Run test specific setup logic on different target

Our use case is that we need to run a CLI script (on Mac) to set up backend configuration before each test case (UI test on real iOS device). The setup logic is test specific, so using pre-build scripts is not an option.

Is this support in any way or what are best practices around such a setup? Ideally, we would still be able to execute the tests from within Xcode.

Run test specific setup logic on different target
 
 
Q