Kotlin, Gradle & Cucumber, not picking up tests

29 views
Skip to first unread message

JR

unread,
Nov 24, 2021, 4:54:22 AM11/24/21
to PIT Users

I have JVM Kotlin project w/ gradle build. I installed the plugin, and pitest runs fine.

I also installed the cucumber-pitest gradle plugin, and when pitest starts it says it has 538 test cases as opposed to 70 test cases w/o the cucumber-pitest plugin.

But when I look at the reports, it's clear pitest did not run any of the cucumber tests. In the report for any file the "tests examined" section never has a cucumber test listed, even though I know they cover the code in question.

One thing I'm not sure of. The docs for the cucumber-pitest plugin says it wants the pitest dependency in the "buildscript" section, but in my case, I'm in a sub-project that can't have a "buildscript" section. So I just added it in the dependency section of my sub-project.

Is there any way to get pitest to tell me what tests it's found, and what code it thinks they cover?

Great tool, even just for the subset of tests it is working with.

I know this is all integration hell kind of problem that everybody hates. Any clue on where to get more info would be helpful.

Thanks,

-Jon

JR

unread,
Nov 24, 2021, 2:39:57 PM11/24/21
to PIT Users
I turned verbose on, so I have a little more info. I get this chunk of output at the beginning of running pitest :
11:34:15 AM PIT >> INFO : MINION : 11:34:15 AM PIT >> FINE : Expecting 400 tests classes from parent
11:34:15 AM PIT >> INFO : MINION : 11:34:15 AM PIT >> FINE : Tests classes received
11:34:15 AM PIT >> INFO : MINION : 11:34:15 AM PIT >> FINE : Cucumber detected, scenarios will be used
11:34:15 AM PIT >> INFO : MINION : 11:34:15 AM PIT >> INFO : Checking environment
11:34:16 AM PIT >> INFO : MINION : 11:34:16 AM PIT >> INFO : Found  65 tests
11:34:16 AM PIT >> INFO : MINION : 11:34:16 AM PIT >> INFO : Dependency analysis reduced number of potential tests by 0
11:34:16 AM PIT >> INFO : MINION : 11:34:16 AM PIT >> INFO : 65 tests received
11:34:16 AM PIT >> INFO : MINION : 11:34:16 AM PIT >> FINE : Running 65 units

It seems to imply that it found the cucumber tests, but 65 is the number of normal junit tests I have.
65 is the number it comes up with most often, but sometimes it 111 or 536. Even in those cases, it only runs the coverage tests for the 65 junit cases.




Reply all
Reply to author
Forward
0 new messages