-
Notifications
You must be signed in to change notification settings - Fork 57
Error when running the tests #4
Comments
Just looking at this error message it's hard to tell what exactly went wrong. Is it possible that you share the products generated by |
I am running into exact same problem. source code on fbsimcontrol:
So it apparently failed to retrieve the PID of current simulators while simulator was up... But ps -A shows a ton of PIDs associated with iphonesimulator. This could be FBSimulator issue also... May I ask what part of product are you asking to see? |
It's really tough to help here without any further information. It is by the way not trying to find the PID of the simulator, it is trying to find the PID of the test runner process. This is either the application under test, or, for the UI Test case, the UI Test Runner application. |
Yes but what information do you need @plu to debug, can you be specific |
One possible root cause can be that your app is built for a higher deployment target than the Simulator you want to use. Example: When I try to run this on a 9.3 Simulator, I get the same error: $ pxctest run-tests \
--testrun build/Build/Products/Test_iphonesimulator10.2-x86_64.xctestrun \
--destination 'os=iOS 9.3'
Error Domain=com.facebook.FBSimulatorControl Code=0 "Failed start test manager" UserInfo={NSLocalizedDescription=Failed start test manager, NSUnderlyingError=0x7f88226276a0 {Error Domain=com.facebook.XCTestBootstrap Code=0 "Failed to determine test runner process PID" UserInfo={NSLocalizedDescription=Failed to determine test runner process PID}}} This is because the app requires iOS 10.2, so it cannot run on 9.3. You can find log files per Simulator in this directory: If I check the log file for the scenario described before, I can see this in the logs:
Next step is to figure out why it crashed. Crash log are placed here: |
Thank you @plu for helping investigating, let me double check my simulator and will let you know in a couple of days. |
Were you able to get this working? I am getting the same error. I see the simulator starting, it tries to open the app then fails with the Failed to determine test runner process PID error. Deployment target is set at 9.3 and I'm running on Simulator 10.2 |
@andrewcrawfordstv can you provide logs for the simulator ( |
@ollieatkinson Weird I'm not getting any logs for the times I'm running the tests... The only thing is this in Core Simulator a few minutes before the tests ran: CoreSimulatorService[424] : Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSLocalizedDescription=Invalid request: Invalid port UUID specified.} The run command I'm using is this after build for testing: pxctest run-tests --destination 'name=iPhone 7,os=iOS 10.2' --testrun build/Products/UITests_iphonesimulator10.2-x86_64.xctestrun This results in the error when running the tests: Error Domain=com.facebook.FBSimulatorControl Code=0 "Failed start test manager" UserInfo={NSLocalizedDescription=Failed start test manager, NSUnderlyingError=0x7fd03d7bb250 {Error Domain=com.facebook.XCTestBootstrap Code=0 "Failed to determine test runner process PID" UserInfo={NSLocalizedDescription=Failed to determine test runner process PID}}} |
I also meet the same problem, my deployment target is 7.0 and base SDK is iphoneos9.0. Which makes me feel quite frustrated |
It might also be a 32 Bit vs. 64 Bit Simulator issue. For example iPhone 5 is 32 Bit and iPhone 5s is 64 Bit. If the test target was only compiled for It's always a good idea to check the log files here: And the Crashes in |
@plu I'm running the tests on an iPhone 7 Simulator which is 64 bit. I'm building for testing using this: xcodebuild build-for-testing -IDEBuildLocationStyle=Custom -IDECustomBuildLocationType=Absolute -IDECustomBuildProductsPath="$PWD/build/Products" -workspace xx.xcworkspace -scheme xxUITests -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.2' |
@andrewcrawfordstv please check the logs here: |
@plu Only thing that gets updated is CoreSimulator.log but the last entry was about 30 mins before I ran the tests. Something that might be worth mentioning. I just tried it there with KIF tests and it worked. Although running tests that use import XCTest fail. |
If your test target does not have a Host Application, then I have to disappoint you - this is not supported by |
I can also confirm that with Xcode 8.3.1 it's not possible to run tests. Tests fails with error even we have test target with host application attached.
Simulator logs are too noisy and one of the error is
|
I understand that there's a lot to digest when looking at these logs. But that's the best way to figure out what is going wrong. If you want you can upload the logs and I can have a look. Please make sure that you're providing the logs of the correct Simulator (the UDID must match). |
After running pxctest run-tests the simulators launch but before the app is loaded
i get the above issue.
Using iphone 6 and 7 iOS 10.1 Simulators
The text was updated successfully, but these errors were encountered: