How to run shell commands in terminal during iOS XCTest

45 Views Asked by At

I have the following situation. I have an app that that I need to test some simulated operation, and this simulation is done via a python script.

I want to automate this task, by doing some UI configuration on the app, which is done via XCTest, but after doing the configuration, I want to trigger that python script with a simple command on the terminal.

Is there a way to do this from within and during an iOS XCTest?

Summarizing:

When running the automated test, I want to:

  • Open the App
  • Login
  • Do some UI configuration (all of the above done with native XCTest)

and then

  • Trigger the script

I found some posts about invoking the terminal from Xcode, but all of that was only for macOS projects, as the code uses the "Process()" class which is not available to iOS.

How to achieve such task?

Thanks in advance.

Luis

0

There are 0 best solutions below