Course Process

Specification Based Technique

Specification-based techniques are used where a specification exists, such as the requirements specification or functional specification which forms the basis of the tests while performing system or acceptance testing, When performing component or integration testing, a design document or low-level specification forms the basis of the tests. It is commonly known as Black-box testing. From a test basis, test conditions are identified from where further test cases can be derived. These techniques are applicable to every level of testing activity. Functional and non-functional testing are the part of specification-based testing technique.


Types of Specification Based technique

 i) Equivalence Partitioning

Testing cannot be done with all possible input conditions for validating any thus a testing technique is used which divide the set of inputs into the equal partitions from where further test cases are derived. It is applied at any level of testing. The partition is done under the assumption that the software will treat all the conditions in one partition in the same way. Hence, equivalence partitioning needs to check only one condition from each partition. Thus, if that one condition in partition works then it is assumed that all the conditions in that partition are working as expected and if that one condition in a partition does not work, then it is assumed that none of the conditions in that partition will work


ii) Boundary Value Analysis

Boundary Value Analysis is the test case design technique to test boundary value between partitions. Boundary value is an input value on the border of an equivalence partition. It can be both valid and invalid. It incorporates start-end, lower-upper, maximum-minimum on inside and outside boundaries. This can be applied at all test levels. Boundary Value Analysis (BVA) checks the boundary values of Equivalence Class Partitioning(ECP), hence BVA comes after ECP.


iii) Decision Tables

Decision table testing is done with a different combination of inputs that generates various outputs thereby ensure better coverage for testing. It is also known as the Cause-Effect table. In this type of technique, a table is designed with a set of combinations and conditions and evaluates their resultant action. If there is a lot of combinations, it may not be possible or sensible to test every combination hence it is better to prioritize and test the most important combinations. It is appropriate to test complicated business rules as well as the functionalities which has logical relationships between inputs (if-else logic). The main advantage of the decision table is any complex business flows in the application can be easily converted into the test scenarios & test cases.


iv) State Transition Testing

State Transition Testing is done on the system that has a limited number of states and the state transitions from one state to another. In this model, the system and tests are based. Any system which gives a different output for the same input, depending on pre-condition, is a finite state system. In this type of testing, both positive and negative input is given, and the behavior of the system is observed. This is mainly used when a particular event depends on the events and conditions of past events. This technique helps in understanding the behavior of the system and system behavior. Many unplanned or invalid state’s defects can also be exposed through this.


v) Use Case Testing

Use Case Testing is a functional black-box testing technique that covers the test scenarios to exercise the whole system on each transaction basis from the start point to endpoint. It is widely used to develop acceptance tests. It an important test to ensure the user path is working fine on the system. This type of system is tested on the basis of end to end flow of all the transactions (positive test case)  as well as alternate flows (negative test case) based on the user action and system action. This testing covers the integration defect that is caused by the incorrect interaction between different components.


Example of BVA and EP

Assume, we have to test a field which accepts a value between 20 – 55

Boundary Value Analysis Test Case Example:

Invalid (min-1)

Valid (min, +min, -max, max)

Invalid (max+1)


20, 21, 54, 55


Minimum boundary value is 20

Maximum boundary value is 25

Valid Inputs: 20, 21, 54, 55

Invalid Inputs: 19 and 56

Test case 1: Enter the value 19 (20-1) = Invalid

Test case 2: Enter the value 20 = Valid

Test case 3: Enter the value 21 (20+1) = Invalid


Equivalence Partitioning Test Case Example:



Invalid (max+1)




Valid Input: 20-55

Invalid Input: less than or equal to 19 (<=19), greater than or equal to 56 (>=56)

Valid Class: 20 – 55 = Pick any one input test data from 20 – 55

Invalid Class 1: <=19 = Pick any one input test data less than or equal to 19

Invalid Class 2: >=56 = Pick any one input test data greater than or equal to 56

We have one valid and two invalid conditions here.