0

There is a field named "Project description." And it is not a mandatory field. Users will add their description of their project in that field. Now I am giving input and testing that field.

The Condition is that the field accepts a-z, A-Z, 0-9, and all the special characters.

So my question is: if I only enter special characters in that field, or only digits in that field, will this be considered a negative test case? And the test won't pass?

Or will the test pass as it accepts the digits and special characters in the previous condition?

1
  • By "The Condition" you mean "the only condition"? Commented Jul 7 at 17:56

2 Answers 2

1

If I only enter special character in that field or only digits in that field will this be considered a negative test case? And the test won't pass?

No, this is not a "negative test." As you have stated, the requirements for this field are inclusive of 0-9, a-z, A-Z, chars. If you enter all numbers or all special characters, you are doing a positive test case that satisfies the feature requirements. So, the test passes!

Now, you are likely considering this a "negative" test as "Q@$%#^%#$&&&" doesn't seem like a readable input value. In this case, you are correct.

What is considered a "negative test case" in an input field?

  • Tests that don't map to the written list of requirements. A lot of requirements are written in a positive way, and use cases that are not listed in the requirement may not be coded correctly. This is an argument for Implicit versus Explicit Requirements.
  • User input that isn't considered in the design/code. For example, you input "all blank spaces." If the code isn't stripping spaces, this is a bug. Or, on an "age" input field, accepting negative numbers is a bug! (In fact, I saw this today!)
  • Exercising the input to prompt error messages. This is considered negative due to showing the error message. Users don't necessarily expect error messages. Some users think it's broken if they encounter an error message, so ensure the message is helpful to the user.
  • Destructive tests are another form of negative test cases.
  • Input that is outside the scope of boundary values. For example, if your input field only allows &()-_"' special characters, then any character other than those is outside the boundary value scope.
  • Anything unexpected
  • Blank or missing input data when it's a required field
0

Tf I only enter special character in that field or only digit in that field will this be considered as negative test case?

According to the described condition, these inputs should be accepted. Thus, not a negative test.

And the test won't pass? Or the test will pass as it accepts the digits and special character in the previous condition?

It will depend if the product implements correctly the expected condition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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