[go: up one dir, main page]

CN116860614A - Performance test method, apparatus, device, storage medium, and program product - Google Patents

Performance test method, apparatus, device, storage medium, and program product Download PDF

Info

Publication number
CN116860614A
CN116860614A CN202310715490.2A CN202310715490A CN116860614A CN 116860614 A CN116860614 A CN 116860614A CN 202310715490 A CN202310715490 A CN 202310715490A CN 116860614 A CN116860614 A CN 116860614A
Authority
CN
China
Prior art keywords
test
instruction
remote control
target
server
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.)
Pending
Application number
CN202310715490.2A
Other languages
Chinese (zh)
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.)
Zhongke Shuguang International Information Industry Co ltd
Original Assignee
Zhongke Shuguang International Information Industry 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 Zhongke Shuguang International Information Industry Co ltd filed Critical Zhongke Shuguang International Information Industry Co ltd
Priority to CN202310715490.2A priority Critical patent/CN116860614A/en
Publication of CN116860614A publication Critical patent/CN116860614A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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 present application relates to a performance test method, apparatus, computer device, storage medium and program product. The method comprises the following steps: the method comprises the steps that a control target browser executes a target test script to sequentially send a first test instruction and a second test instruction to a server provided with a remote control tool, wherein the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool; receiving test data returned by the server based on the first test instruction and the second test instruction; and obtaining a remote control performance test result according to the test data. The method can reduce the difficulty of remote control performance test.

Description

