In IntelliJ 15.04 - Some Spock tests not being run when trying to run all tests

Answered

Hi,

I am using a gradle project with spock based unit and integration tests separated which I have opened in IntelliJ 15.04.

When I look at this project in intellij I can see the directories are marked correctly as test sources but when I right click on the integration-tests and select "run all tests in groovy" it only runs some of the tests.

For the tests that don't run IntelliJ...

  • doesn't mark them as ignored
  • doesn't mark them as failed
  • the icon remains as a yellow doughnut
  • some of the tests in the same spec are run and pass (green ok icon) so it isn't missing entire spock specs
  • After running the message next to the green bar says "All 8 tests passed" but there are 11 tests
  • If I add @Ignore in front of the tests which aren't being run it still doesn't show them as ignored but keeps the same yellow doughnut
  • If I run the un-run tests on their own they run and pass
  • If I run "gradle test" from the command line it runs all the tests and they pass

Does anyone know what the cause of this might be and if there is a way to fix it.

Cheers

 

7 comments
Comment actions Permalink

Could please share some screenshots or better some test project?

0
Comment actions Permalink

 

 

 

 

 

 

 

 

 

 

Sorry about the FBI style redactions but this should give you enough to see what I'm talking about

Bottom left you can see 11 tests, 3 of which haven't been run. You can also see "All 8 tests passed"

0
Comment actions Permalink

Hm, I still have no idea.

Could you please share you build.gradle? 
You could email me directly daniil.ovchinnikov@jetbrains.com

0
Comment actions Permalink

Was there a solution to this issue?  I have the exact same issue 20 tests are skipped (marked with Yellow Doughnut).  This only happens when right clicking and the groovy folder (root of all tests) and select Run 'All Tests'.  When running each test class this does NOT happen.

The project is a JEE project using Spock as the Unit Test framework.

Version:

IntelliJ IDEA 2017.2.6

build #IU-172.4574.11

JRE 1.8_152-release-915-b12 x86_64

JVM:  OpenJDK 64-Bit Server VM by JetBrains 

0
Comment actions Permalink

Please report at https://youtrack.jetbrains.com/issues/IDEA with a small sample project to reproduce. Thanks.

0
Comment actions Permalink

Hello, I'm having the same issue. What is the status of this?

It's SpringBoot project using Spock as the Unit Test framework to test REST API calls

IntelliJ IDEA 2017.2.6

build #IU-172.4574.11

 

Thanks

 

 

 

0
Comment actions Permalink

If the issue persists in 2017.3.4, please report it as suggested one post above yours.

0

Please sign in to leave a comment.