Added option to only generate HTML/JUnit for failed tests via -f #236
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.
At Grubhub there are CI builds where we run the
XCHTMLReport
against 14000 unit tests, which takes a long time because the app makes repeated calls to the terminal app invoked by external library.package(url: "https://github.com/davidahouse/XCResultKit.git", .upToNextMinor(from: "0.9.2")),
.Exact source: https://github.com/davidahouse/XCResultKit/blob/main/Sources/XCResultKit/XCResultFile.swift#L136
And the build time for this report takes 30 minutes, which is way too long.
This PR makes a high level change to introduce a new parameter
-f
which will ignore reporting on tests that have passed. Only reporting on failures. This reduces the report build time to about 1 minute, and still allows for the report to contain the information that is relevant to a CI build failure.Changes
RenderingArguments
-f
isEmpty
to andcompactMap
Test models to filter those that are empty of any tests. removing noise from the test reportif status == .success && renderingArgs.failingTestsOnly {