Automated testing method and device for management software

By calling a multi-window processor in the automated test of management software and batch processing of multiple windows, the problem of low automation testing efficiency in the existing technology is solved and a more efficient test process is achieved.

CN114116521BActive Publication Date: 2025-06-06CAXA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111556731.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-06-06
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

When multiple windows exist in parallel, multiple windows need to be closed one by one by one by writing test scripts, which increases the script writing workload, resulting in low automation testing efficiency.

Method used

Provides an automated testing method for management software, by obtaining an automated test script and setting a call function in it, calling a multi-window processor to process multiple windows. The multi-window processor realizes batch processing by reading and counting the window names, traversing and closing windows with the same name.

Benefits of technology

By batch processing of multiple windows, the automation testing efficiency of management software is improved, the script writing work is reduced, and the automation testing can be carried out smoothly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116521B_ABST
    Figure CN114116521B_ABST
Patent Text Reader

Abstract

The present application discloses an automated testing method and device for management software. The method comprises: obtaining an automated testing script for management software; setting a call function in the automated testing script, and running the set automated testing script to perform automated testing on the management software; during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, calling a multi-window processor to process the multiple windows according to the call function; and continuing to perform automated testing after the multi-window processor processes the multiple windows. The present application solves the problem of low efficiency of automated testing in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software technology, and in particular to an automated testing method and device for management software. Background Art

[0002] In order to improve the testing efficiency of software products, it is necessary to perform automated testing on each version of the software in daily testing work. At present, for management software products such as PLM, multiple windows often appear during operation, so the automated testing of management software needs to cover the verification of this scenario. At present, for the automated testing of management software, when multiple windows appear, in order to ensure that the automated testing can proceed smoothly, it is necessary to write test scripts to indiscriminately close windows with the same attributes one by one. This operation method increases the workload of writing test scripts and reduces the efficiency of automated testing.

[0003] In the process of automated testing of management software in related technologies, when multiple windows exist in parallel, the only way is to write a test script to indiscriminately close multiple windows one by one and keep only one window, which increases the workload of script writing and leads to low efficiency of automated testing. No effective solution has been proposed yet. Summary of the invention

[0004] The main purpose of the present application is to provide an automated testing method and device, a processor and a storage medium for management software, so as to solve the problem in the related art that during the automated testing of management software, when multiple windows exist in parallel, the multiple windows can only be closed one by one indiscriminately by writing a test script, and only one window is retained, which increases the workload of script writing and leads to low efficiency of automated testing.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for automated testing of management software is provided. The method comprises: obtaining an automated testing script of the management software; setting a calling function in the automated testing script, and running the set automated testing script to perform automated testing on the management software; during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, calling a multi-window processor to process the multiple windows according to the calling function; after the multi-window processor processes the multiple windows, continuing to perform automated testing.

[0006] Further, according to the calling function, calling the multi-window processor to process the multiple windows includes: determining, by the multi-window processor, windows with the same name among the multiple windows; and closing the windows with the same name.

[0007] Furthermore, before calling the multi-window processor to process the multiple windows according to the calling function, the method also includes: step 1, reading the name of each window and recording the total number of the multiple windows and the arrangement order of each window; step 2, counting the number of windows with the same name and the arrangement order of the windows with the same name; step 3, traversing all windows and closing the windows with the same name according to the arrangement order of the windows with the same name; and encapsulating steps 1, 2 and 3 in a functional manner to generate the multi-window processor.

[0008] Furthermore, obtaining the automated test script of the management software includes: writing and recording the test script with a multi-window application scenario through an automated test tool; and generalizing the test script.

[0009] Furthermore, the method further includes: if the multi-window processor fails to successfully process the multiple windows, continuing to call the multi-window processor to process the multiple windows until the multi-window processor successfully processes the multiple windows.

[0010] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an automated testing device for management software is provided. The device comprises: an acquisition unit, used to acquire an automated testing script for management software; a setting unit, used to set a call function in the automated testing script, and run the set automated testing script to perform automated testing on the management software; a detection unit, used to, during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, call a multi-window processor to process the multiple windows according to the call function; and an execution unit, used to continue to execute the automated test after the multi-window processor processes the multiple windows.

[0011] Furthermore, the setting unit includes: a determination module, used to determine windows with the same name among the multiple windows through the multi-window processor; and an operation module, used to close the windows with the same name.

[0012] Furthermore, the device also includes: a reading unit, which is used to, before calling the multi-window processor to process the multiple windows according to the calling function, read the name of each window and record the total number of the multiple windows and the arrangement order of each window in step 1; a counting unit, which is used to, in step 2, count the number of windows with the same name and the arrangement order of the windows with the same name; an operating unit, which is used to, in step 3, traverse all windows and close the windows with the same name according to the arrangement order of the windows with the same name; and an encapsulation unit, which is used to functionally encapsulate steps 1, 2 and 3 to generate the multi-window processor.

[0013] Furthermore, the acquisition unit includes: a writing module, which is used to write and record a test script with a multi-window application scenario through an automated testing tool; and a processing module, which is used to perform general processing on the test script.

[0014] Furthermore, the device further comprises: a calling unit, configured to continue calling the multi-window processor to process the multiple windows if the multi-window processor fails to successfully process the multiple windows, until the multi-window processor successfully processes the multiple windows.

[0015] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium includes a stored program, wherein the program executes any one of the above-mentioned automated testing methods for management software.

[0016] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a processor is provided, wherein the processor is used to run a program, wherein when the program is run, the automated testing method for management software described in any one of the above-mentioned items is executed.

[0017] Through this application, the following steps are adopted: obtaining an automated test script for management software; setting a call function in the automated test script, and running the set automated test script to perform automated testing on the management software; during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, calling a multi-window processor to process the multiple windows according to the call function; after the multi-window processor processes the multiple windows, continuing to perform automated testing, solving the problem in the related art that when multiple windows exist in parallel during the automated testing of management software, some window attributes are consistent, resulting in the inability to recognize the window when the script runs, so that the script fails to run and the automated test cannot continue to run, and the test script can only be written to indiscriminately close multiple windows one by one, leaving only one window, increasing the workload of script writing, and resulting in low efficiency of automated testing. In the process of automated testing of management software, when multiple windows appear, batch processing of multiple windows is performed by calling a multi-window processor to realize automated testing of management software, and the above process does not increase the workload of script writing, thereby achieving the effect of improving the efficiency of automated testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1It is a flow chart of an automated testing method for management software provided in an embodiment of the present application;

[0020] Figure 2 It is a schematic diagram of a situation in which multiple windows appear during an automated test of optional management software provided in an embodiment of the present application;

[0021] Figure 3 is a processing flow chart of an optional multi-window processor provided according to an embodiment of the present application;

[0022] Figure 4 is a flowchart of an optional automated testing method for management software provided according to an embodiment of the present application;

[0023] Figure 5 It is a schematic diagram of an automated testing device for management software provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flow chart of an automated testing method for management software provided in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0028] Step S101, obtaining an automated test script for management software.

[0029] Get automated testing scripts for management software (e.g., PLM software, product lifecycle management software, Product Lifecycle Management).

[0030] Step S102, setting a calling function in the automated test script, and running the set automated test script to perform automated testing on the management software.

[0031] Set up a calling function in the automated test script to call the multi-window processor later to ensure the smooth progress of the automated test process.

[0032] Step S103, during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, a multi-window processor is called to process the multiple windows according to a calling function.

[0033] For example, during the automated testing of PLM software, it is detected that multiple windows appear on the operation interface of the PLM software (for example, Figure 2 As shown), a multi-window processor is called by calling a function to process multiple windows that appear on the operation interface.

[0034] Step S104: After the multi-window processor processes the multiple windows, the automated test continues to be performed.

[0035] When the multi-window processor has finished processing the multiple windows in the operation interface, it continues to perform automated testing on the PLM software.

[0036] In summary, the multi-window processor can quickly process multiple windows that appear during the automated testing of management software, ensuring the smooth progress of the automated testing process and improving the efficiency of the automated testing of management software.

[0037] Optionally, in the automated testing method for management software provided in an embodiment of the present application, based on a calling function, calling a multi-window processor to process multiple windows includes: determining, through the multi-window processor, windows with the same name among multiple windows; and closing windows with the same name.

[0038] For example, during the automated testing of PLM software, it is detected that multiple windows appear in the operation interface of the PLM software. The multi-window processor determines the windows in the operation interface of the PLM software (windows with the same name are windows with the same attributes) and closes all windows with the same name, leaving only windows with different names. Figure 2As shown, there are 5 windows in the current operation interface. There are 3 windows named Part 1, so the multi-window processor closes these three windows named Part 1 and keeps the Part 3 window and the Part 5 window.

[0039] By using a multi-window processor to batch close multiple windows with the same attributes, the efficiency of automated testing of management software is improved.

[0040] Optionally, in the automated testing method for management software provided in an embodiment of the present application, before calling a multi-window processor to process multiple windows based on a calling function, the method also includes: step 1, reading the name of each window and recording the total number of multiple windows and the arrangement order of each window; step 2, counting the number of windows with the same name and the arrangement order of windows with the same name; step 3, traversing all windows and closing windows with the same name according to the arrangement order of windows with the same name; and encapsulating steps 1, 2 and 3 in a functional manner to generate a multi-window processor.

[0041] The first step is to read the name of each window in the operation interface and record the number and order of windows; the second step is to calculate the number of windows with the same name and the order of windows with the same name; the third step is to traverse all windows and close the windows with the same name according to the order of windows with the same name. The above steps are encapsulated in a function as a multi-window processor.

[0042] The multi-window processor can close windows with the same attributes in batches and retain windows with different attributes, thus ensuring the smooth operation of automated testing.

[0043] Optionally, in the automated testing method for management software provided in an embodiment of the present application, obtaining the automated testing script for the management software includes: writing and recording a test script with a multi-window application scenario through an automated testing tool; and generalizing the test script.

[0044] Use automated testing tools to write and record test scripts with multi-window application scenarios, and generalize this test script. When other management software needs to do similar automated testing, you can directly use this test script to reduce the workload of developers in writing test scripts.

[0045] Optionally, in the automated testing method for management software provided in an embodiment of the present application, the method further includes: if the multi-window processor fails to successfully process multiple windows, continuing to call the multi-window processor to process multiple windows until the multi-window processor successfully processes multiple windows.

[0046] After the multi-window processor processes multiple windows of the operation interface, it needs to determine whether the multiple windows are processed successfully (that is, the operation interface only includes windows with different attributes). When the multi-window processor fails to successfully process multiple windows, it continues to call the multi-window processor to process multiple windows until the multi-window processor successfully processes multiple windows.

[0047] The automated testing method for management software provided in the embodiment of the present application obtains the automated testing script of the management software; sets a calling function in the automated testing script, and runs the set automated testing script to perform automated testing on the management software; during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, a multi-window processor is called according to the calling function to process the multiple windows; after the multi-window processor processes the multiple windows, the automated testing continues to be performed, which solves the problem that in the automated testing process of the management software in the related art, when multiple windows exist in parallel, some window attributes are consistent, resulting in the inability to recognize the window when the script is run, so that the script fails to run and the automated testing cannot continue to run. The problem that the multiple windows can only be closed one by one by writing a test script without distinction, and only one window is retained, which increases the workload of script writing and leads to the problem of low efficiency of automated testing. During the automated testing of the management software, when multiple windows appear, the multiple windows are batch processed by calling the multi-window processor to realize the automated testing of the management software, and the above process does not increase the workload of script writing, thereby achieving the effect of improving the efficiency of automated testing.

[0048] like Figure 3 As shown, it is an operation flow chart of an optional multi-window processor provided according to an embodiment of the present application. First, read the name of each window and record the window order and the total number of windows; determine whether the window reading is complete, and after the reading is complete, obtain all window names, the total number of windows with the same name, and the distribution order of windows with the same name; traverse all windows and close all windows with the same number of windows greater than 1 (that is, close windows with the same name). Figure 4 As shown, it is an optional automated test flow chart provided according to the embodiment of the present application. In PLM management software, a multi-window processor is used for automated testing: an automated testing tool is used to write and record a script program with a multi-window application scenario; the UI object library is classified and sorted, and the global object library and the local object library UI objects are modified; according to the compiled test cases, the recorded script is generalized and functionally packaged; the multi-window processor is called for processing; after the multi-window processor completes the processing, the automated test is continued.

[0049] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0050] The embodiment of the present application also provides an automated testing device for management software. It should be noted that the automated testing device for management software in the embodiment of the present application can be used to execute the automated testing method for management software provided in the embodiment of the present application. The automated testing device for management software provided in the embodiment of the present application is introduced below.

[0051] Figure 5 Schematic diagram of an automated testing device for management software according to an embodiment of the present application. Figure 5 As shown, the device includes: an acquisition unit 501, a setting unit 502, a detection unit 503 and an execution unit 504.

