Skip to main content

Jqwik

Simple Story

This is the piece that puts the checklist into the second teacher's hands as well as the first.

That teacher examines by their own method rather than the usual one, so without this piece their whole room would go unsupervised.

What it does

This package does for jqwik what the jupiter package does for JUnit Jupiter. It mirrors that structure deliberately, but binds to jqwik's own lifecycle hooks.

Why it has to exist separately

jqwik is a JUnit platform engine, not a Jupiter extension. It discovers and runs its property tests itself, so an integration that only hooked into Jupiter would never see them. Without this package, a @Property test would run entirely unsupervised.

What is in it

ClassPurpose
JqwikAresTestMeta-annotation registering all jqwik lifecycle hooks
@Public / @HiddenTest visibility, as in the Jupiter integration
JqwikSecurityExtensionActivates and tears down the sandbox
JqwikTestGuardPre- and post-condition guard, including the deadline
JqwikIOExtensionConsole IO redirection
JqwikStrictTimeoutExtensionTimeout enforcement
JqwikLocaleExtensionApplies @UseLocale around a container
JqwikContextAdapter from jqwik's lifecycle context to the Ares TestContext
Import the annotations that match your engine

The annotations are duplicated per engine on purpose. A test class must import de.tum.cit.ase.ares.api.jqwik.* for @Property and de.tum.cit.ase.ares.api.jupiter.* for @Test. Mixing them produces a test that compiles, runs, and is not supervised.

Further reading