Tests
Unit tests
Unit tests are stored in src/test/java
directory and implemented using JUnit. They aim to test individual modules of CogStack Pipeline.
The resources used in these tests are stored in src/test/resources
and they primarily include different text- and image-type documents with configurations.
Unit tests are can be run using gradle build script in the main CogStack directory, by running:
./gradlew test
Acceptance tests
Acceptance tests are stored in src/acceptance-test/java
directory and implemented using JUnit. They aim to test the functionality and correctness of particular CogStack Pipeline components, such as de-identification or NLP-related.
The resources used in these tests are stored in src/
.acceptance-test
/resources
Unit tests are can be run using gradle build script in the main CogStack directory, by running:
./gradlew acceptTest
Integration tests – CogStack Pipeline
Integration tests are stored in src/integration-test/java
directory and implemented using JUnit. They aim to test the CogStack Pipeline components functionality, the correctness of the data processing engine using the supported services.
The resources used in these tests are stored in src/
. integration-test
/resources
During the acceptance tests, these services are launched: ElasticSearch data store and PostgreSQL database. The services configuration is defined in src/integration-test/resources/simple-compose-yaml/docker-compose.yml
Unit tests are can be run using gradle build script in the main CogStack directory, by running:
./gradlew posgtresIntegTest
Integration tests – Example deployments
The example deployments presented in Examples part have also their integration tests provided. They aim to test the example deployments provided with CogStack bundle with downloading the resources, setting up the environment, launching and testing the dockerised services.
The configuration files of the examples with the used resources files located in examples
directory (see: Examples part for more details).
The integration tests are implemented in Python using unittest
module. The tests are stored in test/examples
directory and can be executed by running in the specified directory:
bash run.sh