Comments (8)
I really love this tool. But since you seem to go for a big refactoring maybe these features could be nice too (at least I would love them for our customers projects):
- Custom Theming (provide logo and colors)
- Disable test-code being included into json (since for closed-source projects we just want to publish test results and not the code)
- Since you use react wouldn't it be cool to render the HTML dynamically by loading the JSON in the browser and
JSON.parse
and then render the HTML (React). That way I could only deploy the json somewhere an have an index.html already there with the JS that renders the report.
As far as I understand you are saying with your new project mochawesome-report
one will be able to only generate the json (and not all the assets)? (that would be really nice)
from mochawesome.
@clouless Thanks for the suggestions.
Custom theming is an interesting one but probably not something that will make it into the first releases of v2.
I like the option to disable test code but I'm not sure about leaving it out of the json or just making so it doesn't render in the report.
My thinking is that mochawesome
will continue to generate the json output and mochawesome-report
will consume it and produce the html. This way you should be able to generate a report from previously saved json without re-running the tests.
from mochawesome.
sounds great :)
from mochawesome.
Given that Mocha already has a JSON reporter (and a TAP reporter), is there a definite need for Mochawesome to output its own JSON format instead of piggy-backing on an existing one?
For that matter, if you could not only piggyback on the existing JSON reporter output but create a general tool to take JSON reporter output and any Mocha reporter and feed the Mocha reporter the same events Mocha would have to generate that JSON output, not only would Mochawesome then be able to report on saved test result data, but any Mocha reporter would be able to.
(We had somebody ask about converting JSON to other report formats recently due to a situation where the tool that used Mocha limited its output to JSON, and frankly being able to do this would make testing reporters way easier since it could be separated from running tests to generate the results.)
(Although, maybe an even better alternative would be to create a serialization format for the common test reporter interface so not only would the system work for all Mocha reporters but for all test runners too?)
from mochawesome.
@ScottFreeCode I based the JSON output on the built-in JSON reporter but quickly realized that in order to do all the things I wanted Mochawesome to do, I needed to augment the JSON to add properties and relationships that were not in the existing JSON output.
from mochawesome.
Interesting -- so the JSON reporter is lossy compared to what Mocha's reporter events originally provide? (I'm not very familiar with the events myself beyond the concept and the fact that there have been efforts to standardize them.)
from mochawesome.
The JSON reporter is more selective and basic in the data it outputs. I'm sure it has its uses but it wasn't created to be used as the basis for rendering a full-fledged HTML report.
from mochawesome.
Version 2 is out now
from mochawesome.
Related Issues (20)
- Failed Test cases are marked as passed HOT 2
- Is there a configuration to produce 1 report for all spec files? HOT 1
- Report vanishes on load, returns: "Uncaught TypeError: Expected a finite number" HOT 2
- Filename inheritance option
- Cypress 10.7x - TypeError: addContext is not a function HOT 5
- Need to store report in different folder with different report name for every test run - Mochawesome HOT 1
- ScreenShot is not saving in the screenshot folder - Mochawesome-screenshots HOT 1
- Can not marge the mocha report which genrated in parallel test
- [Discussion] addContext in .then() closure of Cypress (multiple screenshots) HOT 1
- It's possible to update Size ,Color of "addContext"
- How to use Relative path instead of Absolute path for failed screenshot due to cypress-image-snapshot
- missing peer mocha@>=7
- What does the `stats.other` key in the index.json signify ? HOT 3
- Vulnerability in [email protected]
- addContext to selected context in the suite
- Is it possible to show API Response in mochawesome json ? HOT 1
- Running mochawesome from root can mangle testsuite `file` property
- addContext called in beforeEach/afterEach hook adds additional context to the test even when the hook fails and the test is pending
- Retries quantity in mocha report + SDOUT HOT 1
- Unable to generate reports with custom template using mochawesome HOT 1
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.