There are two flags used for testing with xcodebuild: “-only-testing” and “skip-testing”. They describe test suites (aka groups) that need to be tested. So, the scheme can contain many suits, but this flags tell xcodebuild to test only some of them.
It would be great to be able to optionally set one of this flag in “Xcode Test for iOS” workflow step.
Use case / for what or how I would use it
I have a project with a scheme which has two groups on tests (the unit tests and the integration tests). For pull requests into develop I want to run unit-tests and once a day I want to run integration tests (because it’s long to perform and gives additional traffic usage). Also, I do not want to duplicate the scheme.
I want just run xcodebuild tests with a flag “-only-testing:UnitTests” for the first case and “-only-testing:IntTests” for the second one.
It’s a field with one of three options (the last two requires string list with names of the tests).
The first one means “perform all tests” (and its value by default). No additional information needed.
The second one is a filter that means “perform only tests in the list”. User should enter the name of the tests to perform.
The third one is a filter that means “perform all tests excluding ones from the list”. User should the name of the tests to skip.
As long as the first way is not implemented for any reason it may be useful to extend the description of Step like this: