Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber Tags Not Running Features without Background Defined #2432

Open
elizajanus-ally opened this issue Sep 26, 2024 · 3 comments
Open

Cucumber Tags Not Running Features without Background Defined #2432

elizajanus-ally opened this issue Sep 26, 2024 · 3 comments

Comments

@elizajanus-ally
Copy link

👓 What did you see?

For the past week, we have been unable to use the cucumber-js CLI --tags flag to run Scenarios in Features that do not contain the "Background" keyword. The command we are using is cucumber-js $(node playwright-parallel.js ./features) --retry 1 --parallel 3 --tags \"@example-tag and not @broken and not @known-issue and not @scopeChanged and not @local\" -f json:reports/cucumber-report-$INDEX.json -f html:reports/cucumber-report.html. Playwright-parallel.js provides paths to our feature files. Even though the DEBUG logs show that cucumber found 86 scenarios based on the tag provided, no scenarios are run, and we see the output as "0 scenarios; 0 steps". We are not seeing any errors, just that there are no scenarios run despite the fact that the array for "Found feature files based on configuration: []" consist of 86 accurate paths to files. It does not make logical sense given the purpose of the "Background" keyword that we see this result when Features do not contain "Background", and that scenarios run as expected when Features do contain "Background".

✅ What did you expect to see?

We expect to see that all of the scenarios from the selected features listed in the DEBUG logs will be run, or that we will at least encounter an error that indicates why the scenarios are not running.

📦 Which tool/library version are you using?

node v18.17.0, cucumber ^9.4.0

🔬 How could we reproduce it?

  1. Install node v19.17.0 and cucumber 9.4
  2. Set up a Feature file with Background and set up another Feature file without Background, tag each at the Feature level with a different tag, i.e. @background and @no-background
  3. Try running: cucumber-js --retry 1 --parallel 3 --tags "@background" -f json:reports/cucumber-report.json -f html:reports/cucumber-report.html
  4. Try running: cucumber-js --retry 1 --parallel 3 --tags "@no-background" -f json:reports/cucumber-report.json -f html:reports/cucumber-report.html

📚 Any additional context?

No response

@davidjgoss
Copy link
Contributor

For the past week

What happened before this past week? What changed?

@davidjgoss
Copy link
Contributor

the DEBUG logs

Can you paste the output here where you see Resolved configuration: in the debug logs?

@elizajanus-ally
Copy link
Author

The QA developers said that they had changed the tags so that they are at the Feature level rather than at the Scenario level, but according to the Cucumber docs the tag inheritance would basically ensure there is not a change in functionality, and since there are working tests that would not seem to be the problem. Here is the output for Resolved configuration on a test run that did not run any scenarios vs. the configuration for a run when scenarios ran, the output is similar.

Not running scenarios:

