Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

An automated testing method

A technology of automated testing and test scripts, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as difficult implementation, unusable, cumbersome, etc., and achieve strong derivative scalability, low use threshold, and flexibility strong effect

Active Publication Date: 2022-02-22
SHANDONG WELL DATA CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantage of this method is that the user can only perform a one-way test on one interface. After obtaining the data of one interface, it needs to be filled in manually before testing the next interface. Variable values ​​obtained in previous test cases cannot be used in other cases
The disadvantage of this method is that it is impossible to perform flexible tests for some special requirements. For example, an interface needs to be processed five seconds after the previous interface request, or a certain interface needs to perform special operations on a certain parameter of the previous request, etc.
The disadvantage of this method is: the existing languages ​​are large and universal languages, such as PYTHON, JAVA, etc., so the development level requirements for testers are relatively high, and it is difficult to implement

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • An automated testing method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The technical scheme of the present invention is described in detail below in conjunction with accompanying drawing:

[0025] Such as figure 1 , an automated testing method, the steps are:

[0026] 1. Write a test script and a JAVA template file; the test script is tested by calling the API method in the JAVA template file; then global variables for testing are also defined in the test script.

[0027] When writing test scripts, use preset keywords to mark variables, code blocks to be executed, and API methods called in code blocks.

[0028] The script of this embodiment is excerpted as follows:

[0029] $url=http: / / 10.1.0.31:8090 / api / account / loginCheck; #login address

[0030] $url2=http: / / 10.1.0.31:8090 / api / userInfo / getWebStuList; #SELECT class information address

[0031] $url3=http: / / 10.1.0.31:8090 / api / userInfo / modify; #Modify the relationship address

[0032] $param={"loginName":"139****9999","client":"web","pwd":"sih+9QUK+ON1xtnAY+IUtQ==","type":"2"};

[003...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an automatic testing method. First, a test script and a JAVA template file are written. When writing the test script, preset keywords are used to mark variables, code blocks to be executed, and API methods called in the code blocks; Test scripts are tested by calling API methods in JAVA template files. The test scripts are executed by a script interpreter, which is developed based on JAVA. This method provides a simple and flexible script and its interpreter. At the same time, the custom functions that need to be reused can be written into the template file. The tester only needs to care about the input and output of the test and the intermediate process jump, and adjust dynamically. The test can be completed with corresponding parameters, with strong flexibility and low threshold for use.

Description

technical field [0001] The invention relates to an automatic testing method for testing an interface. Background technique [0002] There are mainly three kinds of software interface testing methods in the prior art: [0003] 1. Use POSTMAN and other tools to test a single interface, and compare the values ​​returned by the test. The disadvantage of this method is that the user can only perform a one-way test on one interface. After obtaining the data of one interface, it needs to be filled in manually before testing the next interface. Variable values ​​obtained in previous test cases cannot be used in other cases. [0004] 2. Fill in the URL and protocol parameters in the form of a form to test the linear business interface data. The disadvantage of this method is that it is impossible to perform flexible tests for some special requirements, for example, an interface needs to be processed five seconds after the previous interface request, or a certain interface needs to...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3688
Inventor 李大鹏王冠男邹建伟祁鲁鲁尹孟磊
Owner SHANDONG WELL DATA CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products