Giter Site home page Giter Site logo

Comments (9)

adamgruber avatar adamgruber commented on May 25, 2024 3

Fixed with mochawesome-report-generator 3.1.5

from mochawesome-report-generator.

Antontelesh avatar Antontelesh commented on May 25, 2024 1

So, why is this issue closed? mochawesome does not put the timedOut property into JSON, when marge expects it to be present.

from mochawesome-report-generator.

adamgruber avatar adamgruber commented on May 25, 2024 1

The timedOut property doesn't come from mochawesome, it comes from mocha. See here. The problem is that the test object generated by Cypress does not have a timedOut property.

Unfortunately I keep running into scenarios like this. The reporter was initially designed to work only with mocha and is based off of the test object that mocha generates. However there are other libraries that use mocha under the hood so the reporter is compatible but can exhibit unexpected behavior like this.

The JSON validation was put in place to ensure that marge can successfully generate an HTML report without errors or unexpected rendering since you can pass whatever JSON you want to the cli.

Looking closer, the generated HTML report currently doesn't use the timedOut property so I may just relax the validation for this property.

from mochawesome-report-generator.

JPHamlett1993 avatar JPHamlett1993 commented on May 25, 2024

Had to add the line

"timedOut": false,

To the test. Still make no sense why it would fail while it works using mochawesome

from mochawesome-report-generator.

adamgruber avatar adamgruber commented on May 25, 2024

When you use mochawesome to create the report, it does not validate the JSON data because it assumes that the reporter will provide valid data. However, when you use marge CLI the JSON goes through a validation process to ensure the data has the correct structure since there is no knowing where it came from. That's why you got the error you did.

from mochawesome-report-generator.

Antontelesh avatar Antontelesh commented on May 25, 2024

To give you more context, I'm merging multiple JSON reports generated by mochawesome and then feed the result to marge.

Due to the issue with timedOut property, I'm limited to use the JavaScript API while using CLI would have been simpler.

from mochawesome-report-generator.

stephanmullerNL avatar stephanmullerNL commented on May 25, 2024

I'm running into this same problem when running from the CLI. It would be nice if this could be reopened, the problem clearly isn't solved.

from mochawesome-report-generator.

stephanmullerNL avatar stephanmullerNL commented on May 25, 2024

Awesome, thanks a bunch!

from mochawesome-report-generator.

ujwaldhakal avatar ujwaldhakal commented on May 25, 2024

it didnt fix for me @adamgruber
Invalid value null supplied to /stats/passPercent: Number Invalid value null supplied to /stats/pendingPercent: Number Invalid value undefined supplied to /stats/passPercentClass: PercentClass Invalid value undefined supplied to /stats/pendingPercentClass: PercentClass Invalid value undefined supplied to /suites: Suite Invalid value undefined supplied to /copyrightYear: Number

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.