Skip to content

Instantly share code, notes, and snippets.

@aslakknutsen
Last active June 24, 2024 01:05
Show Gist options
  • Save aslakknutsen/4520226 to your computer and use it in GitHub Desktop.
Save aslakknutsen/4520226 to your computer and use it in GitHub Desktop.
Configure Surefire to scan specific Dependencies for Test classes to include in the test run. Allows us to create reusable test jars without having to unpacking the jar content to disk and setting up testClassesDirectory configuration http://jira.codehaus.org/browse/SUREFIRE-569
[INFO]
[INFO] --- maven-surefire-plugin:2.14-SNAPSHOT:test (tck-tests) @ arquillian-jbossas-remote-6 ---
[INFO] Surefire report directory: /home/aslak/dev/source/testing/arquillian-container-jbossas/jbossas-remote-6/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.arquillian.tck.container.cdi_1_0.CDIBeanLookupWarTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.866 sec
Running org.arquillian.tck.container.servlet_2_5.MultipleWebContextLookupMultiWarTestCase
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.692 sec
Running org.arquillian.tck.container.servlet_2_5.WebContextLookupWarTestCase
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.866 sec
Running org.arquillian.tck.container.servlet_2_5.MultipleWebContextLookupEarTestCase
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.976 sec
Running org.arquillian.tck.container.servlet_3_0.MultipleWebContextLookupMultiWarTestCase
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.372 sec
Running org.arquillian.tck.container.servlet_3_0.WebContextLookupWarTestCase
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.709 sec
Running org.arquillian.tck.container.servlet_3_0.MultipleWebContextLookupEarTestCase
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.957 sec
Results :
Tests run: 38, Failures: 0, Errors: 0, Skipped: 0
<dependencies>
<dependency>
<groupId>org.arquillian.tck.container</groupId>
<artifactId>arquillian-tck-container</artifactId>
<version>1.0.0.Final-SNAPSHOT</version>
<classifier>tests</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14-SNAPSHOT</version>
<configuration>
<dependenciesToScan>
<dependency>org.arquillian.tck.container:arquillian-tck-container</dependency>
</dependenciesToScan>
</configuration>
</plugin>
</plugins>
</build>
@zhengxle
Copy link

zhengxle commented Jun 21, 2024

Hi, aslakknutsen,

when I configured pom.xml like above, there useless:no testcase was running, are there some errors configured?
image
image
image

@zhengxle
Copy link

zhengxle commented Jun 21, 2024

spark-mxmap-jni-23.02.0-test.jar is junit testsuite class jar

@zhengxle
Copy link

maven-surefire-plugin version cause the problem:surefire-plugin 3.3.0 version not valid , as above show, version 2.22.0 is OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment