spockframework / spockframework/spock

Consider adopting JUnit 5.13's `DiscoveryIssue`-reporting mechanism

Open
#2,145 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem?

Spock currently uses ErrorSpecNode to report exceptions encountered during test discovery at execution time.

Describe the solution you'd like

JUnit 5.13 will introduce a new mechanism for reporting issues encountered during discovery. They can have different severities. By default, any error will cause the engine descriptor to be reported as failed during test execution with a DiscoveryIssueException listing the critical discovery issues. Non-critical issues are logged. The critical severity level is configurable. Please see the JUnit User Guide for more info.

For consistency with other test engines, it would be great if Spock could adopt this new mechanism. It would also allow removing ErrorSpecNode from the code base.

Describe alternatives you've considered

No response

Additional context

Maybe there are additional validations that are or could be performed that test authors should be made aware of with severity of INFO or WARNING?

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 with Spock's ErrorSpecNode implementation and the JUnit User Guide section on discovery issues. Trace how discovery exceptions are currently reported, then define completion as adopting JUnit 5.13's severity-based mechanism and removing ErrorSpecNode without losing existing reporting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.