0% found this document useful (0 votes)
16 views1 page

Evaluating Test Adequacy in Software Testing

The document outlines an assignment for a software testing course, featuring four questions that cover different testing scenarios: online shopping cart validation, ATM PIN verification, a ride booking application, and a university exam grading system. Each question includes specific tasks related to black-box, white-box, and hybrid testing strategies, emphasizing test case design, boundary value analysis, and test adequacy. The assignment aims to assess students' understanding of various testing methodologies and their application in real-world scenarios.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Evaluating Test Adequacy in Software Testing

The document outlines an assignment for a software testing course, featuring four questions that cover different testing scenarios: online shopping cart validation, ATM PIN verification, a ride booking application, and a university exam grading system. Each question includes specific tasks related to black-box, white-box, and hybrid testing strategies, emphasizing test case design, boundary value analysis, and test adequacy. The assignment aims to assess students' understanding of various testing methodologies and their application in real-world scenarios.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CSA3703 - SOFTWARE TESTING


ASSIGNMENT – 2
SL Questions
NO
1 Question 1: Online Shopping Cart Validation (Black-box Approach)
Scenario:
You are testing an e-commerce website’s shopping cart feature that accepts quantity
input for items and updates the total bill accordingly. The cart accepts quantities from
1 to 10.
Tasks:
a. Design test cases using equivalence class partitioning.
b. Apply boundary value analysis for quantity input validation.
c. Suggest random test inputs and justify their selection.
d. Identify any limitations of black-box testing in this scenario.
2 Question 2: ATM PIN Verification Logic (White-box Approach)
Scenario:
You are testing an ATM software that verifies user PIN codes. The logic includes
checks for length, numeric input, and maximum 3 retry attempts.
Tasks:
a. Draw the control flow graph of the PIN verification module.
b. Identify all possible decision paths and use them to derive test cases.
c. Evaluate path coverage and code coverage metrics for your tests.
d. Discuss how test adequacy can be ensured in this situation.
3 Question 3: Ride Booking Application (Hybrid Testing Strategy)
Scenario:
You are part of a QA team for a ride-booking mobile application. The app includes user
location input, car type selection, fare calculation, and ride confirmation.
Tasks:
a. Propose test case design strategies using both black-box and white-box methods.
b. Perform equivalence class partitioning for fare ranges.
c. Create a set of test adequacy criteria for booking confirmation.
d. Describe the importance of path coverage in route optimization logic.
4 Question 4: University Exam Grading System
Scenario:
A university system calculates final grades based on assignments (30%), midterms
(30%), and final exams (40%).
Tasks:
a. Design test cases using boundary value analysis for grade computation.
b. Suggest black-box test cases to check grade category outputs (A, B, C, etc.).
c. Generate white-box test cases using a simplified grading flowchart.
d. Discuss the importance of evaluating test adequacy in this academic system.

Common questions

Powered by AI

Black-box testing does not consider the internal workings of the application; it only tests inputs and outputs. For the shopping cart feature, limitations include the inability to identify hidden errors in the code logic, such as internal processing errors or exceptions that occur beyond the input and output boundary. It cannot evaluate performance or security vulnerabilities from this standpoint because it lacks access to the underlying code .

Test adequacy criteria should cover functionality, performance, and security aspects of booking confirmations. Suggested criteria include: achieving full functional coverage where all booking states and transitions (e.g., pending, confirmed, canceled) are exercised; path coverage to ensure all route and fare calculations are verified; and boundary testing for min/max fare values and load testing under peak usage conditions to ensure performance scalability .

Evaluating test adequacy ensures that the system under test has been subjected to enough scrutiny to validate functionality, performance, and correctness. In a university grading system, inadequacies in test coverage can lead to errors in grade computations, potentially affecting student outcomes. Evaluating test adequacy aids in ensuring that all components have been rigorously tested, reducing the risk of undetected bugs, enhancing the system's reliability, and ensuring fairness and accuracy in grade allocations .

Boundary value analysis involves selecting test cases at the extreme ends of input ranges to identify edge cases. For grading, test cases near critical score boundaries such as inputs where the final assignment component crosses from 29 to 30 (30%), midterm from 29 to 30 (30%), and final exam from 39 to 40 (40%). Additionally, test near the pass/fail boundary, e.g., 59 to 60% to ensure correct grade assignment across those thresholds .

A control flow graph (CFG) represents the paths that can be traversed through a program during its execution. For the ATM PIN verification module, the CFG would include nodes for each condition check (e.g., PIN length, numerical input), decision points (e.g., retry attempts), and paths correspond to true or false branches. Creating CFG is crucial because it allows testers to visually represent and identify all possible execution paths, ensuring thorough testing of the program’s logic, particularly for assessing path and decision coverage metrics .

Hybrid testing strategies combine both black-box and white-box testing techniques, capturing the benefits of user perspective testing and internal logic verification. Benefits include comprehensive test coverage, improved defect detection rates, and validation of both the user interface and backend processing logic. Limitations may include higher resource requirements in terms of time and expertise, complexity in integrating findings from diverse tests, and potential gaps if synchronization between both methods is not effectively managed .

Equivalence class partitioning involves dividing the possible inputs into partitions where the system should handle all inputs similarly based on correctness. For a shopping cart that accepts quantity input from 1 to 10, create equivalence classes such as valid quantities (1-10), below valid range (less than 1), and above valid range (more than 10). Test cases would include selecting one value from each partition, such as testing with values 1, 5, 10 (valid), 0 (below range), and 11 (above range). These tests ensure that the system handles valid inputs correctly and rejects invalid ones appropriately.

Ensuring path and code coverage in the ATM PIN verification module is crucial for verifying that all executable paths and codes are validated to prevent security breaches and ensure reliability in handling user inputs. Achieving this involves designing tests that explore all control flow paths, including valid and invalid inputs, retry sequences, and edge conditions such as maximum attempts reached. Code coverage metrics like statement, branch, and condition coverage can be applied to confirm the thoroughness of the tests .

White-box test cases can be derived by examining the flowchart to identify all decision points, conditions, and logic concerning grade calculation. For the university system, focus should be on individual components (assignments, midterms, final exams) and their weightage. Test cases should address each logical pathway that translates to different combinations of weighted scores, the exact threshold crossing decisions, and exception paths to cover scenarios like a missed component. This ensures code coverage for every decision possible in the flowchart .

Path coverage in route logic ensures that all possible routes (execution sequences) through the application's ride selection and booking process are evaluated. This is crucial for discovering issues with the application's logic that might not be detectable through testing isolated parts. Path coverage helps verify that every route option in the application works correctly, ensuring reliability and efficiency in route selection algorithms and optimizing the user experience by reducing unnecessary fare costs or travel time .

You might also like