Open ivanvillarfreire opened 6 months ago
Hey @ivanvillarfreire - I don't have time to look at this right now, but I just wanted to pop in and thank you for filing a really nice bug report ❤️
Hi @ivanvillarfreire @ZevEisenberg , I might've encountered a similar issue.
One thing I've tried to do is to print out ProcessInfo.processInfo.environment
in my test suite, and I noticed that I can't find these entries:
"IS_MUTER_RUNNING": "YES"
and the usual "FileName_54_59_424": "YES"
, or in @ivanvillarfreire 's case would be something like "Basic_21_20_456": "YES"
in the test log that Muter generates.
In this case, I would say that Muter has successfully inserted the mutant into the copy of the codebase, but it can't seem to run on the mutated part of the code.
Thank you!
hi @ivanvillarfreire thanks for the report! Could check the logs? I'm not able to reproduce it. Here is the project that I'm using
Command line invocation:
/Applications/Xcode-15.4.0.app/Contents/Developer/usr/bin/xcodebuild test-without-building -destination platform=macOS,arch=x86_64 -xctestrun muter.xctestrun
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:x86_64, id:00006000-000A38D61E02401E, name:My Mac }
{ platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00006000-000A38D61E02401E, name:My Mac }
Testing started
Test suite 'issueTests' started on 'My Mac - issue (18254)'
Test case 'issueTests.testDivisionIsMajorThanOne()' failed on 'My Mac - issue (18254)' (0.149 seconds)
Test session results, code coverage, and logs:
/..../Test-issue-2024.06.25_11-52-53--0300.xcresult
Failing tests:
issueTests.testDivisionIsMajorThanOne()
** TEST EXECUTE FAILED **
Hi @ivanvillarfreire , the issue doesn't happen again for me after I try building from source instead of using the homebrew version.
https://github.com/muter-mutation-testing/muter/issues/283#issuecomment-2189220722
Hi @rakaramos
I cannot execute your test locally, fails with:
MacBook-Pro-de-Ivan:issue ivanvillar$ xcodebuild test-without-building -destination platform=macOS,arch=x86_64 -xctestrun muter.xctestrun
2024-06-27 09:19:12.369 xcodebuild[58968:8562289] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -destination platform=macOS,arch=x86_64 -xctestrun muter.xctestrun
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:x86_64, id:00006021-001808323AF0C01E }
{ platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00006021-001808323AF0C01E }
2024-06-27 09:19:12.547 xcodebuild[58968:8562289] Writing error result bundle to /var/folders/z1/b_6s03sj3155q3dds_yvb9ym0000gn/T/ResultBundle_2024-27-06_09-19-0012.xcresult
xcodebuild: error: Failed to build workspace temporary with scheme Transient Testing.: Cannot load xctestrun file (/Users/ivanvillar/Downloads/issue/muter.xctestrun): The file “muter.xctestrun” couldn’t be opened because there is no such file.
@ivanvillarfreire that is weird, are you running it manually or using muter?
I think it was my bad and I launched the wrong command.
Could you please provide the builded Muter binary? I want to test if it's something related with how I build on M2.
Good afternoon.
I open this issue due to a very rare situation I'm facing on. I will try to explain it with simple examples:
I have this function:
As you see, is a pretty simple function which is tested with this:
So far, so good, the test works:
Now, I can do a "manual mutation" myself, let's transform the function to this one and re-execute the tests:
Notice the change from:
To:
After reexecute the test it fails:
Which is obviously correct.
At this point, mutation-speaking, we could say that this mutant is killed when I simulate a "manual mutation" let's say.
Now, if I put back the original code and execute muter with:
The mutation suite ends ok, but:
That is the problem:
That is telling me that the mutant is not killed but that cannot be true according to the first test that I did manually, right? I can even see on the mutated code folder how indeed the change, as the report says, is the change from > to <:
At this point I'm thinking on some kind of problem with the schemata way of working.
Other data: