Skip to content

Running Tests

To run all tests, use the following command:

Terminal window
./gradlew test

To run the unit tests, use the following command:

Terminal window
./gradlew :client:test

To run FFI tests between Java and Rust, use the following command:

Terminal window
./gradlew :client:testFfi

To run end-to-end tests, use the following command:

Terminal window
./gradlew :integTest:test

To run integration tests for pubsub feature:

Terminal window
./gradlew :integTest:pubsubTest

IT suite start the server for testing - standalone and cluster installation using cluster_manager script. By default, it starts servers without TLS; to activate TLS add -Dtls=true to the command line:

Terminal window
./gradlew :integTest:test -Dtls=true

To run a single test, use the following command:

Terminal window
./gradlew :integTest:test --tests '*.functionLoad_and_functionList' --rerun

To run one class, use the following command:

Terminal window
./gradlew :client:test --tests 'BatchTests' --rerun

To run IT tests against an existing cluster and/or standalone endpoint, use:

Terminal window
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379

If those endpoints use TLS, add -Dtls=true (applied to both endpoints):

Terminal window
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379 -Dtls=true

You can combine this with test filter as well:

Terminal window
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379 --tests 'BatchTests' -Dtls=true

To run server modules test (it doesn’t start servers):

Terminal window
./gradlew :integTest:modulesTest -Dcluster-endpoints=localhost:7000 -Dtls=true

JaCoCo results are automatically generated just by running the tests (due to the finalizedBy jacocoTestReport task). The generated files are located in client/build/reports/jacoco and integTest/build/reports/jacoco

To (re)generate protobuf code, use the following command:

Terminal window
./gradlew protobuf