Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase TestLab on IOS - the .xctestrun file didn't specify any test targets

I'm trying to use firebase TestLab on iOS using this guide:

https://firebase.google.com/docs/test-lab/ios/firebase-console#build_xctests_for_your_app

but after I upload the zip file including the xctestrun file I'm getting the following error:

Upload invalid: the .xctestrun file didn't specify any test targets.

I have two targets in my app and a Tests target and a UI tests target, On both test target, I set the Target I want to test as the host application.

Any ideas?

like image 559
aviv_elk Avatar asked Jan 28 '23 04:01

aviv_elk


2 Answers

In my case the following order of actions helped:

  1. open your app's .xcworkspace file
  2. go to File -> New -> Target
  3. choose iOS Unit Testing Bundle and press the button Next
  4. check the credentials like Product Name, Team, Bundle Identifier, etc. and then press the button Finish

Now you need to make a new attempt to build for testing (Product -> Build For -> Testing) and follow the Firebase instruction regarding creating an archive

like image 120
Mary Seleznova Avatar answered Feb 13 '23 06:02

Mary Seleznova


This probably happened because you testing targets are not part of the scheme when building.

Take a look at the .xctestrun and see if it is an empty .plist file. If it's empty then add the testing targets when building.

like image 44
Maik Avatar answered Feb 13 '23 07:02

Maik