TTIDE

WP

Integration with IDE

T2 can be called as an API. It means that you can use T2 from a Junit test. Here is an example:

import org.junit.Test;

public class BinarySearchTreeTest {

    @Test
    public void test1() {
        Sequenic.T2.Main.Junit(BinarySearchTree.class.getName() 
                                        + 
                                        " --nmax=20000 --lenexec=7 --violmax=3 --savegoodtr=3") ;
    }

    @Test
    public void test2() ... // perhaps complement with hand crafted tests here

}

Since we can use T2 from Junit tests, you can also use T2 from any IDE that supports testing with Junit. For example I use Sun's Netbeans. This IDE allows me to run Junit tests and browse through their results. If you also install the code coverage plugin then you also have a nice functionality to measure the coverage of your T2 tests; this plugin will even show you which lines of your target class have been covered, and which ones have not been covered. So, you can focus your manual test effort on those which have not been covered.

E.g. to use T2 from Netbeans the steps are simple:

  1. Put T2 jar somewhere. Add this jar to the classpath of your Netbeans project.
  2. Add "-ea" to the JVM option of your project; this turns on assertion checking.
  3. Install coverage plugin (not necessary but highly recommended).

The steps for Eclipse is quite similar. Use the EclEmma? plugin to measure the code coverage of your tests.

That's all. Now write your Junit tests, in the style like the one above. Tell the IDE to switch-on the coverage measuring, then just hit Shift-F6 to run the tests. Watch the results, and inspect the coverage reports. See screen shorts here.

I imagine that the steps needed to use T2 from other IDEs would be quite similar.