Make Java tests run with TestNG

TestNG generates xml reports that Jenkins can use, JUnit does not without
Ant or Maven.

To run the tests, deploy the Jar and run:
    /usr/local/frc/JRE/bin/java -jar wpilibJavaIntegrationTests-0.1.0-SNAPSHOT.jar -junit -testclass edu.wpi.first.wpilibj.test.TestSuite

Change-Id: I9e8a7dcab775f9c5ad1905afa798cd9191e25438
This commit is contained in:
Thomas Clark
2014-08-15 16:21:45 -04:00
parent e523157507
commit 6d89974016

View File

@@ -34,6 +34,11 @@
<artifactId>junit-toolbox</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
</dependency>
</dependencies>
<profiles>
@@ -120,6 +125,12 @@
<version>2.0</version>
<type>jar</type>
</artifactItem>
<artifactItem>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
<type>jar</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
@@ -148,7 +159,7 @@
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>edu.wpi.first.wpilibj.test.TestSuite</mainClass>
<mainClass>org.testng.TestNG</mainClass>
</manifest>
</archive>
</configuration>