Coder Social home page Coder Social logo

jenkinsci / junit-plugin Goto Github PK

View Code? Open in Web Editor NEW
76.0 26.0 333.0 2.35 MB

Allows JUnit-format test results to be published

Home Page: https://plugins.jenkins.io/junit

License: MIT License

Java 92.73% HTML 6.43% CSS 0.02% JavaScript 0.82%
jenkins jenkins-plugin junit hacktoberfest

junit-plugin's Introduction

JUnit Plugin for Jenkins

Jenkins Plugin GitHub release Jenkins Plugin Installs

The JUnit plugin provides a publisher that consumes XML test reports generated during the builds and provides some graphical visualization of the historical test results (see JUnit graph for a sample) as well as a web UI for viewing test reports, tracking failures, and so on. Jenkins understands the JUnit test report XML format (which is also used by TestNG). When this option is configured, Jenkins can provide useful information about test results, such as trends.

The plugin also provides a generic API for other unit-test publisher plugins in Jenkins. This functionality was part of the Jenkins Core until it was split out to this plugin in version in 1.577.

Configuration

The JUnit publisher is configured at the job level by adding a Publish JUnit test result report post build action. The configuration parameters include:

  • Test report XMLs: Specify the path to JUnit XML files in the Ant glob syntax, such as **/build/test-reports/*.xml. Be sure not to include any non-report files into this pattern. You can specify multiple patterns of files separated by commas. The base directory of the fileset is the workspace root.

  • Retain long standard output/error: If checked, any standard output or error from a test suite will be retained in the test results after the build completes. (This refers only to additional messages printed to console, not to a failure stack trace). Such output is always kept if the test failed, but by default lengthy output from passing tests is truncated to save space. Check this option if you need to see every log message from even passing tests, but beware that Jenkins's memory consumption can substantially increase as a result, even if you never look at the test results!

  • Health report amplification factor: The amplification factor to apply to test failures when computing the test result contribution to the build health score. The default factor is 1.0. A factor of 0.0 will disable the test result contribution to build health score, and, as an example, a factor of 0.5 means that 10% of tests failing will score 95% health. The factor is persisted with the build results, so changes will only be reflected in new builds.

  • Allow empty results: If checked, the default behavior of failing a build on missing test result files or empty test results is changed to not affect the status of the build. Please note that this setting make it harder to spot misconfigured jobs or build failures where the test tool does not exit with an error code when not producing test report files.

  • Skip publishing checks: If this option is unchecked, then the plugin automatically publishes the test results to corresponding SCM hosting platforms. For example, if you are using this feature for a GitHub organization project, the warnings will be published to GitHub through the Checks API. If this operation slows down your build, or you don't want to publish the warnings to SCM platforms, you can use this option to deactivate this feature.

  • Checks name: If provided, and publishing checks enabled, the plugin will use this name when publishing results to corresponding SCM hosting platforms. If not, a default of "Test" will be used.

  • Skip marking build unstable: If this option is unchecked, then the plugin will mark the build as unstable when it finds at least 1 test failure. If this option is checked, then the build will still be successful even if there are test failures reported. In any case, the corresponding pipeline node (and stage) will be marked as unstable in case of test failure. In order to enable this, set the property: skipMarkingBuildUnstable to true:

    junit skipMarkingBuildUnstable: true, testResults: 'test-results.xml'
    

Test result checks (for GitHub projects)

⚠️ This feature requires:

If not disabled in the job configuration, this plugin will publish test results to GitHub through GitHub checks API.

In the Details view of each check (example), test results will be displayed.

checks

In order to disable the checks feature, set the property skipPublishingChecks to true:

junit skipPublishingChecks: true, testResults: 'test-results.xml'

The plugin will default to using the stage name or branch of a parallel step prepended by Tests for the checks name. If there are no enclosing stages or branches, Tests will be used. The name can also be overridden by a withChecks step.

The following snippet would publish three checks with the names Tests / Integration, Tests and Integration Tests, respectively.

stage('Integration') {
  junit 'test-results.xml'
}

junit 'more-test-results.xml'

stage('Ignored') {
  withChecks('Integration Tests') {
    junit 'yet-more-test-results.xml'
  }
}

Contributing

Refer to our contribution guidelines

junit-plugin's People

Contributors

abayer avatar aroskuski avatar basil avatar batmat avatar daniel-beck avatar darxriggs avatar dependabot[bot] avatar dwnusbaum avatar greybird avatar gyuvaraj10 avatar jglick avatar jtnord avatar kgyrtkirk avatar kohsuke avatar kutzi avatar mrginglymus avatar notmyfault avatar oleg-nenashev avatar olivergondza avatar renovate[bot] avatar slide avatar soid avatar ssogabe avatar tan9 avatar timja avatar uhafner avatar vlatombe avatar wadeck avatar wolfs avatar zbynek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

junit-plugin's Issues

"From" test class name is wrong for Android Espresso tests

Version report

Jenkins and plugins versions report:

Jenkins 2.319.1
JUnit 1.53
  • What Operating System are you using (both controller, and any agents involved in the problem)?
Windows (probably, it doesn't matter)

Reproduction steps

In Test Case result page there is a wrong "from" class after running Android Espresso tests.

      <p>
        <span style="font-weight:bold">
          <st:out value="${it.fullDisplayName}"/>
        </span>
        <j:if test="${it.suiteResult != null &amp;&amp; it.className != it.suiteResult.name}">
          (from <st:out value="${it.suiteResult.name}"/>)
        </j:if>
      </p>

Results

Expected result:

com.example.SomeCoolTestAAA.someMethodTest (from com.example.SomeCoolTestAAA)

or

com.example.SomeCoolTestAAA.someMethodTest

Actual result:

com.example.SomeCoolTestAAA.someMethodTest (from com.example.SomeCoolTestBBB)

...[truncated 135494 chars]...

I'm not making much sense of the explanation of this option:

Retain long standard output/error: If checked, any standard output or error from a test suite will be retained in the test results after the build completes. (This refers only to additional messages printed to console, not to a failure stack trace). Such output is always kept if the test failed, but by default lengthy output from passing tests is truncated to save space...

Is that saying that that option only applies to passing tests and that failing tests should always have full output and not have ...[truncated 135494 chars]... in the middle of it's Standard Output section in the JUnit results?

IOW, I should never see ...[truncated 135494 chars]... in a failing test result, correct? If correct, then this issue is to report that I do see that even in failing test results.

"failed-to-read" tests make the pipeline UNSTABLE

Hello, we use sbt test for executing tests and generating test-results.

Randomly, junit (1.34) fails to read some of the .xml

Stacktrace
Failed to read test report file /var/jenkins/workspace/xxxxxx/target/test-reports/TEST-xxxxxxx.TaskUtilsTest.xml
org.dom4j.DocumentException: Error on line 18 of document  : Content is not allowed in trailing section.
	at org.dom4j.io.SAXReader.read(SAXReader.java:511)
	at org.dom4j.io.SAXReader.read(SAXReader.java:392)
	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:178)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:369)
	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:299)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:224)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:196)
	at hudson.tasks.junit.TestResult.<init>(TestResult.java:151)
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:143)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3122)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:375)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 32; Content is not allowed in trailing section.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1473)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1431)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
	at org.dom4j.io.SAXReader.read(SAXReader.java:494)
	... 17 more

This makes the step UNSTABLE and leads the entire pipeline state result to UNSTABLE, stopping dev from being able to merge on GitHub (continuous-integration check).

Is there a way to prevent junit from going UNSTABLE? I tried the following and it didn't work:

    post {
        always {
            catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
                junit 'target/test-reports/*.xml'
                archiveArtifacts artifacts: "target/scala-${DEFAULT_SCALA_VERSION}/scoverage-report/**"
                archiveArtifacts artifacts: 'target/test-reports/**'
                step([$class: 'ScoveragePublisher', reportDir: "target/scala-${DEFAULT_SCALA_VERSION}/scoverage-report", reportFile: 'scoverage.xml'])
            }
        }

also

    post {
        always {
            junit allowEmptyResults: true, healthScaleFactor: 0.0, testResults:'target/test-reports/*.xml'
            archiveArtifacts artifacts: "target/scala-${DEFAULT_SCALA_VERSION}/scoverage-report/**"
            archiveArtifacts artifacts: 'target/test-reports/**'
            step([$class: 'ScoveragePublisher', reportDir: "target/scala-${DEFAULT_SCALA_VERSION}/scoverage-report", reportFile: 'scoverage.xml'])
            
        }

unfortunately, the above didn't help.

There is no way to ignore TimestampCheck which cause build to fail

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 18

Reproduction steps

I have my build that builds docker images and runs unit tests (in go). Sometimes, when there are no changes in the code, it uses docker cache, including test reports that are created, and it's totally ok.
But then the build fails on the test archiving step with this error:
"Recording test results
Test reports were found but none of them are new. Did leafNodes run?

For example, /home/tools/jenkins/workspace/../mySdk/build/test-results/testDebugUnitTest/TEST-com.example.ExampleTest.xml is 16 hr old"

It must be a way to ignore this unnecessary timestamp check!

Expected Results

build succeeded

Actual Results

build failed

Anything else?

No response

junit command only reads Jenkins' set environment variables

I'm slightly confused why this happens.

post {
	always {
		junit 'mock-junit-${BUILD_NUMBER}.xml'
	}
}

Above succeeds.

environment {
	FOO = "bar"
}
post {
	always {
		sh '''echo ${FOO} ${BUILD_NUMBER}'''
		sh '''ls|grep mock-junit-${FOO}-${BUILD_NUMBER}.xml'''
		junit 'mock-junit-${FOO}-${BUILD_NUMBER}.xml'
	}
}

In above, junit command fails with the following outputs:

echo ${FOO} ${BUILD_NUMBER} — Shell Script <1s
+ echo bar 44
bar 44

ls|grep mock-junit-${FOO}-${BUILD_NUMBER}.xml — Shell Script <1s
+ ls
+ grep mock-junit-bar-44.xml
mock-junit-bar-44.xml

mock-junit-${FOO}-${BUILD_NUMBER}.xml — Archive JUnit-formatted test results <1s
Recording test results
No test report files were found. Configuration error?
No test report files were found. Configuration error?

The only conclusion I can draw from this is that it cannot read the variable I set myself. Can someone explain what happens here?

Allow old test reports

I'm seeing an incorrect error:

Recording test results
Test reports were found but none of them are new. Did leafNodes run? 

For example, /home/tools/jenkins/workspace/../mySdk/build/test-results/testDebugUnitTest/TEST-com.example.ExampleTest.xml is 16 hr old

This is correct, because I am using Gradle and it has identified that it did not need to execute the tests because it was previously run and no inputs have changed from a previous build

Some of my code:

@Field String jUnitReports = [
        '**/build/test-reports/*.xml',
        '**/build/test-results/**/*.xml',
        '**/build/outputs/androidTest-results/**/*.xml',
        '**/spoon-output/**/junit-reports/*.xml',
        '**/junit-reports/*.xml',
        '**/build/outputs/androidTest-results/**/*.xml',
]
        .join(",")
