We have an application which is deployed on JBoss 5.1, JDK 1.6. We also have scripts written in PowerShell for testing. These scripts access the application using a web-service. I would like to check the code coverage of the scripts. Any ideas? Most of the tools I saw are checking a JUnit test coverage and I don't see how we can use them.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
AFAIK, all code coverage tools use the same concept (I'll omit the reporting and checking part):
For the second step, the common use case is indeed to run JUnit tests but your tests don't have to be JUnit tests. Actually, they don't even have to be automated.
And the instrumented code doesn't have to be executed in the context of a unit test, it can be packaged in a WAR/EAR and deployed on a container (this will just require a bit more work).
For Cobertura, this is what we can read in the Frequently Asked Questions:
For Emma, this is what the documentation says:
For clover, check the Working with Distributed Applications page.
Code cover is a great tool. For your case you should use command-line interface, that might you incorporate with existing PowerShell scripts.
I use emma coverage tool integrated with unit testing project build phase, however, tool's documentation says that it's fairly simple to get code coverage at situation you described.
I suggest jacoco, as it does not require source code modifications. Check out Measuring Code Coverage in (Tomcat) Java Applications with a GreyBox Harness