Reputation: 45
I am executing different test scenarios in Karate feature file but at the end of my test I want to delete my test data from Cassandra database. Could you suggest me how can I connect Cassandra from Karate and how to execute Data cleanup activity only once after all test case execution?
Upvotes: 1
Views: 547
Reputation: 58128
1) write a Java utility and call it from Karate, refer: https://github.com/intuit/karate#calling-java
2) Normally it is safer to clean-up before a test and you can use karate.callSingle()
for this. To do something at the end of a test-suite, it is simplest to do it in the Java runner, similar to how HTML reports are generated: https://github.com/intuit/karate#parallel-execution
Upvotes: 2