Serenity-js: How to run a specific tag like -Dtest.tagnames=RegressionTest

Created on 22 Aug 2018  路  5Comments  路  Source: serenity-js/serenity-js

I am aware of the 'tags' option in the 'config' file which is more useful to ignore some tag. But in case the test targetting only a specific tag how can be achieved it?

question

All 5 comments

Hi, I achieved this creating a script in my package json:

"smokeUat": "node ./node_modules/protractor/bin/protractor ./protractor.conf.js --cucumberOpts.tags="@uat""

With this I only run the scripts with tag uat.
Also you can use the name of the scenario:

"runSpecificScenario": "node ./node_modules/protractor/bin/protractor ./protractor.conf.js --cucumberOpts.name scenarioName"

Documentation is pretty good here!

Hey @rakeshnambiar! Does @jdmesalosada and @nbarrett suggestions solve the issue for you?

Thanks @jdmesalosada @nbarrett and @jan-molak. It's worked for me. Previpously I mentioned all the required tags within a single quotes instead of :
['~@RegressionTest', '@SanityTest']

Glad you managed to get it resolved, thanks for letting us know!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edupeeth picture edupeeth  路  7Comments

AbhineetSharmax picture AbhineetSharmax  路  4Comments

codesandtags picture codesandtags  路  4Comments

mrj04 picture mrj04  路  3Comments

rakeshnambiar picture rakeshnambiar  路  7Comments