-
Notifications
You must be signed in to change notification settings - Fork 89
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
How can I get the title of my spec file/describe as my HTML report file namne #185
Comments
Can you provide more details on how you are running your tests? What options are you passing to the reporter? Based on your comment I would expect a single report to be output, not 3. |
"reporter": "mochawesome", It become 3 reports because I have 3 spec files with each describe command inside them, and that's why I'm getting 3 reports after each describe has finished. So the html reports become as the follow: But what I want is to inherit the name of my describe or the spec file it self. In my case I have 3 spec files with each describe command inside with those those names For my case I want the mochawesome reports to be: instead of the default name. |
The functionality you are looking for is not currently available. There are some differences with how standalone mocha works and how it works when using cypress. These differences make adding this feature non-trivial but I am trying to find a solution that will work for the majority of cases. |
With v7.1.0 this is now possible. See https://github.com/adamgruber/mochawesome#reportfilename-replacement-tokens |
Let's say I have 3 spec files that each one of them has its own describe. When I run all 3 files together mochawesome report will be generated as
mochawesome.html
mochawesome_001.html
mochawesome_002.html
Is it a way to inherit the spec file name or even the descripe name of the spec file into the reports?
The text was updated successfully, but these errors were encountered: