Skip to content

Testing

SemTK team @ Knowledge Discovery Lab edited this page Feb 2, 2018 · 4 revisions

Testing

To run unit tests only

$ mvn test

To run integration tests (*_IT.java) only

  • Start Virtuoso if needed. By default, the tests look for Virtuoso at localhost:2420.
  • Start SemTK services as specified in the "Make and Start Services" section of Installing (be sure to use ./startServices.sh)
  • Configure integration tests if needed: sparqlGraphLibrary/src/test/resources/integrationtest.properties
$ mvn failsafe:integration-test

To run all tests

Follow prerequisites above for integration tests, and then run this script in the semtk-opensource directory:

$ ./runTests.sh

Here is sample output:

user@host -bash semtk-opensource> ./runTests.sh
Writing full test output to /home/user/projects/semtk-opensource/runTests-20180111T110050.log
Running unit tests in /home/user/projects/semtk-opensource...
Running integration tests in /home/user/projects/semtk-opensource...
Tests run: 104, Failures: 0, Errors: 0, Skipped: 0
Tests run: 92, Failures: 0, Errors: 0, Skipped: 0