Automatic generation method of JMeter test script and interface test method and system

A test script and automatic generation technology, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as cumbersome, increased error, time-consuming and labor-intensive

Pending Publication Date: 2021-02-26
SHANGHAI BILIBILI TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when using JMeter to test, it is necessary to manually write each test interface, which will not only cause cumbersome workload, but also increase the possibility of errors. Moreover, after the Web service is modified, it is necessary to manually adjust the test script. cumbersome and time-consuming

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
  • Automatic generation method of JMeter test script and interface test method and system
  • Automatic generation method of JMeter test script and interface test method and system
  • Automatic generation method of JMeter test script and interface test method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021]In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below in conjunction with the accompanying drawings.

[0022]Seefigure 1 Shown is a schematic flow diagram of a method for automatically generating a JMeter test script according to an embodiment of the present invention, including:

[0023]S110: Decompress the compressed web project package to a folder;

[0024]S120: Recursively retrieve all the target files in the folder;

[0025]S130: Use a reflection mechanism for all the target files to obtain interface information that meets a specific specification;

[0026]S140: Generate a JMeter test script by using the interface information.

[0027]As a result, on the one hand, by automatically generating JMeter test scripts, the workload of manual writing of test scripts is reduced, and work efficiency is improved; on the other hand, since the reflection mechanism is used f...

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 relates to an automatic generation method of a JMeter test script and an interface test method and system, and belongs to the technical field of automatic test. The automatic generationmethod of the JMeter test script comprises the following steps: decompressing a Web project package to a folder; performing recursion on the folder, and retrieving all target files; utilizing a reflection mechanism to obtain interface information conforming to a specific specification for all the target files; and generating a JMeter test script by utilizing the interface information. The invention has the beneficial effects that on one hand, the JMeter test script is automatically generated, so that the workload of manually compiling the test script is reduced, and the working efficiency is improved; and on the other hand, since a reflection mechanism is utilized for all retrieved target files, it can be ensured that no test interface is missed, error factors caused by manual compiling ofthe test script are also avoided, and therefore the reliability of the test script can be guaranteed.

Description

Technical field[0001]The invention relates to the field of Internet technology, in particular to the technical field of automated testing, and specifically refers to a method for automatically generating a JMeter test script, an interface testing method and a system.Background technique[0002]For the current web services developed using Java, in the testing phase, humans are often used to call the web service through the UI on the client side for testing, which is not only inefficient, but also easy to ignore certain interfaces.[0003]In addition, JMeter can also be used as a testing tool. JMeter is a Java-based stress testing tool developed by the Apache organization to perform stress testing on software. It was originally designed for web application testing, but later expanded to other testing areas. It can be used to test static and dynamic resources, such as static files, Java servlets, CGI scripts, Java objects, databases, or FTP servers, etc. JMeter can be used to simulate huge...

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 Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3684G06F11/3688
Inventor 张怡
Owner SHANGHAI BILIBILI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products