Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

junit5PluginVersion = '1.1.2' can the compatiable verstion be picked up from test configuration #334

Open
nagkumar opened this issue Apr 7, 2023 · 5 comments

Comments

@nagkumar
Copy link

nagkumar commented Apr 7, 2023

instead of explicit on junit5PluginVersion value

pitest {
    junit5PluginVersion = '1.1.2'
    //pitestVersion = '1.11.7'
}

can this value not be picked from

tasks.test {
    useJUnitPlatform()
}

As most may not know to such details..

ref: hcoles/pitest#1182

@szpak
Copy link
Owner

szpak commented Apr 7, 2023

How would you like to map the JUnit Platform version with the compatible pitest-junit5-plugin version?

1.1.2 requires pitest 1.9.0 or above and JUnit Platform 1.9.2 (Jupiter 5.9.2)
1.1.1 requires pitest 1.9.0 or above and JUnit Platform 1.9.1 (Jupiter 5.9.1)
1.1.0 requires pitest 1.9.0 or above and JUnit Platform 1.9.1 (Jupiter 5.9.1)
1.0.0 requires pitest 1.9.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)
0.16 requires pitest 1.4.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)
0.15 requires pitest 1.4.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)
0.5-0.14 requires pitest 1.4.0 or above and JUnit Platform 1.7.x (Jupiter 5.7.x)

What for the future versions?

@nagkumar
Copy link
Author

nagkumar commented Apr 10, 2023

As we can know junit version used using this Kotlin DSL, in my case it is 5.9.2

val bdependencies = project.configurations.getByName("testImplementation").dependencies
println("JUnit 5 Jupiter version: " + bdependencies.find { it.name.contains("junit-jupiter-api") }?.version)
println("JUnit 5 Platform commons version: " + bdependencies.find { it.name.contains("junit-platform-commons") }?.version)

can we not map this to Junit commons platform as 1.9.2 and junit5PluginVersion to 1.1.2

@szpak
Copy link
Owner

szpak commented Apr 10, 2023

Great. For 1.9.2 it is doable. You bump JUnit Platform 1.10.0 in 2 months - what pitest-junit5-plugin version should be used?

@nagkumar
Copy link
Author

nagkumar commented May 19, 2023

You bump JUnit Platform 1.10.0 in 2 months - what pitest-junit5-plugin version should be used?

@szpak in such case we can follow best compatible one for that junit version which would be the 5.9.2 etc..

if we map 1.1.2 for 5+ etc..

same as how node works with compatible dependencies https://stackoverflow.com/questions/22565344/in-package-json-dependency-version

ref:
#337 (comment)

@nagkumar
Copy link
Author

nagkumar commented May 19, 2023

Another option (I may be wrong here..) as don't know the internal usage of junit5PluginVersion and I assume junit5PluginVersion is not meant to be customized by end users such as me (as a user of pitest)

Can we, not add the respective junit plugin dependency in pitest maven repo or define the value of
junit5PluginVersion in this pitest pom file itself.

that way, whenever pitest version changes, the correct version of junit5PluginVersion can be used internally.
https://repo1.maven.org/maven2/org/pitest/pitest-maven/1.13.2/pitest-maven-1.13.2.pom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants