CN111352850B - Online editing method and device based on nonfunctional test - Google Patents

Online editing method and device based on nonfunctional test Download PDF

Info

Publication number
CN111352850B
CN111352850B CN202010245736.0A CN202010245736A CN111352850B CN 111352850 B CN111352850 B CN 111352850B CN 202010245736 A CN202010245736 A CN 202010245736A CN 111352850 B CN111352850 B CN 111352850B
Authority
CN
China
Prior art keywords
nonfunctional
client
sending
test
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.)
Active
Application number
CN202010245736.0A
Other languages
Chinese (zh)
Other versions
CN111352850A (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
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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an online editing method and device based on nonfunctional 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 nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and receiving a request generated by the client, running and sending the request to the nonfunctional testing tool to conduct nonfunctional testing. The on-line editing method and device based on the nonfunctional test effectively reduce the requirements of nonfunctional testers, make the nonfunctional testers concentrate on the requirements of the business, and effectively reduce the purchasing cost and maintenance cost of enterprises.

Description

Online editing method and device based on nonfunctional 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 nonfunctional testing.
Background
In the prior art, the nonfunctional test generally needs to use special tools, such as Loadrunner and Jmeter to perform script writing work, the Loadrunner can support the scripts of java and c, and the Jmeter supports the scripts in Jmx format, which specifically generally includes the following three modes:
(1) Recording and manually writing. Recording is to access the actual tested system through the functions provided by the tool, manually operate the process, record the operation flow of the user by the system, convert the operation flow into the script of the tool, edit the script by the user to finish corresponding script writing, and manually write non-functional scripts by using the languages or formats supported by the tool, wherein a plurality of corresponding operation functions or interfaces are generally provided to help the user write.
(2) Uploading online scripts, uploading scripts written offline to the online, automatically distributing by using a press machine by utilizing an online script operation mechanism, performing online operation by using a container, waiting for execution result generation, and then viewing the execution result.
(3) The protocol generates a message, can generate and send some general messages in an interface configuration mode, can simulate a transaction message and is simply configured.
However, the above methods all require that the tester be familiar with the corresponding script to perform the nonfunctional test. For those who are unfamiliar and do not need to be familiar with the corresponding script, nonfunctional testing work cannot be performed quickly and efficiently. In particular, the prior art has the following drawbacks: the learning cost is high: mature nonfunctional tools need to have professional skills, learning cost is high, for most financial transaction platforms, the HTTP protocol is the most basic communication mode, but to achieve simple testing of HTTP, the Jmeter needs to be familiar with multiple concepts such as thread groups, assertions, post-processing, variable and result display, etc. Complex TPS curve functions cannot be implemented. Currently all nonfunctional tests require manual adjustments to achieve a given TPS, let alone to complete the TPS gradient or the actual production of a bimodal TPS pattern. On-line editing and debugging functions. Both Loadrunner and Jmeter are offline tools that cannot provide online editing and debugging functions.
Disclosure of Invention
Aiming at the problems in the prior art, the online editing method and the online editing device based on the nonfunctional test reduce the requirements of nonfunctional testers, enable the nonfunctional testers to concentrate on the requirements of the business, effectively reduce the purchasing cost and the maintenance cost of enterprises, and effectively reduce the difficulty of nonfunctional single 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 a nonfunctional test, including:
generating a script template according to a pre-received request script;
analyzing the script template to a nonfunctional testing tool;
transmitting transaction elements generated by the non-functional test tool to the client;
and receiving a request generated by the client, running and sending the request to the nonfunctional testing tool to conduct nonfunctional testing.
In one embodiment, the transaction element includes: the protocol that sent the request, the request address, the port, and the parameter file.
In one embodiment, the sending the transaction element generated by the non-functional test tool to the client includes:
converting the transaction element into default script information and sending the default script information to a client;
editing the default script information by a client;
receiving default script information edited by a client;
performing object conversion on the edited default script information, and sending the default script information to the nonfunctional 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 on-line editing method based on the nonfunctional test further comprises:
filtering and converting the acquisition result of the nonfunctional testing tool according to a preset WebSocket server;
and sending the nonfunctional test result to the client in real time.
In one embodiment, the on-line editing method based on the nonfunctional test further comprises:
and establishing a PID controller, wherein the PID controller is used for calculating the error between the current TPS and the preset TPS, calculating the accumulated error of the nonfunctional test and calculating the error conversion rate of the nonfunctional test.
In a second aspect, the present invention provides an online editing apparatus based on a nonfunctional test, comprising:
the script template generation unit is used for generating a script template according to a pre-received request script;
the script template analysis unit is used for analyzing the script template to a nonfunctional testing tool;
a transaction element transmitting unit for transmitting the transaction element generated by the non-functional test tool to the client; the transaction element includes: a protocol, a request address, a port and a parameter file of a request are sent;
and the testing unit is used for receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool so as to conduct nonfunctional testing.
In one embodiment, the transaction element transmitting unit includes:
the transaction element conversion module is used for converting the transaction element into default script information and sending the default script information to a 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 carrying out object conversion on the edited default script information and sending the edited default script information to the nonfunctional testing 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 on-line editing device based on the nonfunctional test further comprises:
the monitoring unit is used for filtering and converting the acquisition result of the nonfunctional testing tool according to a preset WebSocket server;
the result sending unit is used for sending the nonfunctional test result to the client in real time;
the PID establishment unit is used for establishing a PID controller, and the PID controller is used for calculating the error between the current TPS and the preset TPS, calculating the accumulated error of the nonfunctional test and calculating the error conversion rate of the nonfunctional 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, the processor implementing the steps of an on-line editing method based on non-functional testing when the program is executed by the processor.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of an on-line editing method based on non-functional testing.
As can be seen from the above description, the online editing method and device based on non-functional test according to the embodiments of the present invention are implemented by setting a Web API between a client and a non-functional test tool, and generating a script template according to a request script received in advance; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction. Specifically, the beneficial effects of the invention are as follows:
(1) Because the system introduces a control theory into the nonfunctional test field, the simulation of the production pressure can be effectively performed, and the system supports the operation according to the preset TPS data by introducing the produced TPS data into the system, and can support the pressure simulation of the real data of gradient, double peaks or double 11.
(2) By using the structural design of the device, the simplified nonfunctional test can be realized, the complicated operation steps are automatically completed, and the labor is saved.
(3) The system organically combines editing, debugging, running and comparison, avoids the trouble of switching between different systems, and reduces the operation and maintenance of the system.
(4) The online scheme enables large-scale application based on cloud to develop a road.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an online editing method based on a nonfunctional test according to an embodiment of the present invention;
FIG. 2 is a flowchart of an online editing method step 300 based on a nonfunctional test according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a non-functional test-based online editing method according to a second embodiment of the present invention;
FIG. 4 is a flowchart of an online editing method based on a nonfunctional test according to an embodiment of the present invention;
FIG. 5 is a flow chart of an online editing method based on nonfunctional testing in a specific application example of the present invention;
FIG. 6 is a multi-terminal schematic diagram of an online editing method based on nonfunctional testing in a specific application example of the present invention;
FIG. 7 is a schematic diagram of the PID controller according to the embodiment of the invention;
FIG. 8 is a block diagram of an on-line editing device based on nonfunctional testing in an embodiment of the present invention;
FIG. 9 is a block diagram showing a construction of a transaction element transmitting unit in a specific application example of the present invention;
FIG. 10 is a block diagram of a second embodiment of an on-line editing device based on nonfunctional testing;
fig. 11 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides a specific implementation manner of an online editing method based on nonfunctional testing, and referring to fig. 1, the method specifically comprises the following steps:
step 100: and generating a script template according to the pre-received request script.
It will be appreciated that the request script is initiated by a client, which may be a Web terminal, and that the script template refers to a general non-functional script, and that the user may modify the corresponding content on this template, for example, add transactions, modify configuration information of the original transactions, etc.
Step 200: and analyzing the script template to a nonfunctional testing tool.
It will be appreciated that parsing the script template (non-functional test template) will yield element information for the template, such as: the method comprises two reference examples of transactions, and a user can modify the transaction information and can add and delete the transaction information in the template.
Step 300: the transaction elements generated by the non-functional test tool are sent to the client.
The transaction element refers to a protocol, a request address, a port, a parameter file and the like for sending a request, and the element can be obtained to convert an element into message information and return the message information to the front end for displaying the content of the template.
Step 400: and receiving a request generated by the client, running and sending the request to the nonfunctional testing tool to conduct nonfunctional testing.
As can be seen from the above description, the online editing method based on non-functional test provided by the embodiment of the present invention sets a Web API between a client and a non-functional test tool, and generates a script template according to a request script received in advance; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction.
In one embodiment, referring to fig. 2, step 300 further comprises:
step 301: and converting the transaction element into default script information and sending the default script information to a client.
It will be appreciated 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: and receiving default script information edited by a client.
Step 304: and converting the edited default script information into an object and transmitting the object to the nonfunctional testing tool.
It will be appreciated that the object in step 304 is a message sent from the front end, and the message is converted into a script file conforming to the format of the nonfunctional testing 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 will be appreciated that the file name is used to edit the script file that is generated after the script is generated, and the execution ID is generated during the generation of the script that conforms to the format of the non-functional test tool, and is used to mark the unique script.
In one embodiment, referring to fig. 3, the on-line editing method based on the nonfunctional test further includes:
step 500: and filtering and converting the acquisition result of the nonfunctional testing tool according to a preset WebSocket server.
Step 600: and sending the nonfunctional test result to the client in real time.
In implementation, steps 500 and 600 may be implemented to create a listener module that performs the following functions: firstly, a WebSocket server is established, secondly, the acquisition result of the nonfunctional testing tool is filtered and converted, thirdly, a real-time returned result is sent in the running process, and fourthly, after the running is finished, corresponding resources are closed.
In one embodiment, referring to fig. 4, the on-line editing method based on the nonfunctional test further includes:
step 700: and establishing a PID controller.
The PID controller in step 700 is used to calculate the error of the current TPS from the predetermined TPS, calculate the accumulated error of the nonfunctional test, and calculate the error conversion rate of the nonfunctional test. The PID controller (Proportion Integration differential. Proportional-integral-derivative controller) is composed of a proportional unit integrating unit I and a derivative unit. By setting three parameters of Kp, ki and Kd. Proportion-to control the current, the error value is multiplied by a negative constant P (representing the proportion) and then added to a 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 scale range of the controller of an electric heater is 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 the controller output is also 0 when the error is 0. Integrate-to control the past, the error value is the sum of errors over 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 change back and forth around a predetermined value because the system will not eliminate the redundant correction. By adding a negative average error ratio value, the average systematic error value is always reduced. Therefore, the PID loop system will eventually be set at a predetermined value. Derivative-to control future, calculate the first derivative of the error, multiply with a negative constant D, and finally add to the predetermined value. The control of this derivative will react to the system changes. The greater the derivative result, the more quickly the control system reacts to the output result. This D parameter is also the reason that the PID is called a predictive controller. The D parameter helps to reduce short-term controller changes. Some practical slow systems may not require the D parameter. For more specialized purposes, a PID controller can be referred to as a filter in the 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 may result in the system never reaching the preset value.
As can be seen from the above description, the online editing method based on non-functional test provided by the embodiment of the present invention sets a Web API between a client and a non-functional test tool, and generates a script template according to a request script received in advance; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction. Specifically, the beneficial effects of the invention are as follows:
(1) Because the system introduces a control theory into the nonfunctional test field, the simulation of the production pressure can be effectively performed, and the system supports the operation according to the preset TPS data by introducing the produced TPS data into the system, and can support the pressure simulation of the real data of gradient, double peaks or double 11.
(2) By using the structural design of the device, the simplified nonfunctional test can be realized, the complicated operation steps are automatically completed, and the labor is saved.
(3) The system organically combines editing, debugging, running and comparison, avoids the trouble of switching between different systems, and reduces the operation and maintenance of the system.
(4) The online scheme enables large-scale application based on cloud to develop a road.
To further illustrate the present solution, the present invention takes Jmeter as an example, and provides an online editing method modularization based on nonfunctional testing to provide a specific application example of the present method, where the specific application example specifically includes the following, see fig. 5 and 6.
The specific application example sets a Web API between a Web end (client) and a nonfunctional testing tool Jmeter, namely, adopts WebAPI micro-service and a VUE front-end framework, 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 sending the transaction elements generated by the nonfunctional testing tool to the Web end.
The objects in WebAPI are converted into Jmeter objects (specifically, hashTree can be converted into files), jmeter objects are converted into corresponding xml scripts, and finally, parameter files and scripts are saved to corresponding directories.
S3: a PID controller is provided.
Referring to fig. 7, the PID is mainly used to control the transmitted TPS, for example, to send out pressure according to 100TPS standard, then the amount and interval of concurrency of the transaction need to be adjusted to reach 100TPS, fluctuation occurs during adjustment, the PID is used to control fluctuation, and TPS is quickly stabilized at 100TPS (the current TPS is calculated from the returned sampling data). In fig. 7, the proportional element is used to reflect the error between the current TPS of the system and the predetermined TPS, the integral element is used to reflect the accumulated error of the system, the differential element is used to reflect the transformation rate of the system error, and the actuator, i.e. the engine, is used to execute the content in the file.
S4: monitoring the test procedure and the conversion procedure.
Specifically, a listener module may be provided. The module has the following implementation functions: firstly, a WebSocket server (a mode of interface and back-end API communication) is established, secondly, the acquisition result of the JMER is filtered and converted, thirdly, a real-time return result is sent in the operation process, and fourthly, after the operation is finished, corresponding resources are closed.
As can be seen from the above description, the online editing method based on non-functional test provided by the embodiment of the present invention sets a Web API between a client and a non-functional test tool, and generates a script template according to a request script received in advance; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction. Specifically, the beneficial effects of the invention are as follows:
(1) Because the system introduces a control theory into the nonfunctional test field, the simulation of the production pressure can be effectively performed, and the system supports the operation according to the preset TPS data by introducing the produced TPS data into the system, and can support the pressure simulation of the real data of gradient, double peaks or double 11.
(2) By using the structural design of the device, the simplified nonfunctional test can be realized, the complicated operation steps are automatically completed, and the labor is saved.
(3) The system organically combines editing, debugging, running and comparison, avoids the trouble of switching between different systems, and reduces the operation and maintenance of the system.
(4) The online scheme enables large-scale application based on cloud to develop a road.
Based on the same inventive concept, the embodiments of the present application also provide an online editing device based on a non-functional test, which can be used to implement the method described in the above embodiments, such as the following embodiments. The principle of solving the problem of the online editing device based on the nonfunctional test is similar to that of the bank website cash consumption prediction method, so that the implementation of the online editing device based on the nonfunctional test can be realized by referring to the bank website cash consumption prediction method, and the repeated parts are not repeated. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment of the invention provides a specific implementation mode of an online editing device based on a nonfunctional test, which can realize a cash consumption prediction method of a banking website, and referring to fig. 8, the online editing device based on the nonfunctional test specifically comprises the following contents:
a script template generation unit 10 for generating a script template according to a request script received in advance;
a script template parsing unit 20, configured to parse the script template to a non-functional test tool;
a transaction element transmitting unit 30 for transmitting the transaction element generated by the non-functional test tool to the client; the transaction element includes: a protocol, a request address, a port and a parameter file of a request are sent;
and the testing unit 40 is used for receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool for performing nonfunctional testing.
In one embodiment, referring to fig. 9, the transaction element transmitting 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;
the information editing module 302 is 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 default script information to the non-functional test tool;
the file name generating module 305 is configured to generate a file name and an execution ID according to the default script information after the object conversion, and send the file name and the execution ID to the client.
In one embodiment, referring to fig. 10, the non-functional test-based online editing apparatus further includes:
a monitoring unit 50, configured to filter and convert the collection result of the nonfunctional testing tool according to a preset WebSocket server;
a result transmitting unit 60, configured to transmit 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 with a predetermined TPS, calculating an accumulated error of the nonfunctional test, and calculating an error conversion rate of the nonfunctional test.
As can be seen from the above description, the online editing device based on non-functional test provided by the embodiment of the present invention sets a Web API between a client and a non-functional test tool, and generates a script template according to a request script received in advance; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction. Specifically, the beneficial effects of the invention are as follows:
(1) Because the system introduces a control theory into the nonfunctional test field, the simulation of the production pressure can be effectively performed, and the system supports the operation according to the preset TPS data by introducing the produced TPS data into the system, and can support the pressure simulation of the real data of gradient, double peaks or double 11.
(2) By using the structural design of the device, the simplified nonfunctional test can be realized, the complicated operation steps are automatically completed, and the labor is saved.
(3) The system organically combines editing, debugging, running and comparison, avoids the trouble of switching between different systems, and reduces the operation and maintenance of the system.
(4) The online scheme enables large-scale application based on cloud to develop a road.
The embodiment of the present application further provides a specific implementation manner of an electronic device capable of implementing all the steps in the non-functional test-based online editing method in the foregoing embodiment, and referring to fig. 11, the electronic device specifically includes the following contents:
a processor 1201, a memory 1202, a communication interface (Communications Interface) 1203, and a bus 1204;
wherein the processor 1201, the memory 1202 and the communication interface 1203 perform communication with each other through the bus 1204; the communication interface 1203 is used for realizing information transmission among related devices such as server-side devices, data acquisition devices, client devices and the like.
The processor 1201 is configured to invoke a computer program in the memory 1202, and when the processor executes the computer program, the processor implements all the steps in the non-functional test-based online editing method in the above embodiment, for example, when the processor executes the computer program, the processor implements 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 nonfunctional testing tool.
Step 300: the transaction elements generated by the non-functional test tool are sent to the client.
Step 400: and receiving a request generated by the client, running and sending the request to the nonfunctional testing tool to conduct nonfunctional testing.
As can be seen from the above description, in the electronic device according to 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 request script received in advance; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction. Specifically, the beneficial effects of the invention are as follows:
(1) Because the system introduces a control theory into the nonfunctional test field, the simulation of the production pressure can be effectively performed, and the system supports the operation according to the preset TPS data by introducing the produced TPS data into the system, and can support the pressure simulation of the real data of gradient, double peaks or double 11.
(2) By using the structural design of the device, the simplified nonfunctional test can be realized, the complicated operation steps are automatically completed, and the labor is saved.
(3) The system organically combines editing, debugging, running and comparison, avoids the trouble of switching between different systems, and reduces the operation and maintenance of the system.
(4) The online scheme enables large-scale application based on cloud to develop a road.
The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the non-functional test-based online editing method in the above embodiments, and a computer program stored on the computer-readable storage medium, which when executed by a processor implements all the steps in the non-functional test-based online editing method in the above embodiments, 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 nonfunctional testing tool.
Step 300: the transaction elements generated by the non-functional test tool are sent to the client.
Step 400: and receiving a request generated by the client, running and sending the request to the nonfunctional testing tool to conduct nonfunctional testing.
As can be seen from the above description, the computer readable storage medium in the embodiments of the present application generates a script template according to a request script received in advance by setting a Web API between a client and a non-functional test tool; then, analyzing the script template to a nonfunctional testing tool; transmitting transaction elements generated by the non-functional test tool to the client; and finally, receiving the request operation generated by the client and sending the request operation to the nonfunctional testing tool to conduct nonfunctional testing. The invention reduces the requirements of non-functional testers and makes the non-functional testers concentrate on the requirements of business, and for enterprises, the purchasing cost and the maintenance cost of the enterprises can be effectively reduced because of the open source framework, and for developers (because the developers do not know the non-functional test and have more trouble in performing the single transaction test), the method can be used for effectively reducing the difficulty of the non-functional single transaction. Specifically, the beneficial effects of the invention are as follows:
(1) Because the system introduces a control theory into the nonfunctional test field, the simulation of the production pressure can be effectively performed, and the system supports the operation according to the preset TPS data by introducing the produced TPS data into the system, and can support the pressure simulation of the real data of gradient, double peaks or double 11.
(2) By using the structural design of the device, the simplified nonfunctional test can be realized, the complicated operation steps are automatically completed, and the labor is saved.
(3) The system organically combines editing, debugging, running and comparison, avoids the trouble of switching between different systems, and reduces the operation and maintenance of the system.
(4) The online scheme enables large-scale application based on cloud to develop a road.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a hardware+program class embodiment, the description is relatively simple, as it is substantially similar to the method embodiment, as relevant see the partial description of the method embodiment.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can 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 are also possible or may be advantageous.
Although the present application provides method operational steps as an example or flowchart, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented by an actual device or client product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or figures.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (5)

1. An online editing method based on nonfunctional testing, comprising:
generating a script template according to a pre-received request script;
analyzing the script template to a nonfunctional testing tool;
transmitting transaction elements generated by the non-functional test tool to the client;
receiving a request operation generated by a client and sending the request operation to the nonfunctional testing tool so as to conduct nonfunctional testing;
filtering and converting the acquisition result of the nonfunctional testing tool according to a preset WebSocket server;
sending a nonfunctional test result to the client in real time;
establishing a PID controller, wherein the PID controller is used for calculating the error between the current TPS and the preset TPS, calculating the accumulated error of the nonfunctional test and calculating the error conversion rate of the nonfunctional test;
the acquisition result of the nonfunctional testing tool is filtered and converted according to a preset WebSocket server; and sending the non-functional test result to the client in real time, including:
establishing a WebSocket server, filtering and converting the acquisition result of the nonfunctional testing tool, sending a real-time returned result in the operation process, and closing the corresponding resource after the operation is finished;
the sending the transaction element generated by the non-functional test tool to the client comprises:
converting the transaction element into default script information and sending the default script information to a client;
editing the default script information by a client;
receiving default script information edited by a client;
performing object conversion on the edited default script information, and sending the default script information to the nonfunctional 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.
2. The non-functional test-based online editing method of claim 1, wherein the transaction element comprises: the protocol that sent the request, the request address, the port, and the parameter file.
3. An on-line editing device based on a nonfunctional test, comprising:
the script template generation unit is used for generating a script template according to a pre-received request script;
the script template analysis unit is used for analyzing the script template to a nonfunctional testing tool;
a transaction element transmitting unit for transmitting the transaction element generated by the non-functional test tool to the client; the transaction element includes: a protocol, a request address, a port and a parameter file of a request are sent;
the testing unit is used for receiving a request operation generated by the client and sending the request operation to the nonfunctional testing tool so as to conduct nonfunctional testing;
the monitoring unit is used for filtering and converting the acquisition result of the nonfunctional testing tool according to a preset WebSocket server;
the result sending unit is used for sending the nonfunctional test result to the client in real time;
the PID establishment unit is used for establishing a PID controller, and the PID controller is used for calculating the error between the current TPS and the preset TPS, calculating the accumulated error of the nonfunctional test and calculating the error conversion rate of the nonfunctional test;
the monitoring unit and the result sending unit are specifically used for establishing a WebSocket server, filtering and converting the acquired results of the nonfunctional testing tool, sending the results returned in real time in the running process, and closing corresponding resources after the running is finished;
the transaction element transmission unit includes:
the transaction element conversion module is used for converting the transaction element into default script information and sending the default script information to a 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 carrying out object conversion on the edited default script information and sending the edited default script information to the nonfunctional testing 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.
4. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the non-functional test based on-line editing method of any of claims 1 to 2 when the program is executed by the processor.
5. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the non-functional test based on-line editing method of any of claims 1 to 2.
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 CN111352850A (en) 2020-06-30
CN111352850B true 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)

