JUnit

Last Version: 3.3.0

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:

jwt-junit5-entur

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

Json Web Token resource-server utilities

Last Version: 2.0.2

Release Date:

jwt-junit5-spring

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

Json Web Token resource-server utilities

Last Version: 2.0.2

Release Date:

junit-quickcheck-core

com.pholser : junit-quickcheck-core

Property-based testing, JUnit-style: core functionality

Last Version: 1.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.4.0-beta.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: 2.1.3

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.4.0-beta.2", "/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.4.0-beta.2

Release Date:

FluentLenium JUnit

org.fluentlenium : fluentlenium-junit

JUnit 4.x Adapter for FluentLenium

Last Version: 5.0.4

Release Date:

JUnit Foundation

com.nordstrom.tools : junit-foundation

This is the foundation framework for JUnit automation

Last Version: 17.0.0

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:

Last Version: 2.0.1

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:

Last Version: 5.13.2

Release Date:

Mycila Junit Extensions

com.mycila : mycila-junit

Contributions to Junit Framework

Last Version: 1.4.ga

Release Date:

Last Version: 20040902.070920

Release Date:

Last Version: 1.2.0

Release Date:

Last Version: 4.0.0-RC6

Release Date:

Last Version: 1.2.1

Release Date:

Last Version: 1.9.0-M1

Release Date:

junit-runner

com.intropro.prairie : junit-runner

Embedded Environment for Testing

Last Version: 1.2.0

Release Date:

Joala Labs JUnit

net.joala : joala-labs-junit

Joala Labs is a module which provides experimental features. These experimental features might be removed at any time without notice. Typically you will find classes in here which might once make it into Joala's Public API.

Last Version: 1.2.1

Release Date:

chutney-junit-api

com.chutneytesting : chutney-junit-api

A junit 5 engine implementation for running glacio features.

Last Version: 1.4.9

Release Date:

core-junit4

com.github.skjolber.mockito-rest-spring : core-junit4

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

core-junit5

com.github.skjolber.mockito-rest-spring : core-junit5

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

thucydides-junit

net.thucydides : thucydides-junit

An Acceptance Testing framework for web applications based on WebDriver, and integrating with JUnit and net.thucydides.easyb.

Last Version: 0.9.275

Release Date:

HK2 Junit Runner

org.glassfish.hk2 : hk2-junitrunner

A utility for running HK2 tests

Last Version: 3.0.3

Release Date:

Last Version: 1.7.0.Alpha10

Release Date:

Last Version: 1.4.3

Release Date:

Quarkus - JUnit 4 Mock

io.quarkus : quarkus-junit4-mock

Module with some empty JUnit4 classes to allow Testcontainers to run without needing to include JUnit4 on the class path

Last Version: 2.10.0.Final

Release Date:

chutney-junit-engine

com.chutneytesting : chutney-junit-engine

A junit 5 engine implementation for running glacio features.

Last Version: 1.4.9

Release Date:

testing-junit4

com.fnproject.fn : testing-junit4

The Function Development Kit for Java makes it easy to build and deploy Java functions to Fn

Last Version: 1.0.149

Release Date:

Last Version: 2.0.1

Release Date:

Last Version: 1.0.12

Release Date:

Camunda BPM JUnit 5 Extension

org.camunda.bpm.extension : camunda-bpm-junit5

Community extension to provide a process engine for JUnit 5 tests.

Last Version: 1.1.0

Release Date:

junit

org.scalameta : junit-interface

A Java implementation of sbt's test interface for JUnit 4

Last Version: 1.0.0-M5

Release Date:

S3Mock - Testsupport - JUnit4

com.adobe.testing : s3mock-junit4

S3 mock implementation to be used for hermetic testing

Last Version: 2.4.13

Release Date:

junit4-jetty

com.github.skjolber.mockito-rest-spring : junit4-jetty

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

junit4-tomcat

com.github.skjolber.mockito-rest-spring : junit4-tomcat

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

junit4-undertow

com.github.skjolber.mockito-rest-spring : junit4-undertow

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

junit5-jetty

com.github.skjolber.mockito-rest-spring : junit5-jetty

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

junit5-tomcat

com.github.skjolber.mockito-rest-spring : junit5-tomcat

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

junit5-undertow

com.github.skjolber.mockito-rest-spring : junit5-undertow

REST web-service mocking utility for Spring using JUnit and Mockito

Last Version: 1.0.3

Release Date:

Last Version: 2.0.0

Release Date: