Improving performance

As you apply continuous testing to your own projects, there are two ways in which you may want to improve performance. First, you may want to see feedback from your tests even more quickly. Secondly, you may be concerned that processor load from running your tests will slow down your ability to make forward progress on development. Continuous testing for Eclipse has several experimental new features that address these concerns, detailed below.

Faster loading: hotswapping

Continuous testing can run the tests in a debugging JVM, and keep the JVM running after tests complete. In many cases, when a file changes, it is then possible to "hotswap" the new class definition into the running JVM and re-run the tests without having to start a new JVM. This saves the time required to load a new JVM into memory and load all of the unchanged classes. Depending on your JVM, certain changes (such as adding new methods to an existing class) may prevent hotswapping to occur. In these cases, continuous testing will simply terminate the old JVM and start a new one.

To enable hotswapping:

  1. From the main menu bar, select Window > Preferences, which opens the Preferences dialog.
  2. In the left pane of this dialog, select "Continuous Testing", and check the box for "Enable hot-swapping".

Hotswapping is not currently supported for Eclipse plug-in tests.

Reduced processor load: low-priority execution

In many operating systems, it is possible to request that a command be run at a lower priority, so that it only runs when no other processes require the processor. In Linux, this is accomplished by using the "nice" command. If a particular continuous testing launch configuration is using too much of your CPU, you can enable low-priority execution:
  1. Right-click the project associated with the launch configuration, and select Properties.
  2. Choose "Continuous Testing" from the left pane.
  3. Make sure to resize the dialog so you can see all of the Continuous Testing options.
  4. Check the box marked "Run JUnit in low priority. Prefix command:"
  5. In the text box immediately underneath the box you just checked, type in a prefix command appropriate for your operating system. Below are some systems that the authors are aware of, and the corresponding command for starting low-priority execution. You may need to check your system documentation to find something that will work on your system.

Reduced processor load: remote execution

This is still an experimental feature, and we have not completed documentation for it yet. If you are curious, please Contact the authors.