Black Box Testing Techniques- Part 1

Equivalence partitioning, Boundary value analysis

In this tutorial we will discuss about two black box testing techniques which are: Requirements based testing, positive and negative testing. 

Requirements Based

The requirements-based testing (RBT) process gives solution to two major issues:

1. Validating that the requirements are correct, complete, and testable .

2. Designing the required and  sufficient set of test cases from the requirements (SRS document) to ensure that the design and coding are done correctly to meet the expectations. Designing tests should focus on: reducing large number of tests to a reasonable size set, and ensuring that the tests got the right answer.

[visualizer id=”1790″]

Of the bugs found in requirements, roughly half were due to poorly written, confusing, unclear, and incorrect requirements. The remaining half was due to requirements that were completely omitted.

The overall RBT strategy is to test throughout the development life cycle and focus on the quality of the Requirements Specifications. This results to early detection of defects which has been shown to be much less expensive than finding defects during integration testing or later. The RBT process also has a focus on defect prevention, not just defect detection.

 

Cost to Fix Errors

[table id=1 /]

At the requirements phase the cost ratio to fix errors is one to one; at coding it is 10 to one; at production it is from 40 to 1,000 to one. A study by James Martin showed that the root cause of 56 percent of all bugs identified in projects are errors introduced in the requirements phase.

Positive and Negative Testing:

Testing the product to prove that it works as per specifications and expectations . Simply, Testing with valid inputs is called Positive Testing . Application displaying error message when it is expected is also part of positive testing.

Example : Consider the login Page:

  • On entering valid ‘user name’ and ‘Password’ : allow the user to login — Positive testing.
  • If either the user name or password are invalid: then error message has to be displayed — Negative test conditions for Positive testing (because its defined in the specifications).

 

Email login

Negative Testing is performed to prove that the product does not fail when an unexpected input is entered. The main purpose of negative testing is try and break the system. It covers the scenarios which are not designed or coded. Negative Testing would be the product not displaying an error when it should be or displaying an error when it should not be.

Example :

Entering password in ‘User name’ field  and  user name in ‘Password’ field – Error message to displayed  — Negative testing (not defined in specs and this may break the system because, there is a possibility that ‘error message’ may not be displayed).

Positive Testing – Verify known test conditions. Negative Testing – Break the system with unknown test conditions.

Negative Testing requires very good creativity among the tester’s to cover as many unknowns as possible and 100 pc of coverage in negative testing is not practical.

The continuation of the post, we will know about the equivalence class and boundary value techniques.

[su_divider]Project Plan = life cycle model + Project parameters[/su_divider]