OpenLiberty / OpenLiberty/docs

Enhance "traditional" test flow support/tooling

Open
#8,047 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
14
Forks
58
Avg merge
4m
Merged PRs (30d)
35

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the OpenLiberty docs for liberty:dev, -DhotTests, and Surefire/Failsafe reporting, then review the existing guidance for running tests against a live server. Done would be a documented, supported workflow or a clear recommendation; any annotation-based tooling would need a maintainer decision on scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd, documentation, testing
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.