How to use Spock framework for test automation instead of Cucumber in Katalon Studio?

If you are already familiar with Spock framework and want to carry out your UI testing with it, then you are able to make a UI testing project with WebDriver + Spock + Gradle like the example, aren’t you? Why do you bother yourself for bringing Spock into Katalon Studio? Just messy, I think.

Trying to import the jar file of Spock and related libraries into the Drivers folder of your project would be possible by using com.katalon.gradle-plugin as described in Using AWS SDK in Katalon Studio, how to resolve external dependencies with Gradle.

You would be able to find a way to run a Spock-based scripts.

But in the end you would be disappointed that you can not obtain a good report from the tests ---- all you will obtain is the output into System.out. No pretty-formated reports will be available.

As for Cucumber, Katalon Team has integrated it into the Katalon Studio. I suppose that significant portion of their efforts were made for good reporting. You would miss it for Spock in KS.

1 Like