-
Notifications
You must be signed in to change notification settings - Fork 161
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
Name of the report is not saving as expected (even though 'reportFilename' in cypress.json file is changed) #293
Comments
This will not work because the reporter has already been created with the initial options and no longer references the Cypress config. There is currently no way to have custom filenames for each test. |
Is it possible to implement it as a new feature? |
It might be possible but I don't have a ton of time to devote to it right now. |
Looking into this a bit, adding the feature is pretty straightforward but to work with Cypress will require cypress-io/cypress#1495 to be complete. |
is this feature implemented? |
Not yet but PRs are welcome. |
Please see https://github.com/adamgruber/mochawesome#reportfilename-replacement-tokens which is now available in v7.1.0. I believe this should address your issues. |
i am using mochawesome for my cypress tests.
This is my cypress.json file
when I ran my tests, the reports are generated with name 'sample.html' which is expected as I have defined my report title as sample in cypress.json file.
now I wanted to have unique name for each report generated based on the test suite name.
so I have used the cypress event '
test:before:run
' and set thereportFilename
in cypress.json to the test suite name before the execution of each test, the sample code is down belowI see the
reportFilename
is successfully changed to Tests suite nameBut my report is still saved as 'sample.html'
![image](https://user-images.githubusercontent.com/46937269/67519965-ee3b9700-f675-11e9-9732-167051cc8db5.png)
Why my report is still saving as sample.html , instead of my test suite name?
can you help me to resolve this @adamgruber ?
The text was updated successfully, but these errors were encountered: