Tagged articles
18 articles
Page 1 of 1
Qunhe Technology Quality Tech
Qunhe Technology Quality Tech
Sep 25, 2025 · Operations

Cut Regression Testing to Minutes with Lightweight Interception and Spock Tests

This article outlines how a team tackled long‑standing automation gaps in custom output modules and second‑party packages by introducing a lightweight interception verification system and a Groovy‑Spock data‑driven testing framework, achieving full‑coverage regression in minutes, reducing bug detection time, and boosting overall testing efficiency.

Backend testingGroovySoftware Testing
0 likes · 9 min read
Cut Regression Testing to Minutes with Lightweight Interception and Spock Tests
政采云技术
政采云技术
Feb 7, 2023 · Fundamentals

Comprehensive Guide to Unit Testing with the Spock Framework

This article provides an in‑depth tutorial on unit testing using Spock, covering its advantages over JUnit, core concepts like specifications, fixtures, feature methods, data‑driven testing, mock and stub techniques, interaction constraints, and tooling for automated test generation, all illustrated with Groovy and Java code examples.

Data‑Driven TestingGroovyJava
0 likes · 22 min read
Comprehensive Guide to Unit Testing with the Spock Framework
DaTaobao Tech
DaTaobao Tech
Mar 24, 2022 · Fundamentals

Introduction to the Spock Testing Framework for Java and Groovy

Spock is an open‑source Java/Groovy testing framework that blends JUnit‑style structure with a concise Groovy DSL, offering data‑driven “given‑expect‑where” tests, straightforward mocking and property injection, Maven‑based setup, and seamless PowerMock integration for static‑method mocking, making it a powerful alternative to traditional unit‑test tools.

GroovyJavaMocking
0 likes · 17 min read
Introduction to the Spock Testing Framework for Java and Groovy
FunTester
FunTester
Jan 20, 2022 · Backend Development

Mastering Static Resource Mocking in Spock with PowerMock

This article provides a step‑by‑step guide on mocking static variables and static methods in the Spock testing framework using PowerMock, covering annotation setup, custom behavior definitions, and handling mixed scenarios where both static and instance mocks are required.

Java TestingMockitoPowerMock
0 likes · 5 min read
Mastering Static Resource Mocking in Spock with PowerMock
FunTester
FunTester
Jan 18, 2022 · Backend Development

Mastering Spock Unit Tests: From Dependencies to Mocking Static Methods

This article walks through setting up Spock for Java/Groovy projects, lists required Maven dependencies, shows how to handle static‑method mocking with PowerMock and Mockito, and provides concrete code examples for mocking @Autowired components, shared objects, and defining mock behavior.

BackendGroovyJava
0 likes · 11 min read
Mastering Spock Unit Tests: From Dependencies to Mocking Static Methods
FunTester
FunTester
Dec 14, 2021 · Fundamentals

Challenges and Solutions for Unit Test Coverage in Spring Boot: Mocking Static Methods with Spock, Mockito, and PowerMock

The author describes encountering quality‑assurance challenges in Spring Boot, revisiting unit‑testing frameworks like Spock, Mockito, and PowerMock, struggling with static‑method mocking, and ultimately adopting a "reset and rebuild" strategy to resolve dependency conflicts and improve test coverage.

MockingMockitoPowerMock
0 likes · 5 min read
Challenges and Solutions for Unit Test Coverage in Spring Boot: Mocking Static Methods with Spock, Mockito, and PowerMock
Meituan Technology Team
Meituan Technology Team
Aug 12, 2021 · Backend Development

Spock Testing Framework: BDD, Mocking, and Unit Test Practices for Java/Groovy Backend Development

The article presents a comprehensive guide to using the Spock testing framework for Java and Groovy backend development, illustrating its BDD‑style DSL, data‑driven tables, integrated mocking (including static methods via PowerMock), exception verification, in‑memory DAO testing, and enhanced coverage reporting compared to JUnit.

BDDGroovyJava
0 likes · 35 min read
Spock Testing Framework: BDD, Mocking, and Unit Test Practices for Java/Groovy Backend Development
FunTester
FunTester
Sep 2, 2020 · Backend Development

Mastering Spock: Groovy Unit Tests for JSON Utilities with Real Code Examples

This article extends the previous JsonPath utility guide by demonstrating how to write comprehensive Groovy‑based Spock unit tests, covering Maven/Gradle setup, basic and data‑driven demos, detailed test cases for JSON path extraction, array operations, statistical functions, and a deliberately introduced bug with its console output.

GroovyJSONJava
0 likes · 7 min read
Mastering Spock: Groovy Unit Tests for JSON Utilities with Real Code Examples
FunTester
FunTester
Aug 31, 2020 · Backend Development

How to Build a Groovy‑Based JsonPath Utility Class

This article walks through the creation of a Groovy‑compatible JsonPath utility library, explaining its design, key methods for extracting various data types, a custom verification helper, and how to test it later with the Spock framework.

GroovyJavaJsonPath
0 likes · 6 min read
How to Build a Groovy‑Based JsonPath Utility Class
FunTester
FunTester
May 10, 2020 · Backend Development

Master Spock & Mockito: Seamless Unit Testing with Gradle

This article introduces the Groovy‑based Spock framework and the Mockito mocking library, shows how to configure them together in Gradle, and provides detailed Groovy demo code illustrating various mocking, spying, verification, and exception‑handling techniques for robust Java unit testing.

GradleGroovyJava
0 likes · 8 min read
Master Spock & Mockito: Seamless Unit Testing with Gradle
FunTester
FunTester
Feb 10, 2020 · Backend Development

Migrating to Spock 2.0 M1 with JUnit 5 – Gradle & Maven Setup Guide

This article explains the major changes in Spock 2.0 M1, how to integrate it with JUnit 5 via the JUnit Platform, provides step‑by‑step Gradle and Maven configurations, discusses compatibility issues with Groovy versions, and offers solutions for JUnit 4 Rule migration.

GradleJUnit5Java Testing
0 likes · 6 min read
Migrating to Spock 2.0 M1 with JUnit 5 – Gradle & Maven Setup Guide
FunTester
FunTester
Nov 19, 2019 · Backend Development

Why Skipping Unit Tests Costs More: Java and Groovy Examples

The article explains why many developers avoid unit testing despite its importance, demonstrates a Java method for filtering unpromised tools in a home‑renovation app, provides complete JUnit and Groovy/Spock test implementations, and shows how richer output from Groovy/Spock can speed debugging.

GroovyJUnitJava
0 likes · 10 min read
Why Skipping Unit Tests Costs More: Java and Groovy Examples
FunTester
FunTester
Nov 13, 2019 · Backend Development

Mastering Spock: Practical Unit Test Examples in Groovy

This article introduces the versatile Spock testing framework, explains why it’s favored for Groovy projects despite compatibility quirks, and provides a collection of runnable demo specs that showcase Spock’s expressive syntax, data‑driven testing, and detailed reporting.

GroovyJavaSpock
0 likes · 5 min read
Mastering Spock: Practical Unit Test Examples in Groovy