...
- Set:
db_liquibase_changelog=classpath:org/jasig/ssp/database/masterChangeLog-apiTest.xml
Then start Tomcat in the usual way. This will initialize the SSP database tables with the data expected by the API tests. At this point, you'll probably want to take a backup of the database so you can quickly restore it to a known good state after each execution of the tests. For Postgres:
No Format |
---|
$> pg_dump your-database-name > /path/to/backup/of/your-database-name.sql |
To run the tests, change into the root of your SSP source code checkout and run:
No Format |
---|
$> mvn verify -PAPI_INTEGRATION_TEST -PSKIP_SENCHA -DapiPORT=8080 -DapiURL=http://localhost |
Or if you need to point to a non-default application instance:
No Format |
---|
$> mvn verify -PAPI_INTEGRATION_TEST -PSKIP_SENCHA -DapiPORT=8080 -DapiURL=http://some.other.domain.com |
Then to reset the db after running the tests, shut down Tomcat and run (Postgres only):
No Format |
---|
$> dropdb -i your-database-name ; createdb -O sspadmin -E UTF8 your-database-name && psql -U sspadmin -d your-database-name -f /path/to/backup/of/your-database-name.sql |
TODO TODO TODO...
If anything in it is incorrect or unclear, please leave a comment below.