mobster test --xctest also runs your project’s own XCTest and Swift Testing targets, and puts unit tests, checks and screenshots in one report.
Run your XCTest targets with your checks
- It builds your Xcode project once with
xcodebuild build-for-testinginto.mobster/build.--schemeand--projectchoose what to build (the only scheme, unless you name one), and--test-planpicks one of the scheme’s test plans. - It runs the checks as usual, then
xcodebuild test-without-buildingon a simulator Mobster leases for the run, with the result bundle at.mobster/test-results/<suite-id>/xctest/tests.xcresult. - It reads the
.xcresultwithxcrun xcresulttool(Xcode 16 or later) and merges it into the suite’s reports.
--only-testing Target/Class/test runs only that target, class or test. Repeat it for more. With mobster test pr --xctest, the app the checks drive and the tests come from the same build, and the changed files choose the targets: a target runs when a changed file sits in a folder with its name, else every target runs. The pull request comment names the targets that ran and why.
Read XCTest results
A failed test makes the exit code 1. If the build or the tests can’t run (no test target in the scheme, no free simulator, only iPhones named), the XCTest section says why, the checks still count on their own, and the exit code is 3 unless a check failed.
Mobster runs your tests once, on one simulator, as your schemes and test plans define them. A test that fails once fails the run. The flake score in
--history finds the unstable ones, and the quarantine file names checks, not tests.