I have an existing Spring MVC webapp, built with Ant, set up in Jenkins for CI builds.
I am getting nice code coverage reports from my unit tests with Cobertura.
I recently added some functional/UI tests with Selenium. Does anyone have suggestions for how I could get a single code coverage report from both functional and unit tests? Has anyone done this successfully?
My end goal is to count code coverage holistically, so each class/method can be tested with the technique that makes the most sense and I hope to get close to 100% across all forms of testing. A specific example: it might make more sense to cover controllers through end-to-end UI testing, when they don't have any real logic of their own to test in isolation. I would then still report the code as "covered".
I am not trying to start a debate about unit tests being good/bad or TDD vs. BDD - I am asking a question about how to accomplish my goal with a given set of technologies.
I think Grails handles this nicely, but I haven't figured out how to do this with a regular webapp (Spring MVC, Java EE/JSF, etc.)
-
You might have better luck asking this in sqa.stackexchange.com they deal with a lot of test framework architecture questionsJess– Jess2014年07月11日 19:34:48 +00:00Commented Jul 11, 2014 at 19:34
-
How can I move the question? It wasn't an option under "close" - a few other StackExchange sites like dba and serverfault were options, though.wrschneider– wrschneider2014年07月12日 01:49:52 +00:00Commented Jul 12, 2014 at 1:49