Performance test method, apparatus, device, storage medium, and program product
Technical Field
The present application relates to the field of software testing technology, and in particular, to a performance testing method, apparatus, device, storage medium, and program product.
Background
The noVNC is a VNC (Virtual Network Console ) client supporting HTML5 (Hyper Text Markup Language 5.0.0, hypertext markup language version 5.0), and a user can access a Server desktop where a VNC Server is installed remotely through the VNC client or a browser supporting HTML5 to control an application on the Server, however, when the user quantity is large, access delay may occur, so performance test on the noVNC is necessary.
In the conventional technology, various signal instructions, such as click signal instructions of a keyboard and a mouse, are simulated, and then the signal instructions are sent to a server through websocket links, so that corresponding application programs on the server are started to run, and the like, thereby realizing nonVNC performance test.
However, the signal instruction is sent to the server through the websocket link, so that the simulated signal instruction needs to be sent to the server in a data stream form, and the simulation difficulty of the signal instruction is relatively high, so that the traditional technology has the problem of relatively high performance testing difficulty of the novNC, that is, the problem of relatively high performance testing difficulty of remote control.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a performance testing method, apparatus, device, storage medium, and program product that can reduce the difficulty of remote control performance testing.
In a first aspect, the present application provides a performance testing method. The method comprises the following steps: the control target browser executes the target test script to sequentially send a first test instruction and a second test instruction to a server provided with the remote control tool, wherein the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool; receiving test data returned by the server based on the first test instruction and the second test instruction; and obtaining a remote control performance test result according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
In this embodiment, the test tool may be a selenium test tool, and since the selenium test tool directly runs in the browser, the browser has the characteristics similar to that of a real user in operation, and therefore, the first test script includes a call instruction for calling the selenium test tool, and the target browser executes the first test script, so that the server can be opened as if the real user operates in the browser, and compared with the conventional technology, the real trigger operation can be simulated.
In one embodiment, the method further comprises: receiving the concurrency quantity, and starting a plurality of target browsers according to the concurrency quantity; correspondingly, controlling the target browser to execute the target test script comprises the following steps: and controlling the target browsers to execute the target test scripts respectively.
In this embodiment, by starting a plurality of target browsers according to the concurrency number and then controlling the plurality of target browsers to execute target test scripts respectively, a pressure test for remote control is achieved, so that test data obtained in the test process can reflect remote control performance more.
In one embodiment, obtaining a remote control performance test result according to test data includes: determining response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
In this embodiment, the implementation manner of obtaining the remote control performance test result has the advantages of simplicity and rapidness according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface open response time and a control response time, the method further comprising: determining interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
In one embodiment, the target browser is a headless browser.
In this embodiment, the target browser is a headless browser, so that in the pressure test process for the remote control, a plurality of headless browsers are started, and resource consumption during running of the browsers can be greatly reduced.
In a second aspect, the application further provides a performance testing device. The device comprises: the system comprises a sending module, a remote control tool, a target browser, a remote control tool, a remote control module and a control module, wherein the sending module is used for controlling the target browser to execute a target test script so as to sequentially send a first test instruction and a second test instruction to a server provided with the remote control tool, the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool; the receiving module is used for receiving test data returned by the server based on the first test instruction and the second test instruction; and the acquisition module is used for acquiring a remote control performance test result according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
In one embodiment, the device further includes a starting module, configured to receive the concurrency number, and start a plurality of target browsers according to the concurrency number; correspondingly, the sending module is specifically used for controlling the plurality of target browsers to execute the target test scripts respectively.
In one embodiment, the obtaining module is specifically configured to determine a response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface opening response time and a control response time, and the obtaining module is further configured to determine the interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
In one embodiment, the target browser is a headless browser.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method according to any of the first aspects above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the first aspects above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any of the first aspects above.
According to the performance test method, the device, the equipment, the storage medium and the program product, the target browser is controlled to execute the target test script to sequentially send the first test instruction and the second test instruction to the server provided with the remote control tool, wherein the first test instruction is an instruction for opening the desktop of the server based on the remote control tool, the second test instruction is an instruction for operating the application program installed in the server based on the remote control tool, then test data returned by the server based on the first test instruction and the second test instruction are received, and then the remote control performance test result is obtained according to the test data.
Drawings
FIG. 1 is a diagram of an application environment for a performance testing method in one embodiment;
FIG. 2 is a flow chart of a performance testing method according to one embodiment;
FIG. 3 is a flow chart of a pressure test in one embodiment;
FIG. 4 is a flow diagram of a process for writing a target test script in one embodiment;
FIG. 5 is a flow chart of another performance testing method according to one embodiment;
FIG. 6 is a block diagram of a device for testing properties in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
With the increasing demand for super computing, demands of scientific research software and industrial software on graphic interfaces are continuously increasing, super computing service providers can meet user demands, a nonVNC is used for providing users to access the scientific research software or industrial software remotely operated on the super computing server through a browser, and with the increasing of users, the performance of providing services for the users is better, and the nonVNC needs to be tested.
At present, most of the performance of the service end is tested by an interface mode, and for nonVNC, the service is used by directly establishing a websocket link, and the testing method applies pressure by establishing the websocket link.
However, by directly establishing the websocket link, various signal commands, such as clicking signal commands of a simulation keyboard and a mouse, need to be simulated and sent, but the simulation difficulty of the signal commands is relatively high, even simulation of some signal commands cannot be realized, and even if the simulated signal commands are used for enabling a server to achieve the purpose of starting software, the real triggering operation process on a simulation browser cannot be completely realized, so that the traditional technology has the problem of relatively high performance test difficulty of nonNC, namely the problem of relatively high performance test difficulty of remote control.
The performance test method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 controls the target browser to execute the target test script, so as to sequentially send a first test instruction and a second test instruction to a Server installed with the VNC Server remote control tool, the Server 104 returns test data to the terminal 102 based on the first test instruction and the second test instruction, and the terminal 102 obtains a remote control performance test result according to the test data. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a flow chart of a performance testing method is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
in step 201, the target browser is controlled to execute the target test script, so as to sequentially send a first test instruction and a second test instruction to the server installed with the remote control tool, where the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool.
The target browser may be any browser on the market, such as an IE browser, a 360 browser, etc., and the target browser is installed in the terminal. The remote control tool may be a VNC Server supporting some related operations across platforms. The application program installed in the server may be at least one of an application program corresponding to simulation software, an application program corresponding to scientific research software, an application program corresponding to scientific calculation software, and the like.
Optionally, the terminal controls the target browser to execute the target test script, the target browser firstly sends a first test instruction to a Server installed with the VNC Server remote control tool, and after receiving the first test instruction, the VNC Server remote control tool on the Server supports the target browser to open a desktop of the Server, and the target browser can realize remote control of the Server. And then the target browser sends a second test instruction to the Server provided with the VNC Server remote control tool, and after the VNC Server remote control tool on the Server receives the second test instruction, the target browser performs corresponding operations on the application program installed in the Server according to the second test instruction, such as starting the application program, closing the application program, clicking on an image interface opened by the application program, and the like.
Step 202, test data returned by the receiving server based on the first test instruction and the second test instruction.
Optionally, when executing the first test instruction and the second test instruction, the VNC Server remote control tool in the Server generates first log data, that is, test data, and the Server sends the first log data to the target browser, where the target browser stores the first log data in the database, and when executing the target test script, the target browser also stores second log data when sending the first test instruction and the second test instruction to the Server by the target browser in the database.
And 203, obtaining a remote control performance test result according to the test data.
The remote control performance test result may be a nonvnc performance test result, which includes two types, pass and fail.
Optionally, the terminal may obtain a noVNC performance test result according to a time when the test data is returned to the target browser, and if the time is within a certain time threshold range, the noVNC performance test result is passed, or if not, the noVNC performance test result is not passed.
In another alternative embodiment, the terminal may collate the test data to obtain a noVNC performance test result, and if the amount of error data obtained by collating the test data is within a certain number of threshold values, the noVNC performance test result is passed or not passed.
In summary, the target browser is controlled to execute the target test script, so as to sequentially send a first test instruction and a second test instruction to the server provided with the remote control tool, wherein the first test instruction is an instruction for opening the desktop of the server based on the remote control tool, the second test instruction is an instruction for operating the application program installed in the server based on the remote control tool, then test data returned by the server based on the first test instruction and the second test instruction is received, and then a remote control performance test result is obtained according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
The test tool is used for sending a sending instruction to the target browser, the sending instruction is used for instructing the target browser to sequentially send a first test instruction and a second test instruction to the server, and the test tool can be a selenium test tool which is a tool for testing a Web application program, and the selenium test directly runs in the browser.
Optionally, the first test script includes a call instruction for calling the selenium test tool, so that the terminal controls the target browser to execute the first test script in the target test script, and can call the selenium test tool, so that the target browser can be operated to send the first test instruction to a Server installed with the VNC Server remote control tool.
The second test script includes a plurality of instructions for performing different operations on the application program, such as an instruction for starting the application program, an instruction for closing the application program, an instruction for performing a click operation on a graphical interface of the application program, and the like, so that the terminal controls the target browser to execute the second test script in the target test script, and then the target browser can be operated to send the second test instruction to a Server installed with the VNC Server remote control tool.
In this embodiment, since the selenium test tool directly runs in the browser, the browser has the characteristics similar to the actual user operating, and therefore, the first test script includes a call instruction for calling the selenium test tool, and the target browser executes the first test script, so that the server can be opened as if the actual user operates in the browser, and compared with the conventional technology, the simulation of the actual triggering operation can be realized.
In one embodiment, the method further comprises: receiving the concurrency quantity, and starting a plurality of target browsers according to the concurrency quantity; correspondingly, controlling the target browser to execute the target test script comprises the following steps: and controlling the target browsers to execute the target test scripts respectively.
Optionally, after receiving the concurrency number, the terminal starts up the target browsers with the same number as the concurrency number, for example, the concurrency number is 100, and then the terminal starts up 100 target browsers. Then, the terminal controls each target browser to execute the target test script simultaneously, so that each target browser can send a first test instruction and a second test instruction to a Server provided with the VNC Server remote control tool simultaneously, the desktop of the Server is opened, the application programs (simulation software, scientific research software, scientific calculation software and the like) in the Server are operated, the Server can receive a plurality of first test instructions and a plurality of second test instructions simultaneously, the Server can return test data to the corresponding target browser based on each first test instruction and each second test instruction, and the terminal can acquire remote control performance test results according to the time of the test data received by all the target browsers.
In this embodiment, by starting a plurality of target browsers according to the concurrency number and then controlling the plurality of target browsers to execute target test scripts respectively, a pressure test for remote control is achieved, so that test data obtained in the test process can reflect remote control performance more.
In one embodiment, obtaining a remote control performance test result according to test data includes: determining response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
Optionally, when the target browser executes the target test script and sends the first test instruction and the second test instruction to the server, and when the server returns test data based on the first test instruction and the second test instruction, the target browser generates a log, where the log includes a sending time of sending each instruction and a receiving time of receiving test data corresponding to each instruction, and the response time of the server can be obtained by the terminal making a difference between the sending time and the receiving time corresponding to each instruction.
And comparing the response time corresponding to each instruction with the expected time, and if the number of the response times smaller than the expected time is within a certain number of thresholds, determining that the remote control performance test result is passed, otherwise, not passing.
In this embodiment, the implementation manner of obtaining the remote control performance test result has the advantages of simplicity and rapidness according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface open response time and a control response time, the method further comprising: determining interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
Optionally, after receiving the first test instruction and executing the corresponding operation based on the first test instruction, the server returns the first test data to the target browser, and similarly, after receiving the second test instruction and executing the corresponding operation based on the second test instruction, the server returns the second test data to the target browser.
As described above, the target browser generates a log in the instruction sending and data receiving processes, where the log includes sending time of sending each instruction and receiving time of receiving test data corresponding to each instruction, so that the terminal can obtain interface opening response time of the server based on the receiving time of the first test data and the sending time of the first test instruction; based on the receiving time of the second test data and the sending time of the second test instruction, the control response time of the server can be obtained.
And then, the terminal compares the interface opening response time and the control response time with the expected time respectively, if the interface opening response time and the control response time are smaller than the expected time, the remote control performance test result is passed, otherwise, the remote control performance test result is not passed.
In one embodiment, the target browser is a headless browser.
The headless browser is a browser in an operation mode that the browser does not open a graphical interface.
Optionally, as shown in fig. 3, a flow chart of a pressure test is provided, the terminal starts the same number of headless browsers as the concurrent number, and then controls each headless browser to execute the target test script simultaneously, so that each headless browser can send a first test instruction and a second test instruction to a Server installed with a VNC Server remote control tool simultaneously in sequence, so as to open a desktop of the Server and operate application programs (simulation software, scientific research software, scientific calculation software, etc.) in the Server, wherein each headless browser sends the first test instruction and the second test instruction to the Server in sequence is implemented based on a noVNC.
In this embodiment, the target browser is a headless browser, so that in the pressure test process for the remote control, a plurality of headless browsers are started, and resource consumption during running of the browsers can be greatly reduced.
In addition, as shown in fig. 4, a flow chart of a process of writing a target test script is provided, and the process of writing the target pressure test script is as follows:
through the python script, an initial test script is written by using a locustperformance test tool, then the selenium test tool is called, a browser is operated to open a nonVNC page to be tested, namely a desktop of a server, and then an instruction set is continuously written in the initial test script, wherein the instruction set is used for operating an application program in the server to complete a series of actions, so that the writing of the script is completed, and a target test script is obtained.
In summary, as shown in fig. 5, a flow chart of another performance testing method is provided, that is, the most detailed embodiment of the present application, and the steps of the method are as follows:
step 301, receiving the concurrency quantity, and starting a plurality of headless browsers according to the concurrency quantity.
Step 302, controlling the plurality of headless browsers to execute the target test script respectively, so as to sequentially send a first test instruction and a second test instruction to a server installed with a remote control tool.
Step 303, determining interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
And step 304, acquiring a remote control performance test result according to whether the interface opening response time and the control response time reach the expected time.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a performance testing device for realizing the performance testing method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitation of one or more embodiments of the performance testing device provided below may be referred to above for limitation of the performance testing method, and will not be repeated here.
In one embodiment, as shown in FIG. 6, a block diagram of a performance testing apparatus 400 is provided, the performance testing apparatus 400 comprising: a sending module 401, a receiving module 402, and an obtaining module 403, wherein:
the sending module 401 is configured to control the target browser to execute the target test script, so as to sequentially send a first test instruction and a second test instruction to the server installed with the remote control tool, where the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool.
And the receiving module 402 is configured to receive test data returned by the server based on the first test instruction and the second test instruction.
The obtaining module 403 is configured to obtain a remote control performance test result according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
In one embodiment, the performance testing apparatus 400 further includes a starting module, configured to receive the concurrency number, and start a plurality of target browsers according to the concurrency number; correspondingly, the sending module 401 is specifically configured to control the multiple target browsers to execute the target test scripts respectively.
In one embodiment, the obtaining module 403 is specifically configured to determine a response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface opening response time and a control response time, and the obtaining module 403 is further configured to determine, according to first test data returned by the server based on the first test instruction, the interface opening response time of the server; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
In one embodiment, the target browser is a headless browser.
The various modules in the performance testing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a performance testing method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
the control target browser executes the target test script to sequentially send a first test instruction and a second test instruction to a server provided with the remote control tool, wherein the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool.
And receiving test data returned by the server based on the first test instruction and the second test instruction.
And obtaining a remote control performance test result according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
In one embodiment, the processor when executing the computer program further performs the steps of: receiving the concurrency quantity, and starting a plurality of target browsers according to the concurrency quantity; and controlling the target browsers to execute the target test scripts respectively.
In one embodiment, the processor when executing the computer program further performs the steps of: determining response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface open response time and a control response time, and the processor when executing the computer program further performs the steps of: determining interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
In one embodiment, the target browser is a headless browser.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
the control target browser executes the target test script to sequentially send a first test instruction and a second test instruction to a server provided with the remote control tool, wherein the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool.
And receiving test data returned by the server based on the first test instruction and the second test instruction.
And obtaining a remote control performance test result according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving the concurrency quantity, and starting a plurality of target browsers according to the concurrency quantity; and controlling the target browsers to execute the target test scripts respectively.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface open response time and a control response time, and the computer program when executed by the processor further performs the steps of: determining interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
In one embodiment, the target browser is a headless browser.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
the control target browser executes the target test script to sequentially send a first test instruction and a second test instruction to a server provided with the remote control tool, wherein the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool.
And receiving test data returned by the server based on the first test instruction and the second test instruction.
And obtaining a remote control performance test result according to the test data.
In one embodiment, the target test script comprises a first test script comprising call instructions for calling the test tool and a second test script comprising an instruction set comprising a plurality of instructions for performing different operations on the application.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving the concurrency quantity, and starting a plurality of target browsers according to the concurrency quantity; and controlling the target browsers to execute the target test scripts respectively.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining response time of the server according to the test data; and acquiring a remote control performance test result according to whether the response time reaches the expected time.
In one embodiment, the response time includes an interface open response time and a control response time, and the computer program when executed by the processor further performs the steps of: determining interface opening response time of the server according to first test data returned by the server based on the first test instruction; and determining the control response time of the server according to the second test data returned by the server based on the second test instruction.
In one embodiment, the target browser is a headless browser.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of performance testing, the method comprising:
the method comprises the steps that a control target browser executes a target test script to sequentially send a first test instruction and a second test instruction to a server provided with a remote control tool, wherein the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool;
receiving test data returned by the server based on the first test instruction and the second test instruction;
and obtaining a remote control performance test result according to the test data.
2. The method of claim 1, wherein the target test script comprises a first test script comprising call instructions to call a test tool and a second test script comprising an instruction set comprising a plurality of instructions to perform different operations on the application.
3. The method according to claim 1, wherein the method further comprises:
receiving the concurrency quantity, and starting a plurality of target browsers according to the concurrency quantity;
correspondingly, the control target browser executes a target test script, including:
and controlling the target browsers to execute the target test scripts respectively.
4. The method of claim 1, wherein the obtaining the remote control performance test result from the test data comprises:
determining the response time of the server according to the test data;
and acquiring the remote control performance test result according to whether the response time reaches the expected time.
5. The method of claim 4, wherein the response time comprises an interface open response time and a control response time, the method further comprising:
determining interface opening response time of the server according to first test data returned by the server based on the first test instruction;
and determining the control response time of the server according to second test data returned by the server based on the second test instruction.
6. The method of any of claims 1-5, wherein the target browser is a headless browser.
7. A performance testing apparatus, the apparatus comprising:
the system comprises a sending module, a remote control tool, a target browser, a remote control tool and a control module, wherein the sending module is used for controlling the target browser to execute a target test script so as to sequentially send a first test instruction and a second test instruction to a server provided with the remote control tool, the first test instruction is an instruction for opening a desktop of the server based on the remote control tool, and the second test instruction is an instruction for operating an application program installed in the server based on the remote control tool;
the receiving module is used for receiving test data returned by the server based on the first test instruction and the second test instruction;
and the acquisition module is used for acquiring a remote control performance test result according to the test data.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310715490.2A 2023-06-15 2023-06-15 Performance test method, apparatus, device, storage medium, and program product Pending CN116860614A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310715490.2A CN116860614A (en) 2023-06-15 2023-06-15 Performance test method, apparatus, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310715490.2A CN116860614A (en) 2023-06-15 2023-06-15 Performance test method, apparatus, device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN116860614A true CN116860614A (en) 2023-10-10