post {
  always { 
    junit testResults: jUnitReports, allowEmptyResults: true
}

Can a flag be added to allow old test reports and skip this check? Maybe allowOldTestReports: true?

Note: currently using JUnit Plugin version 1.28

Relates to:

Test Result Trend graph not loading

First up: Thanks for the plugin, it's really useful.

I have an error on my freestyle project. I'm using JUnit plugin 1.4.3. The Post Build action specifies our file - fastlane/test_output/TestResults.xml which is picked up by the plugin so Latest Test Results is linked on the Project and Test Result is linked on an individual build.

When I open my project, the Test Result Trend graph constantly shows a loading indicator. The JS console gives the following message:
[Error] Failed to load resource: the server responded with a status of 500 (Server Error) (getBuildTrendModel, line 0)
https://our-jenkins.domain/$stapler/bound/4021f30a-44e0-4128-8ff7-cc82acf190b7/getBuildTrendModel

The Jenkins logs shows this corresponding stack trace:

Nov 11, 2020 11:52:30 AM WARNING org.eclipse.jetty.server.HttpChannel handleException
/$stapler/bound/3051f894-6089-408c-a438-a8bd1b9bfdc9/getBuildTrendModel
org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.235.5.jar!/jenkins/security/FrameOptionsPageDecorator/httpHeaders.jelly:4:63: <st:header> WRITER
	at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:281)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
	at org.kohsuke.stapler.jelly.ScriptInvoker.execute(ScriptInvoker.java:56)
	at org.kohsuke.stapler.jelly.ScriptInvoker.execute(ScriptInvoker.java:43)
	at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:238)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
	at hudson.init.impl.InstallUncaughtExceptionHandler.handleException(InstallUncaughtExceptionHandler.java:67)
	at hudson.init.impl.InstallUncaughtExceptionHandler.lambda$init$0(InstallUncaughtExceptionHandler.java:36)
	at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:77)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:55)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:501)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: WRITER
	at org.eclipse.jetty.server.Response.getOutputStream(Response.java:739)
	at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:142)
	at org.kohsuke.stapler.compression.CompressionServletResponse.activate(CompressionServletResponse.java:61)
	at org.kohsuke.stapler.compression.CompressionFilter.activate(CompressionFilter.java:108)
	at org.kohsuke.stapler.ResponseImpl.getCompressedOutputStream(ResponseImpl.java:302)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.lambda$createOutputStream$0(DefaultScriptInvoker.java:118)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker$LazyOutputStreamSupplier.get(DefaultScriptInvoker.java:107)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker$1.write(DefaultScriptInvoker.java:133)
	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
	at java.io.BufferedWriter.flush(BufferedWriter.java:254)
	at org.dom4j.io.XMLWriter.flush(XMLWriter.java:275)
	at org.apache.commons.jelly.XMLOutput.flush(XMLOutput.java:127)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:271)
	... 74 more
Caused: javax.servlet.ServletException
	at org.kohsuke.stapler.Facet$1.dispatch(Facet.java:247)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
	at hudson.init.impl.InstallUncaughtExceptionHandler.handleException(InstallUncaughtExceptionHandler.java:67)
	at hudson.init.impl.InstallUncaughtExceptionHandler.lambda$init$0(InstallUncaughtExceptionHandler.java:36)
	at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:77)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:55)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:501)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Thread.java:748)

failOnUnstable option

Feature Request

Currently if a test fails the job status will be unstable. Would be great to able to set the job status to fail in these cases.
There can be an option which would fail the job in case of unstable behavior.

