Use phpunit --teamcity option to report test execution progress in TeamCity format.
PHPUnit TeamCity TestListener
is extension for integration PHPUnit and TeamCity continious integration server. Based on PHPUnit's TestListener feature and TeamCity's Service Messages providing fast and easy test reporting during build process.
- PHPUnit >=3.7, <6.0
- TeamCity >=7.0
Simply add a dependency on munkie/phpunit-teamcity-testlistener
to your project's composer.json
file if you use Composer to manage the dependencies of your project.
Here is a minimal example of a composer.json
file:
{
"require-dev": {
"munkie/phpunit-teamcity-testlistener": "~1.2"
}
}
Add Build Step in TeamCity:
phpunit --printer PHPUnit\\TeamCity\\TestListener
Press "Run..." button in TeamCity. Now build will display executed tests in realtime in "Overview" screen