A cloud desktop client and a method for performing a test thereof

CN117520190BActive Publication Date: 2026-08-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2023-11-24
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0003]云桌面客户端与云桌面虚拟机的交互是通过云桌面传输协议实现,VDI网页(web)客户端是云桌面客户端的重要组成部分,VDI网页(web)客户端目前的功能测试依赖于人工测试,需要由测试人员通过浏览器界面输入服务器地址、人工点击验证模块,验证VDI网页的客户端的业务功能,测试过程耗时且浪费人力

Benefits of technology

[0007]本申请实施例的有益效果在于,提供了云桌面客户端实现了基于远程过程调用的网页(web)客户端的实现自动化测试,无需测试人员手动操作和主观观察,降低人力成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117520190B_ABST
    Figure CN117520190B_ABST
Patent Text Reader

Abstract

The application provides a cloud desktop client and a method for executing a test of the cloud desktop client. The method comprises creating a data serialization structure file; wherein the data serialization structure file contains business logic to be tested, test parameter items and types defined for the business logic; converting the data serialization structure file into a script source file; wherein the script source file is in the same language format as a test script; determining that the business logic is a request data business type, and encapsulating the script source file as a request data type interface parameter; executing a test script of a test case of the business logic, and passing a tested parameter of the business logic to a request data type interface function according to the test parameter items and types of the business logic; simulating a business scenario of the business logic by a web page client, and sending a remote process calling request of the request data to a cloud desktop management platform; receiving returned information sent by the cloud desktop management platform, and determining that the test of the business logic is successful.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to virtual desktop architecture technology, specifically a cloud desktop client and a method for performing tests thereon. Background Technology

[0002] VDI (Virtual Desktop Infrastructure) abstracts and hosts a large number of virtualized desktop sessions through a centralized backend server. Users connect to virtual desktops through virtual desktop clients to meet their remote work needs, utilizing the computing and storage resources of these servers.

[0003] The interaction between the cloud desktop client and the cloud desktop virtual machine is achieved through the cloud desktop transmission protocol. The VDI web client is an important component of the cloud desktop client. Currently, the functional testing of the VDI web client relies on manual testing, requiring testers to manually enter the server address through a browser interface and manually click on the verification module to verify the business functions of the VDI web client. This testing process is time-consuming and wastes manpower. However, the development and iteration of VDI web client functions are rapid, constantly requiring the integration of new business functions, and continuing to rely on manual testing is inefficient and slow in verification progress. Summary of the Invention

[0004] The purpose of this application is to provide a cloud desktop client and a method for performing tests thereon, so that the cloud desktop client can perform automated tests on web clients.

[0005] To achieve the above objectives, this application provides a cloud desktop client execution testing method. The method includes: creating a first data serialization structure file; wherein the first data serialization structure file contains: a first business logic to be tested from the web client of the cloud desktop client, test parameter items and test parameter types defined for the first business logic; converting the first data serialization structure file into a first script source file; wherein the first script source file and the test script have the same language format; determining that the first business logic is a request data business type, and encapsulating the first script source file into request data type interface parameters; running the test script of the test cases for the first business logic, and passing the tested parameters of the first business logic to the request data type interface function according to the test parameter items and types of the first business logic; simulating the business scenario of the web client executing the first business logic, and sending a first remote procedure call request for request data to the cloud desktop management platform; receiving a first return information sent by the cloud desktop management platform, and determining that the test of the first business logic is successful.

[0006] To achieve the above objectives, this application also provides a cloud desktop client, which includes a processor and a memory; the memory is used to store processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: creating a first data serialization structure file; wherein the first data serialization structure file includes: a first business logic to be tested of the web client of the cloud desktop client, test parameter items and test parameter types defined for the first business logic; converting the first data serialization structure file into a first script source file; wherein the first script source file has the same language format as the test script; determining that the first business logic is a request data business type, and encapsulating the first script source file into request data type interface parameters; running the test script of the test cases of the first business logic, and passing the test parameters of the first business logic to the request data type interface function according to the test parameter items and types of the first business logic; simulating the business scenario of the web client executing the first business logic, and sending a first remote procedure call request for request data to the cloud desktop management platform; receiving a first return information sent by the cloud desktop management platform, and determining that the test of the first business logic is successful.

