DEV Community

Himanshu Yadav
Himanshu Yadav

Posted on

Task 2

Boundary value analysis is a software testing technique that focuses on testing values at the boundaries or edges of valid input ranges or conditions. It helps identify potential issues related to the boundaries of acceptable input, as these are often where errors or vulnerabilities are more likely to occur. This technique is commonly used in both functional and non-functional testing.

Suppose you are testing a simple login form for a website that requires a username and password. The requirements for this form are as follows:

Usernames must be between 5 and 15 characters.
Passwords must be at least 8 characters long.

Decision table testing is a black-box testing technique used in software testing to systematically test different combinations of inputs and conditions to ensure that a software application behaves correctly based on various business rules or decision logic. It is particularly useful for testing complex business rules and scenarios with multiple conditions and outcomes.

Here's how decision table testing works:

Identify Business Rules or Conditions: Start by identifying the specific business rules or conditions that the software needs to adhere to. These rules can be related to pricing, eligibility, discounts, approvals, or any other decision-making logic.

Create the Decision Table: Create a decision table that represents all possible combinations of inputs and their corresponding expected outcomes or actions. Each column in the table represents a different input condition or factor, and each row represents a specific combination of input conditions.

Define the Possible Outcomes: For each combination of input conditions, define the expected outcomes or actions that the software should take. These outcomes can be binary (e.g., Yes/No, Approved/Rejected) or more complex (e.g., specific actions or calculations).

Test Scenarios: Generate test scenarios based on the decision table. These scenarios involve selecting specific combinations of input conditions and verifying that the software produces the expected results.

Execute Tests: Execute the test scenarios by inputting the specified conditions into the software and comparing the actual outcomes with the expected outcomes as defined in the decision table.

Analyze Results: Analyze the results of the test scenarios to identify any discrepancies between the actual behavior of the software and the expected outcomes in the decision table. Any inconsistencies or errors should be reported for further investigation and resolution.

Here's a simplified example to illustrate decision table testing:

Scenario: Suppose you are testing an e-commerce website's shopping cart checkout process. The business rules for applying discounts are as follows:

If the total cart value is over 100, apply a 10% discount.
If the user is a premium member, apply an additional 5% discount.
If the user has a coupon code, apply a fixed discount of 20.
You would create a decision table like this:

Condition 1: Cart Value Condition 2: Premium Member Condition 3: Coupon Code Expected Discount Applied
Less than 100 No No No Discount
Less than 100 Yes No 5% Discount
Less than 100 No Yes 20 Discount
Over 100 No No 10% Discount
Over 100 Yes No 15% Discount
Over 100 No Yes 20 Discount
Over 100 Yes Yes 20 Discount
You wuld then create and execute test scenarios based on these combinations to verify that the discounts are correctly applied by the e-commerce website.

Decision table testing helps ensure comprehensive coverage of various combinations of conditions and helps testers identify and validate the software's behavior under different business rule scenarios. It is a structured and effective approach for testing complex decision-based systems.

**Use case testing **is a black-box software testing technique that focuses on validating the functionality of a software application based on its use cases. Use cases represent specific interactions or scenarios that describe how users or actors interact with the system to achieve a particular goal. Use case testing ensures that the software meets the intended user requirements and behaves correctly in various real-world usage scenarios.

Top comments (0)