Software Testing is imperative for a bug-free application; this can be done manually or even automated. Although automation testing reduces the testing time, manual testing continues to be the most popular method for validating the functionality of software applications. Here, we are explaining the most important manual software testing techniques.
The topics discussed in this article are:
- Black Box Testing Technique
- Boundary Value Analysis (BVA)
- Equivalence Class Partitioning
What are Software Testing Techniques?
Software Testing Techniques are basically certain procedures which help every software development project improve its overall quality and effectiveness. It helps in designing better test cases, which are a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements or works correctly. Different testing techniques are implemented as a part of the testing process to improve the effectiveness of the tests.
Black Box Test Design Technique
Black Box Test Design is defined as a testing technique in which functionality of the Application Under Test (AUT) is tested without looking at the internal code structure, implementation details and knowledge of internal paths of the software. This type of testing is based entirely on software requirements and specifications. In Black Box Testing, we just focus on input and output of the software system without bothering about the inner working of the software. By using this technique, we could save a lot of testing time and get good test case coverage.
Test Techniques are generally categorized into Five:
- Boundary Value Analysis (BVA)
- Equivalence Class Partitioning
- Decision Table based testing
- State Transition
- Error Guessing
This article deals only with Boundary Value Analysis and Equivalence Class Partitioning in detail. The remaining three techniques will be explained in the upcoming articles.
Boundary Value Analysis (BVA):
BVA is another Black Box Test Design Technique, which is used to find the errors at boundaries of input domain (tests the behavior of a program at the input boundaries) rather than finding those errors in the centre of input. So, the basic idea in boundary value testing is to select input variable values at their: minimum, just above the minimum, just below the minimum, a nominal value, just below the maximum, maximum and just above the maximum. That is, for each range, there are two boundaries, the lower boundary (start of the range) and the upper boundary (end of the range) and the boundaries are the beginning and end of each valid partition. We should design test cases which exercise the program functionality at the boundaries, and with values just inside and outside the boundaries. Boundary value analysis is also a part of stress and negative testing.
Suppose, if the input is a set of values between A and B, then design test cases for A, A+1, A-1 and B, B+1, B-1.
Why go with Boundary Value Analysis?
Consider an example where a developer writes code for an amount text field which will accept and transfer values only from 100 to 5000. The test engineer checks it by entering 99 into the amount text field and then clicks on the transfer button. It will show an error message as 99 is an invalid test case, because the boundary values are already set as 100 and 5000. Since 99 is less than 100, the text field will not transfer the amount.
The valid and invalid test cases are listed below.
Valid Test Cases
- Enter the value 100 which is min value.
- Enter the value 101 which is min+1 value.
- Enter the value 4999 which is max-1 value.
- Enter the value 5000 which is max value.
Invalid Test Cases
- Enter the value 99 which is min-1 value.
- Enter the value 5001 which is max+1 value
Equivalence partitioning is also known as “Equivalence Class Partitioning”. In this method, the input domain data is divided into different equivalence data classes – which are generally termed as ‘Valid’ and ‘Invalid’. The inputs to the software or system are divided into groups that are expected to exhibit similar behavior. Thus, it reduces the number of test cases to a finite list of testable test cases covering maximum possibilities.
Example: Suppose the application you are testing accept values in the character limit of 1 – 100 only. Here, there would be three partitions: one valid partition and two invalid partitions.
The valid partition: Between 1 & 100 characters.
The expectation is that the text field would handle all inputs with 1-100 characters, the same way.
The first invalid partition: 0 characters.
When no characters are entered, we’d expect the text field to reject the value.
The second invalid partition: ≥ 101
We’d expect the text field to reject all values greater than or equal to 101 charactersEQUIVALENCE PARTITIONING has been categorized into two parts:
- Pressman Rule.
- Practice Method.
Rule 1: If input is a range of values, then design test cases for one valid and two invalid values.
Rule 2: If input is a set of values, then design test cases for all valid value sets and two invalid values.
Consider any online shopping website, where every product should have a specific product ID and name. Users can search either by using name of the product or by the product ID. Here, you can consider a set of products with product IDs and you want to check for Laptops (valid value).
Rule 3: If input is Boolean, then design test cases for both true and false values.
Consider a sample web page which consists of first name, last name, and email text fields with radio buttons for gender which use Boolean inputs.
If the user clicks on any of the radio buttons, the corresponding value should be set as the input. If the user clicks on a different option, the value of input needs to be updated with the new one (and the previously selected option should be deselected).
Here, the instance of a radio button option being clicked can be treated as TRUE and the instance where none are clicked, as FALSE. Also, two radio buttons should not get selected simultaneously; if so, then it is considered as a bug.
If the input is a range of values, then divide the range into equivalent parts. Then test for all the valid values and ensure that 2 invalid values are being tested for.
If there is deviation in between the range of values, then use Practice Method.
If there is no deviation between the range of values, then use Pressman Rule.
Boundary Value Analysis is better than Equivalence Partitioning as it considers both positive and negative values along with maximum and minimum value. So, when compared with Equivalence Partitioning, Boundary Value Analysis proves to be a better choice in assuring the quality.
- Software testing Techniques allow you to design better test cases. There are five primarily used techniques.
- Boundary value analysis is testing at the boundaries between partitions.
- Equivalent Class Partitioning allows you to divide set of test condition into a partition which should be considered the same.
The remaining techniques will be discussed in the upcoming articles.