Different Techniques of Software Testing
Tags: testing
Published: 2023-10-17 22:54:03

**Boundary value analysis:**

Boundary value analysis is a one of software testing technique which to get test cases around the boundary conditions of given input. It helps to reduce the errors or defects that might occur at or near the edges of the valid input ranges. This technique is especially useful in testing scenarios where the software's behaviour may change drastically near the boundaries.

The primary idea behind boundary value analysis is to test the minimum and maximum values, as well as values just above and below these boundaries. By doing so, you can reduce the issues related to boundary conditions.

For example:
In the Username tab minimum 6 characters and maximum 15 character should be there,

1. Minimum value:
6 --> valid positive test

2. Maximum value:
15 --> valid positive test

3. Minimum value-1 :
5 --> Invalid negative test

4. Maximum value+1:
16 --> Invalid negative test

5. Between:
8 or 10 or 13 --> valid test

6. Zero value:
0 --> Invalid test

**Decision table testing**

Decision table testing is a black-box testing technique used to test systems that have complex business rules or logic. It helps in identifying combinations of inputs that should be tested to ensure proper system behaviour. Decision tables are particularly useful when there are multiple conditions and inputs that can result in different outcomes.

A decision table consists of conditions, actions, and rules. Conditions represent the various factors or inputs that influence the system's behaviour, actions specify what the system should do under different conditions, and rules define the relationships between conditions and corresponding actions.

For Example: 
Consider a book shop and discount on book purchase for customers (Regular/Premium)

Decision Table:
Customer Type	Number of Books	Discount Percentage
Regular	        Less than 5	0%
Regular	        5 to 10	        5%
Regular	        More than 10	10%
Premium	        Less than 5	5%
Premium	        5 to 10	        10%
Premium	        More than 10	10%

In this decision table, we have two conditions (Customer Type and Number of Books) and one action (Discount Percentage). The conditions can take on various values, and the table outlines the relationship between them.

Now, let's create test cases based on this decision table:

Test case 1: Customer Type = Regular, Number of Books = 3
Expected Action: Apply a 0% discount

Test case 2: Customer Type = Premium, Number of Books = 8
Expected Action: Apply a 10% discount

Test case 3: Customer Type = Regular, Number of Books = 15
Expected Action: Apply a 10% discount

Test case 4: Customer Type = Premium, Number of Books = 2
Expected Action: 5% discount

**Use case testing**

Use case testing is a software testing technique that focuses on testing the interactions and flows of a system or application based on its use cases. A use case represents a specific functionality or feature that a system provides to its users. Testing based on use cases helps ensure that the software meets the functional requirements and user expectations.

For Example: 
Consider an online shopping application with various use cases, "Checkout page" for this example.

Test Case 1: Successful Checkout

1.Login as a registered user.
2.Add items to the shopping cart.
3.Click on the "Checkout" button.
4.Confirm cart contents.
5.Select a shipping address.
6.Choose a payment method (e.g., credit card).
7.Process the payment.
8.Verify that the order summary is displayed.
9.Verify that the order is saved in the user's order history.

Test Case 2: Unsuccessful Checkout

1.Login as a registered user.
2.Add items to the shopping cart.
3.Click on the "Checkout" button.
4.Confirm cart contents.
5.Select a shipping address.
6.Choose a payment method (e.g., a fake or invalid credit card).
7.Verify that an error message is displayed.
8.Allow the user to retry the payment.

Test Case 3: Cancelling Checkout

1.Login as a registered user.
2.Add items to the shopping cart.
3.Click on the "Checkout" button.
4.Cancel the checkout process during any step.
5.Verify that the cart is not processed as an order.

**LCSAJ Testing**

Linear code sequence and jump testing is a white box testing and structural method. Which works in a control flow way. Executing the sequence and jump with different conditions. 

This helps in reducing the error related with control flow by Conditions, Loops and branching logic scenarios.

For Example:
School joining children age limit is 3 and above.

age = input(<age of the kid>)
if age < 3;
      print ("No admission")
else;
    print ("Good for admission")

Test case:1 (not satisfy the condition)
Age below 3 - No admission

Test case:2 (satisfy the condition)
Age above 3 - Good for admission

Test case:3 (satisfy the condition with exact value)
Age 3 - Good for admission