spockframework / spockframework/spock

Add migration guide Spock 1.x → 2.x to manual or separate document

Open
#1,166 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3.6k
Forks
483
PR merge metrics
No merged PRs in 30d

Description

Somewhere in another issue here (I don't remember where) we lately also talked about how I had difficulties migrating from Spock 1.x to Spock 2.x regarding my Maven setup. @Vampire held the opinion that this is all easily done and well explained somewhere in sample projects, but I had problems anyway and I am not the only one, see for instance this question which I have answered today because I learned by doing it already and had Björn to help me when I got stuck at some point, trying to get PowerMock running again.

The Spock manual currently just points to the JUnit manual for users to learn how to configure JUnit 5:
http://spockframework.org/spock/docs/2.0-M2/all_in_one.html#_new_junit_platform

But JUnit 5 is not Spock 2.x yet. Furthermore, many users are not just migrating from Spock 1.x to 2.x but also have existing JUnit 4 or 5 tests. So how do I set up my Maven project in order to be able to run either Junit 4 + Spock or JUnit 5 + Spock tests? These are real world problems, and an explanation in the manual could ease the pain of many users, I suppose.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the manual's _new_junit_platform section and reviewing the linked migration discussion and Maven setup question. Document the Spock 1.x to 2.x migration path, including projects combining Spock with JUnit 4 or JUnit 5. Done means the manual or a linked standalone guide clearly covers these real-world configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
build-system, documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.