DEV Community

Pavithra
Pavithra

Posted on

Testing Techniques with Examples

1. Boundary Value Analysis:
Boundary value analysis always checks for the Minimum value , Maximum value , Just above maximum value , Just below minimum value and the values accepted between the boundary values.
Example : Warranty period of a vegetable chopper is 6 months from the purchase date. The product was purchased on 01-01-2023.So we have to validate and test the Boundary values for warranty period of the vegetable chopper using Boundary Value Analysis.
Test case 1: Minimum value - Check whether the warranty is active on 01-01-2023 , It should be active
Test case 2: Maximum value - Check whether the warranty is active on 30-06-2023 , It should be active
Test case 3: Just above maximum value - Check whether the warranty is active above 30-06-2023(01-07-2023),It should not be active
Test case 4: Just below minimum value - Check whether the warranty
is active below 01-01-2023(31-12-2022),It should not be active
Test case 5: Nominal value Check whether the warranty is active on 03-04-2023 , It should be active
2. Decision Table testing:
Complex logical relationships are tested using Decision table testing by passing required conditions and required actions. Various logical input combinations are tested in the form of True "T" and False "F".
Example: Testing the login access of an user to the Netflix application to access the video

Image description

3. User Case Testing:
User case testing is a type of an end to end black box functional testing which covers the entire system.
Example:A Food Delivery application is taken under consideration for User Case Testing. Given that 2 Different orders are places by 2 different users ,where user 1 has subscribed for Zero delivery charges benefit and user 2 is a normal user with no added benefits.
Test case 1:User 1 and User 2 should be able to login the food delivery application using their login credentials
Test case 2:Both the users should be able to place the order from the respective restaurants.
Test case 3:User 1 should not be charged for delivery fees and user 2 should be charged for delivery fee.
Test case 4:User 1 and User 2 should be redirected to payment gate way with the respective charges.
Test case 5:User 1 and user 2 should be notified via message for successful completion of order along delivery tracking link.

4. LCSAJ Testing:
Line Code Sequence and Jump testing is a kind of white box testing which majorly focus on the thorough testing of the different control flow paths present in the program.
Example:Finding the greatest of 3 given numbers.n1 is 20, n2 is 30 and n3 is 10.
Below are the code conditions :
step1:Assigning the numbers for variable n1=20,n2=30 and n3=10.
step2:Check n1 > n2 and n1 > n3 , So n1 is the greatest
step3:Check n2 > n1 and n2 > n3 , So n2 is the greatest
step4:Check n3 > n1 and n3 > n2 , So n3 is the greatest
In the above portrayed example complete code coverage testing is done.

Top comments (0)