Running Mock API Server with XCUI Tests

How do I run a mock server (e.g., Wiremock or Prism) while executing Xcode UI tests?

From some of the other topics, it seems possible, but if someone could point me in the direction to get started, I would appreciate it.

Hi @takodainc,

You can do screen -dm the_command and it will run it in the background while letting you continue running other commands.

@takodainc – did you manage to get this to work? I’m in the same boat trying to make a mock api server to work (Swifter). Everything works well when run on my local (+ Bitrise CLI) but the pipeline always fails.

@non-binary – not quite sure where to put that command because it’s a library that im using to serve the api. Is there any documentation on how to Run Mock API servers to serve UI Test for iOS? Is it supported by Bitrise?

Hi @jc.yu,

You would put this in a Script step before it is used by an Xcode step.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.