NPE after upgrade to 1.53 when surefire report directory is empty

Version report

Jenkins and plugins versions report:

Jenkins: 2.303.1
OS: Linux - 3.10.0-1160.36.2.el7.x86_64
---
ace-editor:1.1
active-directory:2.24
allure-jenkins-plugin:2.29.0
analysis-model-api:10.3.0
ansicolor:1.0.0
ant:1.11
antisamy-markup-formatter:2.1
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
basic-branch-build-strategies:1.3.2
bitbucket:1.1.29
bitbucket-approval-filter:1.0.3
bitbucket-approve:1.0.3
blueocean:1.25.0
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.25.0
blueocean-commons:1.25.0
blueocean-config:1.25.0
blueocean-core-js:1.25.0
blueocean-dashboard:1.25.0
blueocean-display-url:2.4.1
blueocean-events:1.25.0
blueocean-executor-info:1.25.0
blueocean-git-pipeline:1.25.0
blueocean-github-pipeline:1.25.0
blueocean-i18n:1.25.0
blueocean-jira:1.25.0
blueocean-jwt:1.25.0
blueocean-personalization:1.25.0
blueocean-pipeline-api-impl:1.25.0
blueocean-pipeline-editor:1.25.0
blueocean-pipeline-scm-api:1.25.0
blueocean-rest:1.25.0
blueocean-rest-impl:1.25.0
blueocean-web:1.25.0
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.1-1
bouncycastle-api:2.24
branch-api:2.6.5
build-pipeline-plugin:1.5.8
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
chucknorris:1.4
cloudbees-bitbucket-branch-source:2.9.11
cloudbees-folder:6.16
cobertura:1.16
code-coverage-api:1.4.1
command-launcher:1.6
conditional-buildstep:1.4.1
config-autorefresh-plugin:1.0
config-file-provider:3.8.1
credentials:2.6.1
credentials-binding:1.27
custom-tools-plugin:0.8
cvs:2.19
data-tables-api:1.11.2-1
display-url-api:2.3.5
docker-commons:1.17
docker-workflow:1.26
durable-task:1.39
echarts-api:5.1.2-11
email-ext:2.83
extended-choice-parameter:0.82
external-monitor-job:1.7
extra-columns:1.24
favorite:2.3.3
font-awesome-api:5.15.4-1
forensics-api:1.3.0
git:4.8.2
git-client:3.9.0
git-parameter:0.9.13
git-server:1.10
github:1.34.1
github-api:1.123
github-branch-source:2.11.2
greenballs:1.15.1
h2-api:1.4.199
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.25
http_request:1.11
jackson2-api:2.12.4
jacoco:3.3.0
javadoc:1.6
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.0
jira:3.6
jjwt-api:0.11.2-9.c8b45b8bb173
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.52
junit-realtime-test-reporter:0.6
ldap:2.7
lockable-resources:2.11
mailer:1.34
mapdb-api:1.0.9.0
matrix-auth:2.6.8
matrix-project:1.19
maven-plugin:3.12
mercurial:2.15
momentjs:1.1.1
nodejs:1.4.0
okhttp-api:3.14.9
pam-auth:1.6
parameterized-trigger:2.41
pegdown-formatter:1.3
periodicbackup:1.6
permissive-script-security:0.6
pipeline-build-step:2.15
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-maven:3.10.0
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.2
pipeline-model-definition:1.9.2
pipeline-model-extensions:1.9.2
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.2
pipeline-stage-view:2.19
pipeline-utility-steps:2.8.0
plain-credentials:1.7
plugin-util-api:2.4.0
popper-api:1.16.1-2
popper2-api:2.10.1-1
pubsub-light:1.16
rebuild:1.32
resource-disposer:0.16
run-condition:1.5
saferestart:0.3
scm-api:2.6.5
script-security:1.78
snakeyaml-api:1.29.1
sonar:2.13.1
sse-gateway:1.24
ssh-agent:1.23
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
stashNotifier:1.20
structs:1.23
test-results-analyzer:0.3.5
timestamper:1.13
token-macro:2.15
trilead-api:1.0.13
variant:1.4
view-job-filters:2.3
warnings-ng:9.5.0
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:2.46
workflow-basic-steps:2.24
workflow-cps:2.94
workflow-cps-global-lib:2.21
workflow-durable-task-step:2.39
workflow-job:2.41
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
ws-cleanup:0.39
  • What Operating System are you using (both controller, and any agents involved in the problem)?
RHEL 7

Reproduction steps

  • Running a build that produces an empty surefire report directory causes the following NPE (with version 1.53, version 1.52 is just fine):
[ERROR] java.lang.NullPointerException
 	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:150)
 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3331)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
  	at hudson.remoting.Request$2.run(Request.java:376)
 	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 	at java.base/java.lang.Thread.run(Thread.java:834)

Results

Expected result:
Build continues/succeeds as it does with version 1.52

Actual result:
Build aborts with NPE (see above)

How to use with GitHub Enterprise deployment?

I have the basics working with the following in my Jenkinsfile.

        always {
            junit 'test-results-junit.xml'
        }

What isn't working for me is setting up the GitHub part with our GitHub Enterprise (GHE) deployment. GHE plays ball with other things like pull request integration, so I'm just at a loss on what's going wrong. The output I get is

[GitHub Checks] Causes for no suitable publisher found: 
[GitHub Checks] Trying to resolve checks parameters from GitHub SCM...
[GitHub Checks] Job does not use GitHub SCM
[GitHub Checks] Trying to resolve checks parameters from Git SCM...
[GitHub Checks] No supported GitSCM repository URL: [REDACTED]
[Checks API] No suitable checks publisher found.

As you can see below, I'm using the Git SCM, and the given pipeline has pull request integration up and running. How do I make this work?
image

Checks API limit

need to trim the characters we send to checks API (65535) is the limit:

[2020-10-23T15:02:30.961Z] [GitHub Checks] Failed Publishing GitHub checks: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/jenkinsci/jenkins/check-runs {"message":"Invalid request.\n\nOnly 65535 characters are allowed; 569338 were supplied.","documentation_url":"https://docs.github.com/rest/reference/checks#create-a-check-run"}

Needs to be shortened here ish https://github.com/jenkinsci/junit-plugin/blob/master/src/main/java/io/jenkins/plugins/junit/checks/JUnitChecksPublisher.java#L76

Add documentation of how to run tests

This might help get PR's like #124 completed. I came here after getting bitten by that bug, finding that the related issues have been open for 6 years, seeing a link to a PR from a year ago, seeing it went stale after a request to add tests, and thinking "how hard can that be?". Then I spelunked the test folder for a few minutes and...was terrified. Seems pretty ad hoc and it's not obvious where I would even start trying to run them, let alone add new ones. Maybe I'm just not familiar with the ecosystem, but I'm willing to bet I'm not the only one.

Support <flakyFailure> and <flakyError> in junit xml report

Both Maven and Gradle support automatically re-running tests on failure and marking them as flaky if they pass on the retry. For better or worse, flaky tests are a common problem for integration and system tests. Marking such tests as flaky would be very helpful.

The Flaky Test Handler plugin has this functionality and more, but it was last released 5 years ago and not actively maintained. It would be great if the basic reporting functionality was part of the core junit plugin.

Relevant documentation for Maven surefire:

