What is Continuous Testing?
Continuous testing builds on the automated developer support in
Eclipse to make it even easier to keep your Java code well-tested, if
you have a JUnit test suite. With continuous testing enabled, as you
edit your code, Eclipse runs your tests quietly in the background, and
notifies you if any of them fail or cause errors. It is most useful
in situations where you would already have a test suite while you are
changing code: when performing maintenance, refactoring, or using
test-first development.
Continuous testing builds on features of Eclipse with which you are
already familiar:
- JUnit integration: Test suites run under continuous testing
give you the same information, in the same format, that you already
get from Eclipse's JUnit integration. However, continuous testing
also helps to automate the choice of when to run tests, which tests to
run, and in which order.
- Compile error notification: As soon as you write code that
contains a compilation error, Eclipse highlights the error in the text
and the margin, and creates a task in the Problems table. This makes
it easy both to quickly find out if what you wrote was wrong, and to
step through and fix problems in an orderly fashion. With continuous
testing, you get the same kind of notification when you write or edit
code that causes one of your tests to fail. However, test failures
are different from compile errors in several ways: test failures can
sometimes not easily be tracked to a single line of code, and test
failures also can provide more information, such as a backtrace, than
compile errors.
The continuous tester plug-in also adds functionality to JUnit:
- Test Filtering and Prioritization: By default, JUnit test suites always run in the
same order. With the plug-in, you can specify how to order the tests and
which tests should be run based on previous test results and which files have
changed. New filters and prioritizers can also be easily created and added
to Eclipse.
- Multiple Result Viewing: JUnit now stores the last result of
every test run launch. You can select which result to view from a list
in the JUnit view.