Friday, April 10, 2009

Surefire plugin, JUnit annotations and Tapestry 5 PageTester

Tapestry 5 has a nice testing framework which allows you to test your pages and components without the need to fire up a servlet container and do expensive integration tests. If you want to use maven test and junit 4 annotations then you will need to exclude the testng dependency.
<dependency>
  <groupId>org.apache.tapestry</groupId>
  <artifactId>tapestry-test</artifactId>
  <version>${tapestry.version}</version>
  <scope>test</scope>
  <exclusions>
    <exclusion>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
    </exclusion>
  </exclusions>
</dependency>
Without this exclusion, the surefire plugin fails to see your JUnit tests that are annotated with @Test.

0 comments:

Post a Comment