quarkus

Quarkus tests not found after update


I updated from 3.17.8 to 3.21.3 using the quarkus update. All went well except my tests now will not run saying "No tests found".

I made a sample test as the only one while debugging this:

  package com.flowt.central;

  import io.quarkus.test.junit.QuarkusTest;
  import org.junit.jupiter.api.Test;

  @QuarkusTest
  public class SampleTest {

    @Test
    public void test1() {
      System.out.println("running test1");
      assert(true);
    }
  }

If I do a mvn clean install I see it is skipping the test:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.flowt.central.SampleTest
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.003 s -- in com.flowt.central.SampleTest
[INFO] 
[INFO] Results:
[INFO] 
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1

If I go back to 3.17.8 it runs. With 3.18.1 and greater it doesn't run - i.e. it shows the test as skipped as above.

I created a new Quarkus app with v 3.21.3. The default test and my sample test both run. I have compared the pom.xml, version numbers etc between the test app and my app and they look the same. I have read the release notes and cannot see anything I need to do.

  <properties>
    <compiler-plugin.version>3.14.0</compiler-plugin.version>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>3.21.3</quarkus.platform.version>
    <skipITs>true</skipITs>
    <surefire-plugin.version>3.5.2</surefire-plugin.version>
</properties>

If I actually use my Quarkus app in DEV mode (as an endpoint for a frontend Vue app) it works fine. It is just the tests that are being skipped.

Any ideas on how to debug this?

Thanks, Murray


Solution

  • Mea culpa.

    I had the following in a dependant jar, left over from attempting to use Cucumber, I think.

    quarkus.test.profile.tags=focus
    

    I removed that, rebuilt that package and now all the tests work.

    FYI.