An automated testing method, system, medium and device for Loongson cloud desktop

By developing and running multiple automated test scripts in series, the problems of complex testing of Loongson CPU cloud desktop system and low manual testing efficiency are solved, and comprehensive functions, performance and stability testing of Loongson CPU cloud desktop system is achieved, improving testing efficiency and accuracy.

CN117909247BActive Publication Date: 2025-03-28MASSCLOUDS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410294716.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2025-03-28
Estimated Expiration
2044-03-15

AI Technical Summary

Technical Problem

The existing technology lacks automated testing methods and systems suitable for Loongson CPU cloud desktop systems, resulting in complex testing, compatibility issues, low manual testing efficiency and accuracy.

Method used

Develop multiple automated test scripts, run the scripts in series, and realize the function, performance and stability test of cloud desktops under the Loongson CPU architecture, including functional tests, stability tests and performance tests.

Benefits of technology

Through automated testing methods, the testing efficiency and accuracy of Loongson CPU cloud desktop system are improved, labor costs and time costs are saved, and system optimization suggestions are provided, which promotes industry development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117909247B_ABST
    Figure CN117909247B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of Loongson cloud desktop, and discloses an automated testing method, system, medium and equipment of Loongson cloud desktop, including: in response to a function test instruction, sequentially running the automated test script of the Loongson cloud desktop client function and the automated test script in the virtual machine connected to the Loongson cloud desktop client, generating a function test result; in response to a stability test instruction, running the automated test script in the virtual machine connected to the Loongson cloud desktop client at intervals during the test period, generating a stability test result; in response to a performance test instruction, after running the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients at the same time, running the monitoring client and the server to automatically generate a report script, generating a performance test result. The problems of Loongson cloud desktop platform compatibility, complex testing, and low efficiency and accuracy of manual testing are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Loongson cloud desktop, and in particular to an automated testing method, system, medium and equipment for Loongson cloud desktop. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the rapid development and application of cloud desktops, the hardware platform and software environment have become more complicated, especially in the CPU (Central Processing Unit) architecture and cloud desktop virtual machine system types. At present, there is a lack of corresponding automated testing methods and systems for the Loongson CPU cloud desktop system.

[0004] Unlike cloud desktops under the X86 architecture (CPU architecture), the Loongson CPU cloud desktop system needs to support the Loongson CPU architecture, such as the Kylin system. The compatibility and ecology of the Loongson CPU cloud desktop system are not yet perfect, and various problems are often encountered during the testing process. For manual testing, the learning cost and technical requirements are high, and the testing efficiency and accuracy are low. Summary of the invention

[0005] In order to solve the above problems, the present invention provides an automated testing method, system, medium and equipment for Loongson cloud desktop, develops multiple scripts, and runs the scripts in series to comprehensively implement function, performance and stability testing of the cloud desktop under the Loongson CPU architecture, thereby solving the problems of compatibility of the Loongson cloud desktop platform, complex testing, and low efficiency and accuracy of manual testing.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A first aspect of the present invention provides an automated testing method for a Loongson cloud desktop, comprising:

[0008] In response to the functional test instruction, the automated test script of the Loongson Cloud Desktop Client function and the automated test script in the virtual machine connected to the Loongson Cloud Desktop Client are sequentially executed to generate a functional test result;

[0009] In response to the stability test instruction, the automated test script in the virtual machine connected to the Loongson Cloud Desktop client is run at intervals during the test period to generate a stability test result;

[0010] In response to the performance test instruction, after simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients, the monitoring client and the server are run to automatically generate a report script to generate the performance test results.

[0011] Furthermore, the automated test script of the Loongson Cloud Desktop client function includes: obtaining elements of the client network configuration interface or login interface, operating the elements, and determining whether the operation is successful.

[0012] Furthermore, the automated test script of the Loongson cloud desktop client function includes: obtaining virtual machine elements, operating the virtual machine elements, and determining whether entry into the virtual machine is successful.

[0013] Furthermore, the automated test script for the Loongson Cloud Desktop client function includes: obtaining a logout button, operating the logout, and determining whether the logout is successful.

[0014] Furthermore, the automated test script in the virtual machine to which the Loongson Cloud Desktop client is connected includes: after automatically logging into the client, operating the browser or installed office software in the virtual machine to determine whether the operation is successful.

[0015] Furthermore, the monitoring client and server automatically generate report scripts including: monitoring the performance of the central processing unit, memory, network and disk.

[0016] Furthermore, the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients are run at the same time: opening multiple cloud desktops at the same time, and running the automated test scripts in the virtual machines connected to the Loongson cloud desktop clients on all cloud desktops at the same time;

[0017] Furthermore, the method of simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients is as follows: opening a cloud desktop and simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients on the single cloud desktop.

[0018] A second aspect of the present invention provides an automated testing system for a Loongson cloud desktop, comprising:

[0019] A functional testing module is configured to: in response to a functional testing instruction, sequentially run an automated testing script for the Loongson Cloud Desktop client function and an automated testing script in a virtual machine connected to the Loongson Cloud Desktop client, and generate a functional testing result;

[0020] A stability test module is configured to: in response to a stability test instruction, run an automated test script in a virtual machine connected to the Loongson Cloud Desktop client at intervals during a test period to generate a stability test result;

[0021] The performance test module is configured to: respond to the performance test instruction, run the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients at the same time, run the monitoring client and the server to automatically generate the report script, and generate the performance test results.

[0022] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor. When the program is executed by the processor, the steps in the automated testing method for a Loongson cloud desktop as described above are implemented.

[0023] The fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the program, the steps in the automated testing method of the Loongson cloud desktop as described above are implemented.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] The present invention provides an automated testing method for Loongson cloud desktop, which develops multiple scripts, connects and runs the scripts in series, and comprehensively implements function, performance, and stability testing of the cloud desktop under the Loongson CPU architecture. It can provide optimization suggestions for the Loongson CPU cloud desktop system and better promote the development of the industry.

[0026] The present invention provides an automated testing method for a Loongson cloud desktop, which can reuse script testing, save labor costs and time costs, and improve test accuracy.

[0027] The present invention provides an automated testing method for a Loongson cloud desktop, which solves the problems of Loongson CPU cloud desktop system platform compatibility, complex testing, low efficiency and accuracy of manual testing, and high labor costs, learning costs, and personnel technical requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings, which constitute a part of the specification of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but do not constitute limitations of the present invention.

[0029] Figure 1 The present invention is a flowchart of an automated testing method for a Loongson cloud desktop according to the first embodiment of the present invention. DETAILED DESCRIPTION

[0030] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0031] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0032] In the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other. The present invention is further described below with reference to the accompanying drawings and embodiments.

[0033] Embodiment 1

[0034] The purpose of this embodiment 1 is to provide an automated testing method for Loongson Cloud Desktop.

[0035] This embodiment provides an automated testing method for Loongson cloud desktop, wherein the host, client, and virtual machine in the cloud desktop system all run under the Loongson CPU architecture, and the running system needs to support Loongson CPU, generally including Kylin, Loongnix and other systems.

[0036] The present embodiment provides an automated testing method for the Loongson cloud desktop, which requires the advance configuration and deployment of the Loongson CPU cloud desktop (referred to as Loongson cloud desktop) system to ensure that the cloud desktop system runs normally on the Loongson CPU server, and that the hardware of the host and client machines in the cloud desktop system are all Loongson CPUs.

[0037] This embodiment provides an automated testing method for Loongson Cloud Desktop, such as Figure 1 As shown, the following steps are included:

[0038] Step 1: Implement automatic testing of Loongson CPU cloud desktop system functions.

[0039] The scope of the Loongson CPU cloud desktop system functional automation test mainly includes functional test cases that are close to user operations of the virtual machines on the client and server of the Loongson CPU cloud desktop system.

[0040] Specifically, after running the automated test script of the Loongson CPU cloud desktop client function, the automated test script in the virtual machine connected to the Loongson CPU cloud desktop client is automatically run, and a functional test result report is automatically generated, which can realize the Loongson CPU cloud desktop functional test. That is, in response to the functional test instruction, the automated test script of the Loongson cloud desktop client function and the automated test script in the virtual machine connected to the Loongson cloud desktop client are run in sequence to generate functional test results. The tester reviews the functional test result report and observes the smoothness of the simulated user automated operation in the virtual machine. At this point, a round of functional testing is completed and can be repeated later.

[0041] Step 2: Automated stability testing of the Loongson CPU cloud desktop system.

[0042] The scope of the Loongson CPU cloud desktop system stability automation test mainly includes simulating the stability of users using the Loongson CPU cloud desktop for long-term office use, such as 7×24 hours connection to the cloud desktop to simulate continuous user operations.

[0043] Specifically, the automated test script in the virtual machine connected to the Loongson CPU cloud desktop client is run in a loop to achieve test stability and automatically output stability test results. That is, in response to the stability test instruction, the automated test script in the virtual machine connected to the Loongson cloud desktop client is run at intervals during the test period to generate stability test results (including each run result). For example, 24 / 7 connection to the cloud desktop simulates user operations and runs normal verification.

[0044] Step 3: Automated performance testing of the Loongson CPU cloud desktop system.

[0045] The scope of the Loongson CPU cloud desktop system performance automation test mainly includes the simulation of users using the client to enter the virtual machine and batch office operations. For example, a server supports the optimal number of cloud desktops, and the performance occupancy of different application scenarios in the cloud desktop.

[0046] Specifically, by simultaneously running the automated test scripts (1, 10, ..., n cloud desktops) in the virtual machines connected to the Loongson CPU cloud desktop client, and running the monitoring client and server to automatically generate report scripts, the Loongson CPU cloud desktop performance test can be realized, and the performance test results can be automatically output. That is, in response to the performance test instructions, after simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients, the monitoring client and server are run to automatically generate report scripts to generate performance test results (CPU, memory, network and disk performance, etc.). For example, test 1, 10, 20, 30, and n cloud desktops to simulate user operations, and monitor the performance indicators of the client and host server. After evaluating the results, performance tests such as the optimal number of cloud desktops supported by a server and the performance occupancy of different application scenarios in the cloud desktop can be analyzed.

[0047] Step 4: Analyze and evaluate the automatically generated test results (functional test results, stability test results, performance test results) to verify whether the Loongson CPU cloud desktop system meets the requirements and identify potential problems; based on the test results analysis, make optimization and improvement suggestions for the cloud desktop system.

[0048] Among them, the automated testing scripts for the Loongson CPU cloud desktop client functions, the automated testing scripts for the Loongson CPU cloud desktop client to connect to the virtual machine, and the scripts for automatically generating reports for monitoring client and server performance are all developed using the computer programming language Python.

[0049] (1) Automated test script for Loongson CPU cloud desktop client functions.

[0050] It is generally used for testing client functions. The Loongson CPU cloud desktop client runs on the cloud terminal. The cloud terminal is based on the Loongson CPU architecture. The system running on the cloud terminal must support the Loongson CPU architecture, which generally includes systems such as Kylin and Loongnix. Relevant scripts are developed on the system running on the cloud terminal, including client network configuration automation test scripts, client center address addition automation test scripts, client login automation test scripts, client entry into the virtual machine automation test scripts, client logout automation test scripts, etc., scripts for client functional testing.

[0051] The client configuration network automation test script mainly includes: automatically obtaining buttons, input boxes and other elements in the client network configuration interface, completing input and configuration operations, and after successful configuration, judging the network connectivity, and automatically recording the test judgment results in the test report file.

[0052] The automated test script for adding a central address to a client is mainly to: automatically obtain buttons, input boxes and other elements in the client central configuration interface, operate the elements, complete the operation of adding a central address, determine the connectivity between the client and the central address, and automatically record the determination results in the test report file.

[0053] The client login automation test script mainly: automatically obtains elements such as the user name, password and other input boxes and login buttons on the login interface, and operates on the elements, including automatic operations of normal login, abnormal login and other scenarios, and asserts the test results, and automatically records them in the test report file.

[0054] The automated test script for the client to enter the virtual machine is mainly to automatically obtain the virtual machine elements, operate the virtual machine elements to enter the virtual machine, and then determine whether the entry into the virtual machine is successful, and record the success or failure results in the test report.

