WebEnq

Online surveys and reporting

This project is maintained by Nivocer

Testing

Unit Testing

We use phpunit for unit testing
Tests are definied in /tests (mainly application)
phpunit.xml defines the configuration, including codecoverage
phpunit.travis.xml runs phpunit, without codecoverage

phpunit --configuration tests/phpunit.xml

Continuous integration

We use Travis-CI for continuous integration testing: each push to the Github repository triggers a build that executes PHP unit tests.

We're currently testing on PHP versions:

Skipping a CI test

In order to skip a build by Travis, add the following to the commit message:

[ci skip]

Checking the Travis config

With travis-lint, it's possible to check the configuration before deploying it: https://github.com/travis-ci/travis-lint

gem install travis-lint
travis-lint

Testing coding guidelines

We use codesniffer to test the guidelines according to a (old) zend guideline.
phpcs.sh runs the tests, we have excluded applicatation/models/base, because it is generated by doctrine

Testing complexity of code

we use pdepend to test the complexity of the code
it results in:

pdepend.sh runs the tests

Testing coding guidelines/complexity of code

Apart from codesniffer and pdepend, we use messdetector to get information about coding guidelines/complexity
phpmd.sh runs the tests

Testing for duplicate code

We are (going to) use duplicate code checker to check for duplicate code. It is an indicator that code is not reused proberly.
@todo script which runs the tests.

Daily build

We run a test server at http://test4.webenq.org/tests featuring PHP 5.4 and Java 6.

Each night, it gets the latest version from Github and runs the complete testsuite