Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove JUnit plugin AggregatedTestResultPublisherTest exclusion #2705

Closed
MarkEWaite opened this issue Nov 29, 2023 · 0 comments · Fixed by #2755
Closed

Remove JUnit plugin AggregatedTestResultPublisherTest exclusion #2705

MarkEWaite opened this issue Nov 29, 2023 · 0 comments · Fixed by #2755
Labels
bug Something isn't working

Comments

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Nov 29, 2023

Jenkins and plugins versions report

Environment
Jenkins 2.434
Java 11, 17, or 21
Apache Maven 3.9.5

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

Ubuntu 22.04 and Red Hat Enterprise Linux 8.9

Reproduction steps

  1. Run the tests from the master branch of the junit plugin with Jenkins 2.434
    git clone https://github.com/jenkinsci/junit-plugin.git
    cd junit-plugin
    mvn clean -Djenkins.version=2.434 -Dtest=AggregatedTestResultPublisherTest verify
    
  2. Confirm that two tests fail with:
[ERROR] Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 12.61 s <<< FAILURE! -- in hudson.tasks.test.AggregatedTestResultPublisherTest
[ERROR] hudson.tasks.test.AggregatedTestResultPublisherTest.testResultsAndAggregatedTestResults -- Time elapsed: 7.497 s <<< ERROR!
org.htmlunit.ElementNotFoundException: elementName=[a] attributeName=[<text>] attributeValue=[junit #1]
        at org.htmlunit.html.HtmlPage.getAnchorByText(HtmlPage.java:694)
        at hudson.tasks.test.helper.TestResultsPage.hasLinkToTestResultOfBuild(TestResultsPage.java:17)
        at hudson.tasks.test.AggregatedTestResultPublisherTest.testResultsAndAggregatedTestResults(AggregatedTestResultPublisherTest.java:129)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:655)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:829)

[ERROR] hudson.tasks.test.AggregatedTestResultPublisherTest.aggregatedTestResultsOnly -- Time elapsed: 2.279 s <<< ERROR!
org.htmlunit.ElementNotFoundException: elementName=[a] attributeName=[<text>] attributeValue=[junit #1]
        at org.htmlunit.html.HtmlPage.getAnchorByText(HtmlPage.java:694)
        at hudson.tasks.test.helper.TestResultsPage.hasLinkToTestResultOfBuild(TestResultsPage.java:17)
        at hudson.tasks.test.AggregatedTestResultPublisherTest.aggregatedTestResultsOnly(AggregatedTestResultPublisherTest.java:66)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:655)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.lang.Thread.run(Thread.java:829)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   AggregatedTestResultPublisherTest.aggregatedTestResultsOnly:66 » ElementNotFound elementName=[a] attributeName=[<text>] attributeValue=[junit #1]
[ERROR]   AggregatedTestResultPublisherTest.testResultsAndAggregatedTestResults:129 » ElementNotFound elementName=[a] attributeName=[<text>] attributeValue=[junit #1]
[INFO]
[ERROR] Tests run: 3, Failures: 0, Errors: 2, Skipped: 0

The same tests pass with jenkins.version=2.433

Same issue is visible with commands from the plugin bill of materials repository using the command:

LINE=weekly PLUGINS=junit TEST=AggregatedTestResultPublisherTest bash local-test.sh

Expected Results

Tests should pass in the plugin repository and in the bill of materials test case

Actual Results

Tests fail because the test depends on specific build status UI components that have been improved in 2.434.

Anything else?

JUnit plugin issue report:

Jenkins core UI change

Item to remove:

  • bom/excludes.txt

    Lines 20 to 21 in cb2376e

    # TODO https://github.com/jenkinsci/junit-plugin/issues/588
    hudson.tasks.test.AggregatedTestResultPublisherTest

Are you interested in contributing a fix?

No response

@MarkEWaite MarkEWaite added the bug Something isn't working label Nov 29, 2023
@MarkEWaite MarkEWaite changed the title Remove junit plugin AggregatedTestResultPublisherTest exclusion when test is fixed Remove junit plugin AggregatedTestResultPublisherTest exclusion Nov 29, 2023
@basil basil changed the title Remove junit plugin AggregatedTestResultPublisherTest exclusion Remove JUnit plugin AggregatedTestResultPublisherTest exclusion Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant