Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graph Theory Techniques in Model-Based Testing

Similar presentations


Presentation on theme: "Graph Theory Techniques in Model-Based Testing"— Presentation transcript:

1 Graph Theory Techniques in Model-Based Testing
Kumeel Alsmail COMP 587

2 Outline The traditional software testing. Modeling.
Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain.

3 The Traditional Software Testing.
The TS suffer from pesticide paradox. Pesticide Paradox: Every method you use to prevent or find bugs leaves a residue of subtler bugs against which those methods are ineffectual. Test Scenarios are difficult to change. Solution: Model based-testing.

4 Modeling “ Is a way of representing the behavior of a system”.
Finite State Machine

5 Model Based-Testing Constructing the behavioral models can begin early in the development cycle. Modeling exposes ambiguities in the specification and design of the software. The model embodies behavioral information that can be re-used in future testing, even when the specifications change. The model is easier to update than a suite of individual tests

6 Graph Theory “ Is an area of mathematics that deals with entities (called nodes) and the connections (called links) between the nodes”. Anything that we can represent with node and edges. The behavior of any software can be represent as states and edges.

7 Example Königsberg bridge problem (Eukerian)
A Postman’s Problem (a b c b e f g d d )

8 Example A Street Sweeper’s Problem.
Direct Graph : “ is a graph whose edges have direction and are called arcs”. Solution: ( a b c b f e g d e g ).

9 Software Testing. Testing software behavior in an efficient time.
Represent the software behavior as graph help us find the bugs easily. Diving the software into many graph to represent all the software behavior.

10 Testing Combination of Action
Achieving statement coverage when testing code. Switch cover: the approach of testing combinations of actions. a b c b f e c b g d e f e g bc bf bg

11 Testing under a Time Deadline
If we have several test machines. If we have very limited time to perform the test. The system goes to a rest state after certain input. Each test machine can run a test scenario until rest state occur. a b c b f e g d e g Machine 1 : a b c d f e g Machine 2 : d e g After using the algorithm Machine 1 : a b c b g Machine 2 : d e f e g

12 Random Walk & Most Likely Paths
“From the current node, choose an outgoing link at random, follow that link to the next node and repeat the process”. Most likely Paths: The activities that the user more likely to perform. Assigning a probability to each link. Random walk will follow the link with high probability.

13 Example

14 Conclusion Models are an excellent way to represent and understand system behavior. Models provide an easy way to update tests. Testing an application can be viewed as traversing a path through the graph of the model. Graph theory techniques allow us to use the behavioral information stored in models to generate new and useful tests.


Download ppt "Graph Theory Techniques in Model-Based Testing"

Similar presentations


Ads by Google