Cassandra Integration Testing
Cassandra Unit is a library which can intergrate with your Java code and help dynamically spin up an embedded Cassandra instances when needed. Once you are done using this instance, you can just termiated it and the library will take care of cleaning up after it.
What purpose does this library serve ?
- Biggest advantage is in
testing. Developers or CI/CD tools no longer need to depend on a centralized database.
- Developers can run all kinds of test scenarios on their code and also test you their DML/DDL queryies before executing them on main Cassandra Cluster. Which means faster development, reduced latency and dependency.
##Steps for Spring JUnit :
1. Include the following dependencies in pom.xml
2. Annotate your Junit class with the following
3. Place your DDL queries in a file named ‘create-table.cql’under /resource folder of your TEST
Leverage the Jmeter plugin for Cassandra developed by Netflix.