Software Testing
What is Negative Testing? Test cases With Example
Negative Testing Negative Testing is a software testing type used to check the software...
A Decision Table is a tabular representation of inputs versus rules/cases/test conditions. It is a very effective tool used for both complex software testing and requirements management. Decision table helps to check all possible combinations of conditions for testing and testers can also identify missed conditions easily. The conditions are indicated as True(T) and False(F) values.
Decision table testing is a software testing technique used to test system behavior for different input combinations. This is a systematic approach where the different input combinations and their corresponding system behavior (Output) are captured in a tabular form. That is why it is also called as a Cause-Effect table where Cause and effects are captured for better test coverage.
Let's learn with an example.
Let's create a decision table for a login screen.
The condition is simple if the user provides correct username and password the user will be redirected to the homepage. If any of the input is wrong, an error message will be displayed.
Conditions | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
Username (T/F) | F | T | F | T |
Password (T/F) | F | F | T | T |
Output (E/H) | E | E | E | H |
Legend:
Interpretation:
While converting this to test case, we can create 2 scenarios ,
And one from the below scenario
As they essentially test the same rule.
Now consider a dialogue box which will ask the user to upload photo with certain conditions like –
If any of the conditions fails the system will throw corresponding error message stating the issue and if all conditions are met photo will be updated successfully
Let's create the decision table for this case.
Conditions | Case 1 | Case 2 | Case 3 | Case 4 | Case 5 | Case 6 | Case 7 | Case 8 |
Format | .jpg | .jpg | .jpg | .jpg | Not .jpg | Not .jpg | Not .jpg | Not .jpg |
Size | Less than 32kb | Less than 32kb | >= 32kb | >= 32kb | Less than 32kb | Less than 32kb | >= 32kb | >= 32kb |
resolution | 137*177 | Not 137*177 | 137*177 | Not 137*177 | 137*177 | Not 137*177 | 137*177 | Not 137*177 |
Output | Photo uploaded | Error message resolution mismatch | Error message size mismatch | Error message size and resolution mismatch | Error message for format mismatch | Error message format and resolution mismatch | Error message for format and size mismatch | Error message for format, size, and resolution mismatch |
For this condition, we can create 8 different test cases and ensure complete coverage based on the above table.
Decision Table Testing is Important because it helps to test different combinations of conditions and provide better test coverage for complex business logic. When testing the behavior of a large set of inputs where system behaviour differs with each set of input, decision table testing provides good coverage and the representation is simple so it is easy to interpret and use.
In Software Engineering, boundary value and equivalent partition are other similar techniques used to ensure better coverage. They are used if the system shows the same behavior for a large set of inputs. However, in a system where for each set of input values the system behavior is different, boundary value and equivalent partitioning technique are not effective in ensuring good test coverage.
In this case, decision table testing is a good option. This technique can make sure of good coverage, and the representation is simple so that it is easy to interpret and use.
This table can be used as the reference for the requirement and for the functionality development since it is easy to understand and cover all the combinations.
The significance of this technique becomes immediately clear as the number of inputs increases. Number of possible Combinations is given by 2 ^ n , where n is the number of Inputs. For n = 10, which is very common in the web based testing, having big input forms, the number of combinations will be 1024. Obviously, you cannot test all but you will choose a rich sub-set of the possible combinations using decision based testing technique.
The main disadvantage is that when the number of input increases the table will become more complex
Click here if the video is not accessible
Negative Testing Negative Testing is a software testing type used to check the software...
Project Summary This project will put you in a corporate setting. You will be testing a demo...
Data Driven Testing Data Driven Testing is a software testing method in which test data is stored in...
Retesting Retesting is a process to check specific test cases that are found with bug/s in the...
What is LoadRunner? LoadRunner is a Performance Testing tool which was pioneered by Mercury in 1999....
What is Correlation? Correlation, as the name suggests, is a mechanism of defining a relationship between...