Problem: How to create Spock Spy and do partial mocking? In this post we’re going to show practical application of partial mocking using Spy. Let’s test!
Continue reading Spock spy and partial mockingSpock Framework
Spock Framework tutorials, teaching Spock Framework from beginner to master using easy to follow examples!
Problem: How to AutoCleanup Spock test resources? It turns out that Spock Framework has a flexible mechanism just for that purpose. Let’s write some code to test it!
Continue reading AutoCleanup Spock test resourcesProblem: Main feature of tests is their readability. How to use Spock Framework documenting features to increase readability of test reports.
Continue reading Documenting Spock Framework TestsProblem: How to flexibly ignore tests in Spock Framework? In this post we’re going to show Spock’s flexible extensions that can spare you a headache. Read on!
Continue reading Flexibly ignore tests in SpockIn this post we show common Spock Framework Maven/Gradle configurations ready to use in your projects and in the rest of the Spock Tutorial.
Continue reading Spock Framework Maven Gradle SetupSpock Framework Mocks allow to easily test handling of unexpected behaviors and inspect thrown exceptions. See how to *throw and handle expected exceptions in unit tests!
Continue reading Spock Framework Mock throw exceptionSpock Framework Mock‘s are very easy to use. When mixed with Groovy closures they become even more powerful and allow us to look inside passed parameters. Learn how to mix both!
Continue reading Spock Framework Mock and ClosuresProblem: Spock Framework Mocks are powerful and very easy to use. Learn here how to use and interact with Mocks in your unit tests on these examples!
Continue reading Spock Framework MockProblem: How to run initialization code before and/or after class/specification in Spock Framework? As always, examples will clarify things out!
Continue reading Spock Framework before after classProblem: How to run some initialization code before and/or after each test case/feature in Spock Framework? The following examples will clarify things out!
Continue reading Spock Framework before after test