Skip to content
This repository has been archived by the owner on Feb 1, 2018. It is now read-only.

Real device deployment? #33

Open
tobi512 opened this issue Sep 6, 2013 · 6 comments
Open

Real device deployment? #33

tobi512 opened this issue Sep 6, 2013 · 6 comments

Comments

@tobi512
Copy link

tobi512 commented Sep 6, 2013

Hi there,
i'm currently setting up a test environment for our app using bwoken as testrunner on jenkins and so far, everything is working fine if the tests run on simulator.

However, i recently tried to run the tests on a real device and somehow, thing didn't work out as expected:
Is bwoken supposed to deploy the app onto a connected device and start testing afterwards, just like it does on the simulator?
In my case, this does not seem to work. (if it is supposed to)

Tested with iPad 1 (seems like it does NOT work with iOS 5?!) and iPad mini (testing only started if the app was already installed, but the tests kept failing as no buttons could be tapped).

Thanks in advance!

Cheers, Tobias

@listrophy
Copy link
Contributor

@tobi512 sorry for not getting to this earlier. :(

Anyway, bwoken is able to deploy to a real device. With v1, it follows this workflow:

  • If no device is connected, run in the simulator.
  • If a device is connected:
  • * If the SIMULATOR environment variable is set to true, run in the simulator.
  • * Otherwise, run on the device.

With v2 (currently in beta), the workflow is the same, except instead of setting an environment variable, you pass the --simulator flag to bwoken.

As far as getting it to run the first time, I'm not sure what's causing the issue. I think you might have to install the app via Xcode first?

@msmollin
Copy link

msmollin commented Jan 8, 2014

So we're having the same issue as @tobi512 listed. Bwoken will build, install, run, and test on the simulator without issue. We can't seem to get it to work on the device without having Xcode install the app first. Is this the intended behavior?

@listrophy
Copy link
Contributor

I would /intend/ for it to just work... this might be a bug with Apple, though.

@vincentjames501
Copy link

This is the same behavior we are observing. Our experience is as follows:

  1. If the real device starts with the binary not installed, the binary is never uploaded to the attached device and instead, the error below is reported.
iphone  test.js
unable  to locate CFBundleIdentifier for path: /Users/jenkins/jenkins/workspace/BuildIOSApp/build/iphoneos/BlahBlah.app
Recording   cancelled : At least one target failed to launch; aborting run
:   Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7fde8d482b20 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
:   Failed to start trace.
  1. If the binary already exists on the device, the existing binary on the device is used for testing but the newly updated binary is not uploaded to the device.

  2. The simulator works as expected from our experiments.

@msmollin
Copy link

Yeah, for the time being we get around this in our Jenkins CI by having it make Xcode run our unit test job first, which will properly deploy to devices, and then it executes Bwoken can run and validate that same build.

@vincentjames501
Copy link

Ohhhhh! We'll try that monday. That's a great idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants