Fiddler interface Test (i) Post interface test

Source: Internet
Author: User
Tags comparison table

Project background:

1, Interface Url:http://192.168.xx.xx:8080/mserver/rest/ms

2, interface parameters: Data=xxxxx&key=xxxxx, the data is encrypted

Another parameter format:
{"Owner": "2", "Resourcetypeid": "$", "GetMode": "All", "sublist": false, "Checkchildren": True, "by": "Createtime DESC "," ParentID ":" 4028817457ad88ab0157ad8a0fed0001 "," OrganizationId ":" 63073b96-6063-b4ef-8f7e-08e50fa5c19e "}

3. Request method: Post

4. Protocol: HTTP

Practical steps

1, open fiddler;

2, switch to "Composer" interface;

3, select request mode: POST;

4, enter the interface address;

5, input request header information, we need to enter the project: Content-type:application/json, according to their own project to set;

6, enter the request parameter in "Requestbody";

Enter the form of the parameter here, to see what type of receiving parameter to receive, and then note the parameter format.

7, click "Execute", send a mock good request, this time on the left side can see the request session;

8, we double-click. or click "Inspector" to view the request response.

9, after completion, export to JMX format, using JMeter open, run;

Description: I started to run with JMeter, the result failed, and then in the "HTTP request Defaults", the server name and port number entered, run, OK success ~

Tip 1: Set the filter condition, we set the IP here, we only capture the request of this IP, so as to facilitate us to view the data

Tip 2: If the request is encrypted data, the returned data is also encrypted

Method 1 (Recommended): I generally require the development of encryption into a configurable, and then set the process of non-encryption mode to test, so as to facilitate the simulation of data and view the correctness of the returned data;

Method 2:

1, get the program encryption and decryption method

2, self-developed a program to bulk encryption and decryption

3, the simulation request bulk encryption, please exist in the specified file

4. Copy the request to fiddler

5, copy the results to the specified file, run the program decryption

Tip 3:

If there are some special characters in the encrypted data, which will cause the request to fail, it is only necessary to escape these characters, I encountered this in the project, was the pit for a long time, only to find the problem;

Some special character escapes the comparison table:

Fiddler interface Test (i) Post interface test

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.