Skip to content

Enhance "traditional" test flow support/tooling #8047

@Ordiel

Description

@Ordiel

Hi folks!

I am unsure on whether this is a feature request or just an inquiry yet as per my search on the documentation I wasn't able to find what I need.

Context:

OpenLiberty is great and it provides a lot of nice tooling which makes developer life easier (once you get used to it that is) yet at the same time it breaks a lot of the "standards" for traditional maven projects, i.e: running the tests against the live server of the application, to do so it is quite simple, just ./mvnw liberty:dev press enter and voila your test run against a live server of your application you can even do that with a single command by passing the -DhotTests flag.

The "problem" arise when you try to get the test reports (like those of surefire/failsafe) as you would do "traditionally" by running mvn test. That command starts, do its thing and, ends, this is great to add it as a step on your CI/CD pipeline, you just add such a step and when it ends your pipeline knows its time to move to the next step, liberty:dev does not make it as simple, specially since it is unclear when its a good time to stop the application after testing. The way I see it, you would either need to set up a timer or capture the output to find specific strings.

Other frameworks have solved this by creating an annotation that would start the server when the tests are running allowing true integration tests without much hassle, see @HelidonTest and @QuarkusTest, they also provide the benefit of starting the server at a random port, allowing for the same worker to run multiple instances of the project (lets say two MR analysis running in parallel on the same computer) without having the ports conflicting.

I hardly doubt I am the first one facing this issue so recommendations would be nice here, and in case its not maybe document such usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions