Running Aspen Unit Tests
Setting up to run unit tests
Unit tests depend on having the unit_tests site setup on your machine. That can be done with the following proceedure:
- Create a templates directory within the install directory.
- In the install directory, copy the unit_tests.ini to templates/unit_tests_local.ini.
- Modify the copied file to include your local MySQL username and password.
- From the command line navigate to the install directory.
- Run
php createSite.php templates/unit_tests_local.ini
- Complete setup per instructions.
PHP Unit Tests
To run the unit tests for PHP from PhpStorm:
- Navigate to tests/phpunit
- Right click on phpunit.xml
- Select
Run 'phpunit.xml (PHPUnit)'
- To run with debugging, select
Debug 'phpunit.xml (PHPUnit)'
Java Unit Tests
To run the unit tests for Java from IntelliJ IDEA:
- Navigate to reindexer/tests
- Right click on the test you wish to run
- Select
Run '<name of test>'
- To run with debugging, select
Debug '<name of test>'