bahmutov / cypress-split

Split Cypress specs across parallel CI machines for speed
MIT License
199 stars 21 forks source link

Getting "cypress-split: no specs to run, running an empty spec file /tmp/empty-6-of-6.cy.js" error #292

Closed praveenkumar3030 closed 3 weeks ago

praveenkumar3030 commented 1 month ago

Hi @bahmutov ,

I have used the Cypress Split plugin in my scripts (I am using the Cucumber Framework and GitLab). I am getting the following error when I use the following line of scripts in my GitLab.yml.

  parallel:
    matrix:
      - VG: ['GB', 'US']
        containers: [1, 2, 3, 4, 5]

npx cypress run -e TAGS="@VG",is_ci=true,split=true --browser chrome --spec "cypress/e2e/features/regressionTests/psj/*.feature";

In PSJ folder there are 5 files inside .

  1. feature1
  2. feature2
  3. feature3
  4. feature4
  5. feature5

Here, VG parameter is nothing but the country value, and we are running 5 features (Spec file) for each and every country.

It's working fine for the first country, i.e. GB. All the features have been executed on all 5 containers. But for US getting the below error on gitlab.

cypress-split: no specs to run, running an empty spec file /tmp/empty-6-of-6.cy.js

image image

How can I resolve this error when providing example matrix 22 or 25, 5*3.. containers on the GitLab YML file? Due to the fact that it was unable to locate the Spec file for the upcoming VG param.

I would appreciate it if you could fix this issue. Thanks in advance! Praveenkumar

bahmutov commented 3 weeks ago

Resolved, see lessons in https://cypress.tips/courses/cypress-split