Appium Server没有在Circleci Macos Image中启动

发布于 2025-02-12 18:34:51 字数 1421 浏览 0 评论 0原文

我正在尝试在iPhone模拟器上的CircleCi Mac OS图像上运行Appium测试。代码以python的方式编写。这是我的config.yml文件,

version: 2.1
orbs:
  macos: circleci/[email protected]

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

这是我的错误,我将获得

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')) 

Circleci管道执行的快照

=“ https://i.sstatic.net/4bvbx.png” alt =“输入图像描述在这里”>

有帮助吗?

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/[email protected]

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月隐月明月朦胧 2025-02-19 18:34:51

如此链接中所述/t/无法启动的appium-server/39144 ,我能够运行代码。

使用以下代码启动Appium。如果有人也被困在这里

  - run:
      name: Install appium server
      command: |
             sudo npm update -g
             sudo npm install -g appium
             sudo npm install -g wd

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文