flakyFailure and flakyError elements will be used in the generated xml report to include information of each failing re-runs.
https://maven.apache.org/surefire/maven-surefire-plugin/examples/rerun-failing-tests.html

Similarly, Gradle:

When mergeReruns is enabled, if a test fails but is then retried and succeeds, its failures will be recorded as <flakyFailure> instead of <failure>, within one <testcase>
https://docs.gradle.org/6.8/userguide/java_testing.html#mergereruns

Release 1.30 all test results are duplicated

Since version 1.30 (1.29 still works), all my tests are reported twice, duplicating all test results.
Probably caused by fix JENKINS-48583.

Each suite is reported once, all tests inside it are reported twice (once with the original name and once appended with '_2'; e.g. my.package.name.suite.testCaseOne and my.package.name.suite.testCaseOne_2).

Configured publish report 'fileset includes': **/report/test/TEST-*.xml

I'm also using the Parallel Test Executor plugin to run all my tests in parallel in 6 jobs running on different nodes.

If more information is required please let me know.

Also posted this bug in Jenkins buglist (not sure where to file this issue; was no response in Jenkins ticket).

Pluggable storage

In common CI/CD use-cases a lot of the space is being consumed by test reports. This data is stored within JENKINS_HOME, and the current storage format requires huge overheads when retrieving statistics and, especially, trends. In order to display trends, each report has to be loaded and then processed in-memory.

The main purpose of externalising Test Results is to optimize Jenkins logic by querying the desired data from specialized external storages, e.g. from Document-based databases like Elasticsearch. According to the current plan, JUnit Plugin will be extended in order to support such external storage in its APIs being widely used by test reporting plugins.

Status:

Foundation work started

Prototype API: #110

Continued in: #141

Todo:

  • New trend chart implementation that doesn't rely on loading Runs
  • Rewrite history chart, probably port it to echarts
  • Fix package result loading showing no results when viewing by package
  • Plugin implementing API - most likely a PostgreSQL plugin
  • Benchmarks - show performance improvements for large instances
  • Present at Cloud native Sig
  • Announcement blog on Jenkins.io

Test strategy:

The junit plugin will provide a sample implementation using h2 database that can be used to verify pluggable storage functionality.

The Postgres implementation will be able to use something like test containers and replicate a similar test inside it's own plugin.

Performance tests will be written using the Microbenchmark harness, see https://www.jenkins.io/blog/2019/06/21/performance-testing-jenkins/

Graduation criteria

This API will be released in Beta initially and will likely change as it's developed.

  • At least one production ready pluggable storage implementation
  • Benchmarks showing improvements
  • Blog on Jenkins.io

Build link in history table not working for Test case

We noticed that the links to the builds of the test results history table are not working when you open the history table on a test case.

e.g. While "http://my-jenkins:8080/view/JUnit/job/MyTestJob/lastCompletedBuild/testReport/history/" is working fine.

The link "http://my-jenkins:8080/view/JUnit/job/MyTestJob/lastCompletedBuild/testReport/com.my.test.package/MyTest/myTestMethod/history/" is not functional. It misses the link to the job and only refers to the JENKINS_ROOT url.

jenkins_junit_link_broken

Edit: We're using Jenkins 2.249.2 and junit-plugin 1.42

Pluggable Storage - No Data Shown in Test Result Analyzer Plugin

When Using Pluggable storage then no test data is shown using Test Result Analyzer Plugin(as in pluggable.png), although data is inserted in PostgresSQL.
But when running same tests without pluggable storage, then results are visible using Test Result Analyzer Plugin as in non-pluggable.png

image

Test trend not generated

As i understand test trend is not generated until there is at least one 100% test pass result?
Is this really expected behavior?

If yes, it would be nice if trend chart showed up instantly after first pipeline build even if some tests are failing ...

Publish `H2JUnitTestResultStorage` for conformance to pluggable storage for other plugins to use

Remove/deprecate checksName parameter to junit step

checksName was introduced in #189 as an attempt to address #183, namely

we have multiple invocations of junit (across multiple different pipelines jobs) per PR.
This means that currently, only the last reported test appears.

It suffices to use SuiteResult.getEnclosingBlockNames, which will be set automatically according to stage or parallel branch as of #76, without modifications to the Jenkinsfile.

Avoid upper bounds issue by using most recent plugin util API

Jenkins and plugins versions report

Environment
Jenkins: 2.319.2-SNAPSHOT
OS: Linux - 5.11.0-43-generic
---
PrioritySorter:4.1.0
ace-editor:1.1
adoptopenjdk:1.4
analysis-model-api:10.8.1
ant:1.13
antisamy-markup-formatter:2.6
apache-httpcomponents-client-4-api:4.5.13-1.0
async-http-client:1.9.40.0
authentication-tokens:1.4
authorize-project:1.4.0
badge:1.9
basic-branch-build-strategies:1.3.2
bitbucket:214.v2fd4234d0554
blueocean-commons:1.25.2
blueocean-config:1.25.2
blueocean-core-js:1.25.2
blueocean-dashboard:1.25.2
blueocean-display-url:2.4.1
blueocean-events:1.25.2
blueocean-git-pipeline:1.25.2
blueocean-github-pipeline:1.25.2
blueocean-i18n:1.25.2
blueocean-jwt:1.25.2
blueocean-personalization:1.25.2
blueocean-pipeline-api-impl:1.25.2
blueocean-pipeline-scm-api:1.25.2
blueocean-rest:1.25.2
blueocean-rest-impl:1.25.2
blueocean-web:1.25.2
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-4
bouncycastle-api:2.25
branch-api:2.7.0
build-blocker-plugin:1.7.7
build-name-setter:2.2.0
build-timeout:1.20
buildresult-trigger:0.17
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:737.vdf9dc06105be
cloudbees-folder:6.17
cloudbees-jenkins-advisor:3.3.2
code-coverage-api:2.0.4
command-launcher:1.6
conditional-buildstep:1.4.1
config-file-provider:3.8.2
configuration-as-code:1.55
configurationslicing:1.53-rc412.431f75f10263
conventional-commits:0.10.0
copyartifact:1.46.2
credentials:1055.v1346ba467ba1
credentials-binding:1.27
data-tables-api:1.11.3-6
description-setter:1.10
display-url-api:2.3.5
docker-commons:1.17
docker-java-api:3.1.5.2
docker-workflow:1.26
dtkit-api:3.0.0
durable-task:493.v195aefbb0ff2
echarts-api:5.2.2-2
elastic-axis:1.4.5
email-ext:2.86
envinject:2.4.0
envinject-api:1.8
external-monitor-job:1.7
favorite:2.3.3
font-awesome-api:5.15.4-5
forensics-api:1.7.0
git:4.10.1
git-client:3.11.0
git-forensics:1.3.0
git-parameter:0.9.14
git-server:1.10
git-userContent:1.4
gitea:1.4.1
github:1.34.1
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.4
github-scm-filter-aged-refs:0.2.0
github-scm-trait-commit-skip:0.4.0
gitlab-api:1.0.6
gitlab-branch-source:1.5.9
gitlab-plugin:1.5.26
groovy-postbuild:2.5
h2-api:1.4.199
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.28
implied-labels:0.9-rc50.3ad4692986b8
jackson2-api:2.13.1-244.v773c36c5b330
jacoco:3.3.1
javadoc:1.6
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.2
jira:3.6
jjwt-api:0.11.2-9.c8b45b8bb173
jmh-report:0.9.0
job-dsl:1.78.3
jquery:1.12.4-1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
junit-realtime-test-reporter:72.v203572adb123
label-verifier:1.4
ldap:2.7
leastload:3.0.0
locale:1.4
lockable-resources:2.13
log-parser:2.2
mailer:1.34
mapdb-api:1.0.9.0
matrix-auth:3.0
matrix-project:1.19
maven-plugin:3.16
mercurial:2.16
metrics:4.0.2.8
momentjs:1.1.1
monitoring:1.90.0
naginator:1.18.1
nodelabelparameter:1.10.3
okhttp-api:4.9.3-105.vb96869f8ac3a
oracle-cloud-infrastructure-compute:1.0.15
pam-auth:1.6.1
parallel-test-executor:1.13
parameterized-trigger:2.43
pipeline-build-step:2.15
pipeline-github-lib:1.0
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-graph-view:50.v3a3382d48896
pipeline-input-step:427.va6441fa17010
pipeline-maven:3.10.0
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.3
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.20
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.20
pipeline-utility-steps:2.11.0
plain-credentials:1.7
platformlabeler:1149.v1f78b2a3c1de
plugin-util-api:2.10.0
pollscm:1.3.1
popper-api:1.16.1-2
popper2-api:2.11.0-1
preSCMbuildstep:0.3
prism-api:1.25.0-1
promoted-builds:3.11
pubsub-light:1.16
resource-disposer:0.17
run-condition:1.5
schedule-build:178.v32999348869c
scm-api:2.6.5
script-security:1118.vba21ca2e3286
snakeyaml-api:1.29.1
sse-gateway:1.24
ssh-agent:1.23
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:308.v852b473a2b8c
subversion:2.15.1
support-core:2.79
swarm:3.29
testng-plugin:554.va4a552116332
text-finder:1.17
throttle-concurrents:2.6
timestamper:1.15
token-macro:267.vcdaea6462991
trilead-api:1.0.13
variant:1.4
versioncolumn:2.2
view-job-filters:2.3
warnings-ng:9.10.2
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:1108.v57edf648f5d4
workflow-basic-steps:2.24
workflow-cps:2648.va9433432b33c
workflow-cps-global-lib:552.vd9cc05b8a2e1
workflow-durable-task-step:1112.vda00e6febcc1
workflow-job:1145.v7f2433caa07f
workflow-multibranch:696.v52535c46f4c9
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:804.vba10a18a1476
ws-cleanup:0.40
xshell:0.10
xunit:3.0.5

