Closed rkrisztian closed 4 years ago
Generating html is a responsibility of mochawesome report generator (marge).
mochawesome-merge exists to combine several json reports into one.
I would recommend you to split these two tasks into two commands if one command does not look beautiful for you
In the meantime I've realized that post- and pre- hooks do not run if the hooked command does not exit with success. So I ended up using more bash scripting.
I think it is kind of unfortunate that we got 3 tools for one single task: generating an HTML report for my whole Cypress execution:
This makes the complexity of project setups somewhat more than desired.
Nevertheless, I realize now it's not your tool's problem. I think it's more like a collective problem of all the tools involved. Or I'm thinking about this problem incorrectly, that I'm trying to fit an ecosystem of tools into one single NPM script line, which is the wrong thing to do.
Anyways, thanks for the info.
I've been following this guide (the CLI way): https://www.npmjs.com/package/mochawesome-merge#cypress But it puts report files all over the place. I'd like all files ideally be in
cypress/results
. For example like this:As you could see, I had to add quite some additional code so that the end result is still
mochawesome.html
. Partly becausemochawesome
does not follow a unique naming for the JSON files, that is, the first file isn't numbered. Ideally I would like to have a command like this:(Something like that, whatever fits best to the tool.)
Could you please provide us with something like that? Thanks in advance.