[0052] The acquisition unit 501 is used to acquire the automated test script of the management software.

[0053] The setting unit 502 is used to set a calling function in the automated test script and run the set automated test script to perform automated testing on the management software.

[0054] The detection unit 503 is used to call a multi-window processor to process the multiple windows according to a calling function if it is detected that multiple windows are opened on the target interface of the management software during the automated testing process.

[0055] The execution unit 504 is used to continue to execute the automated test after the multi-window processor processes the multiple windows.

[0056] In summary, the automated testing device for management software provided in the embodiment of the present application obtains the automated testing script of the management software through the acquisition unit 501; the setting unit 502 sets the calling function in the automated testing script, and runs the set automated testing script to perform automated testing on the management software; during the automated testing process, if the detection unit 503 detects that multiple windows are opened on the target interface of the management software, the multi-window processor is called according to the calling function to process the multiple windows; the execution unit 504 continues to execute the automated testing after the multi-window processor processes the multiple windows, thereby solving the problem of management software in the related art being unable to be automatically tested. During the automated testing process, when multiple windows exist in parallel, some window attributes are consistent, resulting in the inability to recognize the window when the script is running, resulting in the failure of the script to run and the inability to continue running the automated test. The only way is to write a test script to indiscriminately close multiple windows one by one and only keep one window, which increases the workload of script writing and leads to low efficiency of automated testing. During the automated testing of management software, when multiple windows appear, the multiple windows are batch processed by calling the multi-window processor to realize automated testing of the management software. The above process will not increase the workload of script writing, thereby achieving the effect of improving the efficiency of automated testing.

[0057] Optionally, in the automated testing device for management software provided in an embodiment of the present application, the setting unit includes: a determination module for determining windows with the same name among multiple windows through a multi-window processor; and an operation module for closing windows with the same name.

[0058] Optionally, in the automated testing device for management software provided in an embodiment of the present application, the device further includes: a reading unit, used for, before calling a multi-window processor to process multiple windows according to a calling function, in step 1, reading the name of each window and recording the total number of multiple windows and the arrangement order of each window; a counting unit, used for step 2, counting the number of windows with the same name and the arrangement order of windows with the same name; an operating unit, used for step 3, traversing all windows and closing windows with the same name according to the arrangement order of windows with the same name; and an encapsulation unit, used for functionally encapsulating steps 1, 2 and 3 to generate a multi-window processor.

[0059] Optionally, in the automated testing device for management software provided in an embodiment of the present application, the acquisition unit includes: a writing module for writing and recording a test script with a multi-window application scenario through an automated testing tool; and a processing module for generalizing the test script.

[0060] Optionally, in the automated testing device for management software provided in an embodiment of the present application, the device also includes: a calling unit, which is used to continue calling the multi-window processor to process multiple windows if the multi-window processor fails to successfully process multiple windows, until the multi-window processor successfully processes multiple windows.

[0061] The automated testing device for management software includes a processor and a memory. The acquisition unit 501, setting unit 502, detection unit 503 and execution unit 504 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.

[0062] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the automated testing of management software can be achieved by adjusting kernel parameters.

[0063] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0064] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the automated testing method of the management software is implemented.

[0065] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the automated testing method of the management software when it is running.

[0066] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining an automated test script for management software; setting a calling function in the automated test script, and running the set automated test script to perform automated testing on the management software; during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, calling a multi-window processor to process the multiple windows according to the calling function; and continuing to execute the automated test after the multi-window processor processes the multiple windows.

[0067] Optionally, according to the calling function, calling the multi-window processor to process the multiple windows includes: determining, by the multi-window processor, windows with the same name among the multiple windows; and closing the windows with the same name.

[0068] Optionally, before calling the multi-window processor to process multiple windows according to the calling function, the method also includes: step 1, reading the name of each window and recording the total number of multiple windows and the arrangement order of each window; step 2, counting the number of windows with the same name and the arrangement order of windows with the same name; step 3, traversing all windows and closing windows with the same name according to the arrangement order of windows with the same name; and encapsulating steps 1, 2 and 3 into functions to generate a multi-window processor.

[0069] Optionally, obtaining the automated test script of the management software includes: writing and recording a test script with a multi-window application scenario through an automated test tool; and generalizing the test script.

