IntelliJ IDEA – the IDE for Professional Development in Java and Kotlin
We've now covered all the key features for creating and running tests with Spock. In Part 5, we finish up the Spock tutorial by looking at additional features that can help you to write short, descriptive, correct tests. Tutorial: Spock Part 1 - Getting Started Part 2 - Writing Tests Part …
In Part 4 of our Spock tutorial, we look at mocking and stubbing. The Spock framework has mocking and stubbing built in. Creating, using and verifying mocks and stubs is nicely aligned with the way the tests are written, and can lead to very readable tests. Tutorial: Spock Part 1 - Getting Sta…
In Part 3 of our Spock tutorial, we'll look at Data Driven Testing. This is one of my favourite things about Spock, although it is also supported in other frameworks like JUnit 5. Tutorial: Spock Part 1 - Getting Started Part 2 - Writing Tests Part 3 - Data Driven Testing Part 4 - Mockin…
In Part 2 of our Spock tutorial, we'll look at writing Spock tests in more detail, including some tips on how to get the most from Groovy. Tutorial: Spock Part 1 - Getting Started Part 2 - Writing Tests Part 3 - Data Driven Testing Part 4 - Mocking and Stubbing Part 5 - Other Useful Ti…
Spock is a really interesting framework for writing automated tests on the JVM. Spock tests are written in Groovy, but they can be used to test Java classes as well. Check out our 30 minute video tutorial on how to write tests using Spock, or follow along with this series of blog posts, which contai…