IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Framework.Internal.Builders.PairwiseStrategy Class Reference

PairwiseStrategy creates test cases by combining the parameter data so that all possible pairs of data items are used. More...

+ Inheritance diagram for NUnit.Framework.Internal.Builders.PairwiseStrategy:
+ Collaboration diagram for NUnit.Framework.Internal.Builders.PairwiseStrategy:

Classes

class  FeatureInfo
 FeatureInfo represents coverage of a single value of test function parameter, represented as a pair of indices, Dimension and Feature. In terms of unit testing, Dimension is the index of the test parameter and Feature is the index of the supplied value in that parameter's list of sources.
 
class  FeatureTuple
 A FeatureTuple represents a combination of features, one per test parameter, which should be covered by a test case. In the PairwiseStrategy, we are only trying to cover pairs of features, so the tuples actually may contain only single feature or pair of features, but the algorithm itself works with triplets, quadruples and so on.
 
class  FleaRand
 FleaRand is a pseudo-random number generator developed by Bob Jenkins: http://burtleburtle.net/bob/rand/talksmall.html#flea
 
class  PairwiseTestCaseGenerator
 PairwiseTestCaseGenerator class implements an algorithm which generates a set of test cases which covers all pairs of possible values of test function.
 
class  TestCaseInfo
 TestCase represents a single test case covering a list of features.
 

Public Member Functions

IEnumerable< ITestCaseDataGetTestCases (IEnumerable[] sources)
 Gets the test cases generated by this strategy instance. More...
 

Private Member Functions

List< object >[] CreateValueSet (IEnumerable[] sources)
 
int[] CreateDimensions (List< object >[] valueSet)
 

Detailed Description

PairwiseStrategy creates test cases by combining the parameter data so that all possible pairs of data items are used.

The number of test cases that cover all possible pairs of test function parameters values is significantly less than the number of test cases that cover all possible combination of test function parameters values. And because different studies show that most of software failures are caused by combination of no more than two parameters, pairwise testing can be an effective ways to test the system when it's impossible to test all combinations of parameters.

The PairwiseStrategy code is based on "jenny" tool by Bob Jenkins: http://burtleburtle.net/bob/math/jenny.html

Member Function Documentation

IEnumerable<ITestCaseData> NUnit.Framework.Internal.Builders.PairwiseStrategy.GetTestCases ( IEnumerable[]  sources)
inline

Gets the test cases generated by this strategy instance.

Returns
A set of test cases.

Implements NUnit.Framework.Interfaces.ICombiningStrategy.

List<object> [] NUnit.Framework.Internal.Builders.PairwiseStrategy.CreateValueSet ( IEnumerable[]  sources)
inlineprivate
int [] NUnit.Framework.Internal.Builders.PairwiseStrategy.CreateDimensions ( List< object >[]  valueSet)
inlineprivate

The documentation for this class was generated from the following file: