Unit Testing

JUnit

junit : junit

JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.

Last Version: 4.13.2

Release Date:

mockito-core

org.mockito : mockito-core

Mockito mock objects library core API and implementation

Last Version: 4.2.0

Release Date:

JUnit 5 (Bill of Materials)

org.junit : junit-bom

This Bill of Materials POM can be used to ease dependency management when referencing multiple JUnit artifacts using Gradle or Maven.

Last Version: 5.8.2

Release Date:

testng

org.testng : testng

Testing framework for Java

Last Version: 7.5

Release Date:

Last Version: 4.2.0

Release Date:

mockito-inline

org.mockito : mockito-inline

Mockito preconfigured inline mock maker (intermediate and to be superseeded by automatic usage in a future version)

Last Version: 4.2.0

Release Date:

JUnit Jupiter API

org.junit.jupiter : junit-jupiter-api

Module "junit-jupiter-api" of JUnit 5.

Last Version: 5.8.2

Release Date:

JUnit Jupiter Engine

org.junit.jupiter : junit-jupiter-engine

Module "junit-jupiter-engine" of JUnit 5.

Last Version: 5.8.2

Release Date:

Mockito

org.mockito : mockito-all

Mock objects library for java

Last Version: 2.0.2-beta

Release Date:

Apache Groovy

org.codehaus.groovy : groovy-testng

Groovy: A powerful, dynamic language for the JVM

Last Version: 3.0.9

Release Date:

JUnit Vintage Engine

org.junit.vintage : junit-vintage-engine

Module "junit-vintage-engine" of JUnit 5.

Last Version: 5.8.2

Release Date:

JUnit Jupiter Params

org.junit.jupiter : junit-jupiter-params

Module "junit-jupiter-params" of JUnit 5.

Last Version: 5.8.2

Release Date:

PowerMock

org.powermock : powermock-module-junit4

PowerMock support module for JUnit 4.x.

Last Version: 2.0.9

Release Date:

OPS4J Pax Exam Driver JUnit4

org.ops4j.pax.exam : pax-exam-junit4

Pax Exam Integration testing framework for Modern Java Platforms.

Last Version: 4.13.5

Release Date:

Apache Groovy

org.codehaus.groovy : groovy-test-junit5

Groovy: A powerful, dynamic language for the JVM

Last Version: 3.0.9

Release Date:

PowerMock

org.powermock : powermock-api-mockito2

PowerMock API for Mockito 2.+..

Last Version: 2.0.9

Release Date:

PowerMock

org.powermock : powermock-api-mockito

PowerMock API for Mockito 1.+..

Last Version: 1.7.4

Release Date:

JUnit Platform Launcher

org.junit.platform : junit-platform-launcher

Module "junit-platform-launcher" of JUnit 5.

Last Version: 1.8.2

Release Date:

JUnit Jupiter (Aggregator)

org.junit.jupiter : junit-jupiter

Module "junit-jupiter" of JUnit 5.

Last Version: 5.8.2

Release Date:

Arquillian TestRunner JUnit Container

org.jboss.arquillian.junit : arquillian-junit-container

JUnit Container Implementation for the Arquillian Project

Last Version: 1.7.0.Alpha10

Release Date:

Last Version: 1.1.9

Release Date:

Testcontainers :: JUnit Jupiter Extension

org.testcontainers : junit-jupiter

Isolated container management for Java code testing

Last Version: 1.16.2

Release Date:

OPS4J Pax Exam JUnit Probe Invoker

org.ops4j.pax.exam : pax-exam-invoker-junit

Pax Exam Integration testing framework for Modern Java Platforms.

Last Version: 4.13.5

Release Date:

jmock-junit4

org.jmock : jmock-junit4

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Last Version: 2.12.0

Release Date:

Last Version: 7.2.3

Release Date:

Last Version: 3.14.0

Release Date:

Last Version: 3.14.0

Release Date:

Last Version: 3.14.0

Release Date:

JUnit Platform Engine API

org.junit.platform : junit-platform-engine

Module "junit-platform-engine" of JUnit 5.

Last Version: 1.8.2

Release Date:

Arquillian TestRunner TestNG Container

org.jboss.arquillian.testng : arquillian-testng-container

TestNG Container Implementation for the Arquillian Project

Last Version: 1.7.0.Alpha10

Release Date:

PowerMock

org.powermock : powermock-module-testng

PowerMock module for TestNG.

Last Version: 2.0.9

Release Date:

OPS4J Pax Exam - JUnit Support

org.ops4j.pax.exam : pax-exam-junit

OPS4J Pax Exam - Integration testing framework for OSGi. Detailed information to be found at http://wiki.ops4j.org/display/ops4j/Pax+Exam.

Last Version: 1.2.4

Release Date:

Last Version: 3.14.0

Release Date:

JUnit Platform Commons

org.junit.platform : junit-platform-commons

Module "junit-platform-commons" of JUnit 5.

Last Version: 1.8.2

Release Date:

JUnitParams

pl.pragmatists : JUnitParams

Better parameterised tests for JUnit

Last Version: 1.1.1

Release Date:

Cucumber-JVM: JUnit

info.cukes : cucumber-junit

Common configuration for all Cucumber modules

Last Version: 1.2.6

Release Date:

JUnit Platform Runner

org.junit.platform : junit-platform-runner

Module "junit-platform-runner" of JUnit 5.

Last Version: 1.8.2

Release Date:

OPS4J Pax Exam - JUnit Extender Implementation

org.ops4j.pax.exam : pax-exam-junit-extender-impl

OPS4J Pax Exam - Integration testing framework for OSGi. Detailed information to be found at http://wiki.ops4j.org/display/ops4j/Pax+Exam.

Last Version: 1.2.4

Release Date:

Last Version: 1.7.0.Alpha10

Release Date:

PowerMock

org.powermock : powermock-core

Various utilities for accessing internals of a class.

Last Version: 2.0.9

Release Date:

Last Version: 2.25.4

Release Date:

JUnit Jupiter Migration Support

org.junit.jupiter : junit-jupiter-migrationsupport

Module "junit-jupiter-migrationsupport" of JUnit 5.

Last Version: 5.8.2

Release Date:

JGit - JUnit Utility Classes

org.eclipse.jgit : org.eclipse.jgit.junit

Utility classes to support JUnit testing of JGit applications.

Last Version: 6.0.0.202111291000-r

Release Date:

Arquillian TestRunner JUnit Standalone

