Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to generate run time code coverage #124

Open
nagaraju-sunkara opened this issue Dec 7, 2018 · 7 comments
Open

how to generate run time code coverage #124

nagaraju-sunkara opened this issue Dec 7, 2018 · 7 comments

Comments

@nagaraju-sunkara
Copy link

nagaraju-sunkara commented Dec 7, 2018

Provide a gradle task to genearte instrument classes with coverage reports genearted at a regular interval

@Alex-Vol-SV
Copy link
Collaborator

Are you looking for Clover coverage generated during regular usage of the instrumented code? What exactly are you talking about? You need to clarify your request. It is very ambiguous and improperly defined.

@nagaraju-sunkara
Copy link
Author

nagaraju-sunkara commented Dec 10, 2018

Yes. I am looking for instrumented classes to have a run time coverage.

How can i Generate a single clover database

I could able to generate the instrumented class files . When it build the JAR file with instrumented code, application startup fails.

@Alex-Vol-SV
Copy link
Collaborator

When building instrumented code your application must include clover.jar as well. Instrumented code has references to Clover classes so your application needs the JAR file.

See documentation of plugin here: Properties

@nagaraju-sunkara
Copy link
Author

Thanks. I could able to generate instrumented JAR file. but it is missing the clover jar as part of build thus throws exception "No class def found".

@Alex-Vol-SV
Copy link
Collaborator

You are responsible for adding this JAR to your application when testing with instrumented JAR file. That is expected of you. I am not going to embed Clover JAR contents in your application JAR file. You can do that if you wanted without changes to the plugin if you think it would help. But the normal way of using the instrumented JAR file is by adding the clover.jar in the application, either on the classpath or inside a WAR file if you are deploying in a container.

@nagaraju-sunkara
Copy link
Author

i could able to add jar at runtime during build now.

Can you give me the steps to have a singleCloverDatabase when it executes the clover tasks?

@Alex-Vol-SV
Copy link
Collaborator

This feature is not implemented yet. We do not handle a clover database produced during an external invocation of instrumented code. If your instrumented JAR is used by an integration test harness managed by Gradle it might be possible to do such a merge of the databases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants