Comments (20)
I have mochawesome working here -> https://github.com/testdrivenio/cypress-mochawesome-s3
Essentially-
- cypress runs
- each spec generates a new report
- a custom script combines each mochawesome json file and calculates the stats
- html report is then generated
from mochawesome-report-generator.
Just inserting a suggestion here too: we could implement a [file]
wildcard in reporterFilename
to be replaced with current spec, then we would have predictable filenames at least.
I think the implementation is easy: just insert a regex replace from [file]
to current report data filename in .getFilename()
. We would need to send reportData
parameter from .prepare()
, to .getOptions()
and then .getFilename()
.
If someone thinks this can be helpful, I can give it a try and open a PR if it works.
from mochawesome-report-generator.
I have mochawesome working here -> https://github.com/testdrivenio/cypress-mochawesome-s3
Essentially-
- cypress runs
- each spec generates a new report
- a custom script combines each mochawesome json file and calculates the stats
- html report is then generated
It solves all my problems @mjhea0
from mochawesome-report-generator.
I have mochawesome working here -> https://github.com/testdrivenio/cypress-mochawesome-s3
Essentially-
- cypress runs
- each spec generates a new report
- a custom script combines each mochawesome json file and calculates the stats
- html report is then generated
I am getting this issue when running tests that are in a "pending" state. Any possible fix for this? Great job on the code so far.
Invalid value "pending" supplied to /suites/suites/0/tests/0/state: TestState
from mochawesome-report-generator.
merge reports is the magic word. it's not supported as far as I know
from mochawesome-report-generator.
@SeriousM is correct. This is something that's been on my radar for a while and held up mostly by lack of time to work on it.
from mochawesome-report-generator.
It would be awesome to have it because cypress.io is now generating a single report for every spec (which are a lot) and how I end up with mochawesome_001.html to mochawesome_130.html
This is really bad and cypress.io team is not gonna fix it.
What data in the json file should be joined to generate a single report?
from mochawesome-report-generator.
I'm not really familiar with cypress.io and how it runs the tests. Seems strange that it generates one report for each spec. Is it running each in a separate process? If so I wonder if there's even a way at the reporter level to aggregate everything at the end. You may still need to post-process all the reports through the mochawesome-report-generator CLI.
Each report JSON should have a top level suite. These would need to be combined into one. But the overall stats would be off.
from mochawesome-report-generator.
Each report JSON should have a top level suite. These would need to be combined into one. But the overall stats would be off.
Can I just omit the overall stats then and just do something like this:
{
"suites": {
"suites": [
...<all tests here>...
]
}
}
from mochawesome-report-generator.
ok, I can combine the json files as described. of course my stats are off (maybe I can calculate them later) but the report is ok.
I noticed that missing json properties create validation errors. That's ok, but the latest version of mochawesome creates an incompatible json: Invalid value undefined supplied to /suites/suites/0/tests/0/timedOut: Boolean
. Adding it let marge work again.
Btw: is there a documentation what all the json properties mean? "beforeHooks", "afterHooks", "pending", etc... when is what filled with and do I have to care?
from mochawesome-report-generator.
Most of the JSON properties come directly from mocha.
the latest version of mochawesome creates an incompatible json
Is this with cypress.io? Can you provide a repo to reproduce this? I put the validation in place to avoid bad data when generating the report but it has caused some headaches. I may need to revisit how the JSON is validated and consider loosening the requirements.
from mochawesome-report-generator.
from mochawesome-report-generator.
I noticed that missing json properties create validation errors. That's ok, but the latest version of mochawesome creates an incompatible json:
Invalid value undefined supplied to /suites/suites/0/tests/0/timedOut: Boolean
. Adding it let marge work again.
@SeriousM
Have you managed to solve this problem?
from mochawesome-report-generator.
I noticed that missing json properties create validation errors. That's ok, but the latest version of mochawesome creates an incompatible json:
Invalid value undefined supplied to /suites/suites/0/tests/0/timedOut: Boolean
. Adding it let marge work again.@SeriousM
Have you managed to solve this problem?
OK i got it. @mjhea0 do the job.
from mochawesome-report-generator.
what job? @izydorekjakub
from mochawesome-report-generator.
I noticed that missing json properties create validation errors. That's ok, but the latest version of mochawesome creates an incompatible json: Invalid value undefined supplied to /suites/suites/0/tests/0/timedOut: Boolean. Adding it let marge work again.
When I fixed this and ran marge command I always got 2 separate files.
For example: I have report1.json and report2.json When I run: marge report1.json report2.json
Result will be: report1.html and report2.html. Merge is not executed.
Did you have the same issue?
from mochawesome-report-generator.
Currently we just generate one report per fixture. Sorry that I can't help you any further but we decided to stop investigate this issue any longer as it costs more than it gives us.
from mochawesome-report-generator.
@stephenchan9 - Yes, this has been fixed.
from mochawesome-report-generator.
@govindn Do you found solution for original issue ? merge reports when run in parallel
from mochawesome-report-generator.
@adamgruber Any update on the original issue?
from mochawesome-report-generator.
Related Issues (20)
- Feature: Statistics on suite
- Snapshots stopped showing up on reports after upgrade to v6.0.1 HOT 1
- Add option to avoid use of custom fonts (assets) HOT 1
- How can I get the title of my spec file/describe as my HTML report file namne HOT 5
- Unlimit mochawesome report files above 1000 and rename them HOT 1
- .html extension duplication in 6.1.0 HOT 6
- Please consider progressive enhancement to avoid blank pages when CSPs don't allow JS HOT 3
- Pattern UKStagingJsonReports/.jsons/*.json matched no report files HOT 8
- formatDuration raises sometimes an "Expected a finite number" exception (and it displays a blank screen) HOT 1
- Report shows passed steps as pending HOT 3
- Failures array empty in report
- Asset folder is getting generate even after --inline=true argument
- Copy Text from Test Header
- Please add line number for soure code displaying HOT 1
- Failing to use [name] for reportFilename HOT 1
- Test result file types/interfaces
- Unable to format the "context" section of the mochawesome report
- Ability to show hooks duration in the generated report
- Assets not placed in correct directory
- Reduce the file size mochawesome report
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mochawesome-report-generator.