20171213-python Automation-Interface test-jmeter-post-add-stu

Source: Internet
Author: User

Interface 3: Adding student information

Brief description: Practice passing JSON type parameters

Request URL:http://api.nnzhp.cn/api/user/add_stu

Request Method: Post


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; method select Post; path input:/api/user/add_stu

Click Body Data to enter the JSON parameter

{
"Name": "Aodi",
"Grade": "Tianxie",
"Phone": "18811111188",
"Addr": "Beijingcaoyang"
}

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/add_stu

POST Data:
{
"Name": "Aodi",
"Grade": "Tianxie",
"Phone": "18811111188",
"Addr": "Beijingcaoyang"
}

{
"Error_code": 1000,
"MSG": "Add Success"
}

20171213-python Automation-Interface test-jmeter-post-add-stu

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.