szpak / gradle-pitest-plugin

Gradle plugin for PIT Mutation Testing
http://gradle-pitest-plugin.solidsoft.info/
213 stars 58 forks source link

Unable to debug PITTest in intellij #163

Closed amitchidrewar1301 closed 4 years ago

amitchidrewar1301 commented 4 years ago

Hi Team,

I have added Pittest configuration in build.gradle configuration.

pitest { mainProcessJvmArgs = ['-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005'] }

Also i am running below command to start the debugging ./gradlew pitest -Dorg.gradle.debug=true

but I am getting Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

I wanted to debug the test case on intellij. Please let me know what are the steps to debug the pittest test cases.

szpak commented 4 years ago

Do you want to debug gradle-pitest-plugin execution (a Gradle plugin for PIT) or PIT execution itself (started from the Gradle plugin)?

amitchidrewar1301 commented 4 years ago

So underline issue is we are getting -

Exception in thread "main" org.pitest.help.PitHelpError: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite. See http://pitest.org for more details. at org.pitest.coverage.execute.DefaultCoverageGenerator.verifyBuildSuitableForMutationTesting(DefaultCoverageGenerator.java:109)

So as it clearly mentions our mutation test cases are failing. And Hence I wanted to debug the test cases to fix. Can you please share the steps do that on Intellj****?,

Apologies to ask basic questions as Novice to this plugin.

szpak commented 4 years ago

Please enable verbose logging in PIT. Then you will see which tests are failing. It should be easier than debugging.

pitest {
    ...
    verbose = true
}
szpak commented 4 years ago

@amitchidrewar1301 Have you been successful in finding the tests that are failing?