[GRADLE-3419] Ignored TestClass Missing from Gradle Test Report Created: 24/Mar/16  Updated: 18/Nov/16  Resolved: 18/Nov/16

Status: Resolved
Project: Gradle
Affects Version/s: 2.8, 2.11, 2.12
Fix Version/s: None

Type: Bug
Reporter: Pepper Lebeck-Jobe Assignee: Unassigned
Resolution: Duplicate Votes: 0


When using Spock's @IgnoreIf annotation which causes all of the test methods in a test class to be ignored, the whole test class is missing from the test report. This differs from how ignored test methods are reported. Those show up in the report and are just marked as ignored. This behavior is also different than how Maven's surefire test reports report the same test class.

Steps to reproduce:

  1. Checkout my fork the spock-example project which has been modified to ignore the HelloSpockSpec
    $> git clone git@github.com:eljobe/spock-example.git
  2. Run the gradle test task
    $> cd spock-example
    $> ./gradlew test

Expected Behavior
In the build/reports/test directory, you can see the HelloSpockSpec in the report, but it is marked as ignored. Or, at least, the methods in the class are marked as ignored.

Observed Behavior
HelloSpockSpec is just missing from the report.
See: https://pepperspages.com/sharing/20160324-test-reports-bug/gradle/

A maven build of the same repo looks like this:

To produce that report, I used:

$> mvn surefire-report:report

This makes me think that the error is not in the data made available by Spock, but in Gradle's report generation code itself.

Properties of my environment
OS: OS X version 10.11.4 (15E65)
Gradle Versions: 2.8, 2.11, 2.12
JDK: 1.7
Maven: 3.3.9
Spock: 1.0
Groovy: 2.4

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Pepper Lebeck-Jobe [ 18/Nov/16 ]

This will now be tracked in https://github.com/gradle/gradle/issues/896

Generated at Wed Jun 30 12:48:18 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.