Name: XCTestWD
Owner: Macaca
Description: A Swift implementation of WebDriver server for iOS that runs on Simulator/iOS devices.
Created: 2017-04-23 08:04:52.0
Updated: 2018-05-16 09:57:32.0
Pushed: 2018-05-16 09:57:30.0
Homepage: https://macacajs.github.io
Size: 681
Language: Swift
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Swift implementation of WebDriver server for iOS that runs on Simulator/iOS devices.
XCTestWD can be either started with XCode IDE or via simple xcodebuild command line. By default, the webdriver agent occupies port 8001
. You can override the default port in XCode by searching XCTESTWD_PORT
under project build settings. Alternatively, it can also be overrided when you execute command line method as specified in 2.2. Using Xcodebuild
Download the project and open the XCode project, checkout the scheme XCTestWDUITests
and run the test case XCTextWDRunner
Open the terminal, go to the directory where contains XCTestWD.xcodeproj
file and execute the following command:
ange the port number to override the default port
odebuild -project XCTestWD.xcodeproj \
-scheme XCTestWDUITests \
-destination 'platform=iOS Simulator,name=iPhone 6' \
XCTESTWD_PORT=8001 \
clean test
To execute for iOS device, run the following command:
ange the port number to override the default port
ecify the device name
odebuild -project XCTestWD.xcodeproj \
-scheme XCTestWDUITests \
-destination 'platform=iOS,name=(your device name)' \
XCTESTWD_PORT=8001 \
clean test
Note: For versions above wxtestwd 2.0.0, please install ideviceinstaller for supporting real device testing
In the current protocol, element strings for each XCUIElementType
are generated based on the existing mapping in reference/xctest/xcuielementtype
Socket Hangup Error happens in the following two scenarios:
Case 1
Issue:
When you have some existing XCTestWD instances running and creating new ones.
Solution:
verify whether ideviceinstaller and xcrun is properly working on your device and simulator.
Hint:
https://github.com/libimobiledevice/ideviceinstaller/issues/48
Case 2
Issue:
When you have started the XCTestWD instance properly but fails in middle of a testing process.
Solution:
See the Macaca Service log to checkout which command leads the error. With detailed and comprehensive log information, please submit an issue to us.
Optional:
If you cannot get anything from macaca server log, open the XCTestWD in your node installation path and attatch for debugging on process 'XCTRunnerUITests-Runner'.
Additional Info
The project path is at
$(npm root -g)/macaca-ios/node_modules/xctestwd"
Set up the linebreak for swift error and exceptions:
Run your command regularly, once the driver has been initialized, attach the process:
Check carthage installation
Now XCTestWD supports gathering debug log into log files which is stored in “Your-App-Sandbox-Root”/Documents/Logs dir. For real devices, you can connect to itunes and choose backup for XCTestWDUITests
and get the debug log. For iOS simulators, the log file is in your computer's simulator app directory like:
ers/${user-name}/Library/Developer/CoreSimulator/Devices \
evice-id}/data/Containers/Data/Application/${app-id}/Documents/Logs"
You can use xcrun simctl list
to get the id of the booted device.
|
SamuelZhaoY
|
xudafeng
|
holy-lousie
|
adudurant
|
Chan-Chun
|
gurisxie
| :—: | :—: | :—: | :—: | :—: | :—: |
This project follows the git-contributor spec, auto upated at Sat Apr 21 2018 12:04:14 GMT+0800
.