plu / pxctest Goto Github PK
View Code? Open in Web Editor NEWExecute tests in parallel on multiple iOS Simulators
License: MIT License
Execute tests in parallel on multiple iOS Simulators
License: MIT License
Hi
I want to run my test targets parallel in same version of simulators.Is that possible?
to be more clear what I want to do is
targetA -----ios 6 version 10.1
targetB------ios 6 version 10.1
After updating to Xcode 8.3 I have switched to the master build of pxctest
(because 0.3.1 doesn't work with Xcode 8.3) and tried to run our test suite. Pxctest reported Test run was empty, no tests were executed
error.
If I run the test suite with xcodebuild using the command below, all the test files are found and executed .
xcodebuild test-without-building \
-xctestrun './xcode-build-dir/Build/Intermediates/CodeCoverage/Products/MyApp_iphonesimulator10.3-x86_64.xctestrun' \
-destination "OS=10.3,name=iPhone 7 Plus"
To run pxctest, I use the following command:
pxctest run-tests \
--destination 'name=iPhone 7 Plus,os=iOS 10.3' \
--testrun './xcode-build-dir/Build/Intermediates/CodeCoverage/Products/MyApp_iphonesimulator10.3-x86_64.xctestrun' \
--output './xcode-build-dir/reports'
Been trying this out with Xcode 8.2. Using boot-simulators
seems to correctly put the simulators into the booted
state (verified via xcrun simctl --path <simset> list
). From that point, using run-tests
causing the previously "headless" simulators to suddenly grow a head. I've checked & double checked the options I'm passing (even going as far verify them by debugging pxctest
).
What else could this issue be?
FYI, we've fully automated our iOS builds with CI & CD using build-for-testing
and 'test-without-building`. Would love to help out with this project to, hopefully drastically, reduce our integration times.
I am using appium to run my test on real iPhone device. Now I want to run it paralleled on multiple real iPhone devices. How can I use this tool is my project.
Some of my tests have a requirement to attach photos. For this we have a number of photos stored in the Camera Roll. We then can attach a photo in our app. However, we delete the simulator each time (starting fresh each time we found to be more reliable) and there are no photos in the Media folder of the device type so when we go to add a photo as an attachment in our app the tests fail. Would it be possible for the media folder to be pre-populated with a sample photo? I have looked at adding something like:
xcrun simctl addmedia {UUID} ./Automation/Media/*.jpg or/Automation/Media/*.jpg
xcrun simctl addmedia booted .
Any suggestions on the best approach ? Thank you for any help.
when I run test with .xctestrun file. it has UnitTest and UITest. I run only UnitTests.
But, output is NilError. What did I do wrong?
I did
xcodebuild \
-derivedDataPath "$PWD/derivedData" \
-scheme 'MyApp' \
-workspace 'MyApp.xcworkspace' \
-destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3' \
build-for-testing
and
pxctest \
run-tests \
--testrun derivedData/Build/Intermediates/CodeCoverage/Products/MyApp_iphonesimulator10.3-x86_64.xctestrun \
--destination 'name=iPhone 5,os=iOS 10.3' \
--destination 'name=iPhone 6,os=iOS 10.3' \
--only UnitTests
Using this
pxctest
run-tests
--destination 'name=iPad Air,os=iOS 10.2'
--destination 'name=iPad Air,os=iOS 10.2'
--testrun "/Users/username/Library/Developer/Xcode/DerivedData/MyApp-erqmuczdcogowjdmkomhdxdfgnfa/Build/Intermediates/CodeCoverage/Products/MyApp_iphonesimulator10.2-x86_64.xctestrun"
I see more than 5 simulator opening and it keeps opening more, I have to kill command line to stop it.
I have a config like below:
rm -rf /tmp/IS24_PR/test-simulators
mkdir /tmp/IS24_PR/test-simulators
pxctest boot-simulators \
--deviceset /tmp/IS24_PR/test-simulators \
--destination 'name=iPhone 7,os=iOS 10.3' \
--destination 'name=iPhone 6,os=iOS 9.3'
pxctest run-tests \
--testrun /tmp/IS24_PR/derivedData/Build/Intermediates/CodeCoverage/Products/ImmoScout24-Alpha_iphonesimulator10.3-x86_64.xctestrun \
--deviceset /tmp/IS24_PR/test-simulators \
--destination 'name=iPhone 7,os=iOS 10.3' \
--destination 'name=iPhone 6,os=iOS 9.3' \
--only 'ImmoScout24-AlphaTests'
It can run quite well for some time. But then I got this error.
NSUnderlyingError=0x7f91bc001b40 {Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to boot device because it cannot be located on disk." UserInfo={NSLocalizedRecoverySuggestion=Use the device manager in Xcode or the simctl command line tool to either delete the device properly or erase contents and settings., NSLocalizedDescription=Unable to boot device because it cannot be located on disk., NSLocalizedFailureReason=The device's data is no longer present at /path/to/device
Do you have any idea how to fix it?
Is it possible to create simulators in a specific location, e.g. --deviceset /tmp/test-simulators, without booting them in a headless state using boot-simulators?
I would like to be able to create simulators, then "run-tests" and delete the simulators once testing has completed.
Currently, I can use boot-simulators but am forced to run in a headless state using this.
So I can run the same tests in parallel in different simulators but is it possible to run different tests at the same time?
Getting the following error, please advise!
brew tap plu/pxctest && brew install pxctest
`
/private/tmp/pxctest20161207-1608-wajtb0/Dependencies/Commander /private/tmp/pxctest20161207-1608-wajtb0
Cloning https://github.com/kylef/Spectre
git: The build tool has reset ENV; --env=std required.
swift-package: error: No version tag found in (/private/tmp/pxctest20161207-1608-wajtb0/Dependencies/Commander/Packages/Spectre) package. Add a version tag with "git tag" command. Example: "git tag 0.1.0"
`
Installation fails with the following log
==> Installing pxctest from plu/pxctest
==> Cloning https://github.com/plu/pxctest.git
Updating /Users/samhan/Library/Caches/Homebrew/pxctest--git
==> Checking out tag 0.3.1
==> ./scripts/build.sh /usr/local/Cellar/pxctest/0.3.1/libexec
Last 15 lines from /Users/samhan/Library/Logs/Homebrew/pxctest/01.build.sh:
2017-02-03 12:05:29 +0530
./scripts/build.sh
/usr/local/Cellar/pxctest/0.3.1/libexec
/private/tmp/pxctest-20170203-2407-4xnvuf/Dependencies/Commander /private/tmp/pxctest-20170203-2407-4xnvuf
Cloning https://github.com/kylef/Spectre.git
git: The build tool has reset ENV; --env=std required.
swift-package: error: No version tag found in (/private/tmp/pxctest-20170203-2407-4xnvuf/Dependencies/Commander/Packages/Spectre.git) package. Add a version tag with "git tag" command. Example: "git tag 0.1.0"
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/plu/homebrew-pxctest/issues
I tried pxctest on Xcode 9 beta and I get "Abort trap: 6" on every command.
cbennett-70ap:iOSxm8 i58288$ sudo xcode-select -s ../../.././../../../../Applications/Xcode-beta.app/Contents/Developer/
Password:
cbennett-70ap:iOSxm8 i58288$ pxctest run-tests --destination 'name=iPad Air 2,os=iOS 10.3' --testrun build/Products/iOSxm8_iphonesimulator11.0-x86_64.xctestrun
Abort trap: 6
cbennett-70ap:iOSxm8 i58288$ pxctest run-tests --destination 'name=iPad Air 2,os=iOS 11.0' --testrun build/Products/iOSxm8_iphonesimulator11.0-x86_64.xctestrun
Abort trap: 6
cbennett-70ap:iOSxm8 i58288$ pxctest run-tests --help
Abort trap: 6
cbennett-70ap:iOSxm8 i58288$
Any support for Xcode beta?
I wold like to run only the tests in one class, therefore I run:
bundle exec rake test:unit[MyAwesomeTestClass]
A small issue happens if the class name is misspelled. In that case the project is still built, and the output looks like:
UnitTests - iPhone 5 iOS 10.2 - Finished executing 0 tests after 0.002s. 0 Failures, 0 Unexpected
UnitTests - iPhone 5 iOS 9.0 - Finished executing 0 tests after 0.001s. 0 Failures, 0 Unexpected
Total - Finished executing 0 tests. 0 Failures, 0 Unexpected
It clearly says Finished executing 0 tests
but I would rather prefer a big red error message :P
Is it possible to re-run failed tests and if not, would it take much effort to add this option?
Has anyone used partition? if so, is it working fine?I would also like to implement splitting my scheme into 2 simulators, I am using a different way but I think this would be easier.
After installing from brew according to the info in the README.md, the boot-simulators
command is not available.
$ pxctest boot-simulators
Unknown command: boot-simulators
$ pxctest
Usage:
$ pxctest
Commands:
+ run-tests
+ version
$ pxctest version
pxctest 0.2.9 (7bb7c7e)
I am trying the headless testing with the boot-simulators command. It looks like new simulator devices are being created and booted in the provided folder (/tmp/test-simulators
in your example).
How can I gracefully shutdown (and possibly delete) the newly created simulator devices after being done with the tests?
Hi
After running build command I get
/var/folders/sc/b19_wblj5bv5wyph7hw5y5b95jc55b/T/SchemeScriptAction-Qjp2Sy: line 2: $: command not found
** TEST BUILD SUCCEEDED **
And i cant see that build/Products file generated.Is there something i missed.
And I should inform you also i get the message below while installing it.
_
You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages
_.
objc[31962]: Class _TtCs18_EmptyArrayStorage is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs24_ContiguousArrayStorage1 is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs17_CocoaSetIterator is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs24_CocoaDictionaryIterator is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs17NonObjectiveCBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs17_stdlib_AtomicInt is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs19_SwiftNativeNSArray is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs24_SwiftNativeNSDictionary is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs17_SwiftNativeNSSet is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs24_SwiftNativeNSEnumerator is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs18_SwiftNativeNSData is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs26_SwiftNativeNSCharacterSet is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs31_stdlib_ReturnAutoreleasedDummy is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs20_SwiftNativeNSString is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs19_NSContiguousString is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs40_SwiftNativeNSArrayWithContiguousStorage is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs21_SwiftDeferredNSArray is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs27_ContiguousArrayStorageBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs14_VaListBuilder is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtCs13VaListBuilder is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSError is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class SwiftObject is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftValue is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNull is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSArrayBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSDictionaryBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSSetBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSStringBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSEnumeratorBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSDataBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSCharacterSetBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftNativeNSIndexSetBase is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftCore.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC8Dispatch16DispatchWorkItem is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftDispatch.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftDispatch.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC10Foundation15NSSimpleCString is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC10Foundation16NSConstantString is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC10Foundation25NSFastEnumerationIterator is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC10Foundation25_NSErrorRecoveryAttempter is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC10Foundation20_SwiftNSCharacterSet is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _TtC10Foundation12_SwiftNSData is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
objc[31962]: Class _SwiftTypePreservingNSNumber is implemented in both /usr/local/Cellar/pxctest/0.2.1/libexec/PXCTestKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib and /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework/Versions/A/Frameworks/libswiftFoundation.dylib. One of the two will be used. Which one is undefined.
I have followed exactly what is given in the RM file. How ever when I execute pxctest run-test, I was always given the error below:
Error Domain=com.facebook.XCTestBootstrap Code=0
it opens the application and immediately minimising the application and after while raises the above issue.
I use --output command to output pxctest
result to circle CI
but I want the JUnit file to be passed to Circle CI
Since updating pxctest and xcode (to 8.3) I have noticed that testing takes a long time to actually begin. It looks like the app is installed on the simulator but then there is a few minutes delay until the app is actually launched. I have tried with both the latest pxctest version and pxctest --HEAD and see the same issue with both. Here is the command I'm running:
pxctest run-tests --destination 'name=iPhone 6s,os=iOS 10.3' --destination 'name=iPhone 6s Plus,os=iOS 10.3' --testrun "<path to .xctestrun>" --output ~/Desktop/test
Partial log output at point of delay:
2017-04-07 11:13:55.849858 pxctest[8314:71970] A4625354-FCE6-4834-BD82-0ED20668CD6C: TestManager Did Connect => TestManager Awaiting Result for (Test Host PID 8597 | Test Host Bundle com.apple.test.TravelerUITests-Runner | Session ID 9220E72D-3C1D-4EF2-B82A-BB3A931A17E4)
2017-04-07 11:13:55.878928 pxctest[8314:71970] A4625354-FCE6-4834-BD82-0ED20668CD6C: Test Plan Started
2017-04-07 11:13:55.879154 pxctest[8314:71970] A4625354-FCE6-4834-BD82-0ED20668CD6C: _XCT_didBeginExecutingTestPlan
2017-04-07 11:13:55.879551 pxctest[8314:71970] A4625354-FCE6-4834-BD82-0ED20668CD6C: Started initilizing for UI testing.
2017-04-07 11:16:11.458411 pxctest[8314:71970] 2E83107C-1BA9-46A9-A858-BA37C069A6DE: _XCT_testSuite:didStartAt:
2017-04-07 11:16:11.458937 pxctest[8314:71970] 2E83107C-1BA9-46A9-A858-BA37C069A6DE: _XCT_testSuite:didStartAt:
2017-04-07 11:16:11.459320 pxctest[8314:71970] 2E83107C-1BA9-46A9-A858-BA37C069A6DE: _XCT_testSuite:didStartAt:
I have also tried with a single simulator and I see the same issue.
See discussion here:
➜ github brew install pxctest
Updating Homebrew...
==> Installing pxctest from plu/pxctest
==> Cloning https://github.com/plu/pxctest.git
Updating /Users/dmytrogolub/Library/Caches/Homebrew/pxctest--git
==> Checking out tag 0.3.3
==> ./scripts/build.sh /usr/local/Cellar/pxctest/0.3.3/libexec
Last 15 lines from /Users/dmytrogolub/Library/Logs/Homebrew/pxctest/01.build.sh:
^
/tmp/pxctest-20170507-41569-1606bgn/PXCTestKit/Extension/String+PXCTestKit.swift:9:8: error: could not build Objective-C module 'CommonCrypto'
import CommonCrypto
^
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /tmp/pxctest-20170507-41569-1606bgn/PXCTestKit/Reporter/TestReporter.swift
CompileSwift normal x86_64 /tmp/pxctest-20170507-41569-1606bgn/PXCTestKit/Command/RunTests/RunTestsReporters.swift
CompileSwift normal x86_64 /tmp/pxctest-20170507-41569-1606bgn/PXCTestKit/Command/RunTests/RunTestsPartitionManager.swift
CompileSwift normal x86_64 /tmp/pxctest-20170507-41569-1606bgn/PXCTestKit/FileReader.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(5 failures)
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/plu/homebrew-pxctest/issues
the failure seems to be happening due to the following line in module.modulemap of CommonCrypto.framework
module CommonCrypto [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/CommonCrypto/CommonCrypto.h"
export *
}
I have few versions of Xcode installed and none of them is in Applications folder. Changing the path to my Xcode location fixed the problem.
Not sure how to fix it for any Xcode location.
Hi,
Can you please clarify if I can use this framework with my existing framework which is based in Java ?
Thanks in advance.
Regards,
Vikrma
Is it possible to generate a .plist file with the test results instead of junit/xml file.?
These two work fine:
$ pxctest boot-simulators --destination "name=iPhone 7,os=iOS 10.3 --deviceset /tmp/test-simulators"
$ pxctest boot-simulators --destination "name=iPhone 6s,os=iOS 9.3 --deviceset /tmp/test-simulators"
These two don't:
$ pxctest boot-simulators --destination "name=iPhone 6,os=iOS 8.4 --deviceset /tmp/test-simulators"
$ pxctest boot-simulators --destination "name=iPhone 6,os=iOS 8.3 --deviceset /tmp/test-simulators"
They both end up with the following error:
Timed out waiting for all required services [com.apple.SpringBoard, com.apple.medialibraryd, com.apple.backboardd, com.apple.mobile.installd, com.apple.SimulatorBridge] to start
$ xcodebuild -version
Xcode 8.3.2
Build version 8E2002
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12
BuildVersion: 16A323
Seeing this error somewhat frequently, not sure how its cropping up...
UI Testing Failure - Application is not running, unable to get Accessibility data. Did you call -launch?
This is the output of the command
brew tap plu/pxctest
brew install pxctest
Output:
==> Installing pxctest from plu/pxctest
==> Cloning https://github.com/plu/pxctest.git
Updating /Users/ignazioc/Library/Caches/Homebrew/pxctest--git
==> Checking out tag 0.2.6
error: no such remote ref f64bef8536fcfc7998df68846460e5adf93be347
Fetched in submodule path 'Dependencies/FBSimulatorControl', but it did not contain f64bef8536fcfc7998df68846460e5adf93be347. Direct fetching of that commit failed.
Error: Failed to download resource "pxctest"
Failure while executing: git submodule -q update --init --recursive
I was able to install only using the HEAD
commit.
➜ ~ brew install pxctest --HEAD
==> Installing pxctest from plu/pxctest
==> Cloning https://github.com/plu/pxctest.git
Updating /Users/ignazioc/Library/Caches/Homebrew/pxctest--git
==> Checking out branch master
==> ./scripts/build.sh /usr/local/Cellar/pxctest/HEAD-c4d456a/libexec
🍺 /usr/local/Cellar/pxctest/HEAD-c4d456a: 227 files, 9.9M, built in 50 seconds
➜ ~
Additional info:
➜ ~ brew --version
Homebrew 1.1.2
Homebrew/homebrew-core (git revision ac83; last commit 2016-12-01)
➜ ~ git --version
git version 2.9.3 (Apple Git-75)
Anyone seeing this issue?, my simulators are boots however the test never starts.
Error Domain=com.facebook.FBSimulatorControl Code=0 "Timed out waiting for all required services [com.apple.SpringBoard, com.apple.medialibraryd, com.apple.backboardd, com.apple.mobile.installd, com.apple.SimulatorBridge] to start" UserInfo={NSLocalizedDescription=Timed out waiting for all required services [com.apple.SpringBoard, com.apple.medialibraryd, com.apple.backboardd, com.apple.mobile.installd, com.apple.SimulatorBridge] to start}
At latest master (0.3.2) build fails. (either via Xcode Cmd+B or ./script/build.sh fails)
I could work-around it by removing Spectre from embedded Commander.xcodeproj
.
Homebrew fails with same error.
$ brew unlink pxctest && brew tap plu/pxctest && brew install pxctest
Unlinking /usr/local/Cellar/pxctest/0.3.1... 0 symlinks removed
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
amazon-ecs-cli jmxtrans rtv
==> Installing pxctest from plu/pxctest
==> Cloning https://github.com/plu/pxctest.git
Updating /Users/a14786/Library/Caches/Homebrew/pxctest--git
==> Checking out tag 0.3.2
==> ./scripts/build.sh /usr/local/Cellar/pxctest/0.3.2/libexec
Last 15 lines from /Users/a14786/Library/Logs/Homebrew/pxctest/01.build.sh:
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/Context.swift'
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/Expectation.swift'
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/Failure.swift'
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/Global.swift'
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/GlobalContext.swift'
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/Reporter.swift'
<unknown>:0: error: no such file or directory: '/tmp/pxctest-20170331-10773-1wigcy1/Dependencies/Commander/.build/checkouts/Spectre.git--7655155069707042687/Sources/Reporters.swift'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(1 failure)
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/plu/homebrew-pxctest/issues
Issue type: Feature Request
Why:
I need to gather coverage data from running tests.
How:
This is available in xcodebuild using the following:
xcodebuild \
-derivedDataPath /tmp/some/directory \
-enableCodeCoverage YES \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0' \
-xctestrun path/to/file.xctestrun \
test-without-building
to extract the coverage data with LLVM
xcrun llvm-cov report -instr-profile /tmp/some/directory/Build/Intermediates/CodeCoverage/Coverage.profdata /tmp/some/directory/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Example.app/Example
I don't know if its possible to pass xcodebuild those command line arguments using pxctest or if it is something that fbxctest would need to incorporate (or neither).
Any idea what's going on here? The build succeeded but it didn't generate $PWD/build/Products/. xctestrun file. But an .xctest run file is generated at Build/Intermediates/CodeCoverage/Products/MyApp_iphonesimulator10.1-x86_64.xctestrun, when run this location getting an error as shown below.
`
Xcode 8.1
Build version 8B62
xcodebuild
-IDEBuildLocationStyle=Custom
-IDECustomBuildLocationType=Absolute
-IDECustomBuildProductsPath="$PWD/build/Products"
-scheme 'MyApp'
-workspace 'MyApp.xcworkspace'
-destination 'platform=iOS Simulator,name=iPhone 5,OS=10.1'
build-for-testing
pxctest \
run-tests
--destination 'name=iPhone 5,os=iOS 10.1'
--testrun Build/Intermediates/CodeCoverage/Products/MyAppUnitTests_iphonesimulator10.1-x86_64.xctestrun
Error Domain=com.facebook.XCTestBootstrap Code=0 "Failed to find test host application" UserInfo={NSLocalizedDescription=Failed to find test host application, NSUnderlyingError=0x7f845045a1d0 {Error Domain=com.facebook.FBControlCore Code=0 "Could not obtain Bundle ID for app at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest" UserInfo={NSLocalizedDescription=Could not obtain Bundle ID for app at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest}}}
`
--only
to VaradicOption
TARGET[:Class/case[,Class2/case2]]
After running pxctest run-tests the simulators launch but before the app is loaded
Error Domain=com.facebook.FBSimulatorControl Code=0 "Failed start test manager" UserInfo={NSLocalizedDescription=Failed start test manager, NSUnderlyingError=0x7fafc1d1d3a0 {Error Domain=com.facebook.XCTestBootstrap Code=0 "Failed to determine test runner process PID" UserInfo={NSLocalizedDescription=Failed to determine test runner process PID}}}
i get the above issue.
Using iphone 6 and 7 iOS 10.1 Simulators
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.