Run tests on iOS device
We need to have ios-deploy, libimobiledevice and appium-xcuitest-driver installed:
sudo npm install -g ios-deploy --unsafe-perm=true
brew install libimobiledevice
npm install appium-xcuitest-driver
brew install libimobiledevice
npm install appium-xcuitest-driver
Check your device id:
idevice_id --list
Build like:
react-native run-ios --device
Here you will also see the path to where your app is being built.
In your wdio.conf capabilities should look like this:
capabilities: [
{
maxInstances: 1,
platformName: "iOS",
deviceName: "<DEVICE_NAME>",
automationName: "XCUITest",
platformVersion: "11.4",
udid: "<UDID of your phone>",
xcodeOrgId: "<TEAM-ID>",
xcodeSigningId: "iPhone Developer",
app: path.resolve("./ios/build/Build/Products/Debug-iphoneos/yourappname.app")
}
],
Assuming you have test defined in packages.conf like wdio wdio.conf, you could try now:
npm run test
Comments
Post a Comment