Page:
PhpUnit Plugin
Pages
Add a Virtual Host
Adding PHPCI Support to Your Projects
Atoum Plugin
Autobuilding from Atlassian Stash
Autobuilding from Git by Cron
Autobuilding From Git
Autobuilding From GitHub
Autobuilding From GitLab
Autobuilding from Bitbucket
Behat plugin
Campfire plugin
Clean build plugin
Codeception plugin
Composer plugin
Configuring PHPCI
Contributing to PHPCI
Copy build plugin
Deployer
Email plugin
Env plugin
Example phpci.yml
Grunt plugin
Hipchat Notify Plugin
Home
Installing PHPCI
Interpolation
Irc plugin
Lint plugin
Logging
Maintainers
MySQL plugin
PHP Code Sniffer plugin
PHP Coding Standards Fixer plugin
PHP Docblock Checker
PHPCI Config
Package build plugin
Pdepend plugin
Phar Plugin
Phing Plugin
Php copy paste detector plugin
Php loc plugin
Php mess detector plugin
Php parallel lint plugin
Php spec plugin
PhpUnit Plugin
Postgresql plugin
Project Status Images and Page
Run Builds Using Cron
Run Builds Using a Daemon
Run Builds Using a Worker
Shell plugin
Slack Notify Plugin
Technical Debt Plugin
Updating PHPCI
Vanilla Installation on OS X 10.10 Yosemite with OS X Server 4
Vanilla Mac Mavericks Server Installation Guide
XMPP notifications plugin
custom plugins setup
3
PhpUnit Plugin
Guillaume Perréal edited this page 2015-04-05 18:40:09 +02:00
Runs PHPUnit tests against your build.
Configuration
Options
Has two modes:
phpunit.xml Configuration File
Its activated if you have phpunit.xml file in your build path, tests/
subfolder, or you specify it as a parameter:
- config - Optional - Path to a PHP Unit XML configuration file.
- run_from - Optional - When running PHPUnit with an XML config, the command is run from this directory
- coverage - Optional - Value for the
--coverage-html
command line flag. - path - Optional - In cases where tests files are in a sub path of the /tests path, allows this path to be set in the config.
Running Tests By Specifying Directory
- directory - Optional - The directory (or array of dirs) to run PHPUnit on
Both modes accept:
- args - Optional - Command line args (in string format) to pass to PHP Unit
Examples
Specify config file and test directory:
test:
php_unit:
config:
- "path/to/phpunit.xml"
path: "app/tests/"
Troubleshooting
If standard logging of PHPCI is not enough, to get standard output from any command, including PHPUnit, edit BaseCommandExecutor::executeCommand()
to see what exactly is wrong
- Run
composer update
in phpunit plugin directory of PHPCI to get all of its dependencies - If phpunit is inside of the project's composer.json, it might interfere with PHPCI's phpunit installation
- Make sure you have XDebug installed.
The Xdebug extension is not loaded. No code coverage will be generated.
Otherwise test report parsing inTapParser
will fail, wanting coverage report as wellInvalid TAP string, number of tests does not match specified test count.