Code Coverage shows 0% for IntelliJ while running web app

Viewed 13964

I have a web server application that I am running inside IntelliJ. I want to run the server with code coverage, then execute an external test harness that will make requests, and see how much of the code is executed by those requests.

I can generate the correct code coverage when running unit tests from within the IDE, but when I run with Code Coverage on and execute with an external harness, I get all 0's for code coverage.

If I run the web app in the debugger instead, it triggers breakpoints as expected, so I know that code is being executed.

Please help!

4 Answers

This is addition to answer given by Maurits will like add another image of coverage window. You just click 'X' red mark to close the coverage lines in left side.

enter image description here

Related