-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.json
More file actions
7 lines (6 loc) · 3.17 KB
/
params.json
File metadata and controls
7 lines (6 loc) · 3.17 KB
1
2
3
4
5
6
7
{
"name": "Mockenize",
"tagline": "Mockenize Server",
"body": "# Mockenize\r\nREST API Testing Toolkit\r\n\r\nMockenize is an efficient server to mockBean, supports random responses, timeout and any media type. To store the responses, Mockenize uses Hazelcast and to run the standalone server uses Spring Boot.\r\nMockenize is free and open source. Contribute if you want!\r\n\r\n[](https://travis-ci.org/Mockenize/mockenize-server)\r\n[  ](https://bintray.com/mockenize/mockenize/mockenize-server/_latestVersion)\r\n# How to use\r\n\r\n- Running the server\r\n```json\r\njava -jar mockenize-server-x.x.x.jar --server.port=8090 (default port is 8080)\r\n```\r\n\r\n- You can use with docker too!\r\n\r\n```json\r\ndocker run -itd -p 8080:8080 mockenize/mockenize-server\r\n```\r\n\r\n- Adding basic mocks\r\n\r\n```json\r\nPOST http://localhost:8080/_mockenize/mocks\r\n{\r\n \"path\" : \"/foo/bar\",\r\n \"method\" : \"POST\",\r\n \"status\" : 202,\r\n \"body\" : \"Response success!!!\",\r\n \"headers\" : {\r\n \"Content-Type\" : \"text/plain\"\r\n }\r\n}\r\n```\r\n\r\n- Adding multiple responses mocks. The responses will return at random.\r\n\r\n```json\r\nPOST http://localhost:8080/_mockenize/mocks\r\n{\r\n \"path\" : \"/foo/bar\",\r\n \"method\" : \"POST\",\r\n \"values\" : [\r\n {\r\n \"status\" : 202,\r\n \"body\" : \"Response success!!!\",\r\n \"headers\" : {\r\n \"Content-Type\" : \"text/plain\"\r\n }\r\n },\r\n {\r\n \"status\" : 500,\r\n \"body\" : \"Response fail!!!\",\r\n \"headers\" : {\r\n \"Content-Type\" : \"text/plain\"\r\n }\r\n }\r\n ]\r\n}\r\n```\r\n\r\n- Using timeout response. (5 seconds)\r\n\r\n```json\r\nPOST http://localhost:8080/_mockenize/mocks\r\n{\r\n \"path\" : \"/foo/bar\",\r\n \"method\" : \"POST\",\r\n \"timeout\" : 5,\r\n \"status\" : 202,\r\n \"body\" : \"Response success!!!\",\r\n \"headers\" : {\r\n \"Content-Type\" : \"text/plain\"\r\n }\r\n}\r\n```\r\n\r\n- Using interval timeout response. (5 at 10 seconds)\r\n\r\n```json\r\nPOST http://localhost:8080/_mockenize/mocks\r\n{\r\n \"path\" : \"/foo/bar\",\r\n \"method\" : \"POST\",\r\n \"minTimeout\" : 5,\r\n \"maxTimeout\" : 10,\r\n \"status\" : 202,\r\n \"body\" : \"Response success!!!\",\r\n \"headers\" : {\r\n \"Content-Type\" : \"text/plain\"\r\n }\r\n}\r\n```\r\n\r\n- Clearing all mocks.\r\n\r\n```json\r\nDELETE http://localhost:8080/_mockenize/mocks/all\r\n```\r\n\r\n- Clearing unique or multiple mocks.\r\n\r\n```json\r\nDELETE http://localhost:8080/_mockenize/mocks\r\n\r\n[\r\n {\r\n \"path\" : \"/foo/bar\",\r\n \"method\" : \"POST\"\r\n },\r\n {\r\n \"url\" : \"/my_second_url/test\",\r\n \"method\" : \"GET\"\r\n }\r\n]\r\n```\r\n\r\n- Use the admin to easily create your mocks.\r\n\r\n```json\r\nhttp://localhost:8080/_mockenize/admin/index.html\r\n```\r\n\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}