Coder Social home page Coder Social logo

normanmaurer / autobahntestsuite-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 7.0 5.11 MB

Maven plugin that runs tests of the autobahntestsuite as port of your build

License: Apache License 2.0

Java 0.18% Python 98.67% JavaScript 0.07% C 0.50% Shell 0.01% CSS 0.04% HTML 0.40% Gherkin 0.02% Batchfile 0.01% Smarty 0.01% GAP 0.10% C++ 0.01%

autobahntestsuite-maven-plugin's Introduction

Maven Autobahn Testsuite Plugin

Maven plugin which allows to run the Autobahn Testsuite as part of your maven build.

Requirements

If you want to have the Testsuite executed as part of your build you need to provide a Main class which will startup a WebSockets server which needs to behave like:

  • Echo back Text/Binary messages
  • Handle everything else like stated in the rfc6455

Adding it to your build

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

<build>
  <plugin>
    <groupId>me.normanmaurer.maven.autobahntestsuite</groupId>
    <artifactId>autobahntestsuite-maven-plugin</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <configuration>
      <!-- The class which contains a main method that accept the port as paramater and startup the -->
      <!-- the server. -->
      <mainClass>io.netty.testsuite.websockets.autobahn.AutobahnServer</mainClass>

      <!-- Optional configuration -->
      <!-- ---------------------- -->
       <!-- The IP address of the host/server-->
      <host>host</host>
      <!-- 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>

      <!-- Specify if a JUnit compatible Xml file will be generated. This can be used by most CI's. -->
      <!-- Default is true -->
      <generateJUnitXml>true</generateJUnitXml>

      <!-- A list of cases to execute. Default is to execute all via *.-->
      <cases>
        <case>*</case>
      </cases>

      <!-- A list of cases to exclude. Default is none. --> 
      <excludeCases></excludeCases>

      <!-- Specify if the plugin should fail on non strict behaviour. Default is false. -->
      <failOnNonStrict>false</failOnNonStrict>
    </configuration>
    <executions>
      <execution>
        <phase>test</phase>
        <goals>
          <goal>fuzzingclient</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
</build>

This will execute the fuzzingclient 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/autobahntestsuite-report, which contains all the details about every test case.

autobahntestsuite-maven-plugin's People

Contributors

ctomc avatar md-5 avatar normanmaurer avatar olamy avatar riyafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autobahntestsuite-maven-plugin's Issues

plugin fails on windows because of import error in twisted

     Caused by: Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "__pyclasspath__/autobahntestsuite/__init__.py", line 23, in <module>
       File "__pyclasspath__/autobahntestsuite/wstest.py", line 24, in <module>
       File "__pyclasspath__/twisted/internet/reactor.py", line 38, in <module>
       File "__pyclasspath__/twisted/internet/default.py", line 56, in <module>
       File "__pyclasspath__/twisted/internet/default.py", line 52, in _getInstallFunction
       File "__pyclasspath__/twisted/internet/selectreactor.py", line 18, in <module>
       File "__pyclasspath__/twisted/internet/posixbase.py", line 24, in <module>
       File "__pyclasspath__/twisted/internet/udp.py", line 51, in <module>
       File "__pyclasspath__/twisted/internet/base.py", line 23, in <module>
       File "__pyclasspath__/twisted/internet/defer.py", line 1490, in <module>
       File "__pyclasspath__/twisted/python/lockfile.py", line 23, in <module>
     ImportError: cannot import name kill

Allow to automatically choose a free port

At the moment the user needs to specify the port to use for the WebSocket during tests. Would be nice if the user could just tell the plugin to use a random free port.

Add the skip configuration property

Like many other plugins so it is possible to skip the testsuite run when a certain property exists. This is particularly useful when the testsuite run has to be skipped when either skipTests or skipAutobahnTests is specified.

Release Version 0.14

Releasing this version and deploying on Maven central will allow it to be included in the Netty build process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.