Hi there,
I have been trying to create a CI/CD pipeline for iOS tests, In fact, I have almost finished it, I am just not getting through the phase where Xcode interacts with the WDA,
The app is getting installed in the simulator but somehow because of the webdriveragent issue, I am getting a sessionNotCreated error.
Somehow the WDA is not able to invoke and Hence, the tests are not going through,
I will really appreciate it if someone could guild me. @Sumitbera I have created this whole workflow using your article on bitrise, do you think you could help me with this.
Here is my .yml file
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ios
trigger_map:
- push_branch: "*"
workflow: primary
- pull_request_source_branch: "*"
workflow: primary
workflows:
Demo_WF:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6: {}
- cache-pull@2: {}
- cocoapods-install@2.2: {}
- xcode-build-for-simulator@0:
inputs:
- simulator_os_version: '15.4'
- simulator_device: iPhone 12 Pro Max
- script@1:
inputs:
- content: |-
# Project Directory
mkdir iOSAppAutomation
title: Test Project Directory
- authenticate-with-github-oauth@0:
inputs:
- access_token: "$GIHUTB_MOBILE_AUTOMATION_PWD"
- username: "$GIHUTB_MOBILE_AUTOMATION_USERNAME"
- script@1:
inputs:
- content: |+
cd /Users/vagrant/git/iOSAppAutomation/
echo "Cloning iOS-Automation"
git clone https://github.com/iOSk/iOS-automation.git
cd iOS-automation/
echo "changing branch to TAU-241"
git checkout TAU-241
git branch
is_always_run: true
title: Clone MobileAutomation Repo
- script@1:
inputs:
- content: |-
npm install -g appium
appium &
title: Start Appium Server
- script@1:
title: iOS Dependencies
inputs:
- content: |-
#Install maven
brew install maven
# Install idevice installer
brew install ideviceinstaller
# Install iOS Deploy
npm install -g ios-deploy --unsafe-perm=true --allow-root
# Install iOS Simulator
npm install ios-sim -g --unsafe-perm=true --allow-root
is_always_run: true
- script@1:
title: Start iOS Simulator
inputs:
- content: |
#Start iPhone 12 pro simulator
ios-sim start --devicetypeid com.apple.CoreSimulator.SimDeviceType.iPhone-12-Pro-Max
# check if the simulator is up
xcrun simctl list | egrep '(Booted)'
is_always_run: true
- script@1:
title: Run Tests
inputs:
- content: |+
# Run iOS appium Test
echo "Moving to project directory"
cd /Users/vagrant/git/iOSAppAutomation/tt-mobile-automation/
mvn clean test
is_always_run: true
- deploy-to-bitrise-io@2.0: {}
- slack@3:
inputs:
- channel: "#tech-builds-ios-bitrise"
- text: ''
- webhook_url: "$tt_slack_build_id_webhook"
- cache-push@2: {}