[0007] The beneficial effect of this application embodiment is that it provides a cloud desktop client that realizes automated testing of the implementation of a web client based on remote procedure calls, eliminating the need for manual operation and subjective observation by testers, thus reducing labor costs. Attached Figure Description

[0008] Figure 1 A flowchart illustrating an embodiment of the method for automated testing of a web client using a cloud desktop client provided in this application;

[0009] Figure 2 A schematic diagram of the architecture of the automated testing solution for the web client of the cloud desktop client provided in this application;

[0010] Figure 3 A schematic diagram of an embodiment of the cloud desktop client for automated testing of web client request data service types provided in this application;

[0011] Figure 4 A schematic diagram illustrating an embodiment of the cloud desktop client's automated testing of web client data acquisition service types provided in this application;

[0012] Figure 5 A schematic diagram of the cloud desktop client for the automated testing web client provided in this application. Detailed Implementation

[0013] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0014] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0015] Figure 1 A flowchart illustrating an embodiment of a method for automated testing of a web client using a cloud desktop client provided in this application; the method includes,

[0016] Step 101: Create a first data serialization structure file; wherein, the first data serialization structure file contains: the first business logic to be tested of the web client of the cloud desktop client, the test parameter items and test parameter types defined for the first business logic;

[0017] Step 102: Convert the first data serialization structure file into a first script source file; wherein the first script source file has the same language format as the test script;

[0018] Step 103: Determine that the first business logic is a request data business type, and encapsulate the first script source file into request data type interface parameters;

[0019] Step 104: Run the test script of the test case of the first business logic, and pass the test parameters of the first business logic to the request data type interface function according to the test parameter items and types of the first business logic.

[0020] Step 105: Simulate the business scenario of the web client executing the first business logic and send the first remote procedure call request for request data to the cloud desktop management platform;

[0021] Step 106: Receive the first return information sent by the cloud desktop management platform to confirm that the test of the first business logic was successful.

[0022] Figure 1 The beneficial effect of the illustrated embodiment is that it provides a cloud desktop client that enables automated testing of web client implementation based on remote procedure calls, eliminating the need for manual operation and subjective observation by testers, thus reducing labor costs.

[0023] Figure 2 This is a schematic diagram of the architecture of the automated testing solution for the web client of the cloud desktop client provided in this application. Figure 2As shown, the architecture includes: serialization structure files, script source files, interface functions, and test scripts.

[0024] The serialization structure file contains: the business logic of the web client of the cloud desktop client to be tested VDI business, such as login, password modification, desktop connection, desktop list retrieval, desktop details retrieval, etc.; test parameter items and test parameter types defined for this business logic; the format of this serialization structure file can be a protobuf file.

[0025] A script source file is a source file in the same language format as the test script language, which is converted from a serialized structure file by the compilation tool. For example, when the test script language is Python, the script source file can be a source file in which the compilation tool converts a protobuf file into Python code; automated testing is achieved through script source files; the compilation language type of the script source file is not limited, for example, it can also be Java.

[0026] Interface Functions: Since the programming language code in the script source file already contains the relevant interface definitions for the VDI services of the web client under test, the script source file is encapsulated into functions that can be directly called by the test cases in order to perform interface calls and pass test parameters. For example, the test case for the web client under test is user login. The parameters to be transmitted when calling the login request include username, password, terminal IP address, client type, or other related extended fields. The encapsulated interface function is a login function that can be called directly.

[0027] Test scripts: Test scripts that can be executed by the test framework of the cloud desktop client and can generate test reports after the test is completed.

[0028] Figure 2 The architecture shown utilizes the layered approach of automated testing. The script source files form the data layer, which contains the core business data. The encapsulated interface functions form the business logic layer, primarily encapsulating specific business logic. The implementation of the business logic relies on the functionality provided by the underlying technical code and may include some common function processing, such as logging and configuration files. The test scripts form the presentation layer, supported by test data and presented through test reporting tools: test environment information, test cases, test steps, execution logs, daily execution curves, etc., facilitating error analysis and data display. This application does not limit the test reporting tools; it incorporates existing test reporting tools by reference.

[0029] Figure 3A schematic diagram of an embodiment of the cloud desktop client automated testing web client request data service type provided in this application; including the following steps:

[0030] Step 301: Create a protobuf file; the protobuf file contains: the VDI business logic to be tested for the web client, the defined test parameter items for the VDI business logic to be tested, and the test parameter types.

[0031] Step 302: Use a compilation tool to convert the protobuf file into a script source file.

[0032] For example, the test script is Python code, and the script source file is a Python source file with the same language format.

[0033] Step 303: Determine that the VDI business logic being tested is a request data business type, and encapsulate the script source file into request data type interface parameters.

[0034] Based on the business type of the VDI business logic being tested, such as the creation, modification, and deletion of business objects, the business type of the VDI business logic being tested is determined.

[0035] Step 304: Run the test script of the test cases for the VDI business logic under test, and pass the test parameters to the request data type interface function according to the test parameter items and types of the VDI business logic under test.

[0036] Step 305: Send a remote procedure call request for the requested data to the cloud desktop management platform.

[0037] As a function that can be invoked as a whole, the test script passes the test parameters to the requesting data interface function according to the test parameters and types of the VDI business logic being tested. This simulates the business scenario of a web client executing the business logic of requesting data and sends remote procedure call requests, such as gRPC requests, to the cloud desktop management platform.

[0038] Step 306: Receive the return information sent by the cloud desktop management platform.

[0039] After receiving a gRPC request from the cloud desktop client based on the simulated business scenario, the cloud desktop management platform returns information based on the response to the request. Upon receiving the return information, the test script of the cloud desktop client confirms that the business logic test of the requested data type is successful.

[0040] Figure 4 A schematic diagram illustrating an embodiment of the cloud desktop client's automated testing of web client data acquisition service types provided in this application;

[0041] Step 401: Create a protobuf file; the protobuf file contains: the VDI business logic to be tested for the web client, the test parameter items defined for the VDI business logic to be tested, and the test parameter types.

[0042] Step 402: Use a compilation tool to convert the protobuf file into a script source file.

[0043] Step 403: Determine that the VDI business logic being tested is a data acquisition business type, and encapsulate the script source file into data acquisition interface parameters.

[0044] If the VDI service being tested is something like retrieving a desktop list or retrieving desktop details, then the service type is determined to be a data retrieval service type.

[0045] Step 404: Run the test script of the test cases for the VDI business logic under test, and pass the test parameters to the data acquisition interface function according to the test parameter items and types of the VDI business logic under test.

[0046] Step 405: Send a remote procedure call request to the cloud desktop management platform to obtain data.

[0047] The test script passes the test parameters to the data acquisition interface function according to the test parameter items and types of the VDI business logic being tested, simulates the business scenario of a web client executing the data acquisition business logic, and sends a gRPC request to acquire data to the cloud desktop management platform.

[0048] Step 406: Receive the return information sent by the cloud desktop management platform.

[0049] After receiving a gRPC request from the cloud desktop client based on the simulated business scenario, the cloud desktop management platform sends the requested object / data back to the cloud desktop client via the returned information.

[0050] Step 407: Convert the returned information into a dictionary data structure.

[0051] The test script for the cloud desktop client converts the returned information into a dictionary (dict) data structure; this includes multiple sets of data, where each set of data has a key that uniquely corresponds to a value.

[0052] 408: Verification of the retrieved data.

[0053] The test script searches for the corresponding keyword in the dictionary data structure based on the test parameters to be verified, and reads the value of that keyword.

[0054] When verifying the test script, the parameter value of the test parameter to be verified can be compared with the value corresponding to the keyword. If they match, it is determined that the business logic for obtaining the data type has passed the test; if they do not match, it is confirmed that the business logic cannot obtain the business data.

[0055] Alternatively, during test script verification, you can check whether the value corresponding to the keyword is empty; if the value corresponding to the keyword is not empty, it is determined that the business logic for obtaining the data type can obtain the business data through the test; if it is empty, it is determined that the business logic cannot obtain the business data.

[0056] The embodiments of this application convert the returned information to a dictionary format to facilitate assertion processing in test cases.

[0057] For business logic involving data type retrieval, in addition to performing data verification based on the returned information, the test script can also call the interface function of related businesses based on the returned information. For example, if the returned information is an object requested / processed by another business, then the business that needs to call / process the returned information is the related business, and the returned information should be sent to the interface function of the related business.

[0058] The beneficial effects of this application's embodiments are that they enable automated testing, eliminating the need for manual operation and subjective observation by testers, thus reducing labor costs; they are conducive to enhancing business stability and robustness; and by implementing automated VDI testing through a web client, they resolve the dependence on various physical terminals, improving testing efficiency and reducing testing costs.

[0059] Figure 5 This is a schematic diagram of the cloud desktop client for the automated testing web client provided in this application. The cloud desktop client 50 includes a processor 51 and a memory 52; the memory 52 is used to store processor-executable instructions; wherein, the processor 51 performs the following operations by running the processor-executable instructions in the memory 52: creating a first data serialization structure file; wherein, the first data serialization structure file includes: the first business logic to be tested of the web client (not shown in the figure) of the cloud desktop client 50, test parameter items and test parameter types defined for the first business logic; converting the first data serialization structure file into a first script source file; wherein, the first script source file has the same language format as the test script; determining that the first business logic is a request data business type, and encapsulating the first script source file into request data type interface parameters; running the test script of the test cases of the first business logic, and passing the test parameters of the first business logic to the request data type interface function according to the test parameter items and types of the first business logic; simulating the business scenario of the web client executing the first business logic, and sending a first remote procedure call request for request data to the cloud desktop management platform; receiving the first return information sent by the cloud desktop management platform, and determining that the test of the first business logic is successful.

[0060] The processor 51 of the cloud desktop client 50 also performs the following operations by running processor-executable instructions in memory: creating a second data serialization structure file; wherein the second data serialization structure file contains: the second business logic to be tested of the web client, test parameter items and test parameter types defined for the second business logic; converting the second data serialization structure file into a second script source file; wherein the second script source file has the same language format as the test script; determining that the second business logic is a data acquisition business type, and encapsulating the second script source file into data acquisition interface parameters; running the test script of the test cases of the second business logic, and passing the tested parameters of the second business logic to the data acquisition interface function according to the test parameter items and types of the second business logic; simulating the business scenario of the web client executing the second business logic, and sending a second remote procedure call request for data acquisition to the cloud desktop management platform; and receiving the second return information sent by the cloud desktop management platform.

[0061] The processor 51 of the cloud desktop client 50 also performs the following operations by running processor-executable instructions in the memory 52: converting the returned information into a dictionary data structure; searching for the corresponding keyword in the dictionary data structure according to the test parameter to be verified; if the parameter value of the test parameter to be verified is consistent with the value of the found keyword, it is determined that the second business logic has passed the test; or, if the parameter value of the test parameter to be verified is inconsistent with the value of the found keyword, it is determined that the second business logic has failed the test.

[0062] The processor 51 of the cloud desktop client 50 also performs the following operations by running processor-executable instructions in the memory 52: converting the returned information into a dictionary data structure; searching for the corresponding keyword in the dictionary data structure according to the test parameters to be verified; if the value of the found keyword is not empty, determining that the second business logic has passed the test; or, if the value of the found keyword is empty, determining that the second business logic has failed the test.

[0063] The processor 51 of the cloud desktop client 50 also performs the following operations by running processor-executable instructions in memory 52: calling another interface function of the associated service based on the returned information.

[0064] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for performing tests on a cloud desktop client, characterized in that, The method includes, Create a first data serialization structure file; wherein, the first data serialization structure file contains: the first business logic to be tested of the web client of the cloud desktop client, the defined test parameter items and test parameter types of the first business logic; The first data serialization structure file is converted into a first script source file; wherein the first script source file has the same language format as the test script; Once the first business logic is determined to be a data request business type, the first script source file is encapsulated into a data request interface function. The test script that runs the test cases of the first business logic passes the test parameters of the first business logic to the request data type interface function according to the test parameter items and types of the first business logic. Simulate the business scenario where the web client executes the first business logic, and send a first remote procedure call request for request data to the cloud desktop management platform; The system receives the first return information sent by the cloud desktop management platform to confirm that the test of the first business logic was successful.

2. The method according to claim 1, characterized in that, The method further includes: Create a second data serialization structure file; wherein, the second data serialization structure file contains: the second business logic to be tested of the web client, the defined test parameter items and test parameter types of the second business logic; The second data serialization structure file is converted into a second script source file; wherein the second script source file has the same language format as the test script; Once the second business logic is determined to be a data acquisition business type, the second script source file is encapsulated into a data acquisition interface function. The test script that runs the test cases of the second business logic passes the test parameters of the second business logic to the data acquisition interface function according to the test parameter items and types of the second business logic; Simulate the business scenario where the web client executes the second business logic, and send a second remote procedure call request to the cloud desktop management platform to obtain data; Receive the second return information sent by the cloud desktop management platform.

3. The method according to claim 2, characterized in that, The method further includes: Convert the returned information into a dictionary data structure; Based on the test parameters of the second business logic, the corresponding keywords are searched in the dictionary data structure; If the value of the parameter being tested in the second business logic matches the value of the found keyword, then the second business logic passes the test; or, The parameter value of the tested parameter in the second business logic is inconsistent with the value of the found keyword, indicating that the second business logic has failed the test.

4. The method according to claim 2, characterized in that, The method further includes: Convert the returned information into a dictionary data structure; Based on the test parameters of the second business logic, the corresponding keywords are searched in the dictionary data structure; If the value of the found keyword is not empty, it confirms that the second business logic can retrieve business data; or, If the value of the keyword is found to be empty, it is determined that the second business logic has not obtained business data.

5. The method according to claim 1, characterized in that, The method further includes: The interface function of the associated business is invoked based on the returned information.

6. A cloud desktop client, characterized in that, The cloud desktop client includes a processor and a memory; the memory stores processor-executable instructions; wherein the processor executes the processor-executable instructions in the memory to perform the following operations: Create a first data serialization structure file; wherein, the first data serialization structure file contains: the first business logic to be tested of the web client of the cloud desktop client, the test parameter items and test parameter types defined in the first business logic; The first data serialization structure file is converted into a first script source file; wherein the first script source file has the same language format as the test script; Once the first business logic is determined to be a data request business type, the first script source file is encapsulated into a data request interface function. The test script that runs the test cases of the first business logic passes the test parameters of the first business logic to the request data type interface function according to the test parameter items and types of the first business logic. Simulate the business scenario where the web client executes the first business logic, and send a first remote procedure call request for request data to the cloud desktop management platform; The system receives the first return information sent by the cloud desktop management platform to confirm that the test of the first business logic was successful.

7. The client according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Create a second data serialization structure file; wherein, the second data serialization structure file contains: the second business logic to be tested of the web client, the defined test parameter items and test parameter types of the second business logic; The second data serialization structure file is converted into a second script source file; wherein the second script source file has the same language format as the test script; Once the second business logic is determined to be a data acquisition business type, the second script source file is encapsulated into a data acquisition interface function. The test script that runs the test cases of the second business logic passes the test parameters of the second business logic to the data acquisition interface function according to the test parameter items and types of the second business logic; Simulate the business scenario where the web client executes the second business logic, and send a second remote procedure call request to the cloud desktop management platform to obtain data; Receive the second return information sent by the cloud desktop management platform.

8. The client according to claim 7, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Convert the returned information into a dictionary data structure; The parameters to be tested in the second business logic are searched for corresponding keywords in the dictionary data structure; If the value of the parameter being tested in the second business logic matches the value of the found keyword, then the second business logic passes the test; or, The parameter value of the tested parameter in the second business logic is inconsistent with the value of the found keyword, indicating that the second business logic has failed the test.

9. The client according to claim 7, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Convert the returned information into a dictionary data structure; Based on the test parameters of the second business logic, the corresponding keywords are searched in the dictionary data structure; If the value of the keyword found is not empty, it confirms that the second business logic can retrieve the business data; or, If the keyword value is found to be empty, it indicates that the second business logic has not obtained any business data.

10. The client according to claim 6, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: The returned information is used to invoke another interface function of the related business.

Citation Information

Patent Citations

  • Pressure test method of gRPC interface, computer equipment and storage medium

    CN111752820A

  • Virtual desktop testing method and device

    CN112306639A