ctrf-io / cypress-ctrf-json-reporter

A Cypress JSON test results reporter that follows the CTRF schema
https://ctrf.io
MIT License
7 stars 2 forks source link

JSON result is being overwritten on each test #16

Closed feliperaul closed 2 months ago

feliperaul commented 3 months ago

First of all, thank for this library, it's exactly what we were after!

However, when starting the test suite with yarn run cypress run --browser chrome --project ./test, we notice that the result file get's overwritten after each test runs; this means that the resulting json has an array tests, but it only contains the last test run.

Also, I think the README is not updated regarding the defaults; the default filename that's being generated is test/after-spec-results, and not ctrf/ctrf-report.json as per the docs.

Ma11hewThomas commented 3 months ago

Thanks for your feedback, please can you try version 0.0.8

As you are running command with --project ./test, the project root is ./test so the output directory should be created inside ./test

With default settings the final report should be saved at ./test/ctrf/ctrf-report.json

Please can you confirm if this is the case?

If you still have issues, are you able to share cypress version, config settings and generated report (sensitive info removed)