Module8_-_Software_Testing_-_Hands_on_Student
Module8_-_Software_Testing_-_Hands_on_Student
Hands On
Testing Process 1: Test Case Design
• Involves designing the test cases (inputs and
outputs) used to test the system
• The goal of test case design is to create a set of tests
that are effective in validation and defect testing
• Test case design approaches:
1. Requirements-based testing
2. Black-Box testing
3. White-Box testing
2021 2
Software Testing Process
3. Test 4. Test
1. Test Cases 2. Test Data
Results Reports
a) Requirement-
b) Black-box c) White-box
based
Login
Customer
Sign up
Identify ONE (1) functional test requirements (TR) from Sign Up use case as illustrated in Figure 1.
Specify the TR with ID and its related statements in the Table 1.
Choose Sign Up test requirements from Table 1, then propose TWO test cases (TC). Specify the TC
with ID, data entered and expected results in the Table 2.
Table 2. Example of Functional Test Cases
+ registerUser()
+ Login()
Next, propose the relevant equivalence classes and boundary values for each attribute of the
Register object in Figure 2. Continue write your answer in Table 3.
Table 3. Equivalence Partition and Input Range
Object class Attributes Equivalence Partition and Input Range
Register UserID 1. Valid: UserID must be character [a-z] only with length between 8-12
characters
2. Invalid 1: UserID not character [a-z] with length between 8-12
characters
3. Invalid 2: UserID is character [a-z] with length not between 8-12
characters
Password
firstName
Activity 4. Design Test Case from selected object
Choose TWO (2) attributes in RegisterUser() method in Figure 2. Propose suitable test cases, then
illustrate the equivalence class and representative boundary values (note for the valid range, split
the test case accordingly) in Table 4.
5
Exit
Activity 5. Draw Flow Graph
Table 5b. Methods registerUser for Register Class
Entity Name Register
Method Name registerUser
Input
Output
Algorithm
1. Write the relevant input, output and algorithm for methods in Table 5b.
2. Draw the flow graph corresponding to algorithm written in Table 5b.
3. Next, demonstrate on how to quantify the cyclomatic complexity for the
flow graph.
Activity 6. Design Test Case using Basis Path
Testing
Propose test cases based on independent path for the flow graph in Activity 5(a) and
write in Table 6. The number of test cases are depends on the number of independent
path that you obtained.
Table 6. Independent Path Based Test Cases
Case No. Independent Path Pass/Fail? Data* for Test Cases Expected Result
TC01 1-2-3-5 Pass UserID = rohayanti True
Password = roha11
TC02 1-2-4-5 Fail UserID = roha False
Password = 9911
Activity 6. Design Test Case using Basis Path
Testing
Propose test cases based on independent path for the flow graph in Activity 5(b) and
write in Table 6. The number of test cases are depends on the number of independent
path that you obtained.
Table 6. Independent Path Based Test Cases
Case No. Independent Path Pass/Fail? Data* for Test Cases Expected Result