Login | Register
My pages Projects Community openCollabNet

mbt
Wiki: All about stop conditions

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

A stop-condition, is a stop criteria for a given generator. It will halt the generation of a test sequence when the given criteria is reached.

REACHED_EDGE

The stop criteria is a named edge. When, during execution, the edge is reached, the test is stopped.

Example

java -jar mbt.jar offline -g RANDOM -s REACHED_EDGE:e_SearchBook -f graphs/UC01.graphml

The example above will generate a random sequence until it reaches the edge e_?SearchBook, and then stop.

REACHED_STATE

The stop criteria is a named vertex. When, during execution, the vertex is reached, the test is stopped.

Example

java -jar mbt.jar offline -g RANDOM -s REACHED_STATE:v_SearchResult -f graphs/UC01.graphml

The example above will generate a random sequence until it reaches the state (vertex) v_?SearchResult, and then stop.

EDGE_COVERAGE

The stop criteria is a percentage number. When, during execution, the percentage of traversed edges is reached, the test is stopped. If an edge is traversed more than one time, it still counts as 1, when calculating the percentage coverage.

Example

java -jar mbt.jar offline -g RANDOM -s EDGE_COVERAGE:90 -f graphs/UC01.graphml

The example above will generate a random sequence until 90% coverage of all edges are reached, and then stop.

STATE_COVERAGE

The stop criteria is a percentage number. When, during execution, the percentage of traversed states is reached, the test is stopped. If vertex is traversed more than one time, it still counts as 1, when calculating the percentage coverage.

Example

java -jar mbt.jar offline -g RANDOM -s STATE_COVERAGE:75 -f graphs/UC01.graphml

The example above will generate a random sequence until 75% coverage of all states (vertices) are reached, and then stop.

TEST_LENGTH

The stop criteria is a number, representing the total numbers of pairs of vertices and edges generated by a generator. For example, if the TEST_LENGTH is 110, the test sequence would be 220 lines long. (including 110 pairs of edges and vertices)

Example

java -jar mbt.jar offline -g RANDOM -s TEST_LENGTH:55 -f graphs/UC01.graphml

The example above will generate a random sequence which will contain 55 pairs of egdes and vertices, and then stop.

TEST_DURATION

The stop criteria is a time, representing the number of seconds that the test generator is allowed to execute.

Example 1

java -jar mbt.jar offline -g RANDOM -s TEST_DURATION:300 -f graphs/UC01.graphml

The example above will generate a random sequence which will run for 300 seconds (5 minutes), and then stop.

REQUIREMENT_COVERAGE

The stop criteria is a percentage number. When, during execution, the percentage of traversed requirements is reached, the test is stopped. If an requirement is traversed more than one time, it still counts as 1, when calculating the percentage coverage.

Example

java -jar mbt.jar offline -g RANDOM -s REQUIREMENT_COVERAGE:95 -f graphs/UC01.graphml

The example above will generate a random sequence until 95% coverage of all requirements are reached, and then stop.

REACHED_REQUIREMENT

The stop criteria is a named requirement. When the requirement is reached, the test is stopped.

Example

java -jar mbt.jar offline -g RANDOM -s "REACHED_REQUIREMENT:UC01 2.3" -f graphs/UC01.graphml

The example above will generate a random sequence until mbt reaches the state containing the requirement UC01 2.3, and then stop.

NEVER

This special stop criteria will never halt the generator.

Example

java -jar mbt.jar offline -g RANDOM -s NEVER -f graphs/UC01.graphml

The example above will generate a random sequence which runs indefinitely.

All about stop conditions (last edited 2009-09-20 18:03:35 -0800 by ?kristiankarl)