Giter Site home page Giter Site logo

Comments (5)

adamgruber avatar adamgruber commented on June 19, 2024

When I run all 3 files together

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.

from mochawesome-report-generator.

Saif4 avatar Saif4 commented on June 19, 2024

"reporter": "mochawesome",
"reporterOptions": {
"charts": true,
"overwrite": false,
"html": true,
"json": true,
"reportDir": "cypress/reports/",
},

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:
mochawesome.html
mochawesome_001.html
mochawesome_002.html

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
accounts.spec.js --> describe name (Accounts)
members.spec.js --> describe name (Members)
admins.spec.js --> describe name (Admins)

For my case I want the mochawesome reports to be:
accounts.html
members.html
admins.html

instead of the default name.

from mochawesome-report-generator.

Saif4 avatar Saif4 commented on June 19, 2024

@adamgruber

from mochawesome-report-generator.

adamgruber avatar adamgruber commented on June 19, 2024

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.

from mochawesome-report-generator.

adamgruber avatar adamgruber commented on June 19, 2024

With v7.1.0 this is now possible. See https://github.com/adamgruber/mochawesome#reportfilename-replacement-tokens

from mochawesome-report-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.