1

I am trying to run my Appium test on CircleCI Mac OS image on an iPhone simulator. Code is written in Python with Behave. Here is my config.yml file

version: 2.1
orbs:
  macos: circleci/macos@2.2.0

jobs:
  example-job:      
    macos:
      xcode: 12.4
    steps:
      - checkout
      - run:
          name: Install appium server
          command: |
            sudo npm update -g
            sudo npm install appium
            sudo npm install wd
      - run:
          name: Start appium server
          command: appium & 
          background: true
       
      - run:
          name: Installing Dependencies
          command: pip3 install -r requirements.txt
  
      - run:
          name: Run Test
          command: behave --tags=sanity
workflows:
  example-workflow:
    jobs:
      - example-job

Here is my the error I am getting

MaxRetryError: HTTPConnectionPool(host='localhost', port=4723): Max retries exceeded 
with url: /wd/hub/session (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 0x106602a60>: Failed to 
establish a new connection: [Errno 61] Connection refused')) 

Snapshot of the CircleCI pipeline execution

enter image description here

Any help?

Naseem
  • 911
  • 5
  • 18
  • 48

1 Answers1

0

As mentioned in this link https://discuss.circleci.com/t/unable-to-start-appium-server/39144, I was able to run the code.

Use the below code to start Appium. Posting it here if anyone is also stuck

  - run:
      name: Install appium server
      command: |
             sudo npm update -g
             sudo npm install -g appium
             sudo npm install -g wd
Naseem
  • 911
  • 5
  • 18
  • 48