Is it possible to run individual test cases, or individual test suites, from an iOS app test target, instead of all the test cases, from a command line interface?
Yo
To run an individual test case you can use -only-testing
xcodebuild test
-workspace .xcworkspace
-scheme ""
-destination ''
-only-testing
//for example
xcodebuild test
-workspace SampleApp.xcworkspace
-scheme "SampleAppTest"
-destination 'platform=iOS Simulator,name=iPhone 11 Pro Max,OS=13.5'
-only-testing SampleAppTest/SampleAppTest/testExample
-only-testing SampleAppTest/SampleAppTest/testExample2
-only-testing://
For example if Test Navigator looks like
the parameter will have the following type
-only-testing:SampleAppTest/SampleAppTest/testExample
If you want to add an additional test case you can add one more -only-testing
Also you can skip a test using: -skip-testing
Test results you can find
/Users/alex/Library/Developer/Xcode/DerivedData/-dzqvyqfphypgrrdauxiyuhxkfxmg/Logs/Test/Test--2020.09.25_13-45-46-+0300.xcresult
[Xcode screenshot]
Read more here