Resolved configuration: {
  backtrace: false,
  dryRun: false,
  forceExit: false,
  failFast: false,
  format: [
    'json:reports/cucumber-report-1.json',
    'html:reports/cucumber-report.html'
  ],
  formatOptions: {},
  import: [],
  language: 'en',
  name: [],
  order: 'defined',
  paths: [
    'features/C3_Auto/Auto_Account.feature',
    'features/C3_Auto/Auto_Authredesign_ContractSelection.feature',
    'features/C3_Auto/Auto_Authredesign_Secondary_persona.feature',
    'features/C3_Auto/Auto_CaseRecord.feature',
    'features/C3_Auto/Auto_Case_CreditBureauCaseMilestoneData.feature',
    'features/C3_Auto/Auto_Case_Privacy_BillingAddress.feature',
    'features/C3_Auto/Auto_Case_SpecialHandling_TotalLoss.feature',
    'features/C3_Auto/Auto_CreditBureauCases.feature',
    'features/C3_Auto/Auto_ExtensionRegression.feature',
    'features/C3_Auto/Auto_ExtensionRegression_2.feature',
    'features/C3_Auto/Auto_LightningComplaint.feature',
    'features/C3_Auto/Auto_LightningLetter.feature',
    'features/C3_Auto/Auto_LightningUnPaidCharges.feature',
    'features/C3_Auto/Auto_RiskReviewTeam_Identifier.feature',
    'features/C3_Auto/Auto_authredesign_ContractSearch.feature',
    'features/C3_Bank/Credit',
    'Card/Complaints/Bank_CredirCard_FieldSetupValidationRules.feature',
    'features/C3_Bank/Credit',
    'Card/Complaints/Bank_CreditCard_ComplaintsHistory.feature',
    'features/C3_Bank/Credit',
    'Card/Complaints/Bank_CreditCard_ComplaintsRecordTypesAdmin.feature',
    'features/C3_Bank/Credit',
    'Card/Customer',
    'Search/Bank_CreditCard_ContactSSNAddress.feature',
    'features/C3_Bank/Deposit/Account',
    'Services/Bank_CaseCreation.feature',
    'features/C3_Bank/Deposit/Account/Account',
    'Details/Bank_LightningStopChecks.feature',
    'features/C3_Bank/Deposit/Account/Actions/Accounts/Bank_IRA.feature',
    'features/C3_Bank/Deposit/Account/Actions/Accounts/Bank_RemoveFunds.feature',
    'features/C3_Bank/Deposit/Account/Actions/Customer',
    'Service/Bank_LossPrevention.feature',
    'features/C3_Bank/Deposit/Account/Actions/Money',
    'Movement/Bank_ECheckDepositInquiry.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_ATMFeeRefund.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_ChangeIRA.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_DecedentDeceasedAccountHolder.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_FulfillmentOrder1.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_LightningDecedentAccount.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_OpenAnEstateAccount.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_RemoveAccount2.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_UnauthorizedCheck.feature',
    'features/C3_Bank/Deposit/Account/Cards/Bank_LimitChange.feature',
    'features/C3_Bank/Deposit/Account/Wire',
    'Transfers/Bank_WiresCreateCase.feature',
    'features/C3_Bank/Deposit/Actions/Accounts/Bank_LightningOpenAccounts.feature',
    'features/C3_Bank/Deposit/Actions/Customer',
    'Service/Bank_CashBackPromo2.feature',
    'features/C3_Bank/Deposit/Actions/Workflows/Bank_ExternalAccountIssues.feature',
    'features/C3_Bank/Deposit/Authentication/Authentication/Bank_Deposit_Deceased_Classification.feature',
    'features/C3_Bank/Deposit/Authentication/Seamless',
    'Authentication/Bank_Authentication.feature',
    'features/C3_Bank/Deposit/Authentication/Seamless',
    'Authentication/Bank_LightningExceptionDenied',
    'copy.feature',
    'features/C3_Bank/Deposit/Authentication/Search/Bank_LightningSearchCustomer.feature',
    'features/C3_Bank/Deposit/Contacts/Contact',
    'Methods/Bank_Contacts_DemandNoteCustomer.feature',
    'features/C3_Bank/Deposit/Contacts/Contact',
    'Methods/Bank_Contacts_MailingAddress.feature',
    'features/C3_Bank/Deposit/Contacts/General',
    'Information/Bank_LightiningMinorAccount.feature',
    'features/C3_Bank/Deposit/Customer',
    'Cases/Bank_OEBCaseRiskReviewQueue.feature',
    'features/C3_Bank/Deposit/Customer',
    'Information/Bank_DepositPPPValidation.feature',
    'features/C3_Bank/Deposit/FACT/Bank_FACT_Cases.feature',
    'features/C3_Bank/Deposit/FACT/Bank_FACT_NoRiskRouting.feature',
    'features/C3_Bank/Deposit/Features/Bank_DeptAccount.feature',
    'features/C3_Bank/Invest/Customer/Account/Invest',
    'Actions/Logs/Bank_Invest_Interactionlogs_DueDate.feature',
    'features/C3_Bank/Invest/Customer/Account/Tasks/Bank_Invest_TaskCreation.feature',
    'features/C3_Bank/Invest/Customer/Customer',
    'Credentials/Bank_Invest_CustomerCredentials.feature',
    'features/C3_Bank/Invest/Customer/Customer',
    'Search/Bank_Invest_CustomerSearch.feature',
    'features/C3_Bank/Invest/Leads/Bank_Invest_QuickLead.feature',
    'features/C3_Bank/Mortgage/Customer',
    'Search/Bank_Mortgage_SearchRemoval.feature',
    'features/C3_Bank/Wealth/Customer',
    'Search',
    '/Bank_Wealth_SearchRemoval.feature',
    'features/setInitial_Password.feature'
  ],
  parallel: 3,
  publish: false,
  publishQuiet: false,
  require: [
    'utilities/**/*.ts',
    'objects/**/*.ts',
    'step-definitions/**/*.ts'
  ],
  requireModule: [ 'ts-node/register' ],
  retry: 1,
  retryTagFilter: '',
  strict: true,
  tags: '(@cease_desist and not @broken and not @known-issue and not @scopeChanged and not @local)',
  worldParameters: {}
}

