2

I'm trying to use a GPX file, for simulating my location when I run UI Tests. I have selected the GPX file under 'Test Location'. But it's not working. I just get an error, which tells me 'Location not available'.

enter image description here

I know, I can go into Run -> Debug and then activate 'Allow Location Simulation' and then select the file as 'Default Location'. But since I only want it to be activated for my UITests, and not when I run it normally in the simulator - I don't want to set it as default in the Run section.

So, is it possible to make this work ONLY for my UITests :-)?

Grumme
  • 794
  • 2
  • 9
  • 31

1 Answers1

0

Since Xcode 11, you can configure it through a Test Plan.

Each test plan has one (or multiple) configuration(s) and you can set the mock location in the Localization section (you can use a GPX file too).

enter image description here

Eugenio
  • 324
  • 1
  • 5
  • 15