kumeel alsmail comp 587. outline the traditional software testing. modeling. model based-testing....

14
Kumeel Alsmail COMP 587

Upload: bruce-crawford

Post on 05-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

Kumeel Alsmail

COMP 587

Page 2: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

Outline

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

Page 3: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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.

Page 4: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

Modeling

“ Is a way of representing the behavior of a system”.

Finite State Machine

Page 5: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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

Page 6: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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.

Page 7: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

Example Königsberg bridge problem (Eukerian)

A Postman’s Problem (a b c b e f g d d )

Page 8: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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 ).

Page 9: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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.

Page 10: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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

Page 11: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

Testing under a Time DeadlineIf 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 gMachine 1 : a b c d f e g Machine 2 : d e g

After using the algorithmMachine 1 : a b c b g Machine 2 : d e f e g

Page 12: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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.

Page 13: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

Example

Page 14: Kumeel Alsmail COMP 587. Outline The traditional software testing. Modeling. Model Based-Testing. Graph Theory. Testing Example. Random Walk. Markov Chain

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.