-
Notifications
You must be signed in to change notification settings - Fork 26
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
Found 0 tests in Kotlin project #53
Comments
Hi @szpak , I am using the Android fork, which is a wrapper that simply finds the source and test classes differently. That fork works correctly with JUnit 4 tests, but applying this plugin doesn't work. |
Ok, it was misled by the link to the original project webpage. I don't know if the fork support JUnit 5 tests with Android. With enabling verbose mode in PIT (and @koral-- do you have a functional test with JUnit 5 that could confirm that at least in the basic case works? |
Btw, @xgouchet here you have a sample JUnit 5 and Kotlin project which works. It's not an Android project, but maybe you will spot any other difference. |
So there is an issue in the Android version, which doesn't handle the In the log I see this line :
Is there something missing ? |
It in general looks ok. There could be some Android-related quirks. Maybe @koral-- will have any idea. |
I confirm that it junit5 plugin does not work with Android projects. |
Quite a long time but I've managed to find a time to investigate that. It seems that the workaround consists of 2 steps:
See the commit autolinked above and the whole functional test where it is located. |
Nice @koral--! Based on your research, why |
Normally (not taking pitest into account) that dependency has to be added to It seems that the more elegant solution in the plugin (apart from making |
I was able to fix that issue. |
I'm trying to run PITest with the JUnit 5 plugin in an Android/Kotlin project.
I'm applying the JUnit 5 project using the recommended approach
But when I run PITest, the following outputs is given. It does find my 887 test classes, and can generate mutation, but somehow it doesn't recognizes the tests from my Kotlin classes. Is there a way to make the plugin more verbose as to whay it doesn't find my
@Test
annotated methods ?The text was updated successfully, but these errors were encountered: