Software batch testing method and computer readable storage medium

By generating custom images and configuring servers on cloud services, automated batch testing and compatibility testing of software can be achieved, solving the problems of time-consuming, labor-intensive and costly traditional testing, reducing hardware and labor costs, and enabling monitoring of resource usage.

CN117555807BActive Publication Date: 2026-01-20FUJIAN STAR NET EVIDEO INFORMATION SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311810121.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2026-01-20
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

Traditional batch testing of software is time-consuming and labor-intensive, has high hardware costs, and produces incomplete test reports, failing to effectively monitor system resource usage.

Method used

By creating virtual machines, using cloud services to generate custom images and configuring servers, software testing and compatibility testing can be automated, reducing equipment and labor costs.

Benefits of technology

It enables compatibility testing on different systems, reduces equipment and labor costs, and can automatically monitor resource usage, providing a basis for optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117555807B_ABST
    Figure CN117555807B_ABST
Patent Text Reader

Abstract

The application discloses a software batch test method and a computer readable storage medium, and the method comprises the following steps: creating a virtual machine; installing a corresponding system on the virtual machine according to a preset system image file, and respectively installing a software to be tested and test software in each system; uploading virtual disk files of each system in a virtual machine directory to cloud storage, generating a custom image corresponding to each system through an elastic computing cloud service, and creating a preset number of servers according to the custom image; and respectively testing the software to be tested through the test software in each server. The application can realize compatibility test, and can reduce the equipment cost and labor cost during batch test.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software testing, in particular to a software batch testing method and a computer readable storage medium. BACKGROUND

[0002] Software testing is essential in the software development process, and function testing, stability testing and batch testing need to be continuously carried out in the development and iteration process of software. The traditional manual simulation of user input method is time-consuming and laborious, and batch testing also needs to provide a large number of hardware environments such as machines, which has a high hardware cost, and only records error logs during the testing process, ignoring the overall detection of system resource usage, resulting in incomplete test reports. SUMMARY

[0003] The technical problem to be solved by the present application is to provide a software batch testing method and a computer readable storage medium, which can realize compatibility testing and reduce the equipment cost and labor cost during batch testing.

[0004] In order to solve the above technical problems, the technical scheme adopted by the present application is as follows: a software batch testing method, comprising:

[0005] Creating a virtual machine;

[0006] According to the preset system image file, installing the corresponding system on the virtual machine, and installing the software to be tested and the test software in each system respectively;

[0007] Uploading the virtual disk files of each system in the virtual machine directory to the cloud storage, generating the custom image corresponding to each system through the elastic computing cloud service, and creating a preset number of servers according to the custom image;

[0008] Respectively testing the software to be tested in each server through the test software.

[0009] The present application also provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method as described above.

[0010] The present application has the advantages that: by using the elastic computing service provided by the cloud service, custom images of different systems are generated on the cloud service, and enough servers are configured as batch testing devices as needed, so that the equipment cost during batch testing can be reduced, and the compatibility testing of the software to be tested in different systems can be realized; the software to be tested is automatically tested by the test software, which can reduce the labor cost and ensure the testing accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0011] Figure 1 The flowchart of the software batch testing method of the present application;

[0012] Figure 2 A method flow chart for the first embodiment of the present application. DETAILED DESCRIPTION

[0013] To make the technical contents, purposes and effects of the present application clear, the following will be described in detail in combination with the embodiments and the accompanying drawings.

[0014] Please refer to Figure 1 A software batch testing method, comprising:

[0015] creating a virtual machine;

[0016] installing a corresponding system on the virtual machine according to a preset system image file, and installing a software to be tested and a testing software in each system respectively;

[0017] uploading the virtual disk files of each system in the virtual machine directory to a cloud storage, generating a custom image corresponding to each system through an elastic computing cloud service, and creating a preset number of servers according to the custom image;

[0018] testing the software to be tested through the testing software in each server respectively.

[0019] From the above description, it can be seen that the present application has the beneficial effects of realizing compatibility testing and reducing the equipment cost and labor cost during batch testing.

[0020] Further, the virtual machine is created, specifically:

[0021] installing virtual machine software and creating a virtual machine through the virtual machine software.

[0022] Further, the testing of the software to be tested through the testing software in each server respectively comprises:

[0023] selecting one server as a master server and the other servers as slave servers in the preset number of servers;

[0024] the testing software on the master server sends a testing instruction to the testing software on the slave server, and receives a testing result returned by the testing software on the slave server;

[0025] the testing software on the slave server receives the testing instruction and tests the local software to be tested, and returns the testing result to the testing software on the master server.

[0026] From the above description, it can be seen that the testing control and result arrangement are realized through the testing software on the master server, thereby realizing the automation of testing.

[0027] Further, it further comprises:

[0028] When a new version of the to-be-tested software is to be tested, the new version of the to-be-tested software is installed on the master server, and the new version of the to-be-tested software is synchronized to each slave server through the test software on the master server.

[0029] As can be seen from the above description, when the to-be-tested software is updated, it is not necessary to rebuild the custom image, but only to install the new version of the to-be-tested software on the master server, and the test software synchronizes the new version of the to-be-tested software to the slave server, thereby reducing the repeated operation of repeatedly building a custom system image when the software is updated, and further reducing the labor cost.

[0030] Further, the to-be-tested software is a web application program constructed based on a front-end development framework and with a browser as a rendering component.

[0031] The to-be-tested software is tested by the test software, specifically:

[0032] The browser driver in the test software and the browser in the to-be-tested software establish a communication connection through an http protocol.

[0033] The test software performs a test operation on the to-be-tested software through the browser driver according to a preset test script, and the test operation includes a mouse click operation and a keyboard input operation.

[0034] As can be seen from the above description, the browser driver can obtain and operate the web element in the browser through the http protocol, and realize that the test software simulates a user to click a button or input text on the to-be-tested software.

[0035] Further, the use of the system resource by the to-be-tested software is detected by the test software, and the use includes a CPU usage rate, a memory usage rate, and a process usage trend.

[0036] As can be seen from the above description, the software resource usage can be automatically monitored during the test process, and a basis is provided for subsequent application optimization.

[0037] The application further provides a computer readable storage medium having a computer program stored thereon, and the program is executed by a processor to implement the method described above.

[0038] Embodiment one

[0039] Please refer to Figure 2 Embodiment one of the application is a software batch test method suitable for software constructed by Electron (a front-end development framework).

[0040] As shown in Figure 2 The method comprises the following steps:

[0041] S1: Create a virtual machine.

[0042] Specifically, first install virtual machine software (such as VirtualBox virtual machine), and then create a virtual machine through the virtual machine software, and the virtual disk file type is selected as VHD.

[0043] S2: According to the preset system image file, install the corresponding system on the virtual machine, and install the to-be-tested software and the test software in each system respectively.

[0044] For example, system image files (32-bit or 64-bit) of win7, win10 or win11 are prepared in advance, and then different versions of systems are installed on the virtual machine according to these system image files, and the to-be-tested software and the test software are installed in each system respectively.

[0045] Further, if the subsequent cloud storage is Aliyun storage, the virtio driver needs to be installed in each system.

[0046] S3: Read the virtual disk files of each system from the virtual machine directory and upload them to the cloud storage.

[0047] In this embodiment, the.vhd file is obtained from the virtual machine directory and uploaded to the Aliyun storage (such as the oss service).

[0048] S4: According to the virtual disk files of each system, generate a custom image corresponding to each system through the elastic computing cloud service, and create a preset number of servers according to the custom image.

[0049] Specifically, after uploading the.vhd file to the object storage service of the public cloud, the.vhd file is made into a custom image through the import image service of the elastic computing service of the public cloud, and then the server is created through the custom image in the elastic computing service.

[0050] In this embodiment, the elastic computing cloud service is used to generate servers with different versions of window systems and sufficient quantity, which are used as batch testing devices, so as to reduce the hardware device cost of batch testing, and because the created servers have different versions of systems, the compatibility test of the to-be-tested software can be realized.

[0051] S5: Test the to-be-tested software through the test software in each server respectively.

[0052] Specifically, in the created servers, one server is selected as a master server and the other servers are selected as slave servers; the test software on the master server sends test instructions to the test software on the slave servers, the test software on the slave servers tests the to-be-tested software locally after receiving the test instructions, and returns the test results to the test software on the master server, and the test software on the master server receives the test results returned by the test software on each slave server and generates a software running report.

[0053] That is, in the embodiment, the test software on the master server is only used for sending test instructions and receiving and sorting the test results of each slave server, and the test software on the slave servers tests the to-be-tested software locally.

