Skip to content

Third Party Extensions

Björn Kautler edited this page Feb 20, 2023 · 36 revisions

A list of third-party Extensions for Spock:

Mocking

Miscellaneous

  • weld-spock The primary goal of this project is to provide simple and fast tools for CDI unit/component testing.
  • spock-junit5 Provides JUnit 5 (jupiter) extensions support for Spock (2): allows using junit 5 extension in spock (like it was with junit 4 rules in spock 1).
  • spock-spring-dubbo-extension - Solve the problem that the member variables of the Java class containing the annotation @reference cannot be mocked.PR#1141
  • spock-override - Override or ignore inherited Spock feature methods
  • spock-scope-extension - an extension to mark tests as belonging to a (set of) scopes (e.g. a global feature or a major aspect of the application)
  • spock-genesis - Mostly lazy data generators for property based testing using the Spock test framework
  • arquillian-testrunner-spock - The Spock Arquillian Extension opens up for the beauty of Spock tests running in-container using Arquillian with full EJB, Resource and CDI injection.
  • Testcontainers Spock extension for Testcontainers library, which allows to use Docker containers inside of Spock tests.
  • Agorapulse Testing Libraries - Agorapulse Testing Libraries also provides some Spock extensions - @Detached to attach detached mocks (superseded by @AutoAttach) and @OverrideParentsFeatures to skip feature methods in parents
  • spock-thenclose-extension An extension for Spock which allows running some code implicitly at the end of a feature
  • spock-screen-recorder - allows to record video of your test execution. A common use case for this lib is when Spock is glued with Geb for an E2E functional testing suit.
  • spock-slack-reporter - allows to notify team mates on Slack after each test run
  • spock-outputcapture Captures the Output of System.out and System.err. @OutputCapture localLogs or @Shared @OutputCapture globalLogs.
  • spock-order-extension Gives the opportunity to define the order between specs and its parent.
  • tapestry-spock Provides support for Tapestry injections in Spock specifications.
  • spock-ignoreuntil This library adds an new Spock annotation @IgnoreUntil that requires a UTC date up to 30 days in the future. After that time, by default, it will fail the build...

Superseded Extensions

  • spock-global-unroll - automatically enables parametrized tests unrolling in the whole project (superseded in Spock 2.0 by unrolling enabled by default)
  • spock-retry - retry failed tests (superseded by @Retry in Spock 1.2)
  • temp-directory - manages temporary directories for tests (superseded by built-in @TempDir extension in Spock 2.0)