Ashutosh
Ashutosh

Reputation: 35

How to run cypress tests in parallel in Azure DevOps?

We have a framework built upon the following

  1. Cypress
  2. Cucumber
  3. Typescript Is there any way we can run the tests in parallel both in local system and Azure devops?

Upvotes: 1

Views: 955

Answers (1)

Danilo Patrucco
Danilo Patrucco

Reputation: 142

It is quite simple to run it in parallel in Azure Devops.

All you need to do is to make the tasks dependent on the previous task / stage / job E.g.

trigger:
- main

variables:
  - group: Your-var-group

pool:
  vmImage: 'ubuntu-latest'

stages:
- stage: build

  jobs:

  - job: Build
  
      steps:
    - script: |
        echo "build"

- stage: CucumberTest
  dependsOn: build
  jobs:
  - job: cucumber
    - script: |
        echo " run cucumber"

- stage: SeleniumTest
  dependsOn: build
  jobs:
  - job: selenium
    - script: |
        echo " run selenium"

Because both stages depend on build the will both be executed at the same time after the completion on build (you need to have multiple available Agents to do that).

You don't need to give a stage dependency, you can create dependencies based off jobs or tasks Conditions_docs

Upvotes: 1

Related Questions