My first topic is marked as SPAM, so I recreated it.
I'm struggling with setting up per-test coverage for integration tests.
I have the simple setup:
mvn clean clover:setup installto build the project and run the tests.
mvn clover:cloverto generate the html report based on clover.db.
For unit-tests, per-test coverage works superbly: in the html-report on covered lines I see a green line, and by clicking on it it displays the tests that cover this line.
For integration tests, the green/red coverage is shown, but there is no green line and I can't see, which lines are covered by tests.
I tried to do instrumentation-level distributed coverage by adding
to clover-maven-plugin configuration
to maven-surefire-plugin configuration, according to Using Distributed Per-test Coverage page.
But nothing changes: I still do not see test coverage on classes run on the server.
Logs about running distributed coverage are written to maven log.
Distributed coverage is enabled with: name=clover.tcp.server;host=localhost;port=1198;timeout=5000;numClients=0;retryPeriod=1000
Starting distributed coverage client: name=clover.tcp.server;host=localhost;port=1198;timeout=5000;numClients=0;retryPeriod=1000
The strange thing is that when I look to WildFly log, I see similar logs too (after server start):
2017-09-26 17:35:32,895 INFO [stdout] Distributed coverage is enabled with: name=clover.tcp.server;host=localhost;port=1198;timeout=5000;numClients=0;retryPeriod=1000
2017-09-26 17:35:32,896 INFO [stdout] Starting distributed coverage client: name=clover.tcp.server;host=localhost;port=1198;timeout=5000;numClients=0;retryPeriod=1000
which makes me think that the remote server behaves as Clover server, not as the client.
1) Do I have to use distributed coverage at all, since the decision matrix says that for my simple case I just have to use "showUniqueCoverage=true"? I tried to add this to maven configuration, but this does not work as well.
2) Since integration tests are run via maven-failsafe-plugin, I suppose we have to add some configuration to this plugin too.
I've seen this page, but it looks extremely complex and obsolete with aggregate reports and huge report descriptors.
How to configure maven-failsafe-plugin correctly?
3) How do I understand that distributed coverage has started successfully both for the server and client sides?
4) How to make my WildFly server work as Clover-client, not as Clover-server?
Thanks in advance for your answers!
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Heya, Hipchat friends! We’re so happy you’re checking out Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs