Cloud application stress testing system, method, device and equipment
By loading cloud application client devices with containers in the cloud application stress testing system, executing test scripts and obtaining monitoring information, the problems of high cost and low stability of cloud application stress testing are solved, and efficient and low-cost cloud application stress testing are achieved.
Patent Information
- Application Number
- CN202210488319.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-06
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2042-05-06
AI Technical Summary
The existing cloud applications have high pressure measurement costs, low pressure efficiency and stability. The terminal pressure measurement requires 1-to-1 connections affected by the system and bandwidth. The virtualized terminal solution has problems such as equipment lag and network instability.
The cloud application stress testing system is adopted, by opening multiple WEB stress testing pages on multiple servers, loading pressure testing client devices using containers, including cloud application client devices, executing cloud application testing scripts and obtaining operation process monitoring information, achieving multiple openings of cloud application streaming containers, reducing costs and improving pressure speed and stability.
It effectively reduces the cost of pressure testing, improves the speed and stability of pressure application, realizes multiple openings through a single-channel web page, reduces the pressure of terminal equipment based on server bandwidth, and reaches the millisecond level for response speed, and distributes cloud application test scripts in a unified standard.
Smart Images

Figure CN114924953B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of program testing, and particularly to a cloud application stress testing method and device, and an electronic device. Background Art
[0002] Cloud game streaming stress testing uses terminal streaming requests as carriers to simulate real user behaviors, construct a super-large-scale access traffic online, apply pressure with a full-link stress testing model until the target peak value is reached, and discover system bottlenecks and verify system capabilities during the stress testing process.
[0003] Cloud game streaming stress testing is one of the most important means for stability guarantee. How to achieve a large stress testing scale at a lower cost has become a difficult problem at the industry level. A typical cloud game streaming stress testing method is the terminal stress testing method. This method can use real devices for high-concurrency stress testing, or simulate users through virtualized terminals for high-concurrency stress testing. For example, Android devices can be virtualized through ARM architecture servers as stress testing devices.
[0004] However, in the process of implementing the present invention, the inventors found that the above technical solutions have at least the following problems: 1) Terminal stress testing requires "one-to-one" connection. It is very difficult to achieve multi-opening and interaction on one device due to the influence of the system and bandwidth. Therefore, the cost is mainly reflected in the number of terminals. As the stress testing scale increases, the growth in the number of virtualized terminals will bring expensive costs, and the stress testing cost will increase linearly; 2) The virtualized terminal solution or the real device solution itself has some problems with the device system, such as system lag, unstable network, system freeze, etc. In addition, due to the relatively long execution link of the Android automation framework, the stress application efficiency is low and the stability is low. Summary of the Invention
[0005] This application provides a cloud application stress testing method to solve the problems of high cloud application stress testing cost, low stress application efficiency, and low stress testing stability existing in the prior art. This application also provides a cloud application stress testing device and an electronic device.
[0006] This application provides a cloud application stress testing system, including:
[0007] A stress testing server device, configured to obtain stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file; open multiple WEB stress testing pages on multiple servers, where the test pages include multiple containers, the containers load a stress testing client device, and the components of the stress testing client device include a cloud application client device; distribute the stress testing task information to each stress testing client device; and obtain the cloud application operation process monitoring information provided by the stress testing client device;
[0008] A stress testing client device is used to execute a cloud application test script program according to stress testing strategy information and a cloud application test script file; the script program calls a cloud application client device to perform cloud application interaction operations; and monitor information during the operation of the cloud application is obtained.
[0009] This application also provides a cloud application stress testing method, including:
[0010] Open multiple WEB stress testing pages. The testing pages include multiple containers, and the containers load the stress testing client device. The components of the stress testing client device include a cloud application client device;
[0011] Each container executes a cloud application test script program through the stress testing client device;
[0012] The script program calls the cloud application client device to perform cloud application interaction operations;
[0013] Each container obtains monitor information during the operation of the cloud application through the stress testing client device.
[0014] This application also provides a cloud application stress testing method for a stress testing server, including:
[0015] Obtain stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file;
[0016] Open multiple WEB stress testing pages on multiple server sides. The testing pages include multiple containers, and the containers load the stress testing client device. The components of the stress testing client device include a cloud application client device;
[0017] Distribute the stress testing task information to each stress testing client device;
[0018] Obtain monitor information during the operation of the cloud application.
[0019] Optionally, it further includes:
[0020] Set the container quantity information;
[0021] The step of opening multiple WEB stress testing pages on multiple server sides, where the testing pages include multiple containers, includes:
[0022] Obtain the container quantity information;
[0023] Construct a WEB stress testing page including multiple containers according to the container quantity information;
[0024] Open the WEB stress testing page on the server side.
[0025] Optionally, it further includes:
[0026] Set the number of users for stress testing information;
[0027] Determine the number of servers information according to the number of users information.
[0028] Optionally, it further includes:
[0029] Start multiple browsers on the server side through a browser automation testing tool.
[0030] This application also provides a cloud application stress testing method for a stress testing client, including:
[0031] Obtain stress testing strategy information and a cloud application test script file;
[0032] Execute the cloud application test script program according to the stress testing strategy information and the cloud application test script file;
[0033] The script program calls the cloud application client device to perform cloud application interaction operations;
[0034] Obtain the monitoring information during the operation of the cloud application.
[0035] Optionally, the executing the cloud application test script program according to the stress testing strategy information and the cloud application test script file includes:
[0036] Parse the cloud application test script file;
[0037] Execute the cloud application test script program according to the stress testing strategy information and the parsing result of the cloud application test script file.
[0038] Optionally, the script program calling the cloud application client device to perform cloud application interaction operations includes:
[0039] The script program calls the cloud application interaction instruction interface provided by the cloud application client device to perform cloud application interaction operations.
[0040] Optionally, the obtaining the monitoring information during the operation of the cloud application includes:
[0041] Obtain the cloud application screen information through the image interface provided by the cloud application client device;
[0042] Obtain the cloud application screen status information according to the cloud application screen information.
[0043] Optionally, the cloud application screen status information includes: whether the screen is stuck, whether there is a screen freeze, whether there is a green screen.
[0044] Optionally, the stress testing client runs in a container on the browser page;
[0045] The method further includes:
[0046] Obtain container exception information;
[0047] Provide the container exception information to the stress test server.
[0048] This application also provides a cloud application streaming stress test device, including:
[0049] A WEB multi-opening unit, configured to open multiple WEB stress test pages, where the test pages include multiple containers, the containers load a stress test client device, and the components of the stress test client device include a cloud application client device;
[0050] A script execution unit, configured to execute a cloud application test script program for each container through the stress test client device;
[0051] A cloud application interaction unit, configured to call the cloud application client device by the script program for cloud application interaction operations;
[0052] A process monitoring unit, configured to obtain cloud application operation process monitoring information for each container through the stress test client device.
[0053] This application also provides an electronic device, including:
[0054] A processor and a memory;
[0055] The memory is configured to store a program for implementing the above cloud application stress test method, and the device is powered on and runs the program of the method through the processor.
[0056] This application also provides a computer-readable storage medium, in which instructions are stored, and when the instructions run on a computer, the computer is caused to execute the above various methods.
[0057] This application also provides a computer program product including instructions, and when the instructions run on a computer, the computer is caused to execute the above various methods.
[0058] Compared with the prior art, this application has the following advantages:
[0059] The cloud application stress test method provided by the embodiments of this application opens multiple WEB stress test pages, where the test pages include multiple containers, the containers load a stress test client device, and the components of the stress test client device include a cloud application client device; each container executes a cloud application test script program through the stress test client device; the script program calls the cloud application client device for cloud application interaction operations; each container obtains cloud application operation process monitoring information through the stress test client device. Adopting this processing method has at least the following beneficial effects:
[0060] 1) Since the multi-opening of cloud application streaming containers is implemented through a single-channel Web page to replace terminal stress testing, and the bandwidth pressure on the server is much lower than that of terminal devices, the stress testing cost can be effectively reduced.
[0061] 2) Since the stress testing client device integrates a cloud application client device (cloud application SDK) as a sub-component, the scheduling response can reach the millisecond level, and the response speed is faster. Therefore, the stress application speed can be effectively increased.
[0062] 3) Since the cloud application test scripts are distributed and consumed according to a unified standard, the stress testing stability can be effectively improved. Description of the Drawings
[0063] Figure 1 Schematic structural diagram of an embodiment of the cloud application stress testing system provided by the present application;
[0064] Figure 2 Schematic diagram of the stress testing cluster of an embodiment of the cloud application stress testing system provided by the present application;
[0065] Figure 3 Schematic diagram of device interaction of an embodiment of the cloud application stress testing system provided by the present application;
[0066] Figure 4 Schematic diagram of the test page of an embodiment of the cloud application stress testing system provided by the present application;
[0067] Figure 5 Schematic diagram of the container architecture of an embodiment of the cloud application stress testing system provided by the present application;
[0068] Figure 6 Schematic diagram of the test architecture of a single stress testing server of an embodiment of the cloud application stress testing system provided by the present application;
[0069] Figure 7 Schematic flow diagram of an embodiment of the cloud application stress testing method provided by the present application. Detailed Embodiments
[0070] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the spirit of the present application. Therefore, the present application is not limited by the specific embodiments disclosed below.
[0071] In the present application, a cloud application stress testing system, method, and device, as well as an electronic device, are provided. Each solution will be described in detail in the following embodiments.
[0072] The cloud application refers to an application where the terminal interacts with the service (cloud) side. The operations of the terminal are synchronized with the cloud, and the local space occupied is also backed up through the cloud to retain the terminal data. The working principle of the cloud application is to change the usage mode of traditional software from "locally installed and locally operated" to "ready-to-use" service. It is an application that connects to and controls a remote server cluster through the Internet or local area network to complete the application logic operation tasks. The main carrier of the cloud application is Internet technology, presented in the form of a thin client or a smart client, and its interface is essentially an integration of technologies such as HTML5, Javascript, or Flash. The cloud application can not only help users reduce IT costs, but also greatly improve work efficiency.
[0073] A typical cloud application is cloud gaming. In addition, it can also be map navigation, online office software, etc. Taking cloud gaming as an example, the cloud application stress testing system provided by the embodiments of the present application will be described below.
[0074] First Embodiment
[0075] Please refer to Figure 1 , which is the flowchart of the cloud application stress testing system of the present application. In this embodiment, the system is a distributed architecture and may include: a stress testing server device 1 and multiple stress testing client devices 2.
[0076] The stress testing server device 1 can be deployed on the server side, such as on a cloud server or a local area network server, and is responsible for stress testing task management and central control services, including but not limited to stress testing task creation, task distribution, process monitoring, etc. As Figure 2 shown, through the stress testing server device 1, multiple WEB stress testing pages can be opened on multiple server sides (such as ESC servers, cloud servers), and the testing pages include multiple containers.
[0077] It should be noted that the server for opening the WEB stress testing page and the server where the stress testing server device 1 is deployed can be different servers. In this embodiment, the server for opening the WEB stress testing page is an ESC server.
[0078] The container loads the stress testing client device 2, and the stress testing client device 2 includes a cloud application client device (such as a cloud game H5-SDK), that is, the cloud application client device is a sub-component of the stress testing client device 2. In the system provided in this application, the core carrier of the Web is the cloud application H5-SDK, and the entire cloud application H5-SDK is used as an atomic capability and integrated into the stress testing platform. The cloud application SDK, as an internal component of the testing platform, allows the platform to perform arbitrary orchestration on it to achieve multi-opening. In this embodiment, the cloud game SDK is configured to support multiple cloud application connections, so that multiple cloud game connections can be established (such as in series) on a single WEB page.
[0079] As Figure 3 As shown, the stress testing server device 1 is used to obtain stress testing task information, and the stress testing task information includes stress testing strategy information and a cloud application test script file; open multiple WEB stress testing pages on multiple servers, the test pages include multiple containers, the containers load the stress testing client device, and the components of the stress testing client device include a cloud application client device; distribute the stress testing task information to each stress testing client device. Correspondingly, the stress testing client device 2 is used to execute the cloud application test script program according to the stress testing strategy information and the cloud application test script file; the script program calls the cloud application client device to perform cloud application interaction operations; obtain the monitoring information of the cloud application running process. The stress testing server device 1 can store the monitoring information of the cloud application running process provided by the stress testing client device 1 and display the monitoring information to the tester, so that the tester can understand the stress testing situation.
[0080] The stress testing task is usually set by the stress tester and may include stress testing strategy information and a cloud application test script file. The stress testing task information can be stored in a database. The stress testing strategy information refers to the way information of the stress testing, including but not limited to: how long to time out, how long to jump out, etc. The cloud application test script file, also known as the cloud application test script, includes script instructions for simulating user interaction with the cloud game, such as what operation instructions to send to the game at each time point within 10 minutes. Since the stress testing task information is an existing concept, it will not be elaborated here.
[0081] As Figure 4 As shown, the system provided in the embodiment of this application uses a single-channel Web page to implement multi-opening of cloud application streaming containers to replace terminal stress testing. Set multiple windows in the Web page, each window corresponds to a container, and corresponds to a cloud game connection. Specifically, when implementing, the built-in iFrame container function of HTML can be used to set multiple cloud application connection windows in the test web page. HTML includes the iFrame tag, and an inline frame containing another document can be created through the iFrame element. For example, place the link address of the stress testing client device 2 in<iframe>and< / iframe> Among them, such a window corresponds to one cloud game connection.
[0082] As Figure 5 shown, it is a framework diagram of a WEB multi-opening container. Among them, the scheduling layer is mainly responsible for functions such as container registration authentication, task distribution, and task consumption; the execution layer is mainly responsible for consuming the task script logic (cloud application test script) sent down, such as in an automated scenario within the container (such as simulating user interaction with cloud games), reporting logs (such as providing monitoring information on the running process of the cloud application to the stress test server device), etc.; the basic dependencies are mainly the core functions of the cloud application SDK - the upper-layer execution layer needs to establish channel connections and interact with the dependency layer.
[0083] In one example, the stress test server device 1 is also used to set the container quantity information; when opening each WEB stress test page on each server side, the following method can be adopted: obtain the container quantity information, for example, set the container quantity to 8, and 8 containers can be opened in one WEB page; according to the container quantity information, construct a WEB stress test page including multiple containers; open the WEB stress test page on the server side.
[0084] In one example, the stress test server device 1 is also used to set the stress test user quantity information; determine the server quantity information according to the user quantity information. In addition, it can also be used to obtain the usage rights of multiple servers according to the server quantity information. For example, in the scenario of stress testing the use of cloud games by 100,000 users, if each server can open 3 browsers, each browser can open 1 WEB page, each WEB page can open 8 containers, and 8 cloud game connections are established, then the server quantity = 100,000 / (3 * 8), that is, each server can establish 24 cloud game connections.
[0085] In one example, the stress test server device 1 is also used to start multiple browsers on the server side through a browser automation test tool; open the test page in the browser. As Figure 6 shown, distributed execution can utilize the capabilities of Selenium Grid. Selenium is a tool for testing Web applications, and Selenium Grid is one of the three major components of Selenium, allowing users to open multiple browsers for automation on machines and systems simultaneously. Selenium tests run directly in the browser, just like a real user is operating. Specifically, when implementing, other tools for testing Web applications other than Selenium can also be used.
[0086] In one example, the stress testing client device 2 is specifically configured to parse the cloud application test script file; and execute the cloud application test script program according to the stress testing policy information and the parsing result of the cloud application test script file. The script program can call the cloud application interaction instruction interface provided by the cloud application client device to perform cloud application interaction operations, so as to simulate the interaction between the user and the cloud game.
[0087] The cloud application running process monitoring information includes cloud application running status information, such as cloud application screen status information, cloud application interaction response time information, etc.
[0088] In one example, the stress testing client device 2 is specifically configured to obtain the cloud application screen information through the image interface provided by the cloud application client device; and obtain the cloud application screen status information according to the cloud application screen information. The cloud application screen status information includes, but is not limited to: whether the screen is stuck, whether there is a screen freeze, whether there is a green screen.
[0089] In one example, the stress testing client device 2 is further configured to obtain container exception information; and provide the container exception information to the stress testing server, so that the stress testing personnel can learn about the container exception information during the running process of the cloud application.
[0090] Specifically, the system may adopt the following processing flow: The test user submits a stress testing task for the target cloud application to the stress testing platform, such as a scenario of stress testing 100,000 users using a certain cloud game. The stress testing task information may include stress testing policy information (such as how long to time out, how long to jump out, etc.) and the cloud application test script file (such as what operation instructions to send to the game at each time point within 10 minutes), and execute the stress testing task through the stress testing platform; then, the task is distributed to each customized container through the central control service of the stress testing server device. After receiving the automated task (which may include stress testing policy information and the cloud application test script file), the container will parse it and convert it into standard instructions of the cloud application SDK, which means that the operation mode of virtual users can be realized; during the automated execution process, the stress testing client device can grab the current game screen in real time through the image stream interface of the cloud application by the automated Agent (the consumption system of the task) and parse the current scene content of the screen to determine whether the current screen is normal, and at the same time, the parsed content will be reported to the central control service of the stress testing server device and then presented on the front-end report page. Through the scheduling and connection of the stress testing platform and the core service, the scheduling and interaction with the underlying cloud application SDK are realized, and the multi-container instruction set interactive link is realized.
[0091] In this embodiment, the customized container is completely decoupled from the stress testing platform. The customized container packages the cloud application WEB-SDK internally as a component inside the container. Specifically, during implementation, the inside of the container may also include an automated Agent (the consumption system of tasks), which is responsible for listening to the automated tasks of the stress testing platform and for parsing the automated tasks to interact with the SDK of the cloud game. That is to say, the stress testing client device 2 may include the task consumption system Agent.
[0092] As can be seen from the above embodiments, the cloud application stress testing method provided by the embodiments of the present application, by opening multiple WEB stress testing pages, where the testing pages include multiple containers, the containers load the stress testing client device, and the components of the stress testing client device include the cloud application client device; each container executes the cloud application test script program through the stress testing client device; the script program calls the cloud application client device to perform cloud application interaction operations; each container obtains the monitoring information of the cloud application running process through the stress testing client device. By adopting this processing method, it enables multi-opening of cloud application streaming containers with a single-channel Web page to replace terminal stress testing, and relying on the server bandwidth pressure is much lower than that of terminal devices, so the stress testing cost can be effectively reduced. In addition, since the stress testing client device integrates the cloud application client device (cloud application SDK) as a sub-component, the scheduling response can reach the millisecond level, and the response speed is faster, so the stress application speed can be effectively improved. Furthermore, since the cloud application test scripts are distributed and consumed in a unified standard, the stress testing stability can be effectively improved.
[0093] Second Embodiment
[0094] In the above embodiment, a cloud application stress testing system is provided. Correspondingly, the present application also provides a cloud application stress testing method, and the execution subject of the method can be any electronic device, such as a server, etc. This method corresponds to the embodiment of the above system. Since the method embodiment is basically similar to the system embodiment, the description is relatively simple, and for the relevant parts, refer to the partial description of the system embodiment. The method embodiment described below is only illustrative.
[0095] The present application also provides a cloud application stress testing method, including:
[0096] Step S901: Open multiple WEB stress testing pages.
[0097] The testing pages include multiple containers, the containers load the stress testing client device, and the components of the stress testing client device include the cloud application client device.
[0098] Step S903: Each container executes the cloud application test script program through the stress testing client device.
[0099] Step S905: The script program calls the cloud application client device to perform cloud application interaction operations.
[0100] Step S907: Each container obtains monitoring information on the running process of the cloud application through the stress testing client device.
[0101] In one example, the method may further include the following steps: obtaining stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file.
[0102] In one example, the stress testing task information is obtained through the stress testing server device. Multiple WEB stress testing pages are opened on multiple server sides, and the stress testing task information is distributed to each stress testing client device, and the monitoring information on the running process of the cloud application provided by the stress testing client device is obtained.
[0103] In one example, the stress testing server device includes a task management service and a central control service, and the stress testing client device includes a task consumption system (also known as a task scheduling system).
[0104] Third Embodiment
[0105] In the above embodiment, a cloud application stress testing method is provided. Correspondingly, the present application also provides a cloud application stress testing device. This device corresponds to the embodiment of the above method. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0106] The present application further provides a cloud application stress testing device, including:
[0107] WEB Multi-Opening Unit, used to open multiple WEB stress testing pages. The testing pages include multiple containers, and the containers load the stress testing client device. The components of the stress testing client device include a cloud application client device;
[0108] Script Execution Unit, used for each container to execute the cloud application test script program through the stress testing client device;
[0109] Cloud Application Interaction Unit, used for the script program to call the cloud application client device to perform cloud application interaction operations;
[0110] Process Monitoring Unit, used for each container to obtain monitoring information on the running process of the cloud application through the stress testing client device.
[0111] Fourth Embodiment
[0112] In the above embodiments, a cloud application stress testing system is provided. Correspondingly, the present application also provides a cloud application stress testing method. The execution subject of the method may be a stress testing server, such as a server, etc. This method corresponds to the embodiments of the above system. Since the method embodiments are basically similar to the system embodiments, the description is relatively simple. For related parts, refer to the partial description of the system embodiments. The following described method embodiments are only illustrative.
[0113] The present application further provides a cloud application stress testing method, including:
[0114] Step S1001: Obtain stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file.
[0115] Step S1003: Open multiple WEB stress testing pages on multiple server sides. The testing pages include multiple containers, and the containers load stress testing client devices. The components of the stress testing client device include a cloud application client device.
[0116] Step S1005: Distribute the stress testing task information to each stress testing client device.
[0117] Step S1007: Obtain the monitoring information of the cloud application running process through the stress testing client device.
[0118] In one example, the method may further include the following steps: Set the container quantity information; Correspondingly, step S1003 may include the following sub-steps: 1) Obtain the container quantity information; 2) Construct a WEB stress testing page including multiple containers according to the container quantity information; 3) Open the WEB stress testing page on the server side.
[0119] In one example, the method may further include the following steps: Set the stress testing user quantity information; Determine the server quantity information according to the user quantity information.
[0120] In one example, the method may further include the following steps: Start multiple browsers on the server side through a browser automation testing tool.
[0121] The Fifth Embodiment
[0122] In the above embodiments, a cloud application stress testing method is provided. Correspondingly, the present application also provides a cloud application stress testing device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple. For related parts, refer to the partial description of the method embodiments. The following described device embodiments are only illustrative.
[0123] The present application further provides a cloud application stress testing device, including: a stress testing task information acquisition unit, a WEB multi-opening unit, a stress testing task distribution unit, and a monitoring information acquisition unit.
[0124] The stress testing task information acquisition unit is used to acquire stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file; the WEB multi-opening unit is used to open multiple WEB stress testing pages on multiple server sides, the test pages include multiple containers, and the containers load a stress testing client device, and the components of the stress testing client device include a cloud application client device; the stress testing task distribution unit is used to distribute the stress testing task information to each stress testing client device; the monitoring information acquisition unit is used to acquire the monitoring information during the operation of the cloud application.
[0125] Optionally, the device may further include: a container quantity setting unit for setting container quantity information; correspondingly, the WEB multi-opening unit is specifically used to acquire the container quantity information; construct a WEB stress testing page including multiple containers according to the container quantity information; and open the WEB stress testing page on the server side.
[0126] Optionally, the device may further include: a user quantity setting unit and a server quantity determination unit.
[0127] The user quantity setting unit is used to set the stress testing user quantity information; the server quantity determination unit is used to determine the server quantity information according to the user quantity information.
[0128] Optionally, the device may further include: a browser startup unit for starting multiple browsers on the server side through a browser automation testing tool.
[0129] Sixth Embodiment
[0130] In the above embodiment, a cloud application stress testing system is provided. Correspondingly, the present application further provides a cloud application stress testing method, and the execution subject of the method may be a stress testing client, such as a server, a workstation, a personal computer, etc. This method corresponds to the embodiment of the above system. Since the method embodiment is basically similar to the system embodiment, the description is relatively simple, and for the relevant parts, refer to the partial description of the system embodiment. The method embodiment described below is only illustrative.
[0131] The present application further provides a cloud application stress testing method, including:
[0132] Step S1101: Acquire stress testing strategy information and a cloud application test script file.
[0133] In this embodiment, a WEB page is opened in a browser. The WEB page includes multiple containers, and each container loads a stress testing client device. The components of the stress testing client device include a cloud application client device. The stress testing task distribution information is obtained from the stress testing server device through the stress testing client device, which may specifically include stress testing strategy information and a cloud application test script file.
[0134] Step S1103: Execute the cloud application test script program according to the stress testing strategy information and the cloud application test script file.
[0135] In one example, step S1103 may include the following sub-steps: Parse the cloud application test script file; Execute the cloud application test script program according to the stress testing strategy information and the parsing result of the cloud application test script file.
[0136] Step S1105: The script program calls the cloud application client device to perform cloud application interaction operations.
[0137] In one example, step S1105 can be implemented in the following manner: The script program calls the cloud application interaction instruction interface provided by the cloud application client device to perform cloud application interaction operations.
[0138] Step S1007: Obtain the monitoring information during the operation of the cloud application.
[0139] In one example, step S1107 can be implemented in the following manner: Obtain the cloud application screen information through the image interface provided by the cloud application client device; Obtain the cloud application screen status information according to the cloud application screen information. The cloud application screen status information includes but is not limited to: whether the screen is stuck, whether there is a color distortion, whether there is a green screen.
[0140] In one example, the stress testing client runs in a container on the browser page; The method may further include the following steps: Obtain container exception information; Provide the container exception information to the stress testing server.
[0141] The Seventh Embodiment
[0142] In the above embodiment, a cloud application stress testing method is provided. Correspondingly, the present application also provides a cloud application stress testing device. This device corresponds to the method embodiment above. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0143] The present application further provides a cloud application stress testing device, including: a stress testing task information acquisition unit, a script execution unit, a cloud application interaction unit, and a cloud application monitoring unit.
[0144] A stress test task information acquisition unit for acquiring stress test strategy information and cloud application test script files; a script execution unit for executing a cloud application test script program according to the stress test strategy information and the cloud application test script files; a cloud application interaction unit for the script program to call a cloud application client device to perform cloud application interaction operations; a cloud application monitoring unit for acquiring cloud application operation process monitoring information.
[0145] Optionally, the script execution unit is specifically configured to parse the cloud application test script files; and execute the cloud application test script program according to the stress test strategy information and the parsing results of the cloud application test script files.
[0146] Optionally, the cloud application interaction unit is specifically configured for the script program to call a cloud application interaction instruction interface provided by the cloud application client device to perform cloud application interaction operations.
[0147] Optionally, the cloud application monitoring unit is specifically configured to acquire cloud application screen information through an image interface provided by the cloud application client device; and acquire cloud application screen status information according to the cloud application screen information.
[0148] The cloud application screen status information includes: whether the screen is stuck, whether there is a color distortion, and whether there is a green screen.
[0149] Optionally, the stress test client runs in a container of a browser page; the device may further include: a container exception handling unit for acquiring container exception information; and providing the container exception information to the stress test server.
[0150] The Eighth Embodiment
[0151] In the above embodiments, a cloud application stress test method is provided. Correspondingly, the present application also provides an electronic device. This device corresponds to the method embodiments above. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple. For related parts, refer to the partial description of the method embodiments. The device embodiments described below are merely illustrative.
[0152] The electronic device of this embodiment includes:
[0153] A processor and a memory;
[0154] The memory is used to store a program for implementing the above-mentioned arbitrary cloud application stress test method, and the device is powered on and runs the program of the method through the processor.
[0155] Although the present application is disclosed above in preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be subject to the scope defined by the claims of the present application.
[0156] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0157] Memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0158] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0159] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
Claims
1. A cloud application stress testing system, characterized in that, Including: A stress testing server device, configured to obtain stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file; Open multiple WEB stress testing pages on multiple servers. The test pages include multiple containers, and the containers load stress testing client devices. The components of the stress testing client devices include cloud application client devices; distribute the stress testing task information to each stress testing client device; And obtain the cloud application running process monitoring information provided by the stress testing client device; A stress testing client device, configured to execute a cloud application test script program according to the stress testing strategy information and the cloud application test script file; The script program calls the cloud application client device to perform cloud application interaction operations; Obtain the cloud application running process monitoring information.
2. A cloud application stress testing method, characterized in that, Including: Open multiple WEB stress testing pages. The test pages include multiple containers, and the containers load stress testing client devices. The components of the stress testing client devices include cloud application client devices; Each container executes a cloud application test script program through the stress testing client device; The script program calls the cloud application client device to perform cloud application interaction operations; Each container obtains the cloud application running process monitoring information through the stress testing client device.
3. A cloud application stress testing method, characterized in that For the stress testing server, including: Obtain stress testing task information, where the stress testing task information includes stress testing strategy information and a cloud application test script file; Open multiple WEB stress testing pages on multiple servers. The test pages include multiple containers, and the containers load stress testing client devices. The components of the stress testing client devices include cloud application client devices; Distribute the stress testing task information to each stress testing client device; Obtain the cloud application running process monitoring information.
4. The method according to claim 3, wherein Further including: Set the container quantity information; The opening of multiple WEB stress testing pages on multiple servers, where the test pages include multiple containers, includes: Obtain the container quantity information; Construct a WEB stress testing page including multiple containers according to the container quantity information; Open the WEB stress testing page on the server.
5. The method according to claim 3, characterized in that Further including: Set the stress testing user quantity information; Determine the server quantity information according to the user quantity information.
6. The method according to claim 3, characterized in that, Further including: Start multiple browsers on the server through a browser automation testing tool.
7. A cloud application stress testing method, characterized in that, For the stress testing client device in the system according to claim 1, including: Obtain the stress testing strategy information and the cloud application test script file; Execute a cloud application test script program according to the stress testing strategy information and the cloud application test script file; The script program calls the cloud application client device to perform cloud application interaction operations; Obtain the cloud application running process monitoring information.
8. The method according to claim 7, characterized in that The executing of the cloud application test script program according to the stress testing strategy information and the cloud application test script file includes: Parse the cloud application test script file; Execute the cloud application test script program according to the stress testing strategy information and the parsing result of the cloud application test script file.
9. The method according to claim 7, characterized in that, The script program calling the cloud application client device to perform cloud application interaction operations includes: The script program calls the cloud application interaction instruction interface provided by the cloud application client device to perform cloud application interaction operations.
10. The method according to claim 7, wherein The obtaining of the monitoring information during the operation of the cloud application includes: Obtaining cloud application screen information through the image interface provided by the cloud application client device; Obtaining cloud application screen status information according to the cloud application screen information.
11. The method according to claim 10, wherein The cloud application screen status information includes: whether the screen is stuck, whether there is a screen freeze, and whether there is a green screen.
12. The method according to claim 7, wherein The stress test client runs in a container on a browser page; The method further includes: Obtaining container exception information; Providing the container exception information to the stress test server.
13. A cloud application streaming stress testing device, characterized in that, including: A WEB multi-opening unit for opening multiple WEB stress test pages. The test pages include multiple containers, and the containers load the stress test client device. The components of the stress test client device include the cloud application client device; A script execution unit for each container to execute the cloud application test script program through the stress test client device; A cloud application interaction unit for the script program to call the cloud application client device to perform cloud application interaction operations; A process monitoring unit for each container to obtain the monitoring information during the operation of the cloud application through the stress test client device.
14. An electronic device, characterized in that, including: A processor and a memory; The memory is used to store a program for implementing the cloud application stress test method according to any one of claims 2-12. The device is powered on and runs the program of the method through the processor.
Citation Information
Patent Citations
Performance test method, device and system based on cloud computing platform
CN104461856A
Container cloud-based pressure testing method and system
CN110162471A