Table of Contents

Class SequentialTestCaseAlgorithms

Namespace
Microsoft.Accordant
Assembly
Accordant.Operations.dll
public class SequentialTestCaseAlgorithms
Inheritance
SequentialTestCaseAlgorithms
Inherited Members

Methods

CreateRandomWalk(int, int, int?)

This algorithm generates test cases by performing random walks through the state graph. Each walk starts from the root and randomly selects edges until reaching a terminal state or the maximum walk length. Within a walk, each operation call can only appear once (edges leading to already-used operation calls are excluded). Duplicate test cases across walks are eliminated. This is useful for exploring large state spaces where exhaustive coverage is impractical.

public static SequentialTestCaseAlgorithm CreateRandomWalk(int numberOfWalks = 100, int maxWalkLength = 10, int? seed = null)

Parameters

numberOfWalks int

The number of random walks to perform.

maxWalkLength int

Maximum steps per walk. -1 for unlimited (walks until no edges).

seed int?

Optional random seed for reproducibility. Null uses a random seed.

Returns

SequentialTestCaseAlgorithm

CreateTransitionCoverage(int)

This algorithm generates all possible edge traversals starting from the given node. This maximizes coverage of all possible transitions but can result in a very large number of test cases, therefore the default value of maxSequenceLength is set to 3. It can be passed as -1 to generate all possible edge sequences (the number of all possible edge sequences can be exceedingly large however).

public static SequentialTestCaseAlgorithm CreateTransitionCoverage(int maxSequenceLength = 3)

Parameters

maxSequenceLength int

Returns

SequentialTestCaseAlgorithm

StateCoverage(TestingContext, StateGraphNode)

This algorithm ensures that each reachable state in the state space graph is visited at least once. It does not generate all possible operation call sequences - it only ensures that the set of generated test cases drive the system to each unique reachable state.

public static IList<SequentialTestCase> StateCoverage(TestingContext context, StateGraphNode rootNode)

Parameters

context TestingContext
rootNode StateGraphNode

Returns

IList<SequentialTestCase>