CN111352850A - On-line editing method and device based on non-functional test - Google Patents

On-line editing method and device based on non-functional test Download PDF

Info

Publication number
CN111352850A
CN111352850A CN202010245736.0A CN202010245736A CN111352850A CN 111352850 A CN111352850 A CN 111352850A CN 202010245736 A CN202010245736 A CN 202010245736A CN 111352850 A CN111352850 A CN 111352850A
Authority
CN
China
Prior art keywords
functional
functional test
client
sending
script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010245736.0A
Other languages
Chinese (zh)
Other versions
CN111352850B (en
Inventor
董卫华
李华
曹容菲
史梦露
王茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202010245736.0A priority Critical patent/CN111352850B/en
Publication of CN111352850A publication Critical patent/CN111352850A/en
Application granted granted Critical
Publication of CN111352850B publication Critical patent/CN111352850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention provides an online editing method and device based on non-functional test, wherein the method comprises the following steps: generating a script template according to a pre-received request script; analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and receiving a request generated by the client to run and sending the request to the non-functional testing tool for non-functional testing. The online editing method and device based on the non-functional test effectively reduce the requirements of non-functional testers, enable the non-functional testers to concentrate on the requirements of the business, and effectively reduce the purchasing cost and the maintenance cost of enterprises for the non-functional testers.

Description

On-line editing method and device based on non-functional test
Technical Field
The invention relates to the technical field of computers, in particular to the technical field of computer software testing, and particularly relates to an online editing method and device based on non-functional testing.
Background
In the prior art, non-functional tests generally require script writing work by means of special tools, such as Loadrunner and meter, the Loadrunner can support scripts of java and c, and the meter supports scripts of Jmx format, which generally includes the following three ways:
(1) recording and manual authoring. The recording refers to accessing an actual system to be tested through functions provided by a tool, manually operating the process, recording the operation process of a user by the system, converting the operation process into a script of the tool, editing the script by the user to complete corresponding script writing, wherein the manual writing refers to writing a non-functional script by using a language or a format supported by the tool, and generally provides some corresponding operation functions or interfaces to help the user to write.
(2) Uploading online scripts, namely uploading scripts compiled offline to the online, utilizing an online script running mechanism, carrying out online running by using a container through automatic distribution of a press, waiting for generation of an execution result, and then checking the execution result.
(3) The protocol generates messages, and can generate and send some general messages in an interface configuration mode, simulate transaction messages and carry out simple configuration.
However, the above methods all require the tester to be familiar with the corresponding script to perform the non-functional test. Non-functional testing work cannot be performed quickly and efficiently by persons who are not familiar with and do not need to be familiar with the corresponding scripts. In particular, the prior art has the following disadvantages: the learning cost is high: mature non-functional tools need to have professional skills and relatively high learning cost, and for most financial transaction platforms, the HTTP protocol is the most basic communication mode, but to realize simple HTTP testing, Jmeter can be completed only by being familiar with a plurality of concepts such as thread groups, assertions, post-processing, variables and result display. Complex TPS curve functionality cannot be achieved. Currently, all non-functional tests require manual adjustment to achieve a specified TPS, not to mention the completion of TPS gradients or actual production of bimodal TPS patterns. And online editing and debugging functions. Loadrunner and meter are offline tools and cannot provide online editing and debugging functions.
Disclosure of Invention
Aiming at the problems in the prior art, the online editing method and device based on the non-functional test provided by the invention reduce the requirements of non-functional testers, enable the non-functional testers to be more concentrated on the requirements of the business, can effectively reduce the purchasing cost and the maintenance cost of enterprises, and can effectively reduce the difficulty of non-functional bill transaction for developers.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides an online editing method based on non-functional tests, including:
generating a script template according to a pre-received request script;
analyzing the script template to a non-functional test tool;
sending the transaction elements generated by the non-functional testing tool to the client;
and receiving a request generated by the client to run and sending the request to the non-functional testing tool for non-functional testing.
In one embodiment, the transaction elements include: the protocol, request address, port and parameter file that sent the request.
In one embodiment, the sending the transaction element generated by the non-functional test tool to the client comprises:
converting the transaction elements into default script information and sending the default script information to a client;
the client edits the default script information;
receiving default script information edited by a client;
carrying out object conversion on the edited default script information, and sending the object conversion to the non-functional testing tool;
and generating a file name and an execution ID according to the default script information after the object conversion, and sending the file name and the execution ID to the client.
In one embodiment, the online editing method based on non-functional test further includes:
filtering and converting the acquisition result of the non-functional test tool according to a preset WebSocket server;
and sending a non-functional test result to the client in real time.
In one embodiment, the online editing method based on non-functional test further includes:
and establishing a PID controller, wherein the PID controller is used for calculating the error of the current TPS and the preset TPS, calculating the accumulated error of the non-functional test and calculating the error conversion rate of the non-functional test.
In a second aspect, the present invention provides an online editing apparatus based on non-functional test, including:
the script template generating unit is used for generating a script template according to a pre-received request script;
the script template analyzing unit is used for analyzing the script template to a non-functional testing tool;
the transaction element sending unit is used for sending the transaction element generated by the non-functional testing tool to the client; the transaction elements include: sending a protocol, a request address, a port and a parameter file of the request;
and the test unit is used for receiving the request generated by the client side, running and sending the request to the non-functional test tool so as to perform non-functional test.
In one embodiment, the transaction element sending unit includes:
the transaction element conversion module is used for converting the transaction elements into default script information and sending the default script information to the client;
the information editing module is used for editing the default script information by a client;
the information receiving module is used for receiving default script information edited by a client;
the information conversion module is used for performing object conversion on the edited default script information and sending the edited default script information to the non-functional test tool;
and the file name generation module is used for generating a file name and an execution ID according to the default script information after the object conversion, and sending the file name and the execution ID to the client.
In one embodiment, the online editing apparatus based on non-functional test further includes:
the monitoring unit is used for filtering and converting the acquisition result of the non-functional test tool according to a preset WebSocket server;
the result sending unit is used for sending a non-functional test result to the client in real time;
and the PID establishing unit is used for establishing a PID controller which is used for calculating the error of the current TPS and the preset TPS, calculating the accumulated error of the non-functional test and calculating the error conversion rate of the non-functional test.
In a third aspect, the present invention provides an electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the non-functional test based online editing method when executing the program.
In a fourth aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of a non-functional test based online editing method.
As can be seen from the above description, the online editing method and apparatus based on non-functional test provided in the embodiments of the present invention set a Web API between a client and a non-functional test tool, and generate a script template according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method. Specifically, the beneficial effects of the invention are as follows:
(1) because the system introduces a control theory into the field of non-functional test, the simulation of production pressure can be effectively carried out, and the system supports the operation according to the preset TPS data and can support the pressure simulation of real data of gradient, double peaks or double 11 by leading the TPS data produced into the system.
(2) By using the structural design of the device, the invention can realize simplified non-functional test, automatically complete fussy operation steps and save labor.
(3) By organically combining editing, debugging, running and comparing, the system avoids the trouble of switching among different systems and reduces the operation and maintenance of the system.
(4) The online scheme opens the way for cloud-based large-scale applications.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a first flowchart illustrating a non-functional test-based online editing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the steps 300 of the non-functional test-based online editing method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second method for online editing based on non-functional testing according to an embodiment of the present invention;
FIG. 4 is a third flowchart illustrating an online editing method based on non-functional testing according to an embodiment of the present invention;
FIG. 5 is a flow chart of an online editing method based on non-functional testing according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a non-functional test-based online editing method in an embodiment of the present invention;
FIG. 7 is a schematic diagram of a PID controller according to an embodiment of the invention;
FIG. 8 is a first block diagram of an online editing apparatus based on non-functional test according to an embodiment of the present invention;
FIG. 9 is a block diagram of a transaction element sending unit according to an embodiment of the present invention;
FIG. 10 is a block diagram of a non-functional test-based on-line editing apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a specific implementation manner of an online editing method based on non-functional testing, and referring to fig. 1, the method specifically includes the following contents:
step 100: and generating a script template according to the pre-received request script.
It is understood that the request script is initiated by a client, which may be a Web client, and the script template refers to a general non-functional script, and the user may modify corresponding content on the template, for example, add a transaction, modify configuration information of an original transaction, and the like.
Step 200: and analyzing the script template to a non-functional test tool.
It is understood that parsing the script template (non-functional test template) will result in information of the elements of the template, such as: the method comprises two reference examples of transactions, and a user can modify the information of the transactions and can add and delete the transaction information in the template.
Step 300: and transmitting the transaction elements generated by the non-functional testing tool to the client.
The transaction elements refer to a protocol for sending a request, a request address, a port, a parameter file and the like, and in addition, the obtained elements can convert the elements into message information and return the message information to the front-end display template content.
Step 400: and receiving a request generated by the client to run and sending the request to the non-functional testing tool for non-functional testing.
As can be seen from the above description, in the online editing method based on the non-functional test provided in the embodiment of the present invention, a Web API is set between the client and the non-functional test tool, and a script template is generated according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method.
In one embodiment, referring to fig. 2, step 300 further comprises:
step 301: and converting the transaction elements into default script information and sending the default script information to the client.
It is understood that the default script in step 301 refers to the elements of the default transaction contained in the script template.
Step 302: and editing the default script information by the client.
The user can add, delete and modify the default script information, and can also add parameter files and the like.
Step 303: default script information edited by a client is received.
Step 304: and performing object conversion on the edited default script information, and sending the object conversion to the non-functional testing tool.
It is understood that the object in step 304 is a message sent from the front end, and the message is to be converted into a script file conforming to the format of the non-functional test tool.
Step 305: and generating a file name and an execution ID according to the default script information after the object conversion, and sending the file name and the execution ID to the client.
It is to be understood that the file name is a script file for editing a generated script and then executing the generated script file, and the execution ID is generated during generation of a script conforming to the format of the nonfunctional test tool and used to mark a unique script.
In an embodiment, referring to fig. 3, the online editing method based on non-functional test further includes:
step 500: and filtering and converting the acquisition result of the non-functional test tool according to a preset WebSocket server.
Step 600: and sending a non-functional test result to the client in real time.
In the implementation of steps 500 and 600, a listener module may be established, and the function of the listener module is as follows: firstly, establishing a WebSocket server, secondly, filtering and converting the acquisition result of a non-functional test tool, thirdly, sending a real-time returned result in the running process, and fourthly, closing corresponding resources after the running is finished.
In an embodiment, referring to fig. 4, the online editing method based on non-functional test further includes:
step 700: and establishing a PID controller.
The PID controller in step 700 is used to calculate the error between the current TPS and the predetermined TPS, calculate the cumulative error of the non-functional test, and calculate the error conversion rate of the non-functional test. The PID controller (Proportion-integration-differentiation controller) is composed of a proportional unit integral unit I and a differential unit. The Kp, Ki and Kd are set by three parameters. Proportional-to control the error value is multiplied by a negative constant P (representing the proportion) and then added to the predetermined value. P is only true when the output of the controller is proportional to the error of the system. This change in controller output is proportional to the deviation of the input controller. For example, the control of an electric heater is scaled to 10 ℃ and its predetermined value is 20 ℃. It will output 100% at 10 c, 50% at 15 c and 10% at 19 c, noting that when the error is 0, the output of the controller is also 0. Integral-to control the past, the error value is the sum of the errors over a period of time, then multiplied by a negative constant I, and then added to a predetermined value. I finds the average error of the output result of the system and the predetermined value from the past average error value. A simple proportional system will oscillate and will go around a predetermined value because the system cannot eliminate the unwanted correction. By adding a negative average error ratio value, the average systematic error value is always reduced. Therefore, eventually the PID loop system settles to a predetermined value. Differentiating-to control future, calculating a first derivative of the error, multiplying by a negative constant D, and adding to a predetermined value. The control of this derivative will react to changes in the system. The larger the derivative result, the faster the control system will react to the output result. This D parameter is also why the PID is called a predictable controller. The D parameter is helpful in reducing short term changes to the controller. Some practical slow speed systems may not require the D parameter. In more specialized terms, a PID controller may be referred to as a filter in a frequency domain system. This is useful in calculating whether it will eventually reach a stable result. If the values are not properly selected, the input values to the control system will oscillate repeatedly, which results in the system never reaching the preset values.
As can be seen from the above description, in the online editing method based on the non-functional test provided in the embodiment of the present invention, a Web API is set between the client and the non-functional test tool, and a script template is generated according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method. Specifically, the beneficial effects of the invention are as follows:
(1) because the system introduces a control theory into the field of non-functional test, the simulation of production pressure can be effectively carried out, and the system supports the operation according to the preset TPS data and can support the pressure simulation of real data of gradient, double peaks or double 11 by leading the TPS data produced into the system.
(2) By using the structural design of the device, the invention can realize simplified non-functional test, automatically complete fussy operation steps and save labor.
(3) By organically combining editing, debugging, running and comparing, the system avoids the trouble of switching among different systems and reduces the operation and maintenance of the system.
(4) The online scheme opens the way for cloud-based large-scale applications.
To further illustrate the present solution, the present invention takes a meter as an example, and provides a non-functional test based online editing method modularization to provide a specific application example of the method, which specifically includes the following contents, see fig. 5 and fig. 6.
The specific application example sets a Web API between a Web end (client) and a non-functional test tool Jmeter, namely, a WebAPI micro-service and a VUE front-end framework are adopted, and the VUE front-end functions comprise test plan establishment, transaction service establishment, parameter variable service and the like.
S0: and generating a script template according to the pre-received request script.
S1: and analyzing the script template to a Jmeter.
Specifically, a script template is parsed into a Jmeter object, and the Jmeter object is converted into an object of a cost system (WebAPI).
S2: and transmitting the transaction elements generated by the non-functional testing tool to the Web end.
Converting the object in the WebAPI into a meter object (specifically, a HashTree can be converted into a file), converting the meter object into a corresponding xml script, and finally saving the parameter file and the script to a corresponding directory.
S3: a PID controller is provided.
Referring to fig. 7, the function of the PID is mainly to control the TPS to be transmitted, for example, to transmit pressure according to the standard of 100TPS, when the pressure reaches 100TPS, the number and interval of concurrent transactions need to be adjusted, and fluctuation is generated during adjustment, and the PID can control the fluctuation to quickly stabilize TPS at 100TPS (the current TPS is calculated from returned sampling data). In fig. 7, a proportional element is used to reflect an error between a current TPS and a predetermined TPS of a system, an integral element is used to reflect an accumulated error of the system, a differential element is used to reflect a conversion rate of the system error, and an actuator, i.e., an engine, is used to execute contents in a file.
S4: listening for a test procedure and a conversion procedure.
In particular, a listener module may be provided. The module realizes the following functions: firstly, establishing a WebSocket server (a mode of communication between an interface and a back-end API), secondly, filtering and converting the acquisition result of the Jmeter, thirdly, sending a real-time returned result in the running process, and fourthly, closing corresponding resources after the running is finished.
As can be seen from the above description, in the online editing method based on the non-functional test provided in the embodiment of the present invention, a Web API is set between the client and the non-functional test tool, and a script template is generated according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method. Specifically, the beneficial effects of the invention are as follows:
(1) because the system introduces a control theory into the field of non-functional test, the simulation of production pressure can be effectively carried out, and the system supports the operation according to the preset TPS data and can support the pressure simulation of real data of gradient, double peaks or double 11 by leading the TPS data produced into the system.
(2) By using the structural design of the device, the invention can realize simplified non-functional test, automatically complete fussy operation steps and save labor.
(3) By organically combining editing, debugging, running and comparing, the system avoids the trouble of switching among different systems and reduces the operation and maintenance of the system.
(4) The online scheme opens the way for cloud-based large-scale applications.
Based on the same inventive concept, the embodiment of the present application further provides an online editing apparatus based on non-functional test, which can be used to implement the methods described in the above embodiments, such as the following embodiments. Because the principle of solving the problems of the online editing device based on the non-functional test is similar to the cash usage prediction method of the bank outlets, the implementation of the online editing device based on the non-functional test can refer to the implementation of the cash usage prediction method of the bank outlets, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
The embodiment of the present invention provides a specific implementation manner of an online editing apparatus based on a non-functional test, which can implement a method for predicting cash usage of a bank outlet, and referring to fig. 8, the online editing apparatus based on the non-functional test specifically includes the following contents:
a script template generating unit 10 for generating a script template according to a request script received in advance;
a script template parsing unit 20 for parsing the script template to a non-functional test tool;
a transaction element sending unit 30 for sending the transaction element generated by the non-functional test tool to the client; the transaction elements include: sending a protocol, a request address, a port and a parameter file of the request;
and the testing unit 40 is used for receiving the request generated by the client to run and sending the request to the non-functional testing tool to perform non-functional testing.
In one embodiment, referring to fig. 9, the transaction element sending unit 30 includes:
a transaction element conversion module 301, configured to convert the transaction element into default script information and send the default script information to a client;
an information editing module 302, configured to edit the default script information by a client;
an information receiving module 303, configured to receive default script information edited by a client;
the information conversion module 304 is configured to perform object conversion on the edited default script information, and send the object converted default script information to the non-functional test tool;
and the file name generating module 305 is configured to generate a file name and an execution ID according to the default script information after object conversion, and send the file name and the execution ID to the client.
In one embodiment, referring to fig. 10, the online editing apparatus based on non-functional test further includes:
the monitoring unit 50 is used for filtering and converting the acquisition result of the non-functional test tool according to a preset WebSocket server;
a result sending unit 60, configured to send a non-functional test result to the client in real time;
and a PID establishing unit 70 for establishing a PID controller for calculating an error of the current TPS from a predetermined TPS, calculating an accumulated error of the non-functional test, and calculating an error conversion rate of the non-functional test.
As can be seen from the above description, in the online editing apparatus based on non-functional testing provided in the embodiment of the present invention, a Web API is set between the client and the non-functional testing tool, and a script template is generated according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method. Specifically, the beneficial effects of the invention are as follows:
(1) because the system introduces a control theory into the field of non-functional test, the simulation of production pressure can be effectively carried out, and the system supports the operation according to the preset TPS data and can support the pressure simulation of real data of gradient, double peaks or double 11 by leading the TPS data produced into the system.
(2) By using the structural design of the device, the invention can realize simplified non-functional test, automatically complete fussy operation steps and save labor.
(3) By organically combining editing, debugging, running and comparing, the system avoids the trouble of switching among different systems and reduces the operation and maintenance of the system.
(4) The online scheme opens the way for cloud-based large-scale applications.
An embodiment of the present application further provides a specific implementation manner of an electronic device, which is capable of implementing all steps in the online editing method based on the non-functional test in the foregoing embodiment, and referring to fig. 11, the electronic device specifically includes the following contents:
a processor (processor)1201, a memory (memory)1202, a communication interface 1203, and a bus 1204;
the processor 1201, the memory 1202 and the communication interface 1203 complete communication with each other through the bus 1204; the communication interface 1203 is configured to implement information transmission between related devices, such as a server-side device, a data acquisition device, and a client device.
The processor 1201 is configured to call the computer program in the memory 1202, and the processor executes the computer program to implement all the steps in the online editing method based on the non-functional test in the above embodiments, for example, the processor executes the computer program to implement the following steps:
step 100: and generating a script template according to the pre-received request script.
Step 200: and analyzing the script template to a non-functional test tool.
Step 300: and transmitting the transaction elements generated by the non-functional testing tool to the client.
Step 400: and receiving a request generated by the client to run and sending the request to the non-functional testing tool for non-functional testing.
As can be seen from the above description, in the electronic device in the embodiment of the present application, a Web API is set between the client and the non-functional test tool, and a script template is generated according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method. Specifically, the beneficial effects of the invention are as follows:
(1) because the system introduces a control theory into the field of non-functional test, the simulation of production pressure can be effectively carried out, and the system supports the operation according to the preset TPS data and can support the pressure simulation of real data of gradient, double peaks or double 11 by leading the TPS data produced into the system.
(2) By using the structural design of the device, the invention can realize simplified non-functional test, automatically complete fussy operation steps and save labor.
(3) By organically combining editing, debugging, running and comparing, the system avoids the trouble of switching among different systems and reduces the operation and maintenance of the system.
(4) The online scheme opens the way for cloud-based large-scale applications.
Embodiments of the present application further provide a computer-readable storage medium capable of implementing all steps in the online editing method based on the non-functional test in the above embodiments, where the computer-readable storage medium stores a computer program, and the computer program implements all steps of the online editing method based on the non-functional test in the above embodiments when executed by a processor, for example, the processor implements the following steps when executing the computer program:
step 100: and generating a script template according to the pre-received request script.
Step 200: and analyzing the script template to a non-functional test tool.
Step 300: and transmitting the transaction elements generated by the non-functional testing tool to the client.
Step 400: and receiving a request generated by the client to run and sending the request to the non-functional testing tool for non-functional testing.
As can be seen from the above description, in the computer-readable storage medium in the embodiment of the present application, a Web API is set between the client and the non-functional test tool, and a script template is generated according to a pre-received request script; then, analyzing the script template to a non-functional test tool; sending the transaction elements generated by the non-functional testing tool to the client; and finally, receiving a request generated by the client for operation and sending the request to the non-functional testing tool for non-functional testing. For the non-functional testers, the requirements of the non-functional testers are reduced, so that the non-functional testers can be more concentrated on the requirements of the business, for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced due to the open source framework, and for developers (which are not aware of the non-functional tests and are troublesome to carry out single transaction tests), the difficulty of the non-functional single transaction can be effectively reduced by using the method. Specifically, the beneficial effects of the invention are as follows:
(1) because the system introduces a control theory into the field of non-functional test, the simulation of production pressure can be effectively carried out, and the system supports the operation according to the preset TPS data and can support the pressure simulation of real data of gradient, double peaks or double 11 by leading the TPS data produced into the system.
(2) By using the structural design of the device, the invention can realize simplified non-functional test, automatically complete fussy operation steps and save labor.
(3) By organically combining editing, debugging, running and comparing, the system avoids the trouble of switching among different systems and reduces the operation and maintenance of the system.
(4) The online scheme opens the way for cloud-based large-scale applications.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Although the present application provides method steps as in an embodiment or a flowchart, more or fewer steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An online editing method based on non-functional test is characterized by comprising the following steps:
generating a script template according to a pre-received request script;
analyzing the script template to a non-functional test tool;
sending the transaction elements generated by the non-functional testing tool to the client;
and receiving a request generated by the client to run and sending the request to the non-functional testing tool for non-functional testing.
2. The non-functional test based online editing method according to claim 1, wherein the transaction elements comprise: the protocol, request address, port and parameter file that sent the request.
3. The on-line editing method based on non-functional test according to claim 1, wherein the sending the transaction elements generated by the non-functional test tool to the client comprises:
converting the transaction elements into default script information and sending the default script information to a client;
the client edits the default script information;
receiving default script information edited by a client;
carrying out object conversion on the edited default script information, and sending the object conversion to the non-functional testing tool;
and generating a file name and an execution ID according to the default script information after the object conversion, and sending the file name and the execution ID to the client.
4. The on-line editing method based on non-functional test according to claim 1, further comprising:
filtering and converting the acquisition result of the non-functional test tool according to a preset WebSocket server;
and sending a non-functional test result to the client in real time.
5. The on-line editing method based on non-functional test according to claim 1, further comprising:
and establishing a PID controller, wherein the PID controller is used for calculating the error of the current TPS and the preset TPS, calculating the accumulated error of the non-functional test and calculating the error conversion rate of the non-functional test.
6. An online editing apparatus based on non-functional test, comprising:
the script template generating unit is used for generating a script template according to a pre-received request script;
the script template analyzing unit is used for analyzing the script template to a non-functional testing tool;
the transaction element sending unit is used for sending the transaction element generated by the non-functional testing tool to the client; the transaction elements include: sending a protocol, a request address, a port and a parameter file of the request;
and the test unit is used for receiving the request generated by the client side, running and sending the request to the non-functional test tool so as to perform non-functional test.
7. The non-functional-test-based online editing apparatus according to claim 6, wherein the transaction element sending unit comprises:
the transaction element conversion module is used for converting the transaction elements into default script information and sending the default script information to the client;
the information editing module is used for editing the default script information by a client;
the information receiving module is used for receiving default script information edited by a client;
the information conversion module is used for performing object conversion on the edited default script information and sending the edited default script information to the non-functional test tool;
and the file name generation module is used for generating a file name and an execution ID according to the default script information after the object conversion, and sending the file name and the execution ID to the client.
8. The non-functional test based online editing apparatus according to claim 6, further comprising:
the monitoring unit is used for filtering and converting the acquisition result of the non-functional test tool according to a preset WebSocket server;
the result sending unit is used for sending a non-functional test result to the client in real time;
and the PID establishing unit is used for establishing a PID controller which is used for calculating the error of the current TPS and the preset TPS, calculating the accumulated error of the non-functional test and calculating the error conversion rate of the non-functional test.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the non-functional test based on-line editing method of any one of claims 1 to 5 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the non-functional test based on-line editing method of any one of claims 1 to 5.
CN202010245736.0A 2020-03-31 2020-03-31 Online editing method and device based on nonfunctional test Active CN111352850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010245736.0A CN111352850B (en) 2020-03-31 2020-03-31 Online editing method and device based on nonfunctional test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010245736.0A CN111352850B (en) 2020-03-31 2020-03-31 Online editing method and device based on nonfunctional test

Publications (2)

Publication Number Publication Date
CN111352850A true CN111352850A (en) 2020-06-30
CN111352850B CN111352850B (en) 2023-04-25

Family

ID=71196384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010245736.0A Active CN111352850B (en) 2020-03-31 2020-03-31 Online editing method and device based on nonfunctional test

Country Status (1)

Country Link
CN (1) CN111352850B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279090A (en) * 2015-11-17 2016-01-27 中国建设银行股份有限公司 Test script generating method and test script generating device applied in financial field
US20160154724A1 (en) * 2013-06-28 2016-06-02 Nec Corporation Non-functional evaluation assistance device, system, method, and program
CN106649073A (en) * 2015-10-28 2017-05-10 中国移动通信集团公司 Test method and device based on dynamic script template
CN107133161A (en) * 2016-02-26 2017-09-05 中国移动(深圳)有限公司 One kind generation client performance test script method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160154724A1 (en) * 2013-06-28 2016-06-02 Nec Corporation Non-functional evaluation assistance device, system, method, and program
CN106649073A (en) * 2015-10-28 2017-05-10 中国移动通信集团公司 Test method and device based on dynamic script template
CN105279090A (en) * 2015-11-17 2016-01-27 中国建设银行股份有限公司 Test script generating method and test script generating device applied in financial field
CN107133161A (en) * 2016-02-26 2017-09-05 中国移动(深圳)有限公司 One kind generation client performance test script method and device

Also Published As

Publication number Publication date
CN111352850B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
EP3115902B1 (en) Framework for automated testing of mobile apps
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
Stresnjak et al. Usage of robot framework in automation of functional test regression
CN111316227B (en) Method and equipment for debugging application program
CN108829591B (en) Web-based collaborative debugging system and method
CN111352850A (en) On-line editing method and device based on non-functional test
US20050203717A1 (en) Automated testing system, method and program product using testing map
CN116594887A (en) CFD software-based automatic test method and system
Valderas et al. Supporting a hybrid composition of microservices. The eucaliptool platform
Islam et al. Framework for automation of cloud-application testing using selenium (facts)
CN114924963A (en) Distributed execution method, device, equipment and medium for webpage compatibility test
WO2022134001A1 (en) Machine learning model framework development method and system based on containerization technology
CN114327416A (en) Interface synchronization method and device applied to development branch and electronic equipment
CN113961451A (en) Automatic test system for software development tasks of working platform
KR20180119392A (en) Apparatus and method for protocol modeling
CN113448874A (en) Method and device for generating unit test script
CN111309625A (en) Regression testing method and device based on real transaction data
WO2020263417A1 (en) Chat bot diagnostic visualization
Deyab et al. Orchestration framework for automated Ajax-based web application testing
García et al. User Impersonation as a Service in End-to-End Testing.
Anderson Performance modelling of reactive web applications using trace data from automated testing
Godboley et al. Dy-COPECA: A Dynamic Version of MC/DC Analyzer for C Program.
Sun et al. Usefulness evaluation of simulation in server system testing
CN111522737B (en) Automatic test verification method and device for front-end interface and storage medium
WO2024001594A1 (en) Operator development method and apparatus, operator processing method and apparatus, and electronic device, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220921

Address after: 12 / F, 15 / F, 99 Yincheng Road, Pudong New Area pilot Free Trade Zone, Shanghai, 200120

Applicant after: Jianxin Financial Science and Technology Co.,Ltd.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant