Skip to content

Third party Extensions

AntuBLUE edited this page Oct 26, 2024 · 128 revisions

On this page, the JUnit community collects a list of third-party test engines and extensions.

Feel free to add your own!

JUnit Platform Test Engines

Engine authors may also add a minimal working example to the junit5-multiple-engines project.

JUnit Platform Build Support

JUnit Jupiter Extensions

  • ActiveMQ Artemis extensions for JUnit Jupiter which create an embedded ActiveMQ Artemis server, etc.
  • AEM JUnit Jupiter: JUnit Jupiter extension for Adobe Experience Manager that allows one to inject AemContext parameters in test methods and ensures that the context is set up and torn down properly.
  • Apache OpenWebBeans CDI 2 Test Support: use CDI SE API with JUnit Jupiter.
  • Apache Meecrowave Test Support: test your CDI/JAX-RS/JSON-P/JSON-B/Microprofile application very easily.
  • AWS JUnit Jupiter: JUnit Jupiter extensions that allow to inject AWS SDK clients in test classes.
  • Azure CosmosDB : A modifiable extension that prepares Azure Java client and enables Spring's Sql annotation style testing. It also has Testcontainers support that mocks Azure CosmosDB with an emulator.
  • BDD JUnit Jupiter: JUnit Jupiter extension to create and run stories and behaviors a.k.a BDD specification tests.
  • CDI Test: Testing CDI Beans with JUnit Jupiter.
  • Capture System.out and System.err: Capture System.out and System.err outputs in tests.
  • Citrus Framework: Enable Citrus related dependency injection and parameter resolving
  • classpath-junit-extension: Run tests with a modified classpath
  • coroutines-test: Includes a JUnit Jupiter extension that can dump coroutines on timeout.
  • Database Rider: Adds support for DbUnit in JUnit Jupiter tests
  • DbRaccoon: A JUnit Jupiter extension to make the test data setup easier.
  • DbSetup annotations: JUnit Jupiter extension for DbSetup
  • Docker: start docker containers before running tests and stop them afterwards
  • docker-junit-extension: allow start / stop docker containers before / after a test or reusing them between test executions; support mount resources inside docker containers; allow to run commands inside containers and / or to run containers from inside tests (requires JDK 8+).
  • Elementary: A suite of JUnit Jupiter extensions that provides a real annotation processing environment during testing.
  • Fakegen: A test library to fill an object graph with random data
  • GreenMail: JUnit Jupiter support for GreenMail
  • grpc-test: Includes a JUnit Jupiter extension that can automatically release gRPC resources at the end of the test.
  • InlineGherkin: JUnit Jupiter extension to write gherkin like specification tests in JUnit test methods.
  • instancio-junit: an extension for working with the Instancio library
  • Jersey JUnit for testing JAX-RS and Jersey-based applications using the Jersey test framework
  • Jexter: A collection of reusable JUnit Jupiter extensions to improve the quality of your tests
  • jFairy: Extension for JUnit which provides injection of random data
  • JGiven: Behavior-Driven Development in plain Java
  • Jimfs JUnit Jupiter: A JUnit Jupiter @TempDir extension based on the in-memory file system Jimfs
  • JPA Unit: Enables easy testing of JPA entities with an arbitrary JPA provider
  • json-snapshot: A way to implement snapshot testing for POJOs in a similar way to Jest, but compatible with JUnit.
  • JUnit Extensions: JUnit Jupiter equivalents of some of the common JUnit 4 rules: ExpectedException, TemporaryFolder, etc.
  • junit-json-params: Use JSON as a source in parameterized tests system for performance-testing.
  • JUnit Pioneer: JUnit Jupiter extension pack, pushing the frontiers on Jupiter.
  • Jupiter Parallel Load Extension - Run JUnit5/Jupiter tests in parallel. This is particularly useful for automated load/stress testing
  • Kafka JUnit: For testing with a Kafka broker
  • Kafka JUnit: Another library for testing with a Kafka broker
  • LazyParams: Parameterization solution that enables a regular JUnit test to make itself parameterized by introducing parameters in midair during the test execution
  • Log Spy Kt: A Kotlin-centric, Java-friendly library for unit testing logging in the JVM.
  • LogUnit: A Java library for unit-testing logging.
  • MicroShed Testing: For writing true-to-production integration tests for Java EE and MicroProfile applications
  • minutest: A Spek-like Kotlin library that separates tests from fixtures and allows both to be defined and manipulated as data.
  • MockitoExtension: Extension that initializes mocks and handles strict stubbings. This extension is the JUnit Jupiter equivalent of Mockito's MockitoJUnitRunner for JUnit 4.
    • Available in the mockito-junit-jupiter artifact.
  • mockito-rest-spring Mocking external services defined using Swagger/OpenAPI
  • MockKExtension: JUnit Jupiter extension for the Mock K mocking library for Kotlin
  • osgi-test: A suite of test utilities for testing code inside an OSGi framework, including a number of Jupiter extensions:
    • BundleContextExtension - for automatically rolling back changes to the BundleContext made within the test scope;
    • ServiceExtension - for automatically injecting references to services and releasing them at the end of the test scope.
    • ConfigurationExtension - for automatically setting up configurations for a test and for obtaining references to configurations from within a test.
  • Pact extension: JUnit Jupiter extension for consumer driven contract testing using Pact
  • QuickPerf: quickly evaluate some performance properties
  • Rerunner-Jupiter: Re-run failed JUnit Jupiter tests immediately
  • rest-assured-extension: use REST-assured in JUnit Jupiter test cases with simple configuration to test your server APIs
  • resteasy-junit-extension: An extension for using the Jakarta REST (JAX-RS) SeBootstrap for testing REST endpoints.
  • S3Mock: JUnit Jupiter Extension for running Adobes S3Mock from Unit Tests.
  • Samebug: JUnit Jupiter extension for Samebug
  • SBT Jupiter Interface: Implementation of SBT's test interface for JUnit Jupiter
  • Scoped System Properties: Easy to use and lock-free way to scope system properties and avoid changing global state
  • selenium-jupiter: Extension for Selenium WebDriver (also compatible with Appium)
  • SpringExtension for JUnit Jupiter support in the Spring Framework
  • Stdin/Stdout Helper: Helper for testing stdin/stdout interactions
  • System.exit(): Test code that calls System.exit()
  • Talend Component Kit: test your Studio or Pipeline Designer components/connectors with JUnit Jupiter
  • Togglz: Feature Flags for the Java platform
  • Unroll Extension for Kotlin: provide Spock-like where and @Unroll support for Kotlin
  • upREST: Verify your REST services
  • Wiremock: Inject ready-to-use WireMock server in test methods
  • wiremock-extension: use WireMock in JUnit Jupiter by annotating test classes and fields (also supports mocking multiple servers and custom configuration)
  • wiremock-junit-jupiter: JUnit Jupiter minimalistic extension to automatically start and inject WireMock servers with a single annotation @Wiremock
  • XWiki Component Mocking: JUnit Jupiter extension to automatically inject mock components for @Inject fields, and more. See also the source code.
Clone this wiki locally