Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Interface testing with HttpRequester

Shulou Source: shulou.com Published: 2022-06-03 07:19:21 09月23日 Update

Introduction

Httprequester is a plug-in under Firefox, which is very lightweight and is useful for less complex interface testing. As for the installation of ta is also relatively simple, first install Firefox browser and then install plug-ins, it will not be their own google it

Interface information

Here, we take the old calendar API as an example. The general information is as follows:

Interface address: http://v.juhe.cn/laohuangli/d

Return format: json

Request method: http get/post

Request example: http://v.juhe.cn/laohuangli/d?date=2014-09-11&key= your KEY

Request parameter description:

Required description for name type

Keystring is the application APPKEY.

Datestring is the date in the format 2014-09-09

Return parameter description:

Name type description

Error_codeINT return code

ReasonSTRING returns a description

YangliDATE Gregorian calendar

YinliSTRING lunar calendar

WuxingSTRING five elements

ChongshaSTRING brake

BaijiSTRING Peng Zu bogey

JishenSTRING is good for good fortune.

YiSTRING is suitable

XiongshenSTRING should be avoided by evil spirits.

JiSTRING taboo

Example returned by JSON:

{actual combat

Launch the plug-in under Firefox, enter the request address, method, parameters and other information in the corresponding location, and click submit to get the response data, as shown in the following figure.

Here are a few points to pay attention to:

1. If your input parameter is json, you need to select content type as application/json, and enter the input parameter json in the white box at the bottom left of the image above.

2. Choose get or post according to the actual situation. Now many APIs support both post and get.

3. If you need to set a request header, you can click the "headers" tab to switch and then set it.

4. The response data returned is on the right side of the above image.

Other

If authentication is involved in the API, click "authentication" to set it.

If you need base64 for the input parameter, click the corresponding button.

The request can also be saved. There is a clear button at the bottom right of the interface, so there should be no more introduction.

Summary

This tool is simple and easy to use, with low learning cost, but it is only suitable for less complex interfaces. If the company attaches importance to interface testing and wants to carry out it systematically, then it is recommended to use jmeter or develop an interface testing framework.

Tags: Interfaces tests information parameters plug-ins Firefox type or complex above name address button data method format example support selection no Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology OPPO Reno MariaDB Redmi