Contract

Colin Graham

Late stage client / server testing

During development, it looked like this

Contract

Hello world? Again!

Test client

  • Will make a get request to /service/hello_message
  • Will expect a 200 response code
  • Will expect 'Hello world' in the body

Test server

  • Listens for all requests
  • Will match a request to /service/hello_message
  • No query params to check
  • No body to check
  • No headers to check
  • Will return a 200 response code and the specified body

Bells and whistles

Wildcards

Parameters

Setup

How do I run a test client or server?

Running a Contract Client

Running a Contract Server

Or

  • Maven plugins
  • Fat runnable jar

All available from maven central

Group id : org.seekay

Do I have time for questions?

Source:

https://github.com/harmingcola

 

Docs:

http://harmingcola.github.io/contract/

 

Any other questions: Google group:

https://groups.google.com/forum/#!forum/seekay-contracts

Contract

By harmingcola

Contract

  • 615