Closed atulparate closed 6 years ago
@atulparate you could write a small utility file for reading excel content and a logic to convert them to the tags appending and
, or
to them.
Since tags in cucumberOpts are basically strings you use string literals to read the content from the excel utility.
Something like - tags - ${excelUtilFn()}
where excelUtilFn() returns a string appending your concerned tags together
Create a object of cucumberOpts={...... tags: "" }
then use cucmberOpts.tags = getTagsOption();
This will update the tags value from the method you used.
@igniteram in the current project how you run tests using tags?
@shabfactor sorry for the late reply, you can tags in the cucumberOpts
object, you could also pass tags through command line and write a npm script for executing those tags tests!
Since this is a stale issue and more of a support question, closing this for now. Please raise a new issue if necessary!
QUESTION
I want to update the config.ts file at runtime where I will be reading excel file where all features and scenarios are present with a run flag. As per the 'Y' it should update that tag attribute from the config.ts file.
Inside excel structure would be something like below, Run Fla | ScenarioTag Y | @InvalidLogin N | @ValidLogin Y | @ VerifyDashboard
After reading above file it should update config.ts as below, cucumberOpts: { compiler: "ts:ts-node/register", format: "json:./reports/json/cucumber_report.json", require: ["../../bdd/StepDefinition//.ts", "../../support/*.ts"], strict: true, tags: "@InvalidLogin or @VerifyDashboard",
Please suggest.