简体   繁体   中英

Measuring code coverage java using protractor e2e test

There are a two projects one of them is written java is a backend code one of them is angular typescript frontend codes. i wrote e2e tests in the frontend project. now i want to measuring backend code coverage using this e2e test please help

Code Coverage is a measurement of how many lines/blocks/arcs of your code are executed while the automated tests are running.

Search online code coverage tools that can help you, protractor is just end to end testing tool, you need another tool for code coverage.

At a high level,

  1. Instrument cli generated main.js file with grunt protractor coverage
  2. Deploy this as part of your build
  3. Run Protractor tests on the application
  4. Capture coverage for each spec via a collector port
  5. Consolidate spec json files with remapIstanbul
  6. Generate report

The devil is in the details :-)

https://github.com/r3b/grunt-protractor-coverage

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM