Software testing is the process of validating and verifying the Software or Application or Program with the intent of finding the software Bugs. Once the software is developed, it should be tested properly before the system is delivered to the end users.
Software Testing Techniques:
Software testing techniques help in designing better solutions. While exhaustive testing is not possible, the testing techniques help in reducing the total number of test cases to be executed by increasing test coverage. They help to identify test conditions that are otherwise difficult to recognize. Some of the major testing techniques that we can use are as follows,
- It is a software testing that examines the functionality of an application without going deeper into its internal structures.
- Black box testing can entirely be done based on the specifications and software requirements
- In Black box testing, tester tests the application/software by applying different inputs and comparing the output with expected results
- It is also known as Behavioural Testing
Here are types of black box testing,
- Boundary Value Analysis
- Equivalence class portioning
- Decision Table based testing
- State Transition
- Error guessing
White Box Technique
- White box testing is a verification technique where software engineers can use to examine if the code works as expected or not
- It is the strategy testing is based on
- Software’s internal paths
- Design and coding
- Implementation of software under test
- This testing is based on the low-level design document
- It focuses on verifying the flow of inputs and outputs through the application, improving the usability and designs
This type of testing is done to check whether all the statements are executed at least once and to test every line is executed or not with 100 % code coverage. Statement coverage also called as code coverage
This type of testing is done to check every condition in the code is executed or not and to check the 100 % condition coverage
If there is more than one condition to be executed, then we go for decision coverage condition. It executes all the combinations of conditions and outcomes in each decision.
Gray Box Testing
It is a software testing methodology to test the software with partial knowledge of the code in the application—a combination Black and White box testing.
Techniques in Gray box testing:
This testing involves all the variables that exist in the program.
To check whether a change in the previous version of the tested application introduced any new error.
Orthogonal Array testing:
Minimum test cases provide maximum code coverage.
This testing performed on the Historical data of previous defects. Unlike BBT, this testing methodology digs all the code and identifies the defects.
Here is some detailed information about Black Box Testing Technique:
Boundary Value Analysis
- Decision boundaries are places where the behaviour of the system changes
- It is an important technique as it is widely recognised that values on the boundaries cause more errors in the system
- Therefore, the tester should always check the boundaries as if the system fails. It is likely to fail on the decision boundaries
- It can be verified using boundary values, upper boundary values, lower boundary values
- Here is an example,
Equivalence Class Portioning
- Usually it is not possible to perform exhaustive testing when there is large test data either due to lack of time or budgets constraints
- It is very efficient technique used to cut down the number of test data to test the application
- If the given data range is very larger, it can be portioned into equal halves and the boundary value analysis can be applied to write the testcase
- Here is an example,
- According to our example, the test data can be portioned into following classes,
- Now to test the application, tester uses one value from each partition
- tests the application with only three numbers (any one from each partition)
- Each number of class partitions generates the same result. Therefore, the technique is called Equivalence class partitioning
Combined inputs with logical conditions are the Test cases in the decision table. The four areas of the Decision table are the condition stub, condition entries (TC1, TC2 etc), the action stub and the entry. The table’s column is the rule specifying the condition under which the action named in the action stub takes place.
State Transition Technique
The changes in the input conditions change the state of the application under test. This technique allows to test the behaviour of an application. With help of this technique, we can enter various input conditions in sequence. This testing requires both positive as well as negative values to test the system behaviour.
- This technique should be used only to test the application for a limited set of input conditions
- Also, to test under a sequence of events which happens in the application
1.If a user enters a valid password in any of the first three attempts, the user will be able to login successfully.
2.If a user enters the invalid password in the first or second attempt, the user will be prompted to re-enter the password.
When the user enters the password incorrectly in third attempt, an action is taken, and the user will get blocked.
If the user gives the correct PIN number, he or she can access the granted state.
Following table is created based on the diagram above:
When the user enters the correct PIN, the state is transitioned to Access granted. If the user enters an Incorrect PIN, then moved to next state. If he or she does the same thing in third attempt account gets blocked.
It is a software testing technique based on guessing the error which can prevail in the code. Error guessing is an Experience-based technique where the test analyst uses his or her prior experience to guess the defects in the application.
This approach identifies the list of possible errors first and then the analyst writes the test cases to expose those errors. To design test cases based on this technique, the testers can use the prior experience to identify the conditions.