Wednesday, November 18, 2015

Decision table vs State transition

Decision table vs State transition



State Transition:


State or behavior of a system change upon interaction with other system/object, hence testing this transition between states of a system or objects is State Transition.

Ex :
Remember the state transition diagrams or sequence diagrams of UML.These two diagrams which are drafted along the HLD are to be referred to identify the objects, theirs states and transitions.
ATM money withdrawal :
User (Object) is validated for authorization and authentication. Change in state i.e. (inactive user is been activated).
check whether the user is activated or not upon valid and invalid A & A.
Advantages:
Very easy way to draft the test cases.
Transition issues which influence the business can be identified.

Disadvantages:
limited impact on business rules and test conditions.
Requires UML to be included in design phase i.e. in HLD.


Decision Tables:

Drafting a table which highlights the conditions between two objects where rows are denoted by one object and columns by another.

Ex:
Z = X + Y, X is cost price of a certain product, Y is the profit. Z is the selling price
Decision Table will be
Test Condition: sum of CP and Profit shall result as SP.
Row = X, Column = Y. both positive and negative permutations are to be considered.
Thus decision table is to be drafted.

Advantages:
In order to optimize the number of test cases required to ensure optimal test coverage these two design techniques are helpful.
Cover both positive and negative aspects of the test conditions.
Objects are tested, hence functionality i.e. behavior can be defect free.
Disadvantages:
Requires UML to be included in design phase i.e. in HLD.
Is not easy to implement initially.

No comments:

Post a Comment