Hi, I am using the Pitest Intellij plugin along wi...
# kotest
n
Hi, I am using the Pitest Intellij plugin along with some property based tests I have that uses kotest. The mutation testing report indicates mutant killed by the test. Is it possible to get the seed used by kotest to reproduce the test failure for a mutant that is killed? Because running kotest by manually adding the same mutant does not indicate a test failure.
e
n
Running kotest independently does produce the seed used in the event of a failure. But when you use Pitest, this is not produced in the mutation testing output or the report.
e
See the link
Are you saying there’s no file in the location specified?
n
Didn’t find this file on my machine
~/.kotest/seeds/<spec>/<testname>
I’m using the kotest plugin for Intellij on a Mac.
e
It could be that the file has been deleted if you’ve run the test again with another mutant afterwards?
n
Ran kotest on buggy code. The test failed but unable to find this file. The kotest failure output does say “Repeat this test by using seed -5558322341885203881”
j
@Emil Kantis unrelated to Pitest, but yesterday, in a normal plugin with kotest assertions + kotest property testing, the seed file was missing. I am using the latest versions
Indeed I have rechecked it now, it is not in the build dir, and it isn't on my home dir too
Can you check it is working for you, if not, I can open an issue
e
It's working for me. What platform are you targeting?
j
all, KMP
e
Looks like
writeSeed
is only implemented for JVM , could perhaps affect your case?
j
I would expect that jvm tests would write the seed, which should be the same for the rest, and I have seen that seed in the past, not sure if in the file or in the logs now… But anyway looks like a feature request
n
A more general question, how do you reproduce test failures for “KILLED” mutants detected by pitest?