What Operating System are you using (both controller, and any agents involved in the problem)?

Debian 11 as hosted in the Docker image for jenkins/jenkins:2.319.1

Reproduction steps

  1. Updating to most recent 2.289.x plugin bom in a plugin will report the javax-annotation API upper bounds error (as seen in git plugin PR 11996
  2. Updating to the most recent plugin util in junit plugin will avoid that issue

Expected Results

Would like to not need the exclusion to prevent the upper bounds error

Actual Results

Exclusion is sometimes needed to avoid the upper bounds error

Anything else?

Would need a change in the plugin bom, since this plugin receives its version from the plugin bom.

NullPointerException if top level <testsuite> element does not contain a `name`, and the testcase element does not contain a `classname`

Version report

Jenkins and plugins versions report:

click to expand jenkins + plugins versions report
Jenkins: 2.320
OS: Linux - 4.15.0-147-generic
---
ace-editor:1.1
ant:1.12
antisamy-markup-formatter:2.4
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
blueocean:1.25.1
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.25.1
blueocean-commons:1.25.1
blueocean-config:1.25.1
blueocean-core-js:1.25.1
blueocean-dashboard:1.25.1
blueocean-display-url:2.4.1
blueocean-events:1.25.1
blueocean-git-pipeline:1.25.1
blueocean-github-pipeline:1.25.1
blueocean-i18n:1.25.1
blueocean-jira:1.25.1
blueocean-jwt:1.25.1
blueocean-personalization:1.25.1
blueocean-pipeline-api-impl:1.25.1
blueocean-pipeline-editor:1.25.1
blueocean-pipeline-scm-api:1.25.1
blueocean-rest:1.25.1
blueocean-rest-impl:1.25.1
blueocean-web:1.25.1
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-1
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
build-user-vars-plugin:1.8
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:2.9.11
cloudbees-folder:6.16
command-launcher:1.6
conditional-buildstep:1.4.1
credentials:2.6.2
credentials-binding:1.27
display-url-api:2.3.5
docker-commons:1.17
docker-workflow:1.26
durable-task:1.39
echarts-api:5.2.2-1
email-ext:2.84
external-monitor-job:1.7
favorite:2.3.3
font-awesome-api:5.15.4-1
git:4.10.0
git-client:3.10.0
git-server:1.10
github:1.34.1
github-api:1.133
github-branch-source:2.11.3
google-login:1.6
gradle:1.37.1
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.27
jackson2-api:2.13.0-230.v59243c64b0a5
javadoc:1.6
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.1
jira:3.6
jjwt-api:0.11.2-9.c8b45b8bb173
job-dsl:1.78.1
job-restrictions:0.8
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
ldap:2.7
lockable-resources:2.12
mailer:1.34
mapdb-api:1.0.9.0
matrix-auth:2.6.8
matrix-project:1.19
maven-plugin:3.15.1
mercurial:2.15
momentjs:1.1.1
oauth-credentials:0.5
okhttp-api:4.9.2-20211102
pam-auth:1.6.1
parameterized-scheduler:1.0
parameterized-trigger:2.41
permissive-script-security:0.7
pipeline-build-step:2.15
pipeline-github-lib:1.0
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.2
pipeline-model-definition:1.9.2
pipeline-model-extensions:1.9.2
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.2
pipeline-stage-view:2.19
pipeline-utility-steps:2.10.0
plain-credentials:1.7
plugin-util-api:2.5.1
popper-api:1.16.1-2
popper2-api:2.10.2-1
promoted-builds:3.10
pubsub-light:1.16
resource-disposer:0.16
run-condition:1.5
saml:2.0.9
scm-api:2.6.5
script-security:1.78
slack:2.48
snakeyaml-api:1.29.1
sse-gateway:1.24
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:1.23
subversion:2.15.1
throttle-concurrents:2.4
timestamper:1.13
token-macro:267.vcdaea6462991
trilead-api:1.0.13
variant:1.4
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:2.47
workflow-basic-steps:2.24
workflow-cps:2633.v6baeedc13805
workflow-cps-global-lib:545.v7b28cce323cf
workflow-durable-task-step:1097.veac1aacfbda8
workflow-job:2.42
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
ws-cleanup:0.39
  • What Operating System are you using (both controller, and any agents involved in the problem)?
Linux (ubuntu 18.04), docker pipeline job

Reproduction steps

  • Create a junit.xml file that looks something like (probably malformed/definitely missing attributes, but it's what I'm getting from the software I'm using, and circleci seems happy with it)
<?xml version="1.0" encoding="UTF-8"?>
<testsuite id="815305" tests="9" failures="0">
  <testcase id="11829887" name="[debug] test 1" assertions="2" time="181">
  </testcase>
  <testcase id="11845586" name="[debug] test 2" assertions="1" time="186">
  </testcase>
  <testcase id="11849855" name="[debug] test 3" assertions="2" time="203">
  </testcase>
</testsuite>
  • Try to add this with a pipeline script step:
junit testResults: 'junit.xml', allowEmptyResults: true

Results

Expected result:

It to work properly/not fail.

Actual result:

image

[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.NullPointerException
	at hudson.tasks.junit.CaseResult.getPackageName(CaseResult.java:399)
	at hudson.tasks.junit.TestResult.tally(TestResult.java:795)
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:145)
	at hudson.FilePath.act(FilePath.java:1165)
	at hudson.FilePath.act(FilePath.java:1148)
	at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:107)
	at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:153)
	at hudson.tasks.junit.JUnitResultArchiver.parseAndSummarize(JUnitResultArchiver.java:247)
	at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:63)
	at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:29)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

Probable cause/solution:

It looks like there's a null check around the name attribute in SuiteResult.java:

String name = suite.attributeValue("name");
if (name == null)
// some user reported that name is null in their environment.
// see http://www.nabble.com/Unexpected-Null-Pointer-Exception-in-Hudson-1.131-tf4314802.html
name = '(' + xmlReport.getName() + ')';
else {
String pkg = suite.attributeValue("package");
if (pkg != null && pkg.length() > 0) name = pkg + '.' + name;
}
this.name = TestObject.safe(name);

But a little further down, the name attribute is assigned to the classname of the CaseResult, without checking if it's null first, which is what I think eventually blows up:

String classname = e.attributeValue("classname");
if (classname == null) {
classname = suite.attributeValue("name");
}

Probably that second instance should use this.name(or the local name directly) instead of suite.attributeValue("name").

Test view table has broken dropdowns

Jenkins and plugins versions report

Jenkins 2.332, JUnit plugin 1.53

What Operating System are you using (both controller, and any agents involved in the problem)?

OS: Linux - 3.10.0-1160.45.1.el7.x86_64

Reproduction steps

  1. Install the JUnit plugin
  2. Archive tests for a project that has JUnit tests
  3. Head to the /testReport/ tab of a build

Expected Results

I am not sure which kind of information used to be displayed here, maybe it would make sense to remove the drop down button overall to avoid confusion.

Actual Results

All tests have a non working dropdown. The same applies to the /testReport/history/ tab.

Anything else?

No response

Either don't fail or retry publishing checks results

Saw today:

[2021-10-07T11:29:57.037Z] Could not fetch revision from repository: org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator::https://api.github.com::HMCTS::document-management-store-app and branch: PR-1138

java.lang.IllegalStateException: Could not fetch revision from repository: org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator::https://api.github.com::HMCTS::document-management-store-app and branch: PR-1138

While publishing to GitHub checks

Full stacktrace:

12:29:59  hudson.remoting.ProxyException: java.io.FileNotFoundException: https://api.github.com/repos/hmcts/document-management-store-app/pulls/1138
12:29:59  	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getInputStream(ObsoleteUrlFactory.java:490)
12:29:59  	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getInputStream(ObsoleteUrlFactory.java:1204)
12:29:59  	at org.kohsuke.github.GitHubHttpUrlConnectionClient$HttpURLConnectionResponseInfo.bodyStream(GitHubHttpUrlConnectionClient.java:196)
12:29:59  	at org.kohsuke.github.GitHubResponse$ResponseInfo.getBodyAsString(GitHubResponse.java:314)
12:29:59  	at org.kohsuke.github.GitHubResponse.parseBody(GitHubResponse.java:92)
12:29:59  	at org.kohsuke.github.Requester.lambda$fetch$1(Requester.java:76)
12:29:59  	at org.kohsuke.github.GitHubClient.createResponse(GitHubClient.java:455)
12:29:59  	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:406)
12:29:59  Caused: hudson.remoting.ProxyException: org.kohsuke.github.GHFileNotFoundException: https://api.github.com/repos/hmcts/document-management-store-app/pulls/1138 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/pulls#get-a-pull-request"}
12:29:59  	at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:486)
12:29:59  	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
12:29:59  	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
12:29:59  	at org.kohsuke.github.Requester.fetch(Requester.java:76)
12:29:59  	at org.kohsuke.github.GHRepository.getPullRequest(GHRepository.java:1406)
12:29:59  	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1626)
12:29:59  	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
12:29:59  	at io.jenkins.plugins.checks.github.SCMFacade.findRevision(SCMFacade.java:156)
12:29:59  Caused: hudson.remoting.ProxyException: java.lang.IllegalStateException: Could not fetch revision from repository: org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator::https://api.github.com::HMCTS::document-management-store-app and branch: PR-1138
12:29:59  	at io.jenkins.plugins.checks.github.SCMFacade.findRevision(SCMFacade.java:159)
12:29:59  	at io.jenkins.plugins.checks.github.GitHubSCMSourceChecksContext.resolveHeadSha(GitHubSCMSourceChecksContext.java:131)
12:29:59  	at io.jenkins.plugins.checks.github.GitHubSCMSourceChecksContext.<init>(GitHubSCMSourceChecksContext.java:46)
12:29:59  	at io.jenkins.plugins.checks.github.GitHubSCMSourceChecksContext.fromRun(GitHubSCMSourceChecksContext.java:24)
12:29:59  	at io.jenkins.plugins.checks.github.GitHubChecksPublisherFactory.createPublisher(GitHubChecksPublisherFactory.java:42)
12:29:59  	at io.jenkins.plugins.checks.api.ChecksPublisherFactory.lambda$fromRun$0(ChecksPublisherFactory.java:89)
12:29:59  	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
12:29:59  	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
12:29:59  	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
12:29:59  	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
12:29:59  	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
12:29:59  	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
12:29:59  	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
12:29:59  	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
12:29:59  	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
12:29:59  	at io.jenkins.plugins.checks.api.ChecksPublisherFactory.fromRun(ChecksPublisherFactory.java:92)
12:29:59  	at io.jenkins.plugins.checks.api.ChecksPublisherFactory.fromRun(ChecksPublisherFactory.java:69)
12:29:59  	at io.jenkins.plugins.junit.checks.JUnitChecksPublisher.publishChecks(JUnitChecksPublisher.java:41)
12:29:59  	at hudson.tasks.junit.JUnitResultArchiver.parseAndSummarize(JUnitResultArchiver.java:303)
12:29:59  	at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:63)
12:29:59  	at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:29)
12:29:59  	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
12:29:59  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
12:29:59  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
12:29:59  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
12:29:59  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
12:29:59  	at java.base/java.lang.Thread.run(Thread.java:834)

cc @XiongKezhi

MissingFieldException 'checksName' for Freestyle project

After upgrading JUnit plugin to 1.44 Jenkins warns of unreadable data for freestyle projects that use publish JUnit results.

Project type: hudson.model.FreeStyleBuild
Error: MissingFieldException: No field 'checksName' found in class 'hudson.tasks.junit.TestResultAction

Since I don't use any custom names I chose to discard the old data. The same day, I upgraded JUnit to 1.45. Unrelated but I mention this just in case, I was finally able to upgrade Jenkins past 2.263 (couldn't due to the div vs tables change).

This morning, the unreadable data messages are shown again. This time, shown using Jenkins 2.269 formatting.

Project type:
Error: MissingFieldException: Field not found in class. ---- Debugging information ---- message : Field not found in class. field : hudson.tasks.junit.TestResultAction.checksName