[0054] Further, when a new version of to-be-tested software needs to be tested, the new version of to-be-tested software is installed on the master server and synchronized to each slave server through the test software on the master server, that is, when the to-be-tested software is updated, there is no need to repeatedly build a custom image, thereby reducing the repeated operation of repeatedly building a custom system image when the to-be-tested software is updated.

[0055] In the embodiment, the to-be-tested software is a web application program based on Electron (a front-end development framework) and built with a browser (such as chromium) as a rendering component, and a browser driver (such as chromium) is integrated in the test software, the browser driver and the browser in the to-be-tested software establish a communication connection through an http protocol, so that the browser driver can obtain and operate web elements in the browser through the http protocol. The test software performs test operations on the to-be-tested software through the browser driver according to a preset test script, and the test operations include mouse click operations and keyboard input operations, thereby realizing that the test software simulates a user to click a button or input text on the to-be-tested software.

[0056] Further, during the test process, the test software also detects the use of system resources by the to-be-tested software, including CPU usage, memory usage, and process usage trends.

[0057] The embodiment utilizes the elastic computing service provided by the cloud service, can generate servers with sufficient quantity and different versions of systems, thereby reducing the equipment cost during batch testing and realizing compatibility testing of the to-be-tested software on different systems; the test software and the to-be-tested software are installed on each generated server, the to-be-tested software is automatically tested by the test software, thereby reducing the labor cost and ensuring the test accuracy; when the to-be-tested software is updated, only the new version of to-be-tested software needs to be installed on the master server, which can be synchronized to other servers, thereby eliminating the need to rebuild a custom image; by automatically monitoring the software resource usage during the test process, a basis can be provided for subsequent application optimization.

[0058] Embodiment two

[0059] The embodiment is a computer readable storage medium corresponding to the above embodiment, and a computer program is stored on the computer readable storage medium, the program is executed by a processor to realize each step of a software batch test method in the above embodiment, and the same technical effect can be achieved, and the same technical effect can be achieved.

[0060] In summary, the software batch test method and the computer readable storage medium provided by the application utilize the elastic computing service provided by the cloud service, generate custom images of different systems on the cloud service, and configure enough servers as batch test equipment as needed, so that the cost of the equipment during batch testing can be reduced, and the compatibility test of the software to be tested on different systems can be realized; the software to be tested is tested automatically by the test software, which can reduce the labor cost and ensure the test accuracy; and the software resource usage during the test process is automatically monitored, which can provide a basis for subsequent application optimization.

[0061] The above is only an embodiment of the application, and does not limit the patent range of the application, and any equivalent transformation or direct or indirect application in the related technical field by using the content of the specification and drawings of the application is also included in the patent protection range of the application.

Claims

1. A method for batch testing of software, characterized in that, include: Create a virtual machine; Based on the preset system image file, install the corresponding system on the virtual machine, and install the software to be tested and the test software on each system respectively; Upload the virtual disk files of each system in the virtual machine directory to cloud storage, generate custom images corresponding to each system through elastic computing cloud services, and create a preset number of servers based on the custom images; The software under test was tested on each server using testing software.

2. The software batch testing method according to claim 1, characterized in that, The creation of the virtual machine specifically involves: Install virtual machine software and create virtual machines using the virtual machine software.

3. The software batch testing method according to claim 1, characterized in that, The testing of the software under test on each server using testing software includes: Select one server from the preset number of servers as the master server, and the other servers as slave servers; The test software on the master server sends test commands to the test software on the slave server and receives the test results returned by the test software on the slave server. After receiving the test command from the test software on the server, it performs the test on its local software under test and returns the test results to the test software on the main server.

4. The software batch testing method according to claim 3, characterized in that, Also includes: When testing a new version of the software under test, the new version is installed on the master server, and the test software on the master server is used to synchronize the new version of the software under test to each slave server.

5. The software batch testing method according to claim 1, characterized in that, The software under test is a web application built on a front-end development framework and using a browser as the rendering component; The testing of the software under test using testing software specifically includes: The browser driver in the test software establishes a communication connection with the browser in the software under test via the HTTP protocol. The testing software performs test operations on the software under test through the browser driver according to the preset test script. The test operations include mouse click operations and keyboard input operations.

6. The software batch testing method according to claim 1, characterized in that, Also includes: The testing software detects the system resource usage of the software under test, including CPU usage, memory usage, and process usage trends.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Software testing system and method

    CN102622298A

  • Testing method based on cloud computing operating system software compatibility

    CN102831062A