About Me
Introduction
- Code samples
Getting Started
- Introduction to Spock Testing
Assertions
- Assert Magic
- Grouping Assertions
- Group Assertions With verifyAll
- Check for Exceptions with Spock
- Check No Exceptions Are Thrown At All
- Assert Elements In Collections In Any Order
- Support for Hamcrest Matchers
- Using a Custom Hamcrest Matcher
Providing Data
- Assign Multiple Data Variables from Provider
- Write Our Own Data Provider
- Extra Data Variables for Unroll Description
- Reuse Variables In Data Providers
Using Mocks And stubs
- Mocks And Stubs Returning Sequence of Values
- Change Return Value of Mocked or Stubbed Service Based On Argument Value
- Custom Default Responses for Stubs
- Using Mock Method Arguments in Response
- Writing Assertions for Arguments Mock Methods
- Use Stub or Mock For Spring Component Using @SpringBean
Testing Asynchronous Code
- Testing Asynchronous Code With DataVariable(s)
- Testing Asynchronous Code With PollingConditions
Running Spock
- Ignore Specifications Based On Conditions
- Ignoring Other Feature Methods Using @IgnoreRest
- Only Run Specs Based On Conditions
- Including or Excluding Specifications Based On Annotations
- Optimize Run Order Test Methods
Miscellaneous
- Indicate Class Under Test with Subject Annotation
- Indicate Specification As Pending Feature
- Using the Old Method
- Auto Cleanup Resources
- Creating Temporary Files And Directories With FileSystemFixture
- Adjusting Time With MutableClock
- Set Timeout On Specification Methods
- Undo MetaClass Changes
- Undo Changes in Java System Properties