-
Notifications
You must be signed in to change notification settings - Fork 67
Tests not run #83
Comments
instruments rejected my binary because my first device was somehow my Mackbook. Specifying a valid device made instruments to run the test. This may help other users if bwoken can display some error messages or the output of instruments is not missing. I am not sure if this is the design or a bug when using bwoken with Xcode 6. |
I am having the same issue. How do you fix if you want to test in the Simulator? |
The same problem here, was able to workaround it by specifying the device. What you need to do is to look up the available devices by doing:
Note the MacBook Pro being the first entry, which allegedly is the root problem here. Now, you can work around it by calling: |
Ah yeah, that did it. I'm now able to run tests on a particular device or simulator. So what's the way to fix this? Would it be best to detect if the system is Yosemite, then ignore the first device? Or would it be better to pass a device ID to ignore in through the command line or through some config? I took a peek at the code, but I'm not a Ruby dev, so I'm not exactly sure how to dig into this. But I'd be up for helping if I can. |
This works okay with the simulator, but I can't get it to work on a particular device. Is there any tricks to get that working, or is it simulator only for us on Yosemite? Here's what I'm running:
|
Try using instruments directly with verbose to get some error logs. It is not difficult if you follow the instruction here http://blog.manbolo.com/2013/04/09/launching-uiautomation-tests-in-command-line |
Hey all, I'm on the cusp of figuring this out. I got bwoken to work with Yosemite + Xcode 6 with the simulator, but it just sits there with the app running when on-device. Once I hammer that out, I'll get a release out that works. If anyone out there can find the correct incantation of |
I'm trying to figure this out myself. When I run the test it just sits there and the simulator doesn't launch the app. Am I missing a step?
SelectUserTests is just: UIALogger.logStart("Logging element tree ...");
UIATarget.localTarget().logElementTree();
UIALogger.logPass(); |
@ryanjm I mean using instruments itself from the command line, like:
The above line works for the simulator, but I can't figure out the correct line to run tests on a device. I can get the app to launch with some different params, but the tests won't run. 😢 |
By the way, among other things like transpiling CoffeeScript to JavaScript, bwoken just creates the appropriate string to run instruments from the command line. Once we figure out what string that is, then I can update bwoken to generate that string for you. |
That makes sense. I'll try to catch up to where you are in the problem and then see if I can help you figure it out. Right now when I run the line directly I'm getting |
@listrophy You do have the "Enable UI Automation" turned on, right? (Settings > Developer). via appium I do have it turned on with my 4s (my 6 should come in tomorrow) and I'm getting I did get the simulator to work though so that it is a start, thanks for the help. I'll see if I can figure out how to run the test on the device. |
I haven't figured out much yet. The docs say not to use the path for the app name (when targeting a device) but I haven't noticed any difference with that.
I tried doing a "customized Automation template" but that ended with the same results also. It looks like it doesn't matter if you use the name or the device id. ... still poking away at this. |
I was testing with my iPhone 4s yesterday. It is running iOS 8.1.1 so I thought it wouldn't be any different, but it seems to be. The following does run my the test on my iPad Air 2.
I'm still getting Update: looks like order of arguments matters for it to use the right trace file. I updated the code block above to use the right order. |
@ryanjm Awesome! That gets it working. Now, for the bad news: we need to find a way to push the app onto the device. This invocation of instruments doesn't allow for a way to upload a new version to the device, since it only uses the app name, not the path to the binary. |
I used a combination of the xcodebuild command and the ios-deploy command to automate the building and deploying of an updated app to a test device. It looks something like this:
After that, you can run tests on the testing device with the instruments command. |
@listrophy Thanks for the clarification, sorry I missed that step. @reallyseth thanks for sharing those steps. I'll try it out on Monday. |
Has anyone found a fix to use the bwoken command? |
@kdawgwilk, if I build the app within XCode so it gets loaded onto a simulator or device I can then run the bwoken command with the |
I got it running now on the simulator but after the app is installed. Has a solution been integrated into bwoken to combine the steps found above? I have forked bwoken and started to pick it apart to understand more of what is going on but I'm still far from being able to contribute. |
I have just added bwoken into my project. The tests seemed not to run. The "Complete Duration:" was missing. I also typed some random characters in my test js. bwoken happily accepted them and printed the filenames. Then I restarted my computer, did a fresh installation and run the examples. The results were the same. Enabling verbose gave me empty lines after ** BUILD SUCCEEDED **. I am using Xcode 6.1 (6A1052d)
$ bwoken -v
2.1.0.rc.2
$ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
$ bwoken test
Building.......
Build Successful!
iphone example.js
ipad example.js
$ bwoken test --verbose
Build settings from command line:
BWOKEN_CONFIGURATION_BUILD_DIR = ~/myproject/build/iphonesimulator
SDKROOT = iphonesimulator8.1
Build settings from configuration file '/Library/Ruby/Gems/2.0.0/gems/bwoken-2.1.0.rc.2/lib/bwoken/configs/bwoken.xcconfig':
CONFIGURATION_BUILD_DIR = $(BWOKEN_CONFIGURATION_BUILD_DIR)
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) TEST_MODE=1
ONLY_ACTIVE_ARCH = NO
.
.
.
** BUILD SUCCEEDED **
The text was updated successfully, but these errors were encountered: