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

Mismatch between test summary and tests reported #198

Closed
mrginglymus opened this issue Oct 28, 2020 · 2 comments · Fixed by #199
Closed

Mismatch between test summary and tests reported #198

mrginglymus opened this issue Oct 28, 2020 · 2 comments · Fixed by #199

Comments

@mrginglymus
Copy link
Contributor

Having used the ability to have custom checks name in anger, I spotted what I thought was a missing feature, but actually turns out to be appear to be a bug, possibly on this line:

new JUnitChecksPublisher(action, summary).publishChecks(listener);

as the action here is a merge of all junit invocations in a run, but the summary is only the count of passes/fails in the current invocation of junit.

For example:

stage('first stage') {
    junit 'test1.xml' // contains 1 failure, test_foo
}
stage('second stage') {
    junit 'test2.xml' // contains 2 failures, test_bar and test_baz
}

Will result in a check being published that will claim that there are only two failures, but list all three of test_foo, test_bar and test_baz.

The behaviour that I would find most useful is to only report in the checks the failures in that current invocation; the fix for this looks simple enough as far as I can tell, and I'll try to put together a PR if that's the option that's desirable.

It's also entirely possible I've not understood the code and not spotted the actual cause, but the effect definitely appears to be there:

image

@timja
Copy link
Member

timja commented Oct 29, 2020

Sounds right to me

@jglick
Copy link
Member

jglick commented Nov 17, 2020

only report in the checks the failures in that current invocation

Would it not be preferable to list all the failures and the aggregate count? Why would you want to overwrite a Check with less information? Context: #210 (comment)

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