Mock REST interfaces using soapUI.
- node.js (see http://nodejs.org/)
npm install -g restock
restock [-port 3390]
POST localhost:3390/sessions
{"port": 3391}
200 OK
{"session": {"id": 1}}
POST localhost:3390/sessions/1/expectations
{
"method": "GET",
"path": "/ducks",
"reply": {
"status": 200,
"body": {
"ducks": []
}
}
}
200 OK
{"expectation": {"id": 1, ...}}
GET localhost:3391/ducks
200 OK
{"ducks": []}
GET localhost:3390/expectations
200 OK
{
"fulfilled": true,
"expectations": [
{
"id": 1,
...,
"timeout": false,
"fulfilled": true,
"request": {
"body": undefined
}
}
]
}
DELETE localhost:3390/sessions/1
200 OK