I clicked "Discard Unreadable Data". Is this going to continue to happen every day?

Despite of a failed test sometimes the junit upload does not trigger the post/unstable action

Version report

Jenkins and plugins versions report:

Jenkins: 2.289.3
OS: Windows Server 2016 - 10.0

ace-editor:1.1
active-directory:2.25
allure-jenkins-plugin:2.29.0
antisamy-markup-formatter:2.5
apache-httpcomponents-client-4-api:4.5.13-1.0
artifact-repository:1.3.0
authentication-tokens:1.4
blueocean:1.25.2
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.25.2
blueocean-commons:1.25.2
blueocean-config:1.25.2
blueocean-core-js:1.25.2
blueocean-dashboard:1.25.2
blueocean-display-url:2.4.1
blueocean-events:1.25.2
blueocean-git-pipeline:1.25.2
blueocean-github-pipeline:1.25.2
blueocean-i18n:1.25.2
blueocean-jwt:1.25.2
blueocean-personalization:1.25.2
blueocean-pipeline-api-impl:1.25.2
blueocean-pipeline-editor:1.25.2
blueocean-pipeline-scm-api:1.25.2
blueocean-promote-link:1.4.2
blueocean-rest:1.25.2
blueocean-rest-impl:1.25.2
blueocean-web:1.25.2
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-3
bouncycastle-api:2.20
branch-api:2.7.0
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:734.v2f848c5e6ea2
cloudbees-folder:6.16
command-launcher:1.2
credentials:2.6.1
credentials-binding:1.27
display-url-api:2.3.5
docker-commons:1.17
docker-workflow:1.26
durable-task:493.v195aefbb0ff2
echarts-api:5.2.2-1
email-ext:2.85
embeddable-build-status:2.0.3
external-monitor-job:1.7
favorite:2.3.3
font-awesome-api:5.15.4-4
git:4.10.0
git-client:3.10.0
git-server:1.10
github:1.34.1
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.3
gradle:1.37.1
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.28
http_request:1.12
jackson2-api:2.13.0-230.v59243c64b0a5
jaxb:2.3.0
jdk-tool:1.0
jenkins-design-language:1.25.2
jjwt-api:0.11.2-9.c8b45b8bb173
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
lockable-resources:2.12
mailer:1.34
matrix-auth:2.6.9
matrix-project:1.19
momentjs:1.1.1
monitoring:1.88.0
nunit:0.27
okhttp-api:4.9.3-105.vb96869f8ac3a
pipeline-build-step:2.15
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.3
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.19
pipeline-utility-steps:2.11.0
plain-credentials:1.7
plugin-util-api:2.6.0
popper-api:1.16.1-2
popper2-api:2.10.2-1
pubsub-light:1.16
rocketchatnotifier:1.4.10
scm-api:2.6.5
script-security:1.78
snakeyaml-api:1.29.1
sse-gateway:1.24
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:308.v852b473a2b8c
test-results-analyzer:0.3.5
tfs:5.157.1
thinBackup:1.10
timestamper:1.15
token-macro:267.vcdaea6462991
trilead-api:1.0.13
variant:1.4
versioncolumn:2.2
workflow-aggregator:2.6
workflow-api:2.47
workflow-basic-steps:2.24
workflow-cps:2640.v00e79c8113de
workflow-cps-global-lib:2.21
workflow-durable-task-step:2.40
workflow-job:2.42
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8

Window Server 2016 (controller), Server 2019 (agents)

Reproduction steps

pipeline {
agent {
label 'master'
}
options {
skipStagesAfterUnstable()
}
stages {
parallel {
stage('Stage with Problem') {
agent { label "some-agent" }
steps {
echo "Write some xxx.junit.xml"
}
post {
always {
junit skipPublishingChecks: true, testResults: '**/*.junit.xml', allowEmptyResults: true
}
success {
}
unstable {
echo "Stage unstable"
}
failure {
echo "Stage failure"
}
aborted {
echo "Stage aborted"
}
}
}
stage('Other stage') {
agent { label "some-agent" }
steps {
echo "No Problem detected"
}
}
}
}
stage('Success action') {
steps {
echo "Copy some File"
}
}
}
post {
always {
}
success {
}
unstable {
}
failure {
}
}
}

Results

Expected result:

If junit logs any test as failed, this should get hit always
post / unstable {
echo "Stage unstable"
}

junit.txt

Actual result:
post / unstable is not hit, but stage('Succes action') is. Build (testReport) these errors ar reported. The failing stage is marked as instable, the build is marked as instable, but still the stage('Success Action') gets trigged. But the post/unstable ist not hit.

It looks like this code (german) ist triggered:
[2021-12-05T15:00:57.064Z] Zeichne Testergebnisse auf.
[2021-12-05T15:00:57.078Z] Testergebnisberichte enthalten keine Testergebnisse.
[2021-12-05T15:00:57.079Z] Keine JUnit-Testergebnisse gefunden. Liegt vielleicht ein Konfigurationsfehler vor?

Implement `getResultByNodes` in pluggable storage API

What feature do you want to see added?

public TestResult getResultByNodes(@NonNull List<String> nodeIds) {

It was implemented in the tests of junit-realtime-test-reporter-plugin in:

jenkinsci/junit-realtime-test-reporter-plugin#36

https://github.com/dcendents/junit-realtime-test-reporter-plugin/blob/1af2f977de6a9cff6f085d0a41201b13960e7f5d/src/test/java/org/jenkinsci/plugins/junitrealtimetestreporter/storage/H2JunitTestResultStorage.java#L613

We need to implement it in the tests here and add coverage and then implement it in junit-sql-storage-plugin

Upstream changes

No response

How to parse single testResult?

I'd like to parse single testResult from junit tests and send simple summary via instant messenger.
Is there any way to do this directly from Jenkinsfile or via Jenkins' REST API? For example:

Tests execution failed (2/89 tests failed)

I don't any idea how to get into results.

Mismatch between test summary and tests reported

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

xUnit and no runs of job: NoSuchElementException: No dataset 'failed' registered

Jenkins 2.235.5
JUnit Plugin 1.32
ECharts API Plugin 4.8.0-2

2020-08-27 20:39:08.579+0000 [id=96257]	WARNING	o.k.s.HttpResponseRenderer$Default#handleJavaScriptProxyMethodCall: call to /$stapler/bound/b5356f2c-eff1-413e-b518-dd30ea579e5c/getBuildTrendModel failed
java.util.NoSuchElementException: No dataset 'failed' registered
	at edu.hm.hafner.echarts.LinesDataSet.getSeries(LinesDataSet.java:50)
	at hudson.tasks.test.TestResultTrendChart.getLinesChartModel(TestResultTrendChart.java:39)
	at hudson.tasks.test.TestResultTrendChart.create(TestResultTrendChart.java:29)
	at hudson.tasks.test.TestResultProjectAction.createChartModel(TestResultProjectAction.java:122)
	at hudson.tasks.test.TestResultProjectAction.getBuildTrendModel(TestResultProjectAction.java:192)
	at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
	at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:636)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:815)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:199)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:501)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Unknown Source)
