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

pitest 1.7.0 gradle '7.0' does not show test coverage correct for java 11 #941

Closed
ghost opened this issue Sep 28, 2021 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Sep 28, 2021

Hello. here are my configurations.

plugins {
	id 'java'
	id 'info.solidsoft.pitest' version '1.7.0'
}
pitest {
	junit5PluginVersion = '0.15'
	targetClasses = ['com.example.*']
	targetTests = ['com.example.*']
	exportLineCoverage = true
	timestampedReports = true
	outputFormats = ["HTML"]
}
java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(11)
	}
}

When I change JavaLanguageVersion.of(11) to JavaLanguageVersion.of(8) it is working and showing the right Coverage Report.

But with JavaLanguageVersion.of(11) everything is always not covered and always 0%.

@szpak
Copy link
Contributor

szpak commented Sep 29, 2021

It's a known limitation in the Gradle plugin - szpak/gradle-pitest-plugin#301 - no support for Java toolchain.

@szpak
Copy link
Contributor

szpak commented Sep 29, 2021

Btw, just to be sure, remove/comment the toolchain section and run the pitest task with Java 11 set with JAVA_HOME.

@hcoles hcoles closed this as completed Jun 15, 2022
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