Giter Club home page Giter Club logo

Comments (3)

prasanmgc avatar prasanmgc commented on May 21, 2024 2

I am using cypress-cucumber-preprocessor and figured out to configure this plugin.

Cypress.json
{ "baseUrl": "https://google.com", "env": { "TAGS": "not @ignore", "environment": "staging" } }

Below are the changes required in the plugin code 'cli.js'.

splitting by space will create problem for cucumber tags, as tags will contain spaces. i.e. TAGS='@ui-smoke and not @abc_ui and not @ignore'. so we need to allow arguments to be comma-separated and shouldn't split the args by space.

Place 1:
const CY_SCRIPT_ARGS = argv.args ? [argv.args.trim()] : [];

Place 2:
const child = spawn(pckManager, [ 'run', ${CY_SCRIPT}, isYarn ? '' : '--', '--reporter', 'cypress/support/helpers/json-stream-reporter.js', '--spec', command.tests, **'--env',** ...CY_SCRIPT_ARGS ]);

once this is done, you can pass the tags as arguments cypress-parallel -s test:run:headless -t 5 -d 'cypress/integration/specs/ui' -a CYPRESS_baseUrl='https://www.google.com',TAGS='@ui-smoke and not @abc_ui and not @ignore',environment='staging'

Have tested and it is working as expected. Hope this helps. @tnicola Could you please implement the above changes and publish it?

from cypress-parallel.

LukasLewandowski avatar LukasLewandowski commented on May 21, 2024

Any update on this one? Can we use this plugin to execute Cypress Cucumber tests using tags?
CC @tnicola

from cypress-parallel.

LukasLewandowski avatar LukasLewandowski commented on May 21, 2024

I did some experimenting and current cypress-parallel and cypress-cucumber-preprocessor are working together. You can start tests by filtering them using tags.

"cy:single": "cypress run --env name=local,TAGS='@sanity'"
"cy:parallel": "cypress-parallel -s cy:single -t 2 -d cypress/e2e/tryMe -m false",

from cypress-parallel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.