[0055] The client logout automation test script mainly includes: automatically obtaining the elements of the logout button, then performing the logout operation, determining whether the logout is successful, and recording the success or failure results in the test report.

[0056] (2) Automated test scripts within the virtual machine connected to the Loongson CPU cloud desktop client.

[0057] It is generally used to simulate the actual use effect test of user operations in the cloud desktop virtual machine after the client connects to the virtual machine. The virtual machine actually runs on the host server, and the virtual machine system also needs to support Loongson CPU, generally including Kylin, Loongnix and other systems. Relevant scripts are developed on the virtual machine system, including wps operation automation test scripts, browser web browsing automation test scripts and other common software automation test scripts that simulate user office use.

[0058] The main functions of the wps operation automation test script are: to realize automatic and normal login of the client, and then operate the installed wps software (office software) in the virtual machine. First, it automatically opens the wps file, obtains the page elements in the wps software, automatically operates the elements in the page, and realizes a series of operations such as automatic typing, automatic insertion of pictures, automatic browsing, etc. in the wps file, determines whether the operation is successful, and records the success or failure results in the test report.

[0059] The main purpose of the browser web browsing automation test script is to achieve automatic and normal client login, and then implement automated browser operations in the virtual machine. For example, automatically open a website through the browser, and use the script to simulate the mouse wheel scrolling to browse the web page, determine whether the operation is successful, and record the success or failure results in the test report.

[0060] (3) Monitor the client and server to automatically generate report scripts.

[0061] Mainly used for performance testing, this script monitors the performance of CPU, memory, network, disk, etc. on the systems running on the client and host server, and generates a test report.

[0062] This embodiment provides an automated testing method for the Loongson cloud desktop, develops multiple scripts, strings the scripts together and runs them, and comprehensively implements the function, performance, and stability testing of the cloud desktop under the Loongson CPU architecture. It can provide optimization suggestions for the Loongson CPU cloud desktop system and better promote the development of the industry.

[0063] The present embodiment provides an automated testing method for Loongson cloud desktop, which can reuse script testing, save labor costs and time costs, and improve test accuracy.

[0064] This embodiment provides an automated testing method for Loongson cloud desktop, which solves the problems of Loongson CPU cloud desktop system platform compatibility, complex testing, low efficiency and accuracy of manual testing, and high labor costs, learning costs, and personnel technical requirements.

[0065] Embodiment 2

[0066] The purpose of this second embodiment is to provide an automated testing system for Loongson Cloud Desktop, including:

[0067] A functional testing module is configured to: in response to a functional testing instruction, sequentially run an automated testing script for the Loongson Cloud Desktop client function and an automated testing script in a virtual machine connected to the Loongson Cloud Desktop client, and generate a functional testing result;

[0068] A stability test module is configured to: in response to a stability test instruction, run an automated test script in a virtual machine connected to the Loongson Cloud Desktop client at intervals during a test period to generate a stability test result;

[0069] The performance test module is configured to: respond to the performance test instruction, run the automated test scripts in the virtual machines connected to multiple Loongson cloud desktop clients at the same time, run the monitoring client and the server to automatically generate the report script, and generate the performance test results.

[0070] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.

[0071] Embodiment 3

[0072] This embodiment provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor. When the program is executed by the processor, the steps in the automatic testing method of the Loongson cloud desktop as described in the above embodiment 1 are implemented.

[0073] Embodiment 4

[0074] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the program, the steps in the automatic testing method of the Loongson cloud desktop as described in the above embodiment 1 are implemented.

[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0076] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. An automated testing method for Loongson cloud desktop, characterized in that: include: In response to the functional test instruction, the automated test script of the Loongson Cloud Desktop Client function and the automated test script in the virtual machine connected to the Loongson Cloud Desktop Client are sequentially executed to generate a functional test result; In response to the stability test instruction, the automated test script in the virtual machine connected to the Loongson Cloud Desktop client is run at intervals during the test period to generate a stability test result; In response to the performance test instruction, after simultaneously running the automated test scripts in the virtual machines connected to the multiple Loongson Cloud Desktop clients, the monitoring client and the server automatically generate a report script to generate the performance test results; The automated test script for the Loongson cloud desktop client function is used for testing the client function. The Loongson CPU cloud desktop client runs on the cloud terminal. The cloud terminal is a Loongson CPU architecture. The system running the cloud terminal needs to support the Loongson CPU architecture. The relevant scripts are developed on the system running the cloud terminal, including: obtaining elements of the client network configuration interface or login interface, operating the elements, and judging whether the operation is successful; obtaining virtual machine elements, operating the virtual machine elements, and judging whether the entry into the virtual machine is successful; obtaining a logout button, operating the logout, and judging whether the logout is successful; The automated test script in the virtual machine connected to the Loongson cloud desktop client is used to simulate the actual use effect test of user operations in the cloud desktop virtual machine after the client connects to the virtual machine. The virtual machine actually runs on the host server. The virtual machine system needs to support the Loongson CPU. Related scripts are developed on the virtual machine system, including: after automatically logging into the client, operating the browser or installed office software in the virtual machine to determine whether the operation is successful; The monitoring client and server automatically generate a report script for use when testing performance. This script, on the system where the client and host server run, includes: monitoring the performance of the CPU, memory, network, and disk; The method of simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson Cloud Desktop clients is as follows: opening multiple cloud desktops at the same time, and running the automated test scripts in the virtual machines connected to the Loongson Cloud Desktop clients on all cloud desktops at the same time; opening one cloud desktop, and simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson Cloud Desktop clients on the single cloud desktop.

2. An automated testing system for Loongson cloud desktop, characterized in that: include: A functional testing module is configured to: in response to a functional testing instruction, sequentially run an automated testing script for the Loongson Cloud Desktop client function and an automated testing script in a virtual machine connected to the Loongson Cloud Desktop client, and generate a functional testing result; A stability test module is configured to: in response to a stability test instruction, run an automated test script in a virtual machine connected to the Loongson Cloud Desktop client at intervals during a test period to generate a stability test result; The performance testing module is configured to: respond to the performance testing instruction, run the automated testing scripts in the virtual machines connected to the multiple Loongson cloud desktop clients at the same time, run the monitoring client and the server to automatically generate a report script, and generate a performance testing result; The automated test script for the Loongson cloud desktop client function is used for testing the client function. The Loongson CPU cloud desktop client runs on the cloud terminal. The cloud terminal is a Loongson CPU architecture. The system running the cloud terminal needs to support the Loongson CPU architecture. The relevant scripts are developed on the system running the cloud terminal, including: obtaining elements of the client network configuration interface or login interface, operating the elements, and judging whether the operation is successful; obtaining virtual machine elements, operating the virtual machine elements, and judging whether the entry into the virtual machine is successful; obtaining a logout button, operating the logout, and judging whether the logout is successful; The automated test script in the virtual machine connected to the Loongson cloud desktop client is used to simulate the actual use effect test of user operations in the cloud desktop virtual machine after the client connects to the virtual machine. The virtual machine actually runs on the host server. The virtual machine system needs to support the Loongson CPU. Related scripts are developed on the virtual machine system, including: after automatically logging into the client, operating the browser or installed office software in the virtual machine to determine whether the operation is successful; The monitoring client and server automatically generate a report script for use when testing performance. This script, on the system where the client and host server run, includes: monitoring the performance of the CPU, memory, network, and disk; The method of simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson Cloud Desktop clients is as follows: opening multiple cloud desktops at the same time, and running the automated test scripts in the virtual machines connected to the Loongson Cloud Desktop clients on all cloud desktops at the same time; opening one cloud desktop, and simultaneously running the automated test scripts in the virtual machines connected to multiple Loongson Cloud Desktop clients on the single cloud desktop.

3. A computer-readable storage medium having a computer program stored thereon, the program being executed by a processor, characterized in that: When the program is executed by a processor, the steps in the automated testing method for Loongson cloud desktop as described in claim 1 are implemented.

4. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the automated testing method for Loongson Cloud Desktop as described in claim 1 are implemented.

Citation Information

Patent Citations

  • Automatic test method and system for batch simulation of user operation in cloud desktop scene

    CN112416769A

  • Cloud desktop client and test execution method thereof

    CN117520190A