Home > database >  webdriver-manager start --detach do not detach the server in Azure DevOps
webdriver-manager start --detach do not detach the server in Azure DevOps

Time:07-28

I want to run my selenium tests in Azure DevOps. We use agents on ubuntu-20.04.

To achieve this I use npm. So my package.json has next scripts:

"scripts": {
  "update_webdriver": "webdriver-manager update",
  "start": "webdriver-manager start --detach",
  "test": "jest"
}, 

Then I have azure-pipelines.yml with next stage:

- stage: Test
displayName: Run tests
jobs:
  - job: Test
    steps:
    - task: Npm@1
      displayName: npm install
      inputs:
        command: 'install'
    - task: Npm@1
      displayName: npm update
      inputs:
        command: 'custom'
        customCommand: 'run update_webdriver'
    - task: Npm@1
      displayName: npm start
      inputs:
        command: 'custom'
        customCommand: 'start'
    - task: Npm@1
      displayName: npm test
      inputs:
        command: 'custom'
        customCommand: 'test' 

Problem is that pipeline hangs on "npm start" command and doesn't go further. But locally --detach argument works fine.

CodePudding user response:

Only solution I found is to run stanalone selenium in docker container.

  • Related