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

Have ITFizzBuzzTest test a Jersey endpoint and show lines executed #3

Open
pdurbin opened this issue Dec 2, 2015 · 0 comments
Open

Comments

@pdurbin
Copy link

pdurbin commented Dec 2, 2015

http://www.petrikainulainen.net/programming/maven/creating-code-coverage-reports-for-unit-and-integration-tests-with-the-jacoco-maven-plugin/ looks great and the examples at https://github.com/pkainulainen/maven-examples/blob/master/code-coverage-jacoco/README work fine but https://github.com/pkainulainen/maven-examples/blob/master/code-coverage-jacoco/src/integration-test/java/ITFizzBuzzTest.java doesn't seem like an integration test to me. It instantiates FizzBuzz and calls a method on it. To me an integration test hits a REST API endpoint.

What if ITFizzBuzzTest called into a Jersey API endpoint with https://github.com/jayway/rest-assured ? (See https://github.com/IQSS/dataverse/blob/v4.2.1/src/test/java/edu/harvard/iq/dataverse/api/BuiltinUsersIT.java#L62 for an example). Would Jacoco know which lines of code were executed? If so, that would be fantastic!

I sort of have my doubts, though, since at http://stackoverflow.com/questions/17433046/integration-test-of-rest-apis-with-code-coverage/17436389#17436389 I'm reading that like me they haven't figured out how to get Jacoco to show code coverage from rest-assured tests. Maybe @johanhaleby or @marchof or @theon knows. I hope this makes sense!

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

1 participant