Top "Spock" questions

Spock is a testing and specification framework for Java and Groovy applications.

Difference between Mock / Stub / Spy in Spock test framework

I don't understand the difference between Mock, Stub, and Spy in Spock testing and the tutorials I have been looking …

testing mocking spock stub spy
Spock throw exception test

I test Java code with Spock. I test this code: try { Set<String> availableActions = getSthAction() List<String&…

java unit-testing groovy spock
How to use "continue" in groovy's each loop

I am new to groovy (worked on java), trying to write some test cases using Spock framework. I need the …

for-loop groovy each spock continue
Integration Test with Spring Boot and Spock

What is the best way to run an integration test (e.g., @IntegrationTest) with Spock? I would like to bootstrap …

java groovy gradle spring-boot spock
How to do argument capture with spock framework?

I have some Java stuff like this: public interface EventBus{ void fireEvent(GwtEvent<?> event); } public class SaveCommentEvent extends …

spock
Spock - Testing Exceptions with Data Tables

How can exceptions be tested in a nice way (e.g. data tables) with Spock? Example: Having a method validateUser …

exception testing groovy spock
Behavior Driven Development for java - what framework to use?

For the ongoing projects and for improving our development process we considered adopting TDD as development philosophy. While researching for …

testing bdd spock automated-tests jbehave
Unit test Groovy2.0 with Spock : setup( )

I am writing unit test using Spock for groovy-2.0 , and using gradle to run. If I write following the test …

groovy gradle spock
Mock static method with GroovyMock or similar in Spock

First-timer here, apologies if I've missed anything. I'm hoping to get around a call to a static method using Spock. …

unit-testing groovy spock powermock powermockito
IntelliJ + Groovy + Spock

I have been trying to create a Groovy project with Spock testing in IntelliJ IDEA. Here are steps that I …

maven groovy intellij-idea spock