typelevel / typelevel/scalacheck

JUnit Platform engine

Open
#628 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2k
Forks
393
Avg merge
6h 42m
Merged PRs (30d)
4

Description

Hi 👋

@marcphilipp and I prototyped executing ScalaCheck tests on the JUnit Platform by implementing a custom JUnit Platform engine. This has the benefit of being able to run ScalaCheck tests on every tool that supports the JUnit Platform. For example, Gradle can execute tests using the built-in test task. Moreover, by delegating to the JUnit Platform, test framework authors don't need to think about test parallelism anymore because this is handled by the platform. I'm sure it would be relatively easy to also benefit from the console launcher that JUnit provides in order to implement a stand alone CLI ScalaCheck runner.

Currently the engine is more or less only a PoC but we're wondering whether the ScalaCheck community would be interested in a contribution of the engine. We would polish the code and add the missing bits.

You can try it out by cloning the repository and follow the instructions in the README.md. The project contains two demos, one using Gradle and one using Apache Maven. Both demo projects have the StringSpecification example from the user guide that has a failing property. The prototype engine implementation currently discovers all classes that extend Properties and executes them by delegating to org.scalacheck.Test.

We tried to setup a sbt example as well but then realized that there does not seem to be a maintained adapter implementation for running JUnit Platform based tests on sbt.

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 the linked scalacheck-engine repository and its README.md, then inspect the prototype JUnit Platform engine and its delegation to org.scalacheck.Test. Run the Gradle and Maven demos, including the failing StringSpecification property, to understand the current behavior. Done would mean a polished engine with the missing pieces identified and working through the supported JUnit Platform examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.