velo/flexmojos — pull request #7 by xfournet (2012-08-08 13:11:12+00:00)
Title: Fix FlexUnit4 partial report when dataprovider are used

http://www.mail-archive.com/flex-mojos@googlegroups.com/msg07212.html

Diagnostic:
FM is trying to count itself the number of test to be executed based on the Test annotations. When using dataprovider the real number of tests is often much than the one guessed by FM. Since FM is waiting to have the expected number of test executed to send the report, this lead to send an incomplete report to Maven although every tests are executed by FU4. The incomplete report in our case was hiding some test failures to the CI which is really dangerous...

Proposed hot fix:
Since the total number of test is no used elsewhere, I use a fixed value, don't increase the number of executed test until the end of the test where the fixed value is set in order to allow the report of the results.
Tested, and it works well here.

I think that a more deeper refactor would be necessary in order to rely on the hook offered by the various test framework to detect the test run completion instead of trying to count by ourself the number of test which is bug prone.