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

3

5

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?

Kaliope answered 12/11, 2018 at 14:7 Comment(2)
Have you checked the contents of the xctestrun file? Is it not empty? The best way to get help with this issue is to join the Firebase Community and post this question along with your test matrix ID in the #test-lab channel on Slack. Someone from the Test Lab team will help you out.Durable
What could have happened that while building you only built your app target, but not your test targets. In that case the .xctestrun file would be empty.Durable
E
7

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

Ethereal answered 4/1, 2019 at 4:43 Comment(0)
D
1

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.

Durable answered 19/11, 2018 at 21:48 Comment(0)
R
0

Im my case .xctestrun file was generated when Xcode project was built for testing (Product > Build for > Testing). The file was located under {Derived_Directory}/Build/Products

Raasch answered 27/4 at 9:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.