Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

264
Visualizações
How can I get Jenkins pipeline to run a specific cypress test folder to run using a single command when pushing changes to my web app

I have the following directory structure for working with Cypress:

cypress-automation
    cypress
        fixtures
        integration
           apps
              one-spec.js
           pulse
              sample-spec.js
              another-spec.js
        examples
        plugins
        screenshots
        support
        videos
    node_modules
    cypress.env.json
    cypress.json 
    package-lock.json
    package.json

I want to be able to have a command to be able to target the pulse folder test when a specific push has been made. Has anyone made an attempt or has this working that can help me out ?

Edit: Lets say i have a few specs in the app folder. now if i wanted a way to run those specs instead with a specific command when pushing new code changes, is that possible. I want to be able to run specific folders with different scenarios so I am not always running everything everytime.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can directly use the command like this:

npx cypress run --spec "cypress/integration/pulse/*-spec.js"

You can also pre-define commands with specific folders in your package.json like this:

"scripts": {
  "test:pulse": "cypress run --spec \"cypress/integration/pulse/*-spec.js\""
  "test:app": "cypress run --spec \"cypress/integration/app/*-spec.js\""
}

Now when you want to run pulse tests you can just run npm run test:pulse or for app you can run npm run test:app

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda