What is State or Graph based Testing

State Based Testing:-

State Based means change of sate from one state to another.State based Testing is useful to generate the test cases for state machines as it has a dynamic behavior (multiple state) in its system. we Can explain this using state transition diagram.It is a graphic representation of a state machine.

For eg we can take the behavior of mixer grinder. The state transition for this will be like
  1. switch on -- turn towards 1 then 2 then 3 then turn backwards to 2 then 1 then off
  2. switch on - directly turn backwards to 3 then turn towards to off then turn towards 1 then 2 then 3 then turn backwards to 2 then 1 then off
Each represents a state of machine. Like this we can draw state transition diagram. Valid test cases can be generated by:
  • Start from the start state
  • Choose a path that leads to the next state
  • If you encounter an invalid input in a given state, generate an error condition test case
  • Repeat the process till you reach the final state

Graph Based Testing:-

Graph based testing is useful  to represent a transaction or work flows. consider a example of a leave application by an employee.A typical leave application process can be visualized as being made up of the following steps.

1. Employee desires leave
2. He applies leave application form
3. HR verify eligibility for leave
4. If it is eligible manager ensures feasibility
  •  If it is feasible manager approve leave
  •  If it is not feasible manager rejects leave
5.If it is not eligible manager rejects leave

Comments

Post a Comment

Popular posts from this blog

what is Modified Waterfall Model?

what is Prototype Model?

What is User Documentation Testing