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

Updating feature title dynamically based on env #1259

Closed
3 tasks done
jrutila opened this issue Nov 27, 2024 · 1 comment
Closed
3 tasks done

Updating feature title dynamically based on env #1259

jrutila opened this issue Nov 27, 2024 · 1 comment

Comments

@jrutila
Copy link

jrutila commented Nov 27, 2024

Current behavior

I have feature files I want to run in multiple modes, let's call the modes md, json and xml.
I tag the feature files that are supposed to be run against the different modes with a tag @mode
The idea is that I run three different runs variating the mode, e.g. cypress run -e \"TAGS=@mode\" -e \"mode=md\" and after that cypress run -e \"TAGS=@mode\" -e \"mode=json\" and so on

The feature file top looks like this

@mode
Feature: Load document
  This feature supports different modes

Now, the problem is that when my CI runs these and reports all the test suites are named the same: Load document and I can't differentiate between the different mode runs.

Desired behavior

I would like to be able to edit the feature/suite title according to the mode env. After this edit the test suite could be named for example Load document (md), Load document (json) etc

Feature request or question?

It might be that this is possible already by hooking into some hook and editing the suite title there. If so, please point me to the correct hook to make this edit.

Versions

  • Cypress version: 13.16.0
  • Preprocessor version: 21.0.3
  • Node version: 20

Checklist

@badeball
Copy link
Owner

badeball commented Nov 27, 2024

There's no way of modifying tests results during execution. Furthermore, this seems beyond the scope of gherkin - your features should be standalone descriptions of behavior. You can look into example tables or just considering shipping three different reports.

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