muter-mutation-testing / muter

🔎 Automated mutation testing for Swift 🕳️
MIT License
491 stars 39 forks source link

Support xcodebuild as an executable for SPM projects #276

Open aim2120 opened 3 months ago

aim2120 commented 3 months ago

Hi all! I'm very excited to start using muter for my projects. However, I'm in a bit of a bind. It appears that muter only works for SPM projects if you use swift as the executable. However, this isn't possible for many of my SPM projects, which are targeted at iOS and not macOS, and thus require xcodebuild to run tests from the command line.

For example, the first issue I run into when using xcodebuild with SPM is the usage of xcodebuild -showBuildSettings during the BuildForTesting step. When using SPM, this (1) fails due to not having a passed -scheme and (2) even if the -scheme were to be passed, the BUILD_DIR line that the resulting code looks for will not be present in the output.

I'm sure there are many other kinks that would need to be sorted out to support the usage of xcodebuild with SPM. I would be very interested in contributing this functionality to the project, if it's something that you all would support (and think is viable)? I imagine I'm not the only developer using SPM primarily for iOS, which would unlock the ability to use muter for such projects.

Let me know what you think!

rakaramos commented 2 months ago

hey @aim2120 sure, go ahead, sounds like a great candidate for an acceptance tests :D

aim2120 commented 2 months ago

Update: opened PR #282