vs. Resolved configuration when it proceeds to run scenarios:

Resolved configuration: {
  backtrace: false,
  dryRun: false,
  forceExit: false,
  failFast: false,
  format: [
    'json:reports/cucumber-report-1.json',
    'html:reports/cucumber-report.html'
  ],
  formatOptions: {},
  import: [],
  language: 'en',
  name: [],
  order: 'defined',
  paths: [
    'features/C3_Auto/Auto_Account.feature',
    'features/C3_Auto/Auto_Authredesign_ContractSelection.feature',
    'features/C3_Auto/Auto_Authredesign_Secondary_persona.feature',
    'features/C3_Auto/Auto_CaseRecord.feature',
    'features/C3_Auto/Auto_Case_CreditBureauCaseMilestoneData.feature',
    'features/C3_Auto/Auto_Case_Privacy_BillingAddress.feature',
    'features/C3_Auto/Auto_Case_SpecialHandling_TotalLoss.feature',
    'features/C3_Auto/Auto_CreditBureauCases.feature',
    'features/C3_Auto/Auto_ExtensionRegression.feature',
    'features/C3_Auto/Auto_ExtensionRegression_2.feature',
    'features/C3_Auto/Auto_LightningComplaint.feature',
    'features/C3_Auto/Auto_LightningLetter.feature',
    'features/C3_Auto/Auto_LightningUnPaidCharges.feature',
    'features/C3_Auto/Auto_RiskReviewTeam_Identifier.feature',
    'features/C3_Auto/Auto_authredesign_ContractSearch.feature',
    'features/C3_Bank/Credit',
    'Card/Complaints/Bank_CredirCard_FieldSetupValidationRules.feature',
    'features/C3_Bank/Credit',
    'Card/Complaints/Bank_CreditCard_ComplaintsHistory.feature',
    'features/C3_Bank/Credit',
    'Card/Complaints/Bank_CreditCard_ComplaintsRecordTypesAdmin.feature',
    'features/C3_Bank/Credit',
    'Card/Customer',
    'Search/Bank_CreditCard_ContactSSNAddress.feature',
    'features/C3_Bank/Deposit/Account',
    'Services/Bank_CaseCreation.feature',
    'features/C3_Bank/Deposit/Account/Account',
    'Details/Bank_LightningStopChecks.feature',
    'features/C3_Bank/Deposit/Account/Actions/Accounts/Bank_IRA.feature',
    'features/C3_Bank/Deposit/Account/Actions/Accounts/Bank_RemoveFunds.feature',
    'features/C3_Bank/Deposit/Account/Actions/Customer',
    'Service/Bank_LossPrevention.feature',
    'features/C3_Bank/Deposit/Account/Actions/Money',
    'Movement/Bank_ECheckDepositInquiry.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_ATMFeeRefund.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_ChangeIRA.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_DecedentDeceasedAccountHolder.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_FulfillmentOrder1.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_LightningDecedentAccount.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_OpenAnEstateAccount.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_RemoveAccount2.feature',
    'features/C3_Bank/Deposit/Account/Actions/Workflows/Bank_UnauthorizedCheck.feature',
    'features/C3_Bank/Deposit/Account/Cards/Bank_LimitChange.feature',
    'features/C3_Bank/Deposit/Account/Wire',
    'Transfers/Bank_WiresCreateCase.feature',
    'features/C3_Bank/Deposit/Actions/Accounts/Bank_LightningOpenAccounts.feature',
    'features/C3_Bank/Deposit/Actions/Customer',
    'Service/Bank_CashBackPromo2.feature',
    'features/C3_Bank/Deposit/Actions/Workflows/Bank_ExternalAccountIssues.feature',
    'features/C3_Bank/Deposit/Authentication/Authentication/Bank_Deposit_Deceased_Classification.feature',
    'features/C3_Bank/Deposit/Authentication/Seamless',
    'Authentication/Bank_Authentication.feature',
    'features/C3_Bank/Deposit/Authentication/Seamless',
    'Authentication/Bank_LightningExceptionDenied',
    'copy.feature',
    'features/C3_Bank/Deposit/Authentication/Search/Bank_LightningSearchCustomer.feature',
    'features/C3_Bank/Deposit/Contacts/Contact',
    'Methods/Bank_Contacts_DemandNoteCustomer.feature',
    'features/C3_Bank/Deposit/Contacts/Contact',
    'Methods/Bank_Contacts_MailingAddress.feature',
    'features/C3_Bank/Deposit/Contacts/General',
    'Information/Bank_LightiningMinorAccount.feature',
    'features/C3_Bank/Deposit/Customer',
    'Cases/Bank_OEBCaseRiskReviewQueue.feature',
    'features/C3_Bank/Deposit/Customer',
    'Information/Bank_DepositPPPValidation.feature',
    'features/C3_Bank/Deposit/FACT/Bank_FACT_Cases.feature',
    'features/C3_Bank/Deposit/FACT/Bank_FACT_NoRiskRouting.feature',
    'features/C3_Bank/Deposit/Features/Bank_DeptAccount.feature',
    'features/C3_Bank/Invest/Customer/Account/Invest',
    'Actions/Logs/Bank_Invest_Interactionlogs_DueDate.feature',
    'features/C3_Bank/Invest/Customer/Account/Tasks/Bank_Invest_TaskCreation.feature',
    'features/C3_Bank/Invest/Customer/Customer',
    'Credentials/Bank_Invest_CustomerCredentials.feature',
    'features/C3_Bank/Invest/Customer/Customer',
    'Search/Bank_Invest_CustomerSearch.feature',
    'features/C3_Bank/Invest/Leads/Bank_Invest_QuickLead.feature',
    'features/C3_Bank/Mortgage/Customer',
    'Search/Bank_Mortgage_SearchRemoval.feature',
    'features/C3_Bank/Wealth/Customer',
    'Search',
    '/Bank_Wealth_SearchRemoval.feature',
    'features/setInitial_Password.feature'
  ],
  parallel: 3,
  publish: false,
  publishQuiet: false,
  require: [
    'utilities/**/*.ts',
    'objects/**/*.ts',
    'step-definitions/**/*.ts'
  ],
  requireModule: [ 'ts-node/register' ],
  retry: 1,
  retryTagFilter: '',
  strict: true,
  tags: '(@flows and not @broken and not @known-issue and not @scopeChanged and not @local)',
  worldParameters: {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants