|
|
|
[
Permlink
| « Hide
]
Steve Luo [03/Apr/16 07:17 AM]
Need more information. Comment on this issue if you still want to discuss.
In QuickBuild, although you see just 1 test, you can find there is also a small label showing (2 runs, 1/1), means this test run 2 times, one passed and one failed. This is because we treat testHello as the test in suite com.rola.maven.test.AllTests, although the two testHello are in two different classes, they are in one suite, so we aggregate them together, that is why you see 2 runs.
We also compared the generated surefire html report, and don't find too much difference. Both QuickBuild and surefire use AllTests as the suite name and both ignore the fact that the tests are in two different test classes. You can find that there is no real package name and class name for two testHello in surefire report. Actually, in this case, it is very hard to display like what QuickBuild current does as the test suite here is a super set of all other general test suite (test class). Since very recently we use both reports, the QB integrated and the surefire report.
We then noticed that the number of executed tests is different. We cannot change the AllTests.java because we use hundreds of these suite classes to aggregate our tests in our framework. We don't want and cannot use the automatic test case scanning of maven surefire for several reasons. These suite classes are a common JUnit-Feature both the ant JUnit report and the surefire report can handle the AllTest classes as we use them without problem. Please don't run all of your test by using AllTest.java. In this way, the testsuite name in the output xml report is all changed to com.rola.maven.test.AllTest, QuickBuild will use this name as the suite name for two test cases.
Actually, you needn't use AllTest.java to aggregate the tests, QuickBuild will aggregate the tests automatically. So, just remove the configuration section below: <execution> <id>com.rola.maven.test</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <!-- Remove this section <configuration> <includes> <include>com/rola/maven/test/AllTests.java</include> </includes> </configuration> --> </execution> |