Ticket #152 (closed defect: fixed)

Opened 1 year ago

Last modified 10 months ago

result of PHP-Unit seems to be incorrect

Reported by: dirk.thomas@4wdmedia Assigned to: mrook
Priority: major Milestone: 2.3.0
Component: phing-tasks-phpunit Version: 2.3.0RC1
Keywords: phpunit result formatter Cc:

Description

The output of the PHPUnit3ResultFormatter seems to be incorrect in the following case:

If you run a test suite which contains multiple 'sub' test suites the result of the main test suite shows only the runCount, failureCount and errorCount of the last executed suite. Shouln't it display the sum of all executed sub tests?

Therefore it should be necessary for the PHPUnit3ResultFormatter to keep track of the call-hierarchy of the startTestSuite- and endTestSuite-methods.

Attachments

phing230_ext-phpunit-formatter.patch (6.2 kB) - added by dirk.thomas@4wdmedia.de on 09/16/07 10:37:23.
patch for PHPUnit3 formatter

Change History

09/16/07 10:36:46 changed by dirk.thomas@4wdmedia.de

In the following patch the PHPUnit3ResultFormatter was modified to keep track of the call-hierarchy of the start - and endTestSuite methods.

The SummaryPHPUnit3ResultFormatter was modified to only output one result - since it is called summary formatter.

The PlainPHPUnit3ResultFormatter was modified to output the correct counts and time for test-suites.

Furthermore i added the counts for incomplete and skipped tests.

The same modification could be done for the PHPUnit2 part.

09/16/07 10:37:23 changed by dirk.thomas@4wdmedia.de

  • attachment phing230_ext-phpunit-formatter.patch added.

patch for PHPUnit3 formatter

09/16/07 10:39:17 changed by anonymous

In my opinion the PHPUnitTestRunner should be modified in line 182 to not only consider failed and not-implemented tests as FAILED but also skipped test.

10/25/07 01:04:47 changed by hans

Michiel, have you had a chance to look over this? I can apply it, but wasn't sure if you'd want to approve it first.

10/31/07 08:37:29 changed by mrook

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r276, thanks!


Add/Change #152 (result of PHP-Unit seems to be incorrect)




Action