[0070] Optionally, the method further includes: if the multi-window processor fails to successfully process the multiple windows, continuing to call the multi-window processor to process the multiple windows until the multi-window processor successfully processes the multiple windows. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0071] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: obtaining an automated test script for management software; setting a calling function in the automated test script, and running the set automated test script to perform automated testing on the management software; during the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, calling a multi-window processor to process the multiple windows based on the calling function; and continuing to execute the automated test after the multi-window processor processes the multiple windows.

[0072] Optionally, according to the calling function, calling the multi-window processor to process the multiple windows includes: determining, by the multi-window processor, windows with the same name among the multiple windows; and closing the windows with the same name.

[0073] Optionally, before calling the multi-window processor to process multiple windows according to the calling function, the method also includes: step 1, reading the name of each window and recording the total number of multiple windows and the arrangement order of each window; step 2, counting the number of windows with the same name and the arrangement order of windows with the same name; step 3, traversing all windows and closing windows with the same name according to the arrangement order of windows with the same name; and encapsulating steps 1, 2 and 3 into functions to generate a multi-window processor.

[0074] Optionally, obtaining the automated test script of the management software includes: writing and recording a test script with a multi-window application scenario through an automated test tool; and generalizing the test script.

[0075] Optionally, the method further includes: if the multi-window processor fails to successfully process the multiple windows, continuing to call the multi-window processor to process the multiple windows until the multi-window processor successfully processes the multiple windows.

[0076] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0077] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0078] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0080] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0081] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0082] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0083] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0084] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt 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.

[0085] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. An automated testing method for management software. It is characterized in that include: Obtain automated testing scripts for management software; Setting a calling function in the automated test script and running the set automated test script to perform automated testing on the management software; During the automated testing process, if it is detected that multiple windows are opened on the target interface of the management software, a multi-window processor is called to process the multiple windows according to the calling function; After the multi-window processor processes the multiple windows, continuing to perform the automated test; Wherein, according to the calling function, calling the multi-window processor to process the multiple windows includes: determining, by the multi-window processor, windows with the same name among the multiple windows; closing the windows with the same name; Before calling the multi-window processor to process the multiple windows according to the calling function, the method also includes: step 1, reading the name of each window and recording the total number of the multiple windows and the arrangement order of each window; step 2, counting the number of windows with the same name and the arrangement order of the windows with the same name; step 3, traversing all windows and closing the windows with the same name according to the arrangement order of the windows with the same name; and encapsulating steps 1, 2 and 3 in a functional manner to generate the multi-window processor.

2. The method according to claim 1, It is characterized in that The automated test scripts for obtaining management software include: Write and record test scripts with multi-window application scenarios through automated testing tools; The test script is generalized.

3. The method according to claim 1, It is characterized in that The method further comprises: If the multi-window processor fails to successfully process the multiple windows, continue to call the multi-window processor to process the multiple windows until the multi-window processor successfully processes the multiple windows.

4. An automated testing device for management software, It is characterized in that include: An acquisition unit is used to acquire automated test scripts for management software; A setting unit, used for setting a calling function in the automated test script and running the set automated test script to perform automated testing on the management software; A detection unit, configured to, during the automated test process, if it is detected that multiple windows are opened on the target interface of the management software, call a multi-window processor to process the multiple windows according to the calling function; An execution unit, configured to continue to execute the automated test after the multi-window processor processes the multiple windows; Wherein, the setting unit includes: a determination module, used to determine the windows with the same name among the multiple windows through the multi-window processor; an operation module, used to close the windows with the same name; The device also includes: a reading unit, which is used for, before calling the multi-window processor to process the multiple windows according to the calling function, in step 1, reading the name of each window and recording the total number of the multiple windows and the arrangement order of each window; a counting unit, which is used for step 2, counting the number of windows with the same name and the arrangement order of the windows with the same name; an operating unit, which is used for step 3, traversing all windows and closing the windows with the same name according to the arrangement order of the windows with the same name; and an encapsulation unit, which is used for functionally encapsulating steps 1, 2 and 3 to generate the multi-window processor.

5. A computer-readable storage medium, It is characterized in that The storage medium includes a stored program, wherein the program executes the automated testing method for management software according to any one of claims 1 to 3.

6. A processor, It is characterized in that The processor is used to run a program, wherein the program, when running, executes the automated testing method for management software according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Multi-window management method and system

    CN109151531A

  • Desktop operating system application starting time test method and system

    CN113590498A