https://cypress.io logo
Hello everyone! I am new here 👋 I need help with...
# e2e-testing
f
Hello everyone! I am new here 👋 I need help with code coverage generated by cypress. If this is not the best channel to ask about it, please redirect me to the right place. 🙏 I have a small react app and I am trying to build a pipeline for it, using GitHub actions. I am also trying to integrate it with SonarCloud to generate code analysis. I am already able to generate code coverage locally, and when sending the report to a local SonarQube it works perfectly. I am aware that my code needs to be instrumented, and here is the tricky part. I am using
Copy code
"react-scripts -r @cypress/instrument-cra start"
to generate the
.nyc_ouput
file needed to generate coverage. When running cypress on the pipeline, I give him an external URL where my react app is deployed (GitHub pages). However, I am not able to generate the instrumentation for it on the pipeline. Do you know any ways I could generate this
.nyc_output
without having to add it to a script and run my application? Is there any way to generate this
.nyc_output
just with a command analyzing the code? > I am guessing a command like this exists because of a peculiar behavior I noticed. When running my application with
npx cypress run --headless
it does not generate the
nyc_output
. However, when I run opening the interface with
npx cypress open
and clicking to run the tests, it can generate. But I have no idea what is the difference between the headless option and the interface one. Thank you in advance.