Running Tests
Running Tests
Section titled “Running Tests”To run all tests, use the following command:
./gradlew testTo run the unit tests, use the following command:
./gradlew :client:testTo run FFI tests between Java and Rust, use the following command:
./gradlew :client:testFfiTo run end-to-end tests, use the following command:
./gradlew :integTest:testTo run integration tests for pubsub feature:
./gradlew :integTest:pubsubTestIT 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:
./gradlew :integTest:test -Dtls=trueTo run a single test, use the following command:
./gradlew :integTest:test --tests '*.functionLoad_and_functionList' --rerunTo run one class, use the following command:
./gradlew :client:test --tests 'BatchTests' --rerunTo run IT tests against an existing cluster and/or standalone endpoint, use:
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379If those endpoints use TLS, add -Dtls=true (applied to both endpoints):
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379 -Dtls=trueYou can combine this with test filter as well:
./gradlew :integTest:test -Dcluster-endpoints=localhost:7000 -Dstandalone-endpoints=localhost:6379 --tests 'BatchTests' -Dtls=trueTo run server modules test (it doesn’t start servers):
./gradlew :integTest:modulesTest -Dcluster-endpoints=localhost:7000 -Dtls=trueJaCoCo Code Coverage Results
Section titled “JaCoCo Code Coverage Results”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
Generating Protobuf Code
Section titled “Generating Protobuf Code”To (re)generate protobuf code, use the following command:
./gradlew protobuf