Real device testing on iOS failing with INVALID(TEST_NOT_APP_HOSTED)


#1

Hi, I’m wondering what I might be doing wrong to get the following output in https://app.bitrise.io/build/f5efb7484a884d76 :

+------------------------------------------------------------------------------+
| (7) virtual-device-testing-for-ios@0.9.2                                     |
+------------------------------------------------------------------------------+
| id: virtual-device-testing-for-ios                                           |
| version: 0.9.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-10-23T23:19:51-07:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[23:19:51]  * [OK] Step dependency (go) installed, available. 
Configs:
- ZipPath: /Users/vagrant/deploy/testbundle.zip
- TestTimeout: 900
- TestDevices:
---
Model     OS version   Locale     Orientation   
iphone7   12.0         portrait   en            
---
Upload IPAs
=> .xctestrun uploaded
Start test
=> Test started
Waiting for test results
- Validating
Failed to get test status, error: Failed to get test status: INVALID(TEST_NOT_APP_HOSTED)
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | virtual-device-testing-for-ios@0.9.2 (exit code: 1)           | 51 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...itrise-steplib/steps-virtual-device-testing-for-ios/issues |
| Source: ...//github.com/bitrise-steplib/steps-virtual-device-testing-for-ios |
+---+---------------------------------------------------------------+----------+

To get to this point, I:

Any insights are very welcome! We’ve been having a lot of reliability problems with the simulator testing and it would be super helpful if we can get “real devices” working!

Thanks!


iOS UI test problems: slow, unreliable, abort for build time
#2

Hi @eggheadgames !

I have found this:

Could you please check in your app that your test target’s Host application has been set?

If not (or it’s not an app)

  • Set it to your app
  • Push the changes
  • Try a new build.

.xctestrun with host app:

.xctestrun without host app:


#3

Thanks!

Yes, it does have that set in Xcode, but I’ll poke around and see if I can confirm that the xctestrun is being set correctly as well. (I expect it will take me a day or two, fyi.)


#4

In case it makes a difference…

I don’t have a “workspace” – there are no CocoaPods or similar. It’s just a straight “project” with one .xcodeproj file.


#5

I don’t have the checkbox option for “Allow Host Testing APIs” as shown in the first screenshot below :frowning:

I did some digging and ran this command:

xcodebuild build-for-testing -project foo.xcodeproj -scheme foo -destination "platform=iOS Simulator,name=iPhone 5s" -derivedDataPath "build"

Then I looked at the build/Build/Products/LogicPuzzles_iphonesimulator12.0-x86_64.xctestrun, and, as suggested, it was missing the IsAppHostedTestBundle value.

So, now I need to work out how to get that added. Or, maybe I need to convert my app to use a Workspace instead of a project file. (Though it’s quite happy being a project instead of a Workspace, and I’m not sure what side effects that might trigger.)

Thanks for the help so far. I welcome any thoughts going forward!


#6

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