2020-08-27 20:39:08.580+0000 [id=96257]	WARNING	o.k.s.HttpResponseRenderer$Default#handleJavaScriptProxyMethodCall: call to /$stapler/bound/b5356f2c-eff1-413e-b518-dd30ea579e5c/getBuildTrendModel failed
java.util.NoSuchElementException: No dataset 'failed' registered
	at edu.hm.hafner.echarts.LinesDataSet.getSeries(LinesDataSet.java:50)
	at hudson.tasks.test.TestResultTrendChart.getLinesChartModel(TestResultTrendChart.java:39)
	at hudson.tasks.test.TestResultTrendChart.create(TestResultTrendChart.java:29)
	at hudson.tasks.test.TestResultProjectAction.createChartModel(TestResultProjectAction.java:122)
	at hudson.tasks.test.TestResultProjectAction.getBuildTrendModel(TestResultProjectAction.java:192)
	at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
	at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:636)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:815)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:199)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:501)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Unknown Source)
2020-08-27 20:39:08.580+0000 [id=96257]	WARNING	o.e.j.s.h.ContextHandler$Context#log: Error while serving https://example.com/$stapler/bound/b5356f2c-eff1-413e-b518-dd30ea579e5c/getBuildTrendModel
java.util.NoSuchElementException: No dataset 'failed' registered
	at edu.hm.hafner.echarts.LinesDataSet.getSeries(LinesDataSet.java:50)
	at hudson.tasks.test.TestResultTrendChart.getLinesChartModel(TestResultTrendChart.java:39)
	at hudson.tasks.test.TestResultTrendChart.create(TestResultTrendChart.java:29)
	at hudson.tasks.test.TestResultProjectAction.createChartModel(TestResultProjectAction.java:122)
	at hudson.tasks.test.TestResultProjectAction.getBuildTrendModel(TestResultProjectAction.java:192)
	at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
Caused: java.lang.reflect.InvocationTargetException
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:400)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
	at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:636)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:815)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:199)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:501)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Unknown Source)
2020-08-27 20:39:08.581+0000 [id=96257]	WARNING	h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 0c61976a-eee9-428c-a9d3-8fd1a3b3bbe8
java.util.NoSuchElementException: No dataset 'failed' registered
	at edu.hm.hafner.echarts.LinesDataSet.getSeries(LinesDataSet.java:50)
	at hudson.tasks.test.TestResultTrendChart.getLinesChartModel(TestResultTrendChart.java:39)
	at hudson.tasks.test.TestResultTrendChart.create(TestResultTrendChart.java:29)
	at hudson.tasks.test.TestResultProjectAction.createChartModel(TestResultProjectAction.java:122)
	at hudson.tasks.test.TestResultProjectAction.getBuildTrendModel(TestResultProjectAction.java:192)
	at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
	at org.kohsuke.stapler.MetaClass$JavaScriptProxyMethodDispatcher.doDispatch(MetaClass.java:636)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
Caused: javax.servlet.ServletException
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:797)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:456)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:815)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:199)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:128)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1618)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1369)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1284)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:501)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.lang.Thread.run(Unknown Source)

Error: WorkflowScript: 7: Invalid parameter "skipPublishingChecks", did you mean "testDataPublishers"?

I am getting the following error passing in "skipPublishingChecks". Based on the plugin doc the snippet should be valid.

WorkflowScript: 7: Invalid parameter "skipPublishingChecks", did you mean "testDataPublishers"? @ line 7, column 23.
                   junit skipPublishingChecks: true, testResults: 'test-results.xml'
pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                junit skipPublishingChecks: true, testResults: 'test-results.xml'
               
            }
        }
    }
  
}

XML Parsing Error: not well-formed

Hi, is there a way to ignore not well-formed xmls?

Failed to read test report file C:\jenkins\workspace\run-tests-ui_qa\test-results\wdio\junit-reports\wdio-0-47.xml
org.dom4j.DocumentException: Error on line 409 of document  : An invalid XML character (Unicode: 0x1b) was found in the value of attribute "message" and element is "error".
	at org.dom4j.io.SAXReader.read(SAXReader.java:511)
	at org.dom4j.io.SAXReader.read(SAXReader.java:392)
	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:178)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:378)
	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:308)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:224)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:196)
	at hudson.tasks.junit.TestResult.<init>(TestResult.java:151)
	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:144)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3314)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:376)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 409; columnNumber: 23; An invalid XML character (Unicode: 0x1b) was found in the value of attribute "message" and element is "error".
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)

and this is an XML line 407-409

<testcase classname="chrome.88_0_4324_182.windows.Validate_paid_item_is_stored_in_saved_drafts_and_purchases" name="Validate_drafts_contain_paid_item" time="1.841" file=".\tests\web\desktop\premium\invitation\purchase.memberTab.spec.ts">
      <error message="�[2mexpect(�[22m�[31mreceived�[39m�[2m).�[22mtoBe�[2m(�[22m�[32mexpected�[39m�[2m) // Object.is equality�[22m&#xA;&#xA;Expected: �[32m1�[39m&#xA;Received: �[31m0�[39m"/>
      <system-out>

Custom names per junit invocation

We're using (and loving) this new usage of the checks API for junit. However, we have multiple invocations of junit (across multiple different pipelines jobs) per PR.

This means that currently, only the last reported test appears. Is there something in the works to allow for custom names? I'm happy to try to contribute myself if not.

Semicolons in test names cause 400 errors after the fix for SECURITY-1774 / CVE-2020-2160

Users receive "HTTP ERROR 400 Semicolons are not allowed in the request URI" when clicking on the test name if it contains a semicolon. This appears to be due to the change for SECURITY-1774. It is possible to bypass this check by setting allowSemicolonsInPath to true, but probably not advised in the long run. Maybe this plugin should treat the semicolon (;) as a bad character when building up URLs here:

return s.replace('/', '_').replace('\\', '_').replace(':', '_').replace('?', '_').replace('#', '_').replace('%', '_').replace('<', '_').replace('>', '_');

mvn enforcer preventing build

Untarred source for 1.4.3 using maven 3.0.5 on RHEL 7. Java 1.8.0_722. When i run "mvn install" i get the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (display-info) on project junit: A type incompatibility occured while executing org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce: org.sonatype.aether.util.DefaultRepositorySystemSession cannot be cast to org.eclipse.aether.RepositorySystemSession

I have not edited the existing pom.xml in any way.

mvn --version
Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 1.8.0_272, vendor: Red Hat, Inc.
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-1.el7_9.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.2.1.el7.x86_64", arch: "amd64", family: "unix"

Anything i can check? Is this a maven issue?

Testcases marked by behave's reporter with status Untested are considered Passed

When generating the xml files from behave's junit reporter , if a feature has not been executed for instance because a Runtime Error has been generated in a hook and the execution stopped,all the testcases within the feature are reported as untested. In the example the feature has 275 testcases, none of which have been executed.
Captura de pantalla 2021-03-22 a las 16 35 39

After recording the xml data in Jenkins , these scenarios are considered Passed by default
Captura de pantalla 2021-03-23 a las 13 26 52

Shouldn't they be considered skipped instead?

Version report

Jenkins version: 2.263.1
Junit plugin version: 1.47

Dislable the unstable status

Dependencies

Feature Request

We are using this with rspec in jenkins jobs and we want to prevent the result from being changed from success to unstable based on retries - we run rspec with --only-failures if the rspec run fails the first time. We have an old, large rails project with 10,000 specs and there are often some tests that fail. We have other ways to track, prioritize, and manage those. I tried setting the amplification to 0, but that does not seem to do it. Is there some other way to prevent this already?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.