Should we do negative test cases testing by automation. Generally I heard that we can do functional and regression automation. I am doing same. I am using selenium web driver for automation and doing all functional and regression testing using it. But thing is all tests are positive here.

So I would like to know that should we do automation for negative testing or it is better to do it manually? Because I think if we go for automation for negative testing then it will be lot of code to be done..

For Ex: I have register form and field is there called "Password" , Now validations for fields are "Password must be of minimum 6 characters and must contains letter,digit and special character"

So in above case positive automation will be easy as I will test direct by insert valid password , But for negative testing of that field will have lot of cases so should we do automation for that?

Please let me know best way for negative testing. Right now I am preferring manually.

  • You should automate negative tests too, but you may want to keep them separate from positive tests for purposes of smoke testing. – user246 May 4 '15 at 17:32

Your password example is a classic example in favor of automation, once you have the infrastructure for entering a password and detecting rejection adding more cases should be simple and cost effective.

You use the term Negative Testing to describe a type of scenario, but keep in mind that it is functional the same way as any other sunny day scenario, entering a wrong password is something users are allowed to do and not something evil.

Real Negative tests are somewhat more meaningful when used in the code level, for example checking for NULL pointers- this is not something a user of a function should do (unless it is part of normal usage of course)

So, to summarize- you should do negative testing and you should build your automation in such a way that it is not requiring "lot of code to be done"

  • This is what something I was looking for as solution..Thanks a lot for helpful answer. – Helping Hands May 4 '15 at 7:48
  • So we should do negative automation for only those things which end user can do by mistake or intentionally , right? – Helping Hands May 4 '15 at 7:51

It doesn't matter so much what you'll be automating, rather why.

  • Are these negative tests included in your regression sets?
  • Are these tests executed manually every time you run your automated scenarios?
  • Will it eventually save the test team time and resources should it be automated?

Seeing that testing frameworks can usually deal with expected errors, it's perfectly feasible to automate negative tests.


Yes!We should make negative test case be automation testcase.The keypoint is what we can do to make test case be automation.

  1. create many negative case
  2. using less time

The best solution is we can create a framework to automation creating negative test for our application.

  • Welcome to SQA ! I will suggest to keep habit of adding little descriptive answers, which will help others too – NarendraC Aug 12 '16 at 6:11

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.