Home

Awesome

raml-tester-proxy Build Status

A standalone proxy/mock that tests if requests/responses are compliant with a given RAML.

To see all options, execute

java -jar raml-tester-standalone.jar

##Usage as proxy Example: If there is a service running at localhost:8080, start the proxy with

java -jar raml-tester-standalone.jar -t localhost:8080 -r <raml-file> -s.

and access the service using localhost:8099.

Every request or response that does not match the RAML definition will be logged.

##Run asynchronously If the proxy is started with the -a flag, it runs asynchronously. You can send commands to it the following way:

java -jar raml-tester-standalone.jar <command>

These commands are supported:

See also the RAML definition.

##Usage as Mock Instead of forwarding all requests to another server, the tool can also be used to return mock responses. (Which will also be verified against a RAML file.) Use the -m option instead of -t to run in mock mode:

java -jar raml-tester-standalone.jar -m mock-data -r <raml-file> -s.

The files in directory mock-data will be used as responses.

##Usage from Javascript There is a special support for usage from javascript.

See raml-tester-js for details and raml-tester-uc-js for examples.