Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit to capture container outputs with test output #389

Open
neopaf opened this issue Nov 30, 2022 · 1 comment
Open

JUnit to capture container outputs with test output #389

neopaf opened this issue Nov 30, 2022 · 1 comment

Comments

@neopaf
Copy link

neopaf commented Nov 30, 2022

test {
	useJUnitPlatform()
}
dockerCompose.isRequiredBy(test)

dockerCompose {
	captureContainersOutput = true

Currently container output capture flows into main Test Results window:
Снимок экрана 2022-11-30 в 06 21 49

Regretfully test results of a particular test do not contain them:
Снимок экрана 2022-11-30 в 06 22 30

With many tests it would be required to find log messages that happened during a particular case buried inside long logs.

Is it possible to somehow capture container output that was produced during a particular test run with test output, so when I click on a particular test one could see both:

  • logs from call containers during that particular test
  • logs from that particular test code

Any workarounds are welcome!
(And thanks for great plugin!)

@augi
Copy link
Member

augi commented Nov 30, 2022

Hi, this is a very valid feature request, but unfortunately, I don´t have any idea how to implement it 🤔

The test runners IMHO capture stdout/stderr of the tests but the Gradle could run in different JVM process.

Btw. this is solved by-default by the testcontainers project, so you could consider if it were a better choice for you 🙏

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

No branches or pull requests

2 participants