Closed nagkumar closed 2 months ago
I'm not sure, if I fully understand the question/problem. In the Gradle plugin documentation where is a section about "generic" PIT plugins (all plugins, except junit5 plugin which has a dedicated support) with the examples in Groovy (build.gradle) and Kotlin (build.gradle.kts): https://github.com/szpak/gradle-pitest-plugin?tab=readme-ov-file#generic-plugin-support-also-junit-5-in-gradle-pitest-plugin-147
That should apply directly to the TestNG plugin. Please let me know, if you encounter any problem with that.
as per that limited understanding of the documentation I added (as doc has not said anything about TestNG)
pitest 'org.example.pit.plugins:pitest-custom-plugin:0.42'
but it results in error
not sure if there is any testng specific plugin that needs to be used in place of "org.example.pit.plugins:pitest-custom-plugin:0.42
not sure if there is any testng specific plugin that needs to be used in place of "org.example.pit.plugins:pitest-custom-plugin:0.42
The plugin you would like to use - so the TestNG plugin: "org.pitest:pitest-testng-plugin:1.0.0"
.
@nagkumar Have you been able to improve the situation with my suggestions?
dependencies {
implementation("org.pitest:pitest-testng-plugin:1.0.0")
}
Used this in kotlin gradle build file, the testng related error no more reported.. Thank you.
is the name 'pitest-testng-plugin' correct as I assume plugins should be used in gradle plugins {} block not as implementation..
Have you checked pitest("org.pitest:pitest-testng-plugin:1.0.0")
?
implementation
adds pitest-testng-plugin as compile time dependency to your production code which is not needed.
is the name 'pitest-testng-plugin' correct as I assume plugins should be used in gradle plugins {} block not as implementation..
The plugins {}
block contains Gradle plugins (the plugins which help Gradle to build/configure/test/whatever the project) - gradle-pitest-plugin
is an example of that plugin. gradle-pitest-plugin
itself uses an utility/tool PIT/pitest to run the mutation testing which itself uses PIT's plugins for TestNG. As that, it should be visible for PIT and pitest()
(or implementation()
- which isn't perfect - makes it).
I hope, that resolves your doubts.
Closing as no response for 1,5 months. Feel free to comment/reopen, if you need further assistance.
Looking for solution for this
https://github.com/pitest/pitest-testng-plugin/issues/4