When using the SequenceLengthCoverage plugin, the final test case does not always honor the length specified in the properties file. In particular, using the default test case from Subversion, specifying a length of "2" and all possible test cases (max-number of "0") will exhibit this behavior. The attached file shows the contents of the final test case when using these parameters. Worse, the final two steps are to the same node, indicating a cycle in the graph.
Expected behavior:
The final test case should contain exactly two steps when using a length of "2"
Actual behavior:
The final test case contains 5 steps, the last two of which are duplicates.
Platforms:
This is reproducible on Linux and Windows
Steps to reproduce:
* Build the TestCaseGenerator
* Modify the TestCaseGenerator properties file to use the SequenceLengthCoverage plugin, a length of 2, max-number of 0.
* Run the TestCaseGenerator
* Open t258.tst in the output directory
While the other test cases appear to follow the length restriction of 2, the final test case does not. This bug was discovered by tweaking parameters in the properties file and observing various test cases resulting from the changes.
Discovered & reported by the TestCaseGenerator team (7 members)
Output of the final test case using a length of 2
Correction: The fact that there is a cycle in the final test case is not actually a problem. Regardless, there are still too many steps in the final test case.