Family Cites Families (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
CN105279090B (en) * 2015-11-17 2018-07-03 中国建设银行股份有限公司 Test script generation method and device applied to financial field
CN107133161B (en) * 2016-02-26 2021-03-05 中移动信息技术有限公司 Method and device for generating client performance test script

Also Published As

Publication number Publication date
CN111352850A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN106155906B (en) A kind of bank's host close beta system and method
US10678675B2 (en) Assistive, language-agnostic debugging with multi-collaborator control
US20150039941A1 (en) Testing Coordinator
CN110705717A (en) Training method, device and equipment of machine learning model executed by computer
CN110377283B (en) Method for realizing and synchronizing front-end effective data during Web front-end and back-end separation development
US20140123114A1 (en) Framework for integration and execution standardization (fiesta)
CN108829591B (en) Web-based collaborative debugging system and method
CN111352850B (en) Online editing method and device based on nonfunctional test
CN116594887A (en) CFD software-based automatic test method and system
CN117632710A (en) Method, device, equipment and storage medium for generating test code
CN111309625A (en) Regression testing method and device based on real transaction data
CN115470152B (en) Test code generation method, test code generation device, and storage medium
KR20180119392A (en) Apparatus and method for protocol modeling
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
TWI414995B (en) Development and execution platform
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
WO2020263417A1 (en) Chat bot diagnostic visualization
CN113806222B (en) Interface test script generation method, device, equipment and storage medium
Deyab et al. Orchestration framework for automated Ajax-based web application testing
Anderson Performance modelling of reactive web applications using trace data from automated testing
CN115757171A (en) Interface test processing method and device
van Lessen Modeling Test Cases in BPMN for Behavior-Driven Development
Patel et al. Implementation and Comparison of MVC Model in ASP. net Framework and PHP Framework
Dahlin An Evaluation of Spring WebFlux: With focus on built in SQL features

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
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.

GR01 Patent grant
GR01 Patent grant