Family

ID=88222470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310715490.2A Pending CN116860614A (en) 2023-06-15 2023-06-15 Performance test method, apparatus, device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN116860614A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117785592A (en) * 2023-12-18 2024-03-29 中科驭数(北京)科技有限公司 Performance testing method, device, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117785592A (en) * 2023-12-18 2024-03-29 中科驭数(北京)科技有限公司 Performance testing method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN107145440B (en) Application program testing method and device and computer equipment
US9064054B2 (en) Synchronizing execution of a testing application
CN111444158B (en) Long-term and short-term user portrait generation method, device, equipment and readable storage medium
US11709763B2 (en) Systems and method for testing computing environments
US9158657B2 (en) Architecture for remote access to content state
CN116860614A (en) Performance test method, apparatus, device, storage medium, and program product
CN119088476B (en) Pattern file reloading method, system, device and computer equipment
CN113672826B (en) Page jump method, device, computer equipment and storage medium
CN116524986B (en) System level testing method and system for storage products
US20240143414A1 (en) Load testing and performance benchmarking for large language models using a cloud computing platform
CN116662143A (en) Test method, apparatus, device, storage medium and computer program product
CN113535590A (en) Program testing method and device
CN111190574A (en) Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly
CN117493113B (en) Data reporting method, device, computer equipment and storage medium
CN116049009A (en) Test method, device, computer equipment and computer-readable storage medium
CN117056228A (en) Page loading test method and device, computer equipment and storage medium
CN117807334A (en) First screen page display method and device, computer equipment and storage medium
CN119597624A (en) Debug data processing method, device, computer equipment and storage medium
CN117319335A (en) Communication client construction method and device adapting to financial operation system
CN119597664A (en) Test method, test apparatus, computer device, readable storage medium, and program product
CN118018690A (en) Recording method and device for double-record video, computer equipment and storage medium
CN118200314A (en) File interaction method, device, computer equipment and storage medium
CN117407620A (en) Page data processing method, device, computer equipment, storage medium and product
CN119697025A (en) Data reporting method, device, computer equipment and storage medium
CN118409970A (en) Application program performance test method, device, computer equipment, storage medium and computer program product

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