Coder Social home page Coder Social logo

jinlxz / restfixture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smartrics/restfixture

0.0 2.0 0.0 50.12 MB

A FitNesse fixture for testing REST services

Home Page: https://github.com/smartrics/RestFixture/wiki

License: GNU Lesser General Public License v3.0

Java 100.00%

restfixture's Introduction

RestFixture: A FitNesse fixture for testing REST services

Master branch build status: Master Branch Build Status

The RestFixture is a FitNesse (http://fitnesse.org) fixture that allows developers and/or product owners to write test fixtures for REST services with simplicity in mind. The idea is to write tests that are self documenting and easy to write and read, without the need to write Java code.

The fixture allows test writers to express tests as actions (any of the allowed HTTP methods) to operate on resource URIs and express expectations on the content of the return code, headers and body. All without writing one single line of Java code.

And it also works as a living/executable documentation of the API.

The fixture can be used with both Fit (FitRestFixture) and Slim (Table:Rest Fixture) runners.

Overview:

Documentation:

http://github.com/smartrics/RestFixtureLiveDoc

Versions and compatibility with FitNesse

RestFixture v3.1 and below are compatible with any release of FitNesse to date (v20150424) and no further support for newer versions of FitNesse is guaranteed for these versions of RestFixture.

RestFixture v4.0 is compatible with FitNesse v20150424 and above having implemented proper support of Slim Symbols as described in Issue #52.

Test with the latest FitNesse version

The profile latest-fitnesse configures the Versions plugin to fetch the latest FitNesse version. Tests can be executed to verify regression with:

mvn clean versions:use-latest-releases test -P latest-fitnesse

Build: Released from 4.2 onwards

Two new profiles are available: 'bundle' and 'release'

Build the RestFixture jar

mvn clean package

Once the build completes, the directory target contains:

  • smartrics-RestFixture-<version>.jar : the RestFixture jar

Build the RestFixture bundle

mvn clean package -P bundle

Once the build completes, the directory target contains:

  • smartrics-RestFixture-<version>.jar : the RestFixture jar
  • smartrics-RestFixture-<version>-sources.jar : the RestFixture sources jar
  • smartrics-RestFixture-<version>-javadoc.jar : the RestFixture javadoc jar
  • smartrics-RestFixture-<version>-bin.zip: a bundle the RestFixture and all dependencies.
  • dependencies/ : all the RestFixture dependencies (excluding a Logging framework implementation. See below for details)

Build: Releases from 2.1 to 4.1

To build RestFixture install Maven and execute

mvn clean package

Once the build completes, the directory target contains:

  • smartrics-RestFixture-<version>.jar : the RestFixture jar
  • dependencies/ : all the RestFixture dependencies (excluding a Logging framework implementation. See below for details)
  • smartrics-RestFixture-<version>-bin.zip: a bundle the RestFixture and all dependencies.

If the build fails because smartrics-RestClient can't be found, check the pom.xml file and make sure the repository sonatype-releases-restclient is enabled.

Build: Releases up to 2.0

To build RestFixture add a property file in the properties directory named <your.os.username>.properties by copying and customising build.properties if necessary.

Use

ant

or

ant full

to run the default target (this will build the Rest Fixture, start a local instance of FitNesse on port 7070 and run the fitnesse tests in src/test/cat.

You can also pass a build properties file to ant with

ant -Dproperties=<my.bespoke.file>.properties

If it all succeeds a distribution of the RestFixture is available in dist/ alongside with the latest documentation. Reports of tests and metrics are available in build/reports

The (missing!) logger framework dependency

The RestFixture uses slf4j-api; if no logger implementation is provided slf4j defaults to nop binding. Please download and add to the classpath your binding of choice (and the respective configuration file).

The current version is slf4j-api-1.6.6, hence download the matching version of the binding implementation.

Check http://www.slf4j.org/ for more details.

Install

http://stackoverflow.com/questions/35753103/workflow-of-creating-tests-using-restfixture

restfixture's People

Contributors

smartrics avatar gdunn avatar brobie avatar sglebs avatar haroon-sheikh avatar the-alchemist avatar jplambert avatar denlab avatar jvioletterichrel avatar peterkleinmicrodoc avatar tigerqiu712 avatar

Watchers

James Cloos avatar Owen.Liu avatar

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.