tsmock(Test service - Mock) is a self-contain full function mock server writen by pure Java, it has rich functions to support complex mock scenarios
- Support mulitple platforms: Windows, Linux and any platform jre supported
- Support multiple protocols: http, ali metaq
- Support sync and async mock
- Support multiple type callbacks: http, ali metaq, websocket
- Support compressed(gzip)
- Support http proxy mode(forward to next node)
- Support request validation
- Support data process, transform
- Easy to extend function by beanshell script
Jre 8 or higher
It's a self-contain jar file, just put it in a folder and use it, no installation need
- Start
java -jar tsmock.jar -h <http configuration file,json format> -m <metaq configuration file,json format> -l <log path>
nohup java -jar tsmock.jar -h <http configuration file,json format> -m <metaq configuration file,json format> -l <log path> >/dev/null 2>&1 &
- Stop
- Just kill it by
ps -ef|grep xxx|awk '{print $2}'|xargs kill -15
- Just kill it by
- Configuration
- Please refer to http_sample.json and mq_sample.json in the project config folder
- Log
- TSMock will generate 2 type logs under the log path you specify in the cmdl
- tsmock.log: execution log include all the info,warning,error during running.
- trans.log: just request and response pair for the infomation tsmock receive and send back
- logBody parameter in config file turn on or off the request/response body recording
- TSMock will generate 2 type logs under the log path you specify in the cmdl
- UI
- More protocols
Jun Qin at Alibaba
If you find any problems, be free to send mail to [email protected]
MIT © Jun Qin