Mahbub
Mahbub

Reputation: 3

how to run multiple spec files in cypress 10?

I am using cypress 10.0.0, I try to integrate multiple test (spec) file on cypress.config.ts, is possible on new cypress update ??

import { defineConfig } from "cypress";

export default defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      // implement node event listeners here
    },
    supportFolder: 'cypress/support',
    fixturesFolder: 'cypress/fixtures',
    screenshotsFolder: 'cypress/screenshots',
    videosFolder: 'cypress/videos',
    baseUrl: 'http://localhost:5200',
    retries: {
      runMode: 5,
      openMode: 5,
    }
  },
});

Upvotes: 0

Views: 4023

Answers (2)

Tags
Tags

Reputation: 147

Yes it is possible, create a new e2e spec that just imports all other specs.

cypress/e2e/all.cy.js

import './spec1.cy.js'
import './spec2.cy.js'
import './spec3.cy.js'

Then chose all.cy.js as the spec to open in the runner.

Upvotes: 2

Alapan Das
Alapan Das

Reputation: 18634

To run all spec files together you have to use the command:

npx cypress run

Upvotes: 1

Related Questions