org.jboss.arquillian.junit : arquillian-junit-standalone

JUnit Standalone Implementation for the Arquillian Project

Last Version: 1.7.0.Alpha10

Release Date:

Last Version: 4.13.2_1

Release Date:

junit-dataprovider

com.tngtech.java : junit-dataprovider

A TestNG like dataprovider runner for JUnit

Last Version: 1.13.1

Release Date:

Che Plugin :: Java Testing :: JUnit IDE

org.eclipse.che.plugin : che-plugin-testing-junit-ide

Provides version of third parties artifacts to use in Codenvy platform projects

Last Version: 7.0.0-rc-3.0

Release Date:

Che Plugin :: Java Testing :: TestNG IDE

org.eclipse.che.plugin : che-plugin-testing-testng-ide

Provides version of third parties artifacts to use in Codenvy platform projects

Last Version: 7.0.0-rc-3.0

Release Date:

PowerMock

org.powermock : powermock-api-easymock

PowerMock API for EasyMock.

Last Version: 2.0.9

Release Date:

OPS4J Pax Exam Driver TestNG

org.ops4j.pax.exam : pax-exam-testng

Pax Exam Integration testing framework for Modern Java Platforms.

Last Version: 4.13.5

Release Date:

Last Version: 0.4.16

Release Date:

JUnit

junit : junit-dep

JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java.

Last Version: 4.11

Release Date:

Zipkin JUnit

io.zipkin.zipkin2 : zipkin-junit

JUnit rule to spin-up a Zipkin server during tests

Last Version: 2.23.16

Release Date:

Issue Keeper JUnit Connector

link.bek.tools : issue-keeper-junit

Issue keeper is a tracking tool which makes the tests skipped in advance when they are blocked by the open issues.

Last Version: 4.12.5

Release Date:

weld-junit5

org.jboss.weld : weld-junit5

Set of JUnit extensions to enhance the testing of CDI components.

Last Version: 3.0.0.Final

Release Date:

Last Version: 1.6.10

Release Date:

kafka-junit5

com.salesforce.kafka.test : kafka-junit5

This library wraps Kafka's embedded test cluster, allowing you to more easily create and run integration tests using JUnit against a "real" kafka server running within the context of your tests.

Last Version: 3.2.3

Release Date:

Last Version: 2.4.1

Release Date:

JUnit Platform Console

org.junit.platform : junit-platform-console

Module "junit-platform-console" of JUnit 5.

Last Version: 1.8.2

Release Date:

Last Version: 1.7.0.Alpha10

Release Date:

ActiveMQ :: JUnit Rule

org.apache.activemq.tooling : activemq-junit

JUnit Rule for Embedded ActiveMQ Brokers

Last Version: 5.16.3

Release Date:

Che Plugin :: Java Testing :: JUnit Runtime

org.eclipse.che.plugin : che-plugin-testing-junit-runtime

Provides version of third parties artifacts to use in Codenvy platform projects

Last Version: 7.0.0-rc-3.0

Release Date:

Che Plugin :: Java Testing :: TestNG Runtime

org.eclipse.che.plugin : che-plugin-testing-testng-runtime

Provides version of third parties artifacts to use in Codenvy platform projects

Last Version: 7.0.0-rc-3.0

Release Date:

Che Plugin :: Java Testing :: JUnit Server

org.eclipse.che.plugin : che-plugin-testing-junit-server

Provides version of third parties artifacts to use in Codenvy platform projects

Last Version: 7.0.0-rc-3.0

Release Date:

Che Plugin :: Java Testing :: TestNG Server

org.eclipse.che.plugin : che-plugin-testing-testng-server

Provides version of third parties artifacts to use in Codenvy platform projects

Last Version: 7.0.0-rc-3.0

Release Date:

Apache Ant + JUnit

org.apache.ant : ant-junit

contains the junit and junirreport tasks

Last Version: 1.10.12

Release Date:

OPS4J Pax Exam - JUnit Extender API

org.ops4j.pax.exam : pax-exam-junit-extender

OPS4J Pax Exam - Integration testing framework for OSGi. Detailed information to be found at http://wiki.ops4j.org/display/ops4j/Pax+Exam.

Last Version: 1.2.4

Release Date:

Last Version: 3.0.0-M5

Release Date:

ActiveMQ Artemis JUnit Rules

org.apache.activemq : artemis-junit

The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users.

Last Version: 2.20.0

Release Date:

Last Version: 7.2.3

Release Date:

Last Version: 1.6.10

Release Date:

Last Version: 1.6.5

Release Date:

ArchUnit

com.tngtech.archunit : archunit-junit5-engine

A Java architecture test library, to specify and assert architecture rules in plain Java - Module 'archunit-junit5-engine'

Last Version: 0.22.0

Release Date:

JUnit Platform Suite API

org.junit.platform : junit-platform-suite-api

Module "junit-platform-suite-api" of JUnit 5.

Last Version: 1.8.2

Release Date:

Last Version: 13.0.5.Final

Release Date:

ArchUnit

com.tngtech.archunit : archunit-junit5-api

A Java architecture test library, to specify and assert architecture rules in plain Java - Module 'archunit-junit5-api'

Last Version: 0.22.0

Release Date:

Last Version: 1.5.0

Release Date:

JUnitBenchmarks

com.carrotsearch : junit-benchmarks

A framework for writing performance micro-benchmarks using JUnit4 annotations.

Last Version: 0.7.2

Release Date:

JUnit-Interface

com.novocode : junit-interface

An implementation of sbt's test interface for JUnit 4

Last Version: 0.11

Release Date:

Last Version: 2.2.0

Release Date:

PowerMock

org.powermock : powermock-reflect

Various utilities for accessing internals of a class.

Last Version: 2.0.9

Release Date:

Last Version: 13.0.5.Final

Release Date:

Last Version: 3.4.2

Release Date:

jMock JUnit 3 Extension

org.jmock : jmock-junit3

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Last Version: 2.12.0

Release Date:

Last Version: 1.6.10

Release Date:

Mockito Groovy Support

com.cyrusinnovation : mockito-groovy-support

A fix to allow you to use Mockito with Groovy

Last Version: 1.3

Release Date:

allure-junit4

io.qameta.allure : allure-junit4

Module allure-junit4 of Allure Framework.

Last Version: 2.17.2

Release Date:

Last Version: 3.2.2

Release Date:

Apache Directory JUnit Add-ons

org.apache.directory.junit : junit-addons

Custom build tools used by the Apache Directory project.

Last Version: 2.0.1

Release Date:

weld-junit4

org.jboss.weld : weld-junit4

Set of JUnit extensions to enhance the testing of CDI components.

Last Version: 3.0.0.Final

Release Date:

Last Version: 1.4

Release Date:

PowerMock

org.powermock : powermock-module-junit4-rule-agent

PowerMock support module for JUnit 4.x rules with Java agent

Last Version: 2.0.9

Release Date:

Hamcrest JUnit

org.hamcrest : hamcrest-junit

Classes to use Hamcrest matchers within JUnit tests

Last Version: 2.0.0.0

Release Date:

Last Version: 7.0.11

Release Date:

Last Version: 2.0.RC1

Release Date:

RandomizedTesting JUnit4 ANT Task

com.carrotsearch.randomizedtesting : junit4-ant

JUnit test runner and plugins for running JUnit tests with pseudo-randomness.

Last Version: 2.7.9

Release Date:

JGit - JUnit Http Utility Classes

org.eclipse.jgit : org.eclipse.jgit.junit.http

Utility classes to support Http based JUnit testing of JGit applications.

Last Version: 6.0.0.202111291000-r

Release Date:

JUnit Toolbox

com.googlecode.junit-toolbox : junit-toolbox

Useful classes for writing automated tests with JUnit

Last Version: 2.4

Release Date:

FEST Swing - JUnit 4.5 Extension

org.easytesting : fest-swing-junit-4.5

JUnit 4.5-specific extension for FEST-Swing

Last Version: 1.2.1

Release Date:

Mockito-Kotlin

com.nhaarman : mockito-kotlin

Using Mockito with Kotlin.

Last Version: 1.6.0

Release Date:

Transitional :: JUnit 4 stub

io.syndesis.transitional : junit4-stub

Stub used instead of JUnit 4 dependency. These classes are used only so that the class hiearchy can be maintained. Functionality of these classes is not used, that's why they're empty, but they're needed to successfuly compile 3rd party dependencies without introducing junit:junit (JUnit 4) dependency. For one such case see: https://github.com/testcontainers/testcontainers-java/issues/970#issuecomment-625044008

Last Version: 1.13.2

Release Date:

JUnit Platform Test Kit

org.junit.platform : junit-platform-testkit

Module "junit-platform-testkit" of JUnit 5.

Last Version: 1.8.2

Release Date:

Last Version: 0.268

Release Date:

Last Version: 1.7.0

Release Date:

Last Version: 350

Release Date:

takari-cpsuite

io.takari.junit : takari-cpsuite

Takari: The future of software delivery.

Last Version: 1.2.7

Release Date:

Last Version: 4.12.0.1

Release Date:

org-netbeans-libs-junit4

org.netbeans.api : org-netbeans-libs-junit4

Apache NetBeans is an integrated development environment, tooling platform, and application framework.

Last Version: RELEASE126

Release Date:

JUnit Platform Surefire Provider

org.junit.platform : junit-platform-surefire-provider

Module "junit-platform-surefire-provider" of JUnit 5.

Last Version: 1.3.2

Release Date:

Last Version: 3.6.2

Release Date:

Last Version: 3.6.2

Release Date:

Last Version: 1.4.0

Release Date:

JGit - JUnit Ssh Utility Classes

org.eclipse.jgit : org.eclipse.jgit.junit.ssh

Utility classes to support Ssh based JUnit testing of JGit applications.

Last Version: 6.0.0.202111291000-r

Release Date:

Last Version: 7.2.3

Release Date:

testerum-junit

com.testerum : testerum-junit

Testerum test automation platform

Last Version: 5.3.5

Release Date:

Ajocado JUnit Integration

org.jboss.arquillian.ajocado : arquillian-ajocado-junit

Starting point for integration Ajocado to JUnit test suites

Last Version: 1.0.0.CR2

Release Date:

testerum-junit-all

com.testerum : testerum-junit-all

Testerum test automation platform

Last Version: 5.3.5

Release Date:

Zipkin JUnit

io.zipkin.java : zipkin-junit

JUnit rule to spin-up a Zipkin server during tests

Last Version: 2.9.0

Release Date:

Last Version: 4.0.15-alpha

Release Date:

Last Version: 1.6.0

Release Date:

Last Version: 4.0.16-alpha

Release Date:

Last Version: 2.0.RC1

Release Date:

BlockHound JUnit Platform Integration

io.projectreactor.tools : blockhound-junit-platform

Integrates the BlockHound Java agent to detect blocking calls in JUnit Platform-based tests.

Last Version: 1.0.6.RELEASE

Release Date:

MyFaces Extensions-CDI JUnit-Support Module

org.apache.myfaces.extensions.cdi.test : myfaces-extcdi-junit-support-module

The MyFaces project is home of the first free open source JavaServer Faces implementation as well as some useful JSF component libraries and other convenient JSF stuff.

Last Version: 1.0.6

Release Date:

JUnit Platform Reporting

org.junit.platform : junit-platform-reporting

Module "junit-platform-reporting" of JUnit 5.

Last Version: 1.8.2

Release Date:

Last Version: 2.5.28.3

Release Date:

Last Version: 4.7-201002261215

Release Date:

PowerMock

org.powermock : powermock-module-testng-common

PowerMock module for TestNG. Common classes

Last Version: 2.0.9

Release Date:

Last Version: 5.0.1

Release Date:

Last Version: 3.0.0

Release Date:

Scope Rule for JUnit4

com.undefinedlabs.scope : scope-rule-junit4

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the JUnit4 tests.

Last Version: 0.15.1-beta.2

Release Date:

junit-servers-jetty

com.github.mjeanroy : junit-servers-jetty

Add Jetty Embedded Server to your junit tests case.

Last Version: 2.1.0

Release Date:

Last Version: 3.0.0-M5

Release Date:

Apache Geode

org.apache.geode : geode-junit

Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing

Last Version: 1.14.2

Release Date:

Scope Rule for JUnit5

com.undefinedlabs.scope : scope-rule-junit5

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the JUnit5 tests.

Last Version: 0.15.1-beta.2

Release Date:

Scope Runner for JUnit5

com.undefinedlabs.scope : scope-runner-junit5

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the JUnit5 runner.

Last Version: 0.15.1-beta.2

Release Date:

PowerMock

org.powermock : powermock-module-junit4-rule

PowerMock support module for JUnit 4.x rules.

Last Version: 2.0.9

Release Date:

Scope Runner for JUnit4

com.undefinedlabs.scope : scope-runner-junit4

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the JUnit4 runner.

Last Version: 0.15.1-beta.2

Release Date:

Scope Rule for TestNG

com.undefinedlabs.scope : scope-rule-testng

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the TestNG tests.

Last Version: 0.15.1-beta.2

Release Date:

Scope Runner for JUnit4 PowerMock

com.undefinedlabs.scope : scope-runner-junit4-powermock

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the PowerMock runner for JUnit4.

Last Version: 0.15.1-beta.2

Release Date:

Last Version: 2.5.28.3

Release Date:

Scope Runner for TestNG

com.undefinedlabs.scope : scope-runner-testng

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains the classes to instrument the TestNG runner.

Last Version: 0.15.1-beta.2

Release Date:

Last Version: 1.3.1

Release Date:

JUnit Platform Native

org.graalvm.buildtools : junit-platform-native

JUnit Platform support for GraalVM Native Image

Last Version: 0.9.9

Release Date:

Quarkus - Test Framework - JUnit 5

io.quarkus : quarkus-junit5

Build parent to bring in required dependencies

Last Version: 2.6.2.Final

Release Date:

Spock Framework - JUnit 4

org.spockframework : spock-junit4

Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful and highly expressive specification language. Thanks to its JUnit runner, Spock is compatible with most IDEs, build tools, and continuous integration servers. Spock is inspired from JUnit, jMock, RSpec, Groovy, Scala, Vulcans, and other fascinating life forms.

Last Version: 2.1-M2-groovy-3.0

Release Date:

Last Version: 0.1.1

Release Date:

allure-testng

io.qameta.allure : allure-testng

Module allure-testng of Allure Framework.

Last Version: 2.17.2

Release Date:

PowerMock

org.powermock : powermock-classloading-xstream

Performs classloader deep-cloning using X-Stream.

Last Version: 2.0.9

Release Date:

Arquillian Cube Docker JUnit Rule

org.arquillian.cube : arquillian-cube-docker-junit-rule

Arquillian Cube Extension to integrate Arquillian to Docker

Last Version: 1.18.2

Release Date:

Last Version: 4.1.0

Release Date:

bootique-jetty-junit5: JUnit 5 utilities to start Jetty on a dynamic port

io.bootique.jetty : bootique-jetty-junit5

JUnit 5 utilities to start Jetty on a dynamically determined port and provide a client that can be used by the tests

Last Version: 2.0.RC1

Release Date:

Last Version: 2.0.0-alpha-2

Release Date:

Last Version: 4.10.6

Release Date:

Last Version: 5.1.0

Release Date:

Last Version: 2.0.0-alpha-2

Release Date:

Allure TestNG Adaptor

ru.yandex.qatools.allure : allure-testng-adaptor

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Last Version: 1.5.4

Release Date:

Vert.x JUnit 5 support :: Core

io.vertx : vertx-junit5

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Last Version: 4.2.3

Release Date:

Last Version: 2.0.RC1

Release Date:

allure-junit5

io.qameta.allure : allure-junit5

Module allure-junit5 of Allure Framework.

Last Version: 2.17.2

Release Date:

jqassistant.plugin.junit

com.buschmais.jqassistant.plugin : jqassistant.plugin.junit

Framework for structural analysis of Java applications.

Last Version: 1.1.4

Release Date:

Last Version: 6.1.0

Release Date:

Last Version: 5.11.2

Release Date:

junit-quickcheck-generators

com.pholser : junit-quickcheck-generators

Property-based testing, JUnit-style: basic generators

Last Version: 1.0

Release Date:

Quarkus - Test Framework - JUnit 5 Internal Test Framework

io.quarkus : quarkus-junit5-internal

A runner for unit tests, intended for testing Quarkus rather than for end user consumption.

Last Version: 2.6.2.Final

Release Date:

Last Version: 4.13.2

Release Date:

Allure jUnit Adaptor

ru.yandex.qatools.allure : allure-junit-adaptor

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Last Version: 1.5.4

Release Date:

Arquillian Cube Docker JUnit 5

org.arquillian.cube : arquillian-cube-docker-junit5

Arquillian Cube Extension to integrate Arquillian to Docker

Last Version: 1.18.2

Release Date:

Cucumber-JVM: TestNG

info.cukes : cucumber-testng

Common configuration for all Cucumber modules

Last Version: 1.2.6

Release Date:

Last Version: 3.2.2

Release Date:

Betamax

software.betamax : betamax-junit

Betamax is a tool for mocking external HTTP resources such as web services and REST APIs in your tests.

Last Version: 2.0.1

Release Date:

Junit4Osgi

org.apache.felix : org.apache.felix.ipojo.junit4osgi

Apache Felix is an OSGi implementation.

Last Version: 1.0.0

Release Date:

S3Mock - Testsupport - JUnit4

com.adobe.testing : s3mock-junit4

S3 mock implementation to be used for hermetic testing

Last Version: 2.3.3

Release Date:

AEM Mocks JUnit 5

io.wcm : io.wcm.testing.aem-mock.junit5

Mock implementation of selected AEM APIs.

Last Version: 4.1.8

Release Date:

sauce_junit

com.saucelabs : sauce_junit

Collection of Java helper libraries for Sauce Labs

Last Version: 2.1.25

Release Date:

Apache Sling JUnit Core

org.apache.sling : org.apache.sling.junit.core

Runs JUnit tests in an OSGi framework and provides the JUnit libraries

Last Version: 1.1.6

Release Date:

Last Version: 1.2.59

Release Date:

Burst JUnit 4 Integration

com.squareup.burst : burst-junit4

Burst is a unit testing library for varying test data.

Last Version: 1.2.0

Release Date:

Hoverfly JUnit

io.specto : hoverfly-junit

JUnit rule which spins up and manages hoverfly

Last Version: 0.2.2

Release Date:

junit5

au.com.dius.pact.provider : junit5

# Pact Junit 5 Extension ## Dependency The library is available on maven central using: * group-id = `au.com.dius.pact.provider` * artifact-id = `junit5` * version-id = `4.1.x` ## Overview For writing Pact verification tests with JUnit 5, there is an JUnit 5 Invocation Context Provider that you can use with the `@TestTemplate` annotation. This will generate a test for each interaction found for the pact files for the provider. To use it, add the `@Provider` and one of the pact source annotations to your test class (as per a JUnit 4 test), then add a method annotated with `@TestTemplate` and `@ExtendWith(PactVerificationInvocationContextProvider.class)` that takes a `PactVerificationContext` parameter. You will need to call `verifyInteraction()` on the context parameter in your test template method. For example: ```java @Provider("myAwesomeService") @PactFolder("pacts") public class ContractVerificationTest { @TestTemplate @ExtendWith(PactVerificationInvocationContextProvider.class) void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } } ``` For details on the provider and pact source annotations, refer to the [Pact junit runner](../junit/README.md) docs. ## Test target You can set the test target (the object that defines the target of the test, which should point to your provider) on the `PactVerificationContext`, but you need to do this in a before test method (annotated with `@BeforeEach`). There are three different test targets you can use: `HttpTestTarget`, `HttpsTestTarget` and `MessageTestTarget`. For example: ```java @BeforeEach void before(PactVerificationContext context) { context.setTarget(HttpTestTarget.fromUrl(new URL(myProviderUrl))); // or something like // context.setTarget(new HttpTestTarget("localhost", myProviderPort, "/")); } ``` ### HttpTestTarget `HttpTestTarget` accepts the following options: | Option | Type | Default | Description | | ------ | ---- | ------- | ----------- | | host | String | localhost | The hostname to use to access the provider | | port | Int | 8080 | The port the provider is running on | | path | String | "/" | The base path the provider is mounted on | | httpClientFactory | () -> IHttpClientFactory | Default Factory | Callback used to override the HTTP client factory | ### HttpsTestTarget `HttpsTestTarget` accepts the following options: | Option | Type | Default | Description | | ------ | ---- | ------- | ----------- | | host | String | localhost | The hostname to use to access the provider | | port | Int | 8443 | The port the provider is running on | | path | String | "/" | The base path the provider is mounted on | | insecure | Boolean | false | Disables the standard TLS verification used with HTTPS connections | | httpClientFactory | () -> IHttpClientFactory | Default Factory | Callback used to override the HTTP client factory | ### MessageTestTarget `MessageTestTarget` accepts the following options: | Option | Type | Default | Description | | ------ | ---- | ------- | ----------- | | packagesToScan | List<String> | empty List | The Java packages to scan to find classes with annotated methods. If your methods are on your test class, you don't need to supply a value for this. | | classLoader | ClassLoader? | null | Class loader to use to load the classes with annotated methods | ## !! Important note for Maven users !! If you use Maven to run your tests, you will have to make sure that the Maven Surefire plugin is at least version 2.22.1 and configured to use an isolated classpath. For example, configure it by adding the following to your POM: ```xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> <configuration> <useSystemClassLoader>false</useSystemClassLoader> </configuration> </plugin> ``` ### IMPORTANT NOTE!!!: JVM system properties needs to be set on the test JVM if your build is running with Gradle or Maven. Gradle and Maven do not pass in the system properties in to the test JVM from the command line. The system properties specified on the command line only control the build JVM (the one that runs Gradle or Maven), but the tests will run in a new JVM. See [Maven Surefire Using System Properties](https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html) and [Gradle Test docs](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:systemProperties). ### For Message Tests and Spring and Maven If you are using Spring (or Springboot), and want to have values injected into your test, you need to ensure that the same class loader is used to execute your annotated test method as Spring is using to inject the values. In particular, options like the Maven Surefire plugin's `forkCount == 0` can impact this. Either don't supply any packages to scan (this will use the default class loader and the annotated methods **have** to be on your test class), or you can provide the classloader to use as the second parameter to `MessageTestTarget`. ## Provider State Methods Provider State Methods work in the same way as with JUnit 4 tests, refer to the [Pact junit runner](../junit/README.md) docs. ### Using multiple classes for the state change methods If you have a large number of state change methods, you can split things up by moving them to other classes. You will need to specify the additional classes on the test context in a `Before` method. Do this with the `withStateHandler` or `setStateHandlers` methods. See [StateAnnotationsOnAdditionalClassTest](https://github.com/DiUS/pact-jvm/blob/master/provider/junit5/src/test/java/au/com/dius/pact/provider/junit5/StateAnnotationsOnAdditionalClassTest.java) for an example. ## Modifying the requests before they are sent **Important Note:** You should only use this feature for things that can not be persisted in the pact file. By modifying the request, you are potentially modifying the contract from the consumer tests! **NOTE: JUnit 5 tests do not use `@TargetRequestFilter`** Sometimes you may need to add things to the requests that can't be persisted in a pact file. Examples of these would be authentication tokens, which have a small life span. The Http and Https test targets support injecting the request that will executed into the test template method (of type `org.apache.http.HttpRequest` for versions 4.2.x and before, `org.apache.hc.core5.http.HttpRequest` for versions 4.3.0+). You can then add things to the request before calling the `verifyInteraction()` method. For example to add a header: ```java @TestTemplate @ExtendWith(PactVerificationInvocationContextProvider.class) void testTemplate(PactVerificationContext context, HttpRequest request) { // This will add a header to the request request.addHeader("X-Auth-Token", "1234"); context.verifyInteraction(); } ``` ## Objects that can be injected into the test methods You can inject the following objects into your test methods (just like the `PactVerificationContext`). They will be null if injected before the supported phase. | Object | Can be injected from phase | Description | | ------ | --------------- | ----------- | | PactVerificationContext | @BeforeEach | The context to use to execute the interaction test | | Pact | any | The Pact model for the test | | Interaction | any | The Interaction model for the test | | HttpRequest | @TestTemplate | The request that is going to be executed (only for HTTP and HTTPS targets) | | ProviderVerifier | @TestTemplate | The verifier instance that is used to verify the interaction | ## Allowing the test to pass when no pacts are found to verify (version 4.0.7+) By default, the test will fail with an exception if no pacts were found to verify. This can be overridden by adding the `@IgnoreNoPactsToVerify` annotation to the test class. For this to work, you test class will need to be able to receive null values for any of the injected parameters. ## Overriding the handling of a body data type **NOTE: version 4.1.3+** By default, bodies will be handled based on their content types. For binary contents, the bodies will be base64 encoded when written to the Pact file and then decoded again when the file is loaded. You can change this with an override property: `pact.content_type.override.<TYPE>.<SUBTYPE>=text|json|binary`. For instance, setting `pact.content_type.override.application.pdf=text` will treat PDF bodies as a text type and not encode/decode them. ### Controlling the generation of diffs **NOTE: version 4.2.7+** When there are mismatches with large bodies the calculation of the diff can take a long time . You can turn off the generation of the diffs with the JVM system property: `pact.verifier.generateDiff=true|false|<dataSize>`, where `dataSize`, if specified, must be a valid data size (for instance `100kb` or `1mb`). This will turn off the diff calculation for payloads that exceed this size. For instance, setting `pact.verifier.generateDiff=false` will turn off the generation of diffs for all bodies, while `pact.verifier.generateDiff=512kb` will only turn off the diffs if the actual or expected body is larger than 512kb. # Publishing verification results to a Pact Broker For pacts that are loaded from a Pact Broker, the results of running the verification can be published back to the broker against the URL for the pact. You will be able to see the result on the Pact Broker home screen. You need to set the version of the provider that is verified using the `pact.provider.version` system property. To enable publishing of results, set the Java system property or environment variable `pact.verifier.publishResults` to `true`. ### IMPORTANT NOTE!!!: this property needs to be set on the test JVM if your build is running with Gradle or Maven. Gradle and Maven do not pass in the system properties in to the test JVM from the command line. The system properties specified on the command line only control the build JVM (the one that runs Gradle or Maven), but the tests will run in a new JVM. See [Maven Surefire Using System Properties](https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html) and [Gradle Test docs](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:systemProperties). ## Tagging the provider before verification results are published [4.0.1+] You can have a tag pushed against the provider version before the verification results are published. To do this you need set the `pact.provider.tag` JVM system property to the tag value. From 4.1.8+, you can specify multiple tags with a comma separated string for the `pact.provider.tag` system property. ## Setting the provider branch before verification results are published [4.3.0-beta.7+] Pact Broker version 2.86.0 or later You can have a branch pushed against the provider version before the verification results are published. To do this you need set the `pact.provider.branch` JVM system property to the branch value. ## Setting the build URL for verification results [4.3.2+] You can specify a URL to link to your CI build output. To do this you need to set the `pact.verifier.buildUrl` JVM system property to the URL value. # Pending Pact Support (version 4.1.0 and later) If your Pact broker supports pending pacts, you can enable support for that by enabling that on your Pact broker annotation or with JVM system properties. You also need to provide the tags that will be published with your provider's verification results. The broker will then label any pacts found that don't have a successful verification result as pending. That way, if they fail verification, the verifier will ignore those failures and not fail the build. For example, with annotation: ```java @Provider("Activity Service") @PactBroker(host = "test.pactflow.io", tags = {"test"}, scheme = "https", enablePendingPacts = "true", providerTags = "master" ) public class PactJUnitTest { ``` You can also use the `pactbroker.enablePending` and `pactbroker.providerTags` JVM system properties. Then any pending pacts will not cause a build failure. # Work In Progress (WIP) Pact Support (version 4.1.5 and later) WIP pacts work in the same way as with JUnit 4 tests, refer to the [Pact junit runner](../junit/README.md) docs. # Verifying V4 Pact files that require plugins (version 4.3.0+) Pact files that require plugins can be verified with version 4.3.0+. For details on how plugins work, see the [Pact plugin project](https://github.com/pact-foundation/pact-plugins). Each required plugin is defined in the `plugins` section in the Pact metadata in the Pact file. The plugins will be loaded from the plugin directory. By default, this is `~/.pact/plugins` or the value of the `PACT_PLUGIN_DIR` environment variable. Each plugin required by the Pact file must be installed there. You will need to follow the installation instructions for each plugin, but the default is to unpack the plugin into a sub-directory `<plugin-name>-<plugin-version>` (i.e., for the Protobuf plugin 0.0.0 it will be `protobuf-0.0.0`). The plugin manifest file must be present for the plugin to be able to be loaded. # Test Analytics We are tracking anonymous analytics to gather important usage statistics like JVM version and operating system. To disable tracking, set the 'pact_do_not_track' system property or environment variable to 'true'.

Last Version: 4.3.4

Release Date:

junit-quickcheck-core

com.pholser : junit-quickcheck-core

Property-based testing, JUnit-style: core functionality

Last Version: 1.0

Release Date:

Last Version: 1.8.2

Release Date:

junit-servers-tomcat

com.github.mjeanroy : junit-servers-tomcat

Add Tomcat Embedded Server to your junit tests case.

Last Version: 2.1.0

Release Date:

Last Version: 3.2.0.0-M2

Release Date:

junit5

au.com.dius.pact.consumer : junit5

pact-jvm-consumer-junit5 ======================== JUnit 5 support for Pact consumer tests ## Dependency The library is available on maven central using: * group-id = `au.com.dius.pact.consumer` * artifact-id = `junit5` * version-id = `4.2.X` ## Usage ### 1. Add the Pact consumer test extension to the test class. To write Pact consumer tests with JUnit 5, you need to add `@ExtendWith(PactConsumerTestExt)` to your test class. This replaces the `PactRunner` used for JUnit 4 tests. The rest of the test follows a similar pattern as for JUnit 4 tests. ```java @ExtendWith(PactConsumerTestExt.class) class ExampleJavaConsumerPactTest { ``` ### 2. create a method annotated with `@Pact` that returns the interactions for the test For each test (as with JUnit 4), you need to define a method annotated with the `@Pact` annotation that returns the interactions for the test. ```java @Pact(provider="ArticlesProvider", consumer="test_consumer") public RequestResponsePact createPact(PactDslWithProvider builder) { return builder .given("test state") .uponReceiving("ExampleJavaConsumerPactTest test interaction") .path("/articles.json") .method("GET") .willRespondWith() .status(200) .body("{\"responsetest\": true}") .toPact(); } ``` ### 3. Link the mock server with the interactions for the test with `@PactTestFor` Then the final step is to use the `@PactTestFor` annotation to tell the Pact extension how to setup the Pact test. You can either put this annotation on the test class, or on the test method. For examples see [ArticlesTest](https://github.com/DiUS/pact-jvm/blob/master/consumer/junit5/src/test/java/au/com/dius/pact/consumer/junit5/ArticlesTest.java) and [MultiTest](https://github.com/DiUS/pact-jvm/blob/master/consumer/junit5/src/test/groovy/au/com/dius/pact/consumer/junit5/MultiTest.groovy). The `@PactTestFor` annotation allows you to control the mock server in the same way as the JUnit 4 `PactProviderRule`. It allows you to set the hostname to bind to (default is `localhost`) and the port (default is to use a random port). You can also set the Pact specification version to use (default is V3). ```java @ExtendWith(PactConsumerTestExt.class) @PactTestFor(providerName = "ArticlesProvider") public class ExampleJavaConsumerPactTest { ``` **NOTE on the hostname**: The mock server runs in the same JVM as the test, so the only valid values for hostname are: | hostname | result | | -------- | ------ | | `localhost` | binds to the address that localhost points to (normally the loopback adapter) | | `127.0.0.1` or `::1` | binds to the loopback adapter | | host name | binds to the default interface that the host machines DNS name resolves to | | `0.0.0.0` or `::` | binds to the all interfaces on the host machine | #### Matching the interactions by provider name If you set the `providerName` on the `@PactTestFor` annotation, then the first method with a `@Pact` annotation with the same provider name will be used. See [ArticlesTest](https://github.com/DiUS/pact-jvm/blob/master/consumer/junit5/src/test/java/au/com/dius/pact/consumer/junit5/ArticlesTest.java) for an example. #### Matching the interactions by method name If you set the `pactMethod` on the `@PactTestFor` annotation, then the method with the provided name will be used (it still needs a `@Pact` annotation). See [MultiTest](https://github.com/DiUS/pact-jvm/blob/master/consumer/junit5/src/test/groovy/au/com/dius/pact/consumer/junit5/MultiTest.groovy) for an example. ### Injecting the mock server into the test You can get the mock server injected into the test method by adding a `MockServer` parameter to the test method. ```java @Test void test(MockServer mockServer) throws IOException { HttpResponse httpResponse = Request.Get(mockServer.getUrl() + "/articles.json").execute().returnResponse(); assertThat(httpResponse.getStatusLine().getStatusCode(), is(equalTo(200))); } ``` This helps with getting the base URL of the mock server, especially when a random port is used. ## Changing the directory pact files are written to By default, pact files are written to `target/pacts` (or `build/pacts` if you use Gradle), but this can be overwritten with the `pact.rootDir` system property. This property needs to be set on the test JVM as most build tools will fork a new JVM to run the tests. For Gradle, add this to your build.gradle: ```groovy test { systemProperties['pact.rootDir'] = "$buildDir/custom-pacts-directory" } ``` For maven, use the systemPropertyVariables configuration: ```xml <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18</version> <configuration> <systemPropertyVariables> <pact.rootDir>some/other/directory</pact.rootDir> <buildDirectory>${project.basedir}/target</buildDirectory> [...] </systemPropertyVariables> </configuration> </plugin> </plugins> </build> [...] </project> ``` For SBT: ```scala fork in Test := true, javaOptions in Test := Seq("-Dpact.rootDir=some/other/directory") ``` ### Using `@PactDirectory` annotation You can override the directory the pacts are written in a test by adding the `@PactDirectory` annotation to the test class. ## Forcing pact files to be overwritten By default, when the pact file is written, it will be merged with any existing pact file. To force the file to be overwritten, set the Java system property `pact.writer.overwrite` to `true`. # Having values injected from provider state callbacks You can have values from the provider state callbacks be injected into most places (paths, query parameters, headers, bodies, etc.). This works by using the V3 spec generators with provider state callbacks that return values. One example of where this would be useful is API calls that require an ID which would be auto-generated by the database on the provider side, so there is no way to know what the ID would be beforehand. The following DSL methods all you to set an expression that will be parsed with the values returned from the provider states: For JSON bodies, use `valueFromProviderState`.<br/> For headers, use `headerFromProviderState`.<br/> For query parameters, use `queryParameterFromProviderState`.<br/> For paths, use `pathFromProviderState`. For example, assume that an API call is made to get the details of a user by ID. A provider state can be defined that specifies that the user must be exist, but the ID will be created when the user is created. So we can then define an expression for the path where the ID will be replaced with the value returned from the provider state callback. ```java .pathFromProviderState("/api/users/au.com.dius.pact.consumer:junit5:jar:4.3.4", "/api/users/100") ``` You can also just use the key instead of an expression: ```java .valueFromProviderState('userId', 'userId', 100) // will look value using userId as the key ``` ## Overriding the expression markers `${` and `}` (4.1.25+) You can change the markers of the expressions using the following system properties: - `pact.expressions.start` (default is `${`) - `pact.expressions.end` (default is `}`) ## Using HTTPS You can enable a HTTPS mock server by setting `https=true` on the `@PactTestFor` annotation. Note that this mock server will use a self-signed certificate, so any client code will need to accept self-signed certificates. ## Using own KeyStore You can provide your own KeyStore file to be loaded on the MockServer. In order to do so you should fulfill the properties `keyStorePath`, `keyStoreAlias`, `keyStorePassword`, `privateKeyPassword` on the `@PactTestFor` annotation. Please bear in mind you should also enable HTTPS flag. ## Using multiple providers in a test (4.2.5+) It is advisable to focus on a single interaction with each test, but you can enable multiple providers in a single test. In this case, a separate mock server will be started for each configured provider. To enable this: 1. Create a method to create the Pact for each provider annotated with the `@Pact(provider = "....")` annotation. The provider name must be set on the annotation. You can create as many of these as required, but each must have a unique provider name. 2. In the test method, use the `pactMethods` attribute on the `@PactTestFor` annotation with the names of all the methods defined in step 1. 3. Add a MockServer parameter to the test method for each provider configured in step 1 with a `@ForProvider` annotation with the name of the provider. 4. In your test method, interact with each of the mock servers passed in step 3. Note that if any mock server does not get the requests it expects, it will fail the test. For an example, see [MultiProviderTest](https://github.com/DiUS/pact-jvm/blob/master/consumer/junit5/src/test/groovy/au/com/dius/pact/consumer/junit5/MultiProviderTest.groovy). ## Dealing with persistent HTTP/1.1 connections (Keep Alive) As each test will get a new mock server, connections can not be persisted between tests. HTTP clients can cache connections with HTTP/1.1, and this can cause subsequent tests to fail. See [#342](https://github.com/pact-foundation/pact-jvm/issues/342) and [#1383](https://github.com/pact-foundation/pact-jvm/issues/1383). One option (if the HTTP client supports it, Apache HTTP Client does) is to set the system property `http.keepAlive` to `false` in the test JVM. The other option is to set `pact.mockserver.addCloseHeader` to `true` to force the mock server to send a `Connection: close` header with every response (supported with Pact-JVM 4.2.7+). # Testing messages You can use Pact to test interactions with messaging systems. There are two main types of message support: asynchronous messages and synchronous request/response messages. ## Asynchronous messages Asynchronous messages are you normal type of single shot or fire and forget type messages. They are typically sent to a message queue or topic as a notification or event. With Pact tests, we will be testing that our consumer of the messages works with the messages setup as the expectations in test. This should be the message handler code that processes the actual messages that come off the message queue in production. You can use either the V3 Message Pact or the V4 Asynchronous Message interaction to test these types of interactions. For a V3 message pact example, see [AsyncMessageTest](https://github.com/pact-foundation/pact-jvm/blob/ac6a0eae0b18183f6f453eafddb89b90741ace42/consumer/junit5/src/test/java/au/com/dius/pact/consumer/junit5/AsyncMessageTest.java). For a V4 asynchronous message example, see [V4AsyncMessageTest](https://github.com/pact-foundation/pact-jvm/blob/master/consumer/junit5/src/test/groovy/au/com/dius/pact/consumer/junit5/V4AsyncMessageTest.groovy). ### Matching message metadata You can also use matching rules for the metadata associated with the message. There is a `MetadataBuilder` class to help with this. You can access it via the `withMetadata` method that takes a Java Consumer on the `MessagePactBuilder` class. For example: ```java builder.given("SomeProviderState") .expectsToReceive("a test message with metadata") .withMetadata(md -> { md.add("metadata1", "metadataValue1"); md.add("metadata2", "metadataValue2"); md.add("metadata3", 10L); md.matchRegex("partitionKey", "[A-Z]{3}\\d{2}", "ABC01"); }) .withContent(body) .toPact(); ``` ### V4 Synchronous request/response messages Synchronous request/response messages are a form of message interchange were a request message is sent to another service and one or more response messages are returned. Examples of this would be things like Websockets and gRPC. For a V4 synchronous request/response message example, see [V4AsyncMessageTest](https://github.com/pact-foundation/pact-jvm/blob/master/consumer/junit5/src/test/groovy/au/com/dius/pact/consumer/junit5/V4SyncMessageTest.groovy). # Using Pact plugins (version 4.3.0+) The `PactBuilder` consumer test builder supports using Pact plugins. Plugins are defined in the [Pact plugins project](https://github.com/pact-foundation/pact-plugins). To use plugins requires the use of Pact specification V4 Pacts. To use a plugin, first you need to let the builder know to load the plugin (using the `usingPlugin` method) and then configure the interaction based on the requirements for the plugin. Each plugin may have different requirements, so you will have to consult the plugin docs on what is required. The plugins will be loaded from the plugin directory. By default, this is `~/.pact/plugins` or the value of the `PACT_PLUGIN_DIR` environment variable. Then you need to use the `with` method that takes a Map-based data structure and passed it on to the plugin to setup the interaction. For example, if we use the CSV plugin from the plugins project, our test would look like: ```java @ExtendWith(PactConsumerTestExt.class) class CsvClientTest { /** * Setup an interaction that makes a request for a CSV report */ @Pact(consumer = "CsvClient") V4Pact pact(PactBuilder builder) { return builder // Tell the builder to load the CSV plugin .usingPlugin("csv") // Interaction we are expecting to receive .expectsToReceive("request for a report", "core/interaction/http") // Data for the interaction. This will be sent to the plugin .with(Map.of( "request.path", "/reports/report001.csv", "response.status", "200", "response.contents", Map.of( "pact:content-type", "text/csv", "csvHeaders", false, "column:1", "matching(type,'Name')", "column:2", "matching(number,100)", "column:3", "matching(datetime, 'yyyy-MM-dd','2000-01-01')" ) )) .toPact(); } /** * Test to get the CSV report */ @Test @PactTestFor(providerName = "CsvServer", pactMethod = "pact") void getCsvReport(MockServer mockServer) throws IOException { // Setup our CSV client class to point to the Pact mock server CsvClient client = new CsvClient(mockServer.getUrl()); // Fetch the CSV report List<CSVRecord> csvData = client.fetch("report001.csv", false); // Verify it is as expected assertThat(csvData.size(), is(1)); assertThat(csvData.get(0).get(0), is(equalTo("Name"))); assertThat(csvData.get(0).get(1), is(equalTo("100"))); assertThat(csvData.get(0).get(2), matchesRegex("\\d{4}-\\d{2}-\\d{2}")); } } ``` # Test Analytics We are tracking anonymous analytics to gather important usage statistics like JVM version and operating system. To disable tracking, set the 'pact_do_not_track' system property or environment variable to 'true'.

Last Version: 4.3.4

Release Date:

FluentLenium JUnit

org.fluentlenium : fluentlenium-junit

JUnit 4.x Adapter for FluentLenium

Last Version: 5.0.1

Release Date:

Last Version: 5.11.2

Release Date:

jwt-junit5-core

org.entur.jwt-rs : jwt-junit5-core

Json Web Token resource-server utilities

Last Version: 1.1.16

Release Date:

ArchUnit

com.tngtech.archunit : archunit-junit5

A Java architecture test library, to specify and assert architecture rules in plain Java - Module 'archunit-junit5'

Last Version: 0.22.0

Release Date:

Last Version: 2.0.RC1

Release Date:

JUnit Hierarchical Context Runner

de.bechte.junit : junit-hierarchicalcontextrunner

This is a runner implementation that supports context hierarchies in JUnit. For more details please visit: https://github.com/bechte/junit-hierarchicalcontextrunner/wiki

Last Version: 4.12.2

Release Date:

Providence Utils : Testing / Junit 4

net.morimekta.providence : providence-testing-junit4

Helper libraries for testing and comparing providence structures using junit 4.12.

Last Version: 2.7.0

Release Date:

org-netbeans-modules-nbjunit

org.netbeans.api : org-netbeans-modules-nbjunit

Apache NetBeans is an integrated development environment, tooling platform, and application framework.

Last Version: RELEASE126

Release Date:

PowerMock

org.powermock : powermock-api-support

PowerMock API Utility classes.

Last Version: 2.0.9

Release Date:

Last Version: 20040902.070920

Release Date:

Mycila Junit Extensions

com.mycila : mycila-junit

Contributions to Junit Framework

Last Version: 1.4.ga

Release Date: