Oct 15, 2008

Running Sharpen tests faster...

As you probably already know :), Sharpen is a tool (developed by db4o) that aims at easing development efforts by translating java source code into C#. This tools make it easier to provide native solutions in either Java/.Net platforms.

While talking about how to run Sharpen test suite in this post I told that I'd show how to improve these tests startup time.

After a long wait, here it is. So let's go.

If you tried to run Sharpen tests you probably noticed that whenever you launch them a new Eclipse instance starts also (with it's full GUI) and this is one of the culprits for these tests to take longer than necessary to run. The good news is that it's (relatively) easy to configure Eclipse to not display any GUI at all (since all feedback will be given through the main Eclipse window).

To do this, once you checkout all required projects from db4o SVN, just Right Click sharpen.ui.tests project and select Run As / Run Configurations menu.
Now, in "Run Configuration" dialog,  right click on "JUnit Plug-in Test" and select New.

If you followed the previous steps, "Run all tests ...." should contain the right value (sharpen.ui.tests). Just make sure that you have the latest JUnit selected on "Test Runner" dropdown.

We are almost there... :)

The next step is to click on "Main" tab (1), then select "Run as Application" checkbox and select "[No Application] - Headless mode" in the dropdown (2) and finally, click "Run" button (3).

That's it :)

Notice that now sharpen test suite starts faster.

Many thanks to a great friend (Rodrigo) for sharing this information with me.

See you.

No comments: