QA Automation Labs

How to run all Specs /or selected Spec in Cypress v11.2.0


How to run all Specs /or selected Spec in Cypress v11.2.0

Problem Statement

The ability to ‘Run all specs’ or ‘Run filtered specs’ will be removed in Cypress 10.0. For many of the users, the existing implementation “was broken” for them because of how cypress originally architectured supporting this feature. Cypress received feedback regarding the removal of this feature.

In this blog for demo purposes, I am using Cypress version 11.2.0

How to solve the problem

In Cypress version 11.2.0 Cypress team has introduced a feature flag experimentalRunAllSpecs that will restore the prior behavior seen in versions < 10

Steps to Implement ‘Run all specs’ feature

Below are the steps on How we can run all specs in single run

Installing Cypress

Installed Cypress version 11.2.0 using npm install cypress --save-dev

Keep feature flag disable

After installing 11.2.0 next step is to enable experimentalRunAllSpecs flag.

Let’s see when the feature flag experimentalRunAllSpecs is disabled. In the below screenshot, we can see the button to Run all specs is not displaying

Enable the feature flag

When we enable the feature flag experimentalRunAllSpecs:true we can see in the below screenshot button to Run all specs is displaying

After enabling the feature flag either we can run all .specs in a single run or can run a set of .specs

  1. We can run all .specs in a single run

2. We can run a SET of .spec file e.g I want to run the First Set of Spec or Second Set of Spec or Third Set of Spec See in the above screenshot

How to enable Feature Flag

In cypress.config.js set the below commandconst { defineConfig } = require(“cypress”);

module.exports = defineConfig({
e2e: {
experimentalRunAllSpecs: true,
setupNodeEvents(on, config) {
// implement node event listeners here

Steps to run the filtered .specs

If we want to run filtered spec we can simply search and execute the .spec from the list

Two ways of filtering the .specs file

We can run the particular .spec file from the set of specs can be seen in below screenshot

We can also search the .spec file from the Cypress runner and run the .spec file


The ability to ‘Run all specs’ or ‘Run filtered specs’ that was removed in the previous cypress version was re-introduced in Cypress version 11.2.0.

Using the experimentalRunAllSpecs feature flag we can restore the prior behavior and execute all/selected .specs files.

Leave a Comment

Your email address will not be published. Required fields are marked *

Recent Posts


Mocking API Response In Cypress

What is Mocking ? Mocking, in a broader software development and testing context, is a technique used to simulate the behavior of certain components o
Read More

Cypress 13 Integration With BDD/Cucumber & POM

Problem Statement After Cypress version 10, there are some changes needed to integrate Cucumber/BDD with Cypress effectively. In this blog post, we wi
Read More

Running End-to-End Cypress Test cases in a Google Cloud Pipeline

Cypress is an end-to-end testing framework that is used to test web applications. It is an open-source JavaScript-based framework that enables de
Read More