Download presentation
Presentation is loading. Please wait.
1
State based or Graph based testing
Graph based testing methods are applicable to generate test cases for state machines such as language translators, workflows, transaction flows and data flows. Example An application validate a number according to the following simple rules 1. A number can start with an optional sign.
2
2. The optional sign can be followed by any number of digits. 3
2. The optional sign can be followed by any number of digits. 3. The digit can be optionally followed by a decimal point, represented by a period. 4. If there is decimal point, then there should be two digits after the decimal 5. No – whether or not it has a decimal point, should be terminated by a blank.
3
DIGIT 3 DIGIT 4 2 Decimal point + 0r - DIGIT DIGIT 5 1 Blank 6
4
State transition table can be used to derive test cases to test valid and invalid numbers.
Start from the start state. Choose a path that leads to the next state Invalid input - generate an error condition test case. Repeat the process until reach the final state.
5
Current state Input Next state 1 Digit 2 + - Blank 6 Decimal point 3 4 5
6
Graph based testing It is useful to represent a transaction or workflows. Example : employee leave application He fills up a leave application, by providing the details like ID no, starting and ending date. Automation system validate whether the employee is eligible for the requisite number of days of leave.
7
3. Verification by manager ( any deadlines during that period) 4
3. Verification by manager ( any deadlines during that period) 4. Final approval/rejection. Graph representation for the above process Employee desires leave HR verification Manager ensure feasibility Reject Leave application form eligible Feasible ineligible Not feasible Approve
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.