This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
fix: generate a jUnit file per test suite #907
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Test errorsExpand to view the tests failures
|
v1v
approved these changes
Mar 17, 2021
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Mar 17, 2021
* fix: generate a jUnit file per test suite * chore: move reports setup goal to a common Makefile
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Mar 17, 2021
* fix: generate a jUnit file per test suite * chore: move reports setup goal to a common Makefile
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Mar 17, 2021
* fix: generate a jUnit file per test suite * chore: move reports setup goal to a common Makefile
mdelapenya
added a commit
that referenced
this pull request
Mar 17, 2021
mdelapenya
added a commit
that referenced
this pull request
Mar 17, 2021
mdelapenya
added a commit
that referenced
this pull request
Mar 17, 2021
v1v
added a commit
to v1v/e2e-testing
that referenced
this pull request
Mar 17, 2021
…hings * upstream/master: fix: generate a jUnit file per test suite (elastic#907) chore: rename slack channel for Fleet's nightly build (elastic#899) chore: do not scan 6.8.x branch (elastic#879) chore: bump helm versions (elastic#874)
8 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It creates a Make goal per test suite, so that each of them is able to generate its own jUnit report file. It uses gotestsum's
--junitfile
flag to generate the test report, using test suite name as report file name. Therefore, we are removing theGOTESTSUM_JUNITFILE
environment variable from the script used by Jenkins.Because Jenkins will archive all files under
outputs/TEST-unit-*.xml
, there is no need to update the Jenkinsfile.Why is it important?
The
GOTESTSUM_JUNITFILE
environment variable used in the CI script was the culprit of overriding the report file for multiple test suites, then the last unit test execution was the winner, overriding previous report files. With this PR, we are allowing the devveloper to have both formats: jUnit file and terminal output in the same execution ofgotestsum
.Checklist
make notice
in the proper directory)How to test this PR locally
Run as CI:
Run as Developer:
make -C cli test make -C e2e unit-test
Related issues
Screenshots
The jUnit files are generated in the filesystem:
The test report includes the tests: