h2spec-maven-plugin Maven Mojo

Maven plugin which allows to run h2spec test suite as part of the build.

License

License

Categories

Categories

Maven Build Tools H2 Data Databases
GroupId

GroupId

com.github.madgnome
ArtifactId

ArtifactId

h2spec-maven-plugin
Last Version

Last Version

0.6
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

h2spec-maven-plugin Maven Mojo
Maven plugin which allows to run h2spec test suite as part of the build.
Project URL

Project URL

https://github.com/madgnome/h2spec-maven-plugin
Source Code Management

Source Code Management

https://github.com/madgnome/h2spec-maven-plugin

Download h2spec-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.madgnome</groupId>
    <artifactId>h2spec-maven-plugin</artifactId>
    <version>0.6</version>
</plugin>

Dependencies

compile (6)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 2.0
org.apache.maven : maven-artifact jar 2.2.1
org.apache.maven : maven-project jar 2.0.6
org.apache.commons : commons-exec jar 1.3
org.apache.maven.surefire : surefire-report-parser jar 2.19
org.codehaus.plexus : plexus-archiver jar 3.4

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

test (1)

Group / Artifact Type Version
junit : junit jar 3.8.1

Project Modules

There are no modules declared in this project.

Maven h2spec test suite Plugin

Maven plugin which allows to run the h2spec test suite as part of your maven build.

Requirements

If you want to have the Test suite executed as part of your build you need to provide a Main class which will startup a HTTP/2 server.

Adding it to your build

Adding the test suite and make it part of your build is as easy as adding it to the pom.xml file of your maven project:

<build>
    <plugins>
      <plugin>
        <groupId>com.github.madgnome</groupId>
        <artifactId>h2spec-maven-plugin</artifactId>
        <version>0.1-SNAPSHOT</version>
        <configuration>
          <mainClass>io.netty.testsuite.http2.Http2Server</mainClass>
          
          <!-- Optional configuration -->
          <!-- ---------------------- -->
          <!-- The port to bind the server on. Default is to choose a random free port. -->
          <port>-1</port>
          
          <!-- The number of milliseconds to wait for the server to startup. Default is 10000 ms. -->
          <waitTime>10000</waitTime>
          
          <!-- A list of cases to exclude. Default is none. -->
          <excludeSpecs>
            <excludeSpec>3.8 - Sends a GOAWAY frame</excludeSpec>
          </excludeSpecs>
          
          <skip>${skipHttp2Testsuite}</skip>
        </configuration>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>h2spec</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

This will execute the h2spec tests as part of the test phase and fail the phase if one of the test cases fails.

After the run was complete you will find test-reports in the target/test-classes/reports/TEST-h2spec.xml, which contains all the details about every test case.

Versions

Version
0.6
0.5
0.4
0.3