Interface 2: Login
Request Method: Post
Request URL:http://api.nnzhp.cn/api/user/login
1. Open JMeter, right click on test Plan, select Add-threads-thread Group
2, click on Thread Group, right-add sampler-http request
3,http Request page, server name or IP field input: api.nnzhp.cn; mode selection Psot; path input:/api/user/login
Click Parameters, click the Add button, name Input: Username value input: xxx;passwd value input: XXX
4, click on Thread Group, right-add listener-View results tree, click the toolbar green small arrow to execute the script
5, click View Results tree, view request URL and response data
POST Http://api.nnzhp.cn/api/user/login
POST Data:
Username=xxxpasswd=xxx
{
"Error_code": 0,
"Login_info": {
"Login_time": "20171213110841",
"Sign": "Cd2b43f1688e472e3a516b5a2c6831e8",
"UserId": 8
}
}
20171213-python Automation-Interface test-jmeter-post-login