In the process of interface testing, some parameter values are often not fixed, or data processing is required before sending, such as constructing random values for testing, generating the current timestamp, and encrypting data. These interfaces that require pre-processing of parameters are more tedious to test than normal interface tests. This article uses eoLinker AMS ‘” expression constructor “function as an example to introduce how to test this kind of complex interface conveniently and improve the efficiency of interface testing.I. Cases:There is a login interface that needs to pass three parameters: 1.userName (userName), a common string; 2. The userPassword (userPassword) must be encrypted by md5 and converted to all uppercase letters. 3. LoginTime (loginTime) : indicates the current system time stamp.

The traditional way is to use THE MD5 encryption tool to encrypt the plaintext user password to obtain the ciphertext, and then write programs or use tools to convert the string to uppercase. The login timestamp can only be generated using code and pasted into the input box. A lot of time was wasted in this process, and it was a very simple login interface. It was a tester’s nightmare to encounter some interface tests with dozens of parameters. So are there any good tools to solve this problem?Ii. Solutions:The eoLinker AMS interface management platform provides a powerful “expression constructor” for interface testing, which allows you to get processed request parameters by entering simple values and a few mouse clicks. Here is an example: after filling in the form with the values we need to process, click the “Expression Constructor (magic wand)” button to the right of the input box, and the “Parameter Constructor” box will pop up.

Select MD5 encryption for userPassword, and then click upper (upgrade, convert to uppercase) to implement md5 encryption and then convert to uppercase function, very convenient!

To generate timestamp, click “Expression Constructor” and then click timestamp. In addition, the expression constructor of eoLinker AMS supports the following features: 1. Support the use of input box values or custom new constant values; 2. Support generation of TIMESTAMP, UUID, random number, etc.; 3. Support base64 encoding; 4. Supports three encryption algorithms: MD5, SHA, and HMAC. 5. Supports upper and lower case conversion of strings. 6. Supports operations such as string segmentation, interception, and splicing. 7. Support unlimited levels of data manipulation. The expression constructor is one of the dark arts of eoLinker AMS testing, making it easy to test complex interfaces. Your browser does not support the Video TAB.

Eolinker is currently the largest online interface management service provider in China. We provide developers with online interface management and third-party data acquisition services, which effectively help developers and enterprises improve project development efficiency, improve interface management level and reduce the cost of data acquisition and services.