8.3. Automatic JUnit Execution

Rather than explicitly associating each project class with one or more JUnit test classes, you can enable the “Run JUnit Tests Automatically” option in the Sureassert UC Preferences (Window->Preferences->Sureassert UC). Enabling this option causes Sureassert to execute every JUnit test class within any Sureassert-enabled projects in your workspace. Error markers will be added to test classes and/or project classes (depending on the location of the error) wherever any test in any JUnit class fails.

With this option enabled, it is likely that you will have test classes that you do not wish to be executed by Sureassert. The most obvious example is integration tests which require the presence of external resources and which are typically longer-running than unit tests. You can mark any JUnit class with the @NoAutoRun annotation to prevent it from being executed by Sureassert.

Previous Page   |   Next Page   |   Table of Contents

Comments are closed.