Help on instrumenting app code accessed by cy.visit #14510
Replies: 2 comments 3 replies
-
Unfortunately, you need to run your application (or build and run) with instrumentation enabled. If for example, you have a production JavaScript code build running on another machine, then the Cypress plugin cannot help you (since it only collects the code coverage information, not instruments the code). There are people trying to use built-in DevTools code coverage to show coverage for production code, or I had this tool https://github.com/bahmutov/was-tested for instrumenting code on the fly - but none of them are seriously working. I suggest you run your web application locally, insert the Istanbul plugin to instrument the code, run E2E tests, get the coverage then deploy the site. |
Beta Was this translation helpful? Give feedback.
-
I’m sorry but I don’t know. I don’t know it angular version would include the Istanbul plugin to instrument the code during bundling any differently
…Sent from my iPhone
On Jan 15, 2021, at 21:30, karthik22061993 ***@***.***> wrote:
Hi Gleb, once agin thanks, I am using angular 6.1 and example is using angular 8.x . Is it must I have upgrade Angular to 8.x in order to generate e2e test code-coverage? I tried using with 6.1, I see some package mismatch errors like this
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I am performing end to end test using cypress on my angular app served by node.js. I want to generate code coverage for test. As described in documentation,
cypress\plugins\index.js
cypress\support\index.js
package.json
.babelrc
Note all my angular and server code is in another machine, I access the app using cy.visit(www.xyz.com). Iam not sure whether I am doing instrumentation correctly. But how can I instrument code that doesn't exist in my machine?
Any help or suggestion will really help me:)
Beta Was this translation helpful? Give feedback.
All reactions