Task

Every student will be assigned two of the following configurable systems and will produce a test suite adequate for specific test requirements:

- Companies
- DesktopSearcher
- GPL
- Notepad
- ZipMe

 

Test Requirements

  1. 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.

  2. 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.

  3. The assertions in the test must both validate the functionality of the methods invoked in the test and checking enabled/disabled behaviors by feature variables accessed during the test execution.

 

Observations:

   *In addition to the source code, each system contains:
    - All needed libraries
    - An example of test
    - A list of methods which access each feature variable
    - All the feature variables have default feature values defined in the class called <SystemName>Variables. 
      If you want to set another value for one of them, then you should do this in the test.
   *Set the feature variable values in the beginning of the test.
   *For the systems which use GUI, you should use a specific API for testing GUI called GUI Fest, 
    here are some related links: 
    - https://code.google.com/p/fest/
    - http://docs.codehaus.org/display/FEST/Getting+Started
    - http://www.javaworld.com/article/2077740/open-source-tools/test-driven-gui-development-with-fest.html
   *Make cohesive tests, i.e., avoid:
    - covering methods not related in the same test
    - making assertions not related in the same test

 

Example

The following figure illustrates the test suite produced in order to cover the test requirements, considering feature variables BFS and SEARCH, for GPL.

 

 

 

 

This test and the GPL source code are available at: GPL.zip