Every student will be assigned one configurable system and will produce a test suite adequate for specific test requirements.
Test Requirements
For every method that directly accesses a feature variable, there needs to be a test dynamically covering it. Remark: There need Not be a separate test for every such method.
For every feature variable there needs to be a test that dynamically covers that variable without explicitly setting its value in the test code. Remark: Do not set feature variable values unless absolutely required to satisfy some requirement.
The assertions in a test should validate the functionality of the methods invoked in the test (specifically those that have not already been validated in another test). Remark: If there is a specific behavior enabled by the feature variables covered by the methods, the assertions should check this behavior.
The following figure illustrates the test suite produced in order to cover the test requirements, considering feature variables BFS and SEARCH, for GPL.
Requirement 1: the test suite in the figure above has tests that cover the methods which access BFS and SEARCH feature variables. The following table shows a matrix of methods that access these two feature variables, and marks the tests which cover them. Thus, this requirement is covered, once there are tests that dynamically cover all the methods which access such features. Note that the test_GraphSearch dynamically covers the methods hilighted in red, see the figure above.
Requirement 2: the following table shows a matrix of test cases that dynamically cover at least one occurrence of BFS and SEARCH feature variables without explicitly setting their values in the test code.
Requirement 3: all the tests have assertions that check both the functionality of the methods and specific behaviors enabled by the feature variables covered by the methods. For instance this assertion "assertTrue(((CycleWorkSpace) w).AnyCycles);" checks the state o the variable AnyCycles (means that there is a cycle) which may change according to the value of BFS feature variable.
This test and the GPL source code are available at: GPL.zip