79522067

Date: 2025-03-20 06:32:43
Score: 0.5
Natty:
Report link

One thing you can do is combine the specs into a single "batch".

If you make a spec file called, for instance, home-about.spec.js that imports the home spec and about spec

import './home-page-test.spec.js'
import './about-page-test.spec.js'

The command yarn cypress run --spec cypress/e2e/home-about.spec.js produces the following results

enter image description here


That method might be a bit simplistic, depending on what your npm run home-page-test, npm run about-page-test, etc commands are doing.

It might be better to create a NodeJs script and running the Cypress API Module, where you can add various options and also process results and errors.

// e2e-run-tests.js
const cypress = require('cypress')

cypress
  .run({
    spec: [
      './cypress/e2e/home-page-test.spec.js',
      './cypress/e2e/about-page-test.spec.js',
    ]
  })

Run it with the command node e2e-run-tests.js

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Leta Waldergrave