Skip to content
Natanael Arndt edited this page Sep 17, 2013 · 2 revisions

This page describes how to set up a test environment for execute Erfurt PHPUnit tests.

Introduction: Ubuntu

Execute the following using Terminal:

sudo pear config-set auto_discover 1
sudo pear channel-update pear.php.net
sudo pear install pear.symfony-project.com/YAML-1.0.2
sudo pear install phpunit/PHPUnit_Selenium-1.0.1
sudo pear install phpunit/PHPUnit_MockObject-1.0.3
sudo pear install phpunit/PHP_Timer-1.0.0
sudo pear install phpunit/File_Iterator-1.2.3
sudo pear install phpunit/PHP_CodeCoverage-1.0.2
sudo pear install phpunit/Text_Template-1.1.4
sudo pear install phpunit/DbUnit-1.0.0
sudo pear install phpunit/PHPUnit-3.5.15

After PHPUnit was installed, you can switch to the root folder of your Erfurt installation and execute

make test

to start the TestSuite.

Integration tests

If you also want to execute the integration tests you have to go to the tests folder and move config.ini.dist to config.ini. In the config.ini you see that the integration tests connect to a virtuoso instance with the DSN (Data Source Name) VOS_TEST. You should make sure to setup a second virtuoso instance available under this DSN.

You should then access this virtuoso instance once with an OntoWiki (e.g. by temporarily changing its DSN) to get all necessary model into the store.

make test

Notice

The testsuite executes all Erfurt testcases. These also include database interaction, so for example if you haven't installed and setup Virtuoso or MySQL you will see failures.

Clone this wiki locally