Did you ever want to just run a few XCTests or XCUITests, or a particular subset of tests to perform regression in a particular area? XCode now has this capability using Test Plans!
It basically lets you create grouping of tests that you can select to run as desired.
To get started, the scheme must be converted to use Test Plans. Do this by selecting Edit Scheme and then the “Convert to use Test Plans…” button:
You will then pick one of the following 3 Options:
I picked create empty so then I could select the tests I want to pull into that particular test plan.
Once converted, you will see the Test Plan option appear at the top of the Test Navigator tab:
Within this, you can create and edit the test plans:
Select New Test Plan and give it a name. Select Create.
Select this button to add the target which contains your test cases:
You can then enable any of the test cases that you want ran for that particular test plan, set if you want them to run in parallel, or edit configuration values for the tests within that test plan like timeout values.
Once saved, all you have to do is have that Test Plan selected on the Test Navigator tab and run the test plan by using “command + u”. This will run only the tests that were enabled for this particular test plan.