Bug #10467

CodeCoverage: should data/temporary be ignored?

Added by Martin Eisengardt about 11 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Must have
Target version:
-
Start date:
2010-10-26
Due date:
% Done:

100%

Estimated time:

Description

Currently the testing web controller has a flag to enable code coverage.
However the code coverage is correctly limited to the package we are testing (working as intended). But: The code coverage seems to consume the data/temporary folder too. The manual says that unit testing should be done by calling constructors directly and not using any aop proxies but using mock objects and injecting them into the tested classes. That's rather fine.

Due to a bug within phpunit itself currently the code coverage feature will report notices as soon as it sees the data/temporary package. PHPUnit was fixed.
See http://lists.typo3.org/pipermail/flow3-general/2010-October/000603.html
See PHPUnit issue at http://github.com/sebastianbergmann/phpunit/issues/closed#issue/54

I suggest updating Flow3's PHPUnit package. And maybe the data directory should be blacklisted so that PHPUnit does not try code coverage on the temporary data.

#1

Updated by Karsten Dambekalns about 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Target version set to 1.0 alpha 13
  • % Done changed from 0 to 80

We no longer use the PHPUnit FLOW3 package, but rely on PHPUnit 3.5 (at least). In addition the configuration for PHPUnit when used from the command line or through Phing makes correct use of whitelisting now.

The web test runner, well, it should be adjusted, probably.

#2

Updated by Karsten Dambekalns about 11 years ago

  • Status changed from Accepted to Under Review
#3

Updated by Karsten Dambekalns about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 80 to 100
#4

Updated by Karsten Dambekalns over 10 years ago

  • Target version deleted (1.0 alpha 13)

Also available in: Atom PDF