Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-4467

Tests are searched for in modules/testsuite after maven-surefire-plugin upgrade

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • jbossws-cxf-7.3.4.Final, jbossws-cxf-7.3.5.Final, jbossws-cxf-7.3.6.Final, jbossws-cxf-7.3.7.Final
    • jbossws-cxf
    • None

      TL;DR the maven-surefire-plugin is being executed also with modules/testsuite which is type of packaging=pom and have no tests classes.

      Beside being unnecessary, it has also a side effect in recent JBWS versions when trying to execute specific test.
      After recent upgrade of maven-surefire-plugin from 2.22.2 to 3.5.3, which was done transitively via upgrading jbossws-parent from 2.0.0.Final (jboss-parent 39) to 2.0.1.Final (jboss-parent 50), there is a slight change of behavior.

      The usecase is:
      try to run with `mvn install -Dtest=EndorseTestCase`

      with 7.3.3.Final and older, modules/testsuite ignored this -Dtest=EndorseTestCase and the result was:

      [INFO] --- surefire:2.22.2:test (integration-tests) @ jbossws-cxf-testsuite ---
      [INFO] No tests to run.
      [INFO] 
      [INFO] --- surefire:2.22.2:test (forked-integration-tests) @ jbossws-cxf-testsuite ---
      [INFO] No tests to run.
      

      and the build will only fail if child modules of modules/testsuite don't have a matching test class.

      with 7.3.4.Final and newer, surefire search for -Dtest=EndorseTestCase even in this testsuite aggregator module:

      [INFO] --- surefire:3.5.3:test (integration-tests) @ jbossws-cxf-testsuite ---
      [INFO] No tests to run.
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary for JBoss Web Services - Stack CXF Testsuite jakarta 7.3.8-SNAPSHOT:
      [INFO] 
      [INFO] JBoss Web Services - Stack CXF Testsuite jakarta ... FAILURE [  7.601 s]
      [INFO] JBoss Web Services - Stack CXF Specific Tests jakarta SKIPPED
      [INFO] JBoss Web Services - Stack Agnostic Tests jakarta .. SKIPPED
      [INFO] JBoss Web Services - Stack CXF Performance Tests ... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  7.874 s
      [INFO] Finished at: 2026-01-15T23:52:14+01:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.3:test (integration-tests) on project jbossws-cxf-testsuite: No tests matching pattern "EndorseTestCase" were executed! (Set -Dsurefire.failIfNoSpecifiedTests=false to ignore this error.) -> [Help 1]
      

      So the proposal is to make sure surefire is not being executed on parent module modules/testsuite which would fix also the this edge case.

              jbliznak@redhat.com Jan Blizňák
              jbliznak@redhat.com Jan Blizňák
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: