org.sonatype.http-testing-harness:hth-api

${project.name}

License

License

GroupId

GroupId

org.sonatype.http-testing-harness
ArtifactId

ArtifactId

hth-api
Last Version

Last Version

0.8
Release Date

Release Date

Type

Type

jar
Description

Description

${project.name}
Project Organization

Project Organization

Sonatype, Inc.

Download hth-api

How to add to project

<!-- https://jarcasting.com/artifacts/org.sonatype.http-testing-harness/hth-api/ -->
<dependency>
    <groupId>org.sonatype.http-testing-harness</groupId>
    <artifactId>hth-api</artifactId>
    <version>0.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.sonatype.http-testing-harness/hth-api/
implementation 'org.sonatype.http-testing-harness:hth-api:0.8'
// https://jarcasting.com/artifacts/org.sonatype.http-testing-harness/hth-api/
implementation ("org.sonatype.http-testing-harness:hth-api:0.8")
'org.sonatype.http-testing-harness:hth-api:jar:0.8'
<dependency org="org.sonatype.http-testing-harness" name="hth-api" rev="0.8">
  <artifact name="hth-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.sonatype.http-testing-harness', module='hth-api', version='0.8')
)
libraryDependencies += "org.sonatype.http-testing-harness" % "hth-api" % "0.8"
[org.sonatype.http-testing-harness/hth-api "0.8"]

Dependencies

compile (1)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.0.1

Project Modules

There are no modules declared in this project.

Testing Harness for http-based tests.

This library provides two main components:

  • server-provider allows easy HTTP server and HTTP Proxy setups to be used in tests
  • junit-runner makes JUnit able to execute same test code for many server configurations, executing test methods multiple times with different server fixtures.

Supported test libraries:

  • JUnit 4.11

ServerProviders:

  • Jetty 8.1.x

Usage as "test" HTTP server

As stubbing/mocking HTTP server: just add following dependency to your POM:

  <dependency>
    <groupId>org.sonatype.http-testing-harness</groupId>
    <artifactId>server-provider</artifactId>
    <version>...</version>
  </dependncy>

And in your test you can either use org.sonatype.tests.http.server.jetty.impl.JettyServerProvider directly, or use "fluent" API using org.sonatype.tests.http.server.fluent.Server.

JUnit integration

To have more tighter JUnit integration, add following dependency to your POM (it will pull in server-provider too):

  <dependency>
    <groupId>org.sonatype.http-testing-harness</groupId>
    <artifactId>junit-runner</artifactId>
    <version>...</version>
  </dependncy>

Using this module, you can use provided annotations to create tests that are running against combinations of server fixtures, and also it provides very simple JUnit Rules to manage Server lifecycle as JUnit ExternalResource.

Authors/contributors

Original author:

Contributor:

=====

Have fun, t

org.sonatype.http-testing-harness

Sonatype

Developer friendly, full-spectrum software supply-chain management

Versions

Version
0.8
0.7
0.6
0.5.3
0.5.2
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3
0.2
0.1