This small utility reads story cards information from Mingle and test cases information from junit tests, generate test coverage information for them. To use it, you have to add it-coverage-1.0-SNAPSHOT.jar to your test project, then use @Story(storyNumber) to annotate your test class or test case to build the relationship between your story card and test cases. For example: /** * @story 2 */ public void test1() { } or /** * @story 2 */ public class Story1StubTest { public void test1() { } public void test2() { } } Then if your mingle story card has the all the acceptance criteria at the end of the description, formatted like this: h1. 验收策略 # 正常路径1 # 正常路径2 # 异常路径1 ... You can then use the maven plugin to generate a html report: <plugin> <groupId>com.thoughtworks.maven</groupId> <artifactId>itcoverage-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <configuration> <resourceUrl>http://localhost:8080/api/v2/projects/testProject/cards.xml?page=all&filters[]=[Type][is][Story]&sort=number&order=ASC</resourceUrl> <username>username</username> <password>password</password> <testPattern>".*Test.*"</testPattern> </configuration> </plugin>
exceedhl/integration-test-coverage
This small utility calculate integration test coverage by scanning story cards from mingle and manually annotated junit test cases.
Java