Automated Test Process Generation Method, Device, and Computer-Readable Storage Medium

By performing label numbering, dictionary format conversion and operation priority adjustment on the test case set, dynamic and selectable test processes are generated, which solves the shortcomings of existing automated testing methods in terms of selectivity and dynamicity, and achieves more efficient test process management.

CN111400190BActive Publication Date: 2025-06-27PING AN BANK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010216919.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-25
Publication Date
2025-06-27
Estimated Expiration
2040-03-25

AI Technical Summary

Technical Problem

The existing automated testing methods have shortcomings in terms of test selectivity and dynamicity, and when the test process changes, the script code needs to be re-modified, which takes up more manpower and time.

Method used

Through the test case set and automated test framework that receives user input, label numbering, missing value filling, dictionary format conversion, dictionary hierarchy division and operation priority adjustment are generated to generate dynamic and selectable test processes.

Benefits of technology

It improves the selectivity and dynamicity of the test process, reduces the investment in manpower and time, and can flexibly adjust the test process according to user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111400190B_ABST
    Figure CN111400190B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating an automated test process, including: receiving a test case set input by a user client and a selected automated test framework, inputting the test case set into the automated test framework, within the automated test framework, performing label numbering on the test case set to obtain a test case label set, performing missing value filling and dictionary format conversion on the test case label set to obtain a dictionary test label set, performing dictionary level division on the dictionary test label set to obtain hierarchical test labels, and adjusting the operation priority of the hierarchical test labels to obtain a test process. The present invention also proposes an automated test process generation device, an electronic device, and a computer-readable storage medium. The present invention can improve the selectivity and dynamicity of the test process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of testing, and in particular, to a method, apparatus, electronic device, and computer-readable storage medium for generating an automated test process. Background Art

[0002] With the continuous development of automated testing technology, more and more automated testing methods have emerged. However, most current automated testing methods are based on pre-written test scripts for testing, so the selectivity and dynamics of testing are poor. Secondly, since most automated testing methods are based on pre-written test scripts, if the test process changes, the script code needs to be modified again, thus consuming a lot of manpower and time. Summary of the Invention

[0003] The present invention provides a method, apparatus, electronic device, and computer-readable storage medium for generating an automated test process, and its main purpose is to improve the selectivity and dynamics of the test process.

[0004] To achieve the above object, an automated test process generation method provided by the present invention includes:

[0005] Receiving a test case set and a selected automated test framework input by a user client;

[0006] Inputting the test case set into the automated test framework, and performing the following operations in the automated test framework:

[0007] Numbering tags for the test case set to obtain a test case tag set;

[0008] Performing missing value filling and dictionary format conversion on the test case tag set to obtain a dictionary test tag set;

[0009] Performing dictionary level division on the dictionary test tag set to obtain hierarchical test tags;

[0010] Adjusting the operation priority of the hierarchical test tags to obtain a test process.

[0011] Optionally, the test case set includes multiple test cases and the test order of the multiple test cases.

[0012] Optionally, the numbering tags for the test case set to obtain a test case tag set includes:

[0013] According to the test order of the test cases in the test case set, using a preset test branch division rule to group each test case into test branches to obtain one or more test branch groups;

[0014] Number the test cases in the one or more test branch groups to obtain the test case tag set.

[0015] Optionally, the test process numbering includes a test case set number, a test branch group number, a test branch group identifier, and a test following case identifier.

[0016] Optionally, the hierarchical test tags are obtained by hierarchically partitioning the dictionary test tag set, including:

[0017] Perform dictionary syntax verification on the dictionary test tag set;

[0018] Partition the standard dictionary test tag set into one or more groups of dictionary test tag sets according to the test branch group number;

[0019] Select corresponding standard dictionary test tags from the standard dictionary test tag set according to the test branch group identifier and the test following case identifier to fill the dictionary test tag set to obtain hierarchical test tags.

[0020] Optionally, the automated test framework includes Tellurium test framework, wtd test framework, QTP test framework, and Robot Framework test framework.

[0021] Optionally, the method further includes:

[0022] Call test cases from the test case set in sequence according to the test process for automated testing.

[0023] To solve the above problems, the present invention also provides an automated test process generation device, the device includes:

[0024] A label numbering module, configured to receive a test case set input by a user client and a selected automated test framework, input the test case set into the automated test framework, and perform the following operations in the automated test framework: number the test cases to obtain a test case tag set;

[0025] A dictionary format conversion module, configured to perform missing value filling and dictionary format conversion on the test case tag set to obtain a dictionary test tag set;

[0026] A dictionary hierarchical partitioning module, configured to hierarchically partition the dictionary test tag set to obtain hierarchical test tags;

[0027] An operation priority adjustment module, configured to adjust the operation priority of the hierarchical test tags to obtain a test process.

[0028] To solve the above problems, the present invention also provides an electronic device, which includes:

[0029] a memory for storing at least one instruction; and

[0030] a processor for executing the instruction stored in the memory to implement the automated test process generation method described in any one of the above.

[0031] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the automated test process generation method described in any one of the above.

[0032] The embodiments of the present invention rely on the written test scripts. mainly by numbering the test case set with labels and converting it into a dictionary test label set in dictionary format. At the same time, through dictionary level division and operation priority adjustment, a test process that meets the user's requirements can be generated. Because the dictionary level division and operation priority adjustment can be freely adjusted according to the user's needs, with strong dynamics and high selectivity. Therefore, the automated test process generation method, device and computer-readable storage medium proposed by the present invention can improve the selectivity and dynamics of the test process. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flowchart of the automated test process generation method provided by an embodiment of the present invention;

[0034] Figure 2 is a case diagram of the automated test process generation method provided by an embodiment of the present invention;

[0035] Figure 3 is a module diagram of the automated test process generation method provided by an embodiment of the present invention;

[0036] Figure 4 is an internal structure diagram of an electronic device for the automated test process generation method provided by an embodiment of the present invention;

[0037] The implementation, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0039] The present invention provides an automated test process generation method. Refer to Figure 1As shown in the figure, it is a schematic flowchart of a method for generating an automated test process provided by an embodiment of the present invention. This method can be executed by a device, and the device can be implemented by software and / or hardware.

[0040] In this embodiment, the method for generating an automated test process includes:

[0041] S1. Receive a test case set input by a user client and a selected automated test framework.

[0042] The automated test framework is a framework for generating a simulation environment corresponding to the test case set. The automated test framework can adopt currently publicly available ones such as Tellurium, wtd, QTP, and Robot Framework. For example, within the Robot Framework automated test framework, operations such as simulating mouse and keyboard clicks or operating the computer, simulating voice for the computer to receive and store, simulating automatically opening a browser in the computer, and simulating the computer automatically shutting down are performed to determine the correctness when the computer program is running.

[0043] Such as the above-mentioned simulating mouse and keyboard clicks, simulating voice, simulating automatically opening a browser in the computer, simulating the computer automatically shutting down, etc. are all test cases, and further form the test case set. Further, the test case set includes different test cases and the test order between different cases. For example, if the user selects Robot Framework as the automated test framework and inputs Figure 2 the shown test case set, which includes 8 test cases and the test order of 8 test cases. Among them, RF is the abbreviation of the Robot Framework automated test framework. For example, RF case 1 represents simulating mouse and keyboard clicks, RF case 2 represents simulating voice for the computer to receive, RF case 3 represents simulating automatically opening a browser in the computer, etc.

[0044] S2. Input the test case set into the automated test framework and perform the following operations within the automated test framework: Number the test cases in the test case set to obtain a test case label set.

[0045] The main reason for inputting the test case set into the automated test framework is that it is necessary to use the automated test framework to provide a simulation environment to debug the test process of the test case set.

[0046] Specifically, numbering the test cases in the test case set to obtain a test case label set includes: According to the test order of each test case in the test case set, and according to the preset test branch division rules, divide each test case into one or more test branch groups, and number the test cases in the one or more test branch groups to obtain the test case label set.

[0047] The test process number includes: the test case set number, the test branch group number, the test branch group identifier, and the test follow-up case identifier.

[0048] Furthermore, the test branch division rule and the test process number can be Figure 2 illustrated by way of example according to the case diagram. For example, RF case 1 (indicating simulating mouse and keyboard clicks) is tested first. After the test of RF case 1 is completed, RF case 2 (simulating voice for the computer to receive) or RF case 3 (simulating automatically opening the browser in the computer) can be selectively tested. Therefore, RF case 1 is in the first test branch group, and RF case 2 and RF case 3 are in the second test branch group. Since there is only RF case 1 in the first test branch group, the test process number of RF case 1 is fseq:001_eseq:001_tflag:1. RF case 2 and RF case 3 are in the second test branch group, and there is no indication of which one is tested first between RF case 2 and RF case 3. Therefore, the test process numbers of RF case 2 and RF case 3 are both fseq:001_eseq:002_tflag:2. Among them, fseq:001 represents the number of the test case set, eseq represents the test branch group identifier. For example, eseq:001 means RF case 1 is in the first test branch group, and eseq:002 means both RF case 2 and RF case 3 are in the second test branch group. tflag:1 represents the test branch group number. For example, tflag:1 means RF case 1 is in the first test branch group, and RF case 2 and RF case 3 are in the second test branch group. Furthermore, on the premise that the test process number of RF case 1 is fseq:001_eseq:001, RF case 2 and RF case 3 follow immediately. Therefore, the test process number of RF case 1 can be increased to fseq:001_eseq:001_tflag:1_sum:2, indicating that after RF case 1, there are RF case 2 and RF case 3 waiting to be tested, and sum represents the test follow-up case identifier. Similarly, the test process number of RF case 2 is fseq:001_eseq:002_tflag:2_sum:3, and the test process number of RF case 3 is fseq:001_eseq:002_tflag:2_sum:1. Summarizing each test process number gives the test case label set.

[0049] S3. Fill in the missing values of the test case label set and convert it into a dictionary format to obtain a dictionary test label set.

[0050] Such as Figure 2As shown, if the test process number of RF case 7 generated in step S2 is fseq:001_eseq:003_sum:0, since the tflag test branch group number is missing compared with the above fseq:001_eseq:002_tflag:2_sum:1, the missing value filling operation is intelligently filled according to the preset form of the test process number. For example, the test process number of RF case 7, fseq:001_eseq:002_sum:0, after the missing value filling operation, becomes fseq:001_eseq:003_tflag:3_sum:0.

[0051] The dictionary format conversion needs to be correspondingly converted according to the programming language it depends on. For example, the dictionary form of the Python language is {key1:value,key2:value,key3:value,...}, then the dictionary form of the test process number of RF case 3 is {fseq:001,eseq:002,tflag:2,sum:1}.

[0052] S4. Perform dictionary-level partitioning on the dictionary test tag set to obtain hierarchical test tags.

[0053] Specifically, S4 includes: performing dictionary syntax verification on the dictionary test tag set to obtain a standard dictionary test tag set, dividing the standard dictionary test tag set into one or more sub-dictionary test tag sets according to the test branch group number, selecting corresponding standard dictionary test tags from the standard dictionary test tag set according to the test branch group identifier and the test follow-up case identifier to fill the sub-dictionary test tag set, and putting the filled sub-dictionary test tag set into a dictionary to obtain hierarchical test tags.

[0054] The dictionary syntax verification needs to be based on the syntax rules of the programming language it depends on. For example, the dictionary form of the Python language is {key1:value,key2:value,key3:value,...}. When the test process number of RF case 3 is converted into the dictionary form {fseq:001eseq:002,tflag:2,sum:1}, a comma is missing. Therefore, a comma is added between the numbers and letters to become {fseq:001,eseq:002,tflag:2,sum:1}.

[0055] The dictionary test tags corresponding to the above RF case 1 are {fseq:001,eseq:001,tflag:1,sum:2}, the dictionary test tags corresponding to RF case 2 are {fseq:001,eseq:002,tflag:2,sum:3}, the dictionary test tags corresponding to RF case 3 are {fseq:001,eseq:002,tflag:2,sum:1}, and the dictionary test tags of RF case 7 are {fseq:001,eseq:003,tflag:3,sum:0}. The total number of the test branch group numbers tflag is 1, 2, 3. Therefore, the number of groups of the sub-dictionary test tags is 3. Further, the first group is: {fseq:001,eseq:001,tflag:1,sum:2}, the second group is {fseq:001,eseq:002,tflag:2,sum:3}, {fseq:001,eseq:002,tflag:2,sum:1}, and the third group is {fseq:001,eseq:003,tflag:3,sum:0}… Further, for the sub-dictionary test tag {fseq:001,eseq:002,tflag:2,sum:1} in the second group, according to the test branch group identifier, it is known that there are eseq:001 and eseq:003 before eseq:002. Therefore, {fseq:001,eseq:002,tflag:2,sum:1} is filled as {fseq:001,eseq:001_002_003,tflag:2,sum:1}. According to the test following use case identifier, it is known that there is another test case behind. Therefore, {fseq:001,eseq:001_002_003,tflag:2,sum:1} can be further filled as {fseq:001,eseq:001_002_003,tflag:2,sum:1:fseq:001,eseq:003,tflag:3,sum:0}.

[0056] Further, each sub-dictionary test tag is placed in a dictionary to obtain a hierarchical test tag. Therefore, in the following, only the hierarchical test tag needs to be operated on.

[0057] S5. Adjust the operation priority of the hierarchical test tag to obtain a test process.

[0058] There are various adjustment methods for the operation priority adjustment. For example, the priority can be adjusted according to the importance ranking of test cases in the test case set pre-set by the user. For example, the user wants to test RF case 2 first and then test RF case 3. It can also be adjusted according to the test following case identifier. For example, there are 3 test following case identifiers after RF case 2, and RF case 2 and the subsequent 3 test following case identifiers are tested first.

[0059] The operation priority can adopt the left-to-right method. For example, within the hierarchical test label, the priority on the left must be higher than that on the right. Therefore, after the test case on the left is completed, the test case adjacent to the left is continued to be tested.

[0060] Further, when there is a test need, test cases can be called from the test case set in sequence according to the test process for automated testing.

[0061] As Figure 3 shown, it is a functional module diagram of the automated test process generation device of the present invention.

[0062] The automated test process generation 100 of the present invention can be installed in an electronic device. According to the implemented functions, the automated test process generation device may include a label numbering module 101, a dictionary format conversion module 102, a dictionary hierarchical division module 103, and an operation priority adjustment 104. The modules of the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0063] In this embodiment, the functions of each module / unit are as follows:

[0064] The label numbering module 101 is used to receive the test case set input by the user client and the selected automated test framework, input the test case set into the automated test framework, and perform label numbering on the test case set to obtain a test case label set;

[0065] The dictionary format conversion module 102 is used to perform missing value filling and dictionary format conversion on the test case label set to obtain a dictionary test label set;

[0066] The dictionary hierarchical division module 103 is used to perform dictionary hierarchical division on the dictionary test label set to obtain a hierarchical test label;

[0067] The operation priority adjustment module 104 is used to perform operation priority adjustment on the hierarchical test label to obtain a test process.

[0068] Specifically, the specific implementation steps of each module of the automated test process generation device are as follows:

[0069] The text vectorization module 101 receives a test case set input by a user client and a selected automated test framework, inputs the test case set into the automated test framework, and performs the following operations in the automated test framework: numbering the test cases in the test case set to obtain a test case label set.

[0070] The automated test framework is one that generates a simulation environment corresponding to the test case set. The automated test framework can adopt currently publicly available ones such as Tellurium, wtd, QTP, and Robot Framework. For example, in the RobotFramework automated test framework, operations such as simulating mouse and keyboard clicks or operating the computer, simulating speech for the computer to receive and store, simulating automatically opening a browser in the computer, and simulating the computer automatically shutting down are performed to determine the correctness when the computer program is running.

[0071] Operations such as the above-mentioned simulating mouse and keyboard clicks, simulating speech, simulating automatically opening a browser in the computer, and simulating the computer automatically shutting down are all test cases, and further form the test case set. Further, the test case set includes different test cases and the test order between different cases. For example, if the user selects Robot Framework as the automated test framework and inputs Figure 2 the displayed test case set, which includes 8 test cases and the test order of 8 test cases. Among them, RF is the abbreviation of the Robot Framework automated test framework. For example, RF case 1 represents simulating mouse and keyboard clicks, RF case 2 represents simulating speech for the computer to receive, and RF case 3 represents simulating automatically opening a browser in the computer, etc.

[0072] The reason for inputting the test case set into the automated test framework is mainly that it is necessary to use the automated test framework to provide a simulation environment to debug the test process of the test case set.

[0073] Specifically, numbering the test cases in the test case set to obtain a test case label set includes: according to the test order of each test case in the test case set, and according to the preset test branch division rule, dividing each test case into test branches to obtain one or more test branch groups, and numbering the test cases in the one or more test branch groups to obtain the test case label set.

[0074] The test process numbering includes: test case set number, test branch group number, test branch group identifier, and test following case identifier.

[0075] Further, the test branch division rule and the test process numbering can be based on Figure 2Illustrated as follows, for example, RF case 1 (indicating simulating mouse and keyboard clicks) is tested first. After the test of RF case 1 is completed, it is optional to test RF case 2 (simulating voice for the computer to receive) or RF case 3 (simulating automatically opening the browser in the computer). Therefore, RF case 1 is in the first test branch group, and RF case 2 and RF case 3 are in the second test branch group. Since there is only RF case 1 in the first test branch group, the test process number of RF case 1 is fseq:001_eseq:001_tflag:1. RF case 2 and RF case 3 are in the second test branch group, and there is no indication of which one is tested first between RF case 2 and RF case 3. Therefore, the test process numbers of RF case 2 and RF case 3 are both fseq:001_eseq:002_tflag:2. Among them, fseq:001 represents the number of the test case set, eseq represents the test branch group identifier. For example, eseq:001 means RF case 1 is in the first test branch group, and eseq:002 means both RF case 2 and RF case 3 are in the second test branch group. tflag:1 represents the test branch group number. For example, tflag:1 means RF case 1 is in the first test branch group, and RF case 2 and RF case 3 are in the second test branch group. Further, on the premise that the test process number of RF case 1 is fseq:001_eseq:001, RF case 2 and RF case 3 follow immediately. Therefore, the test process number of RF case 1 can be increased to fseq:001_eseq:001_tflag:1_sum:2, indicating that after RF case 1, there are RF case 2 and RF case 3 waiting to be tested, and sum represents the test following case identifier. Similarly, the test process number of RF case 2 is fseq:001_eseq:002_tflag:2_sum:3, and the test process number of RF case 3 is fseq:001_eseq:002_tflag:2_sum:1. Summarize each test process number to obtain the test case label set.

[0076] The dictionary format conversion module 102 fills in the missing values of the test case label set and converts it into a dictionary test label set.

[0077] Such as Figure 2As shown, if the test process number of the generated RF case 7 is fseq:001_eseq:003_sum:0, since the tflag test branch group number is missing compared with the above fseq:001_eseq:002_tflag:2_sum:1, the missing value filling operation is intelligently filled according to the preset form of the test process number. For example, the test process number of RF case 7, fseq:001_eseq:002_sum:0, after the missing value filling operation, gets fseq:001_eseq:003_tflag:3_sum:0.

[0078] The dictionary format conversion needs to be correspondingly converted according to the dependent programming language. For example, the dictionary form of the Python language is {key1:value,key2:value,key3:value,...}, then the dictionary form of the test process number of RF case 3 is {fseq:001,eseq:002,tflag:2,sum:1}.

[0079] The dictionary level division module 103 divides the dictionary test label set into hierarchical test labels.

[0080] Specifically, the dictionary level division module includes: performing dictionary syntax verification on the dictionary test label set to obtain a standard dictionary test label set, dividing the standard dictionary test label set into one or more sub-dictionary test label sets according to the test branch group number, selecting corresponding standard dictionary test labels from the standard dictionary test label set according to the test branch group identifier and the test follow-up case identifier to fill the sub-dictionary test label sets, and putting the filled sub-dictionary test label sets into a dictionary to obtain hierarchical test labels.

[0081] The dictionary syntax verification needs to be based on the syntax rules of the dependent programming language. For example, the dictionary form of the Python language is {key1:value,key2:value,key3:value,...}, when the test process number of RF case 3 is converted into the dictionary form {fseq:001eseq:002,tflag:2,sum:1}, a comma is missing. Therefore, a comma is added between the numbers and letters to become {fseq:001,eseq:002,tflag:2,sum:1}.

[0082] As described above, the dictionary test tags corresponding to RF case 1 are {fseq:001,eseq:001,tflag:1,sum:2}, the dictionary test tags corresponding to RF case 2 are {fseq:001,eseq:002,tflag:2,sum:3}, the dictionary test tags corresponding to RF case 3 are {fseq:001,eseq:002,tflag:2,sum:1}, and the dictionary test tags of RF case 7 are {fseq:001,eseq:003,tflag:3,sum:0}. The total number of the test branch group numbers tflag is 1, 2, 3. Therefore, the number of groups of the sub-dictionary test tags is 3. Further, the first group is: {fseq:001,eseq:001,tflag:1,sum:2}, the second group is {fseq:001,eseq:002,tflag:2,sum:3}, {fseq:001,eseq:002,tflag:2,sum:1}, and the third group is {fseq:001,eseq:003,tflag:3,sum:0}… Further, for the sub-dictionary test tag {fseq:001,eseq:002,tflag:2,sum:1} in the second group, according to the test branch group identifier, it is known that there are eseq:001 and eseq:003 before eseq:002. Therefore, {fseq:001,eseq:002,tflag:2,sum:1} is filled as {fseq:001,eseq:001_002_003,tflag:2,sum:1}. According to the test following use case identifier, it is known that there is another test case after it. Therefore, {fseq:001,eseq:001_002_003,tflag:2,sum:1} can be further filled as {fseq:001,eseq:001_002_003,tflag:2,sum:1:fseq:001,eseq:003,tflag:3,sum:0}.

[0083] Further, each sub-dictionary test tag is placed in a dictionary to obtain a hierarchical test tag. Therefore, in the follow-up, only the hierarchical test tag needs to be operated on.

[0084] The operation priority adjustment module 104 adjusts the operation priority of the hierarchical test tag to obtain a test process.

[0085] There are various ways to adjust the operation priority. For example, the priority can be adjusted according to the importance ranking of test cases pre-set by the user in the test case set. For instance, if the user wants to test RF case 2 first and then test RF case 3. It can also be adjusted according to the test following case identifier. For example, there are 3 test following case identifiers after RF case 2, and RF case 2 and the subsequent 3 test following case identifiers are tested first.

[0086] The operation priority can be in the left-to-right manner. For example, within the hierarchical test label, the priority on the left is definitely higher than that on the right. Therefore, after the left test case is tested, the test case adjacent to the left is continued to be tested.

[0087] Further, when there is a test need, test cases can be called from the test case set in sequence according to the test process for automated testing.

[0088] As Figure 4 shown, it is a schematic structural diagram of an electronic device for implementing the method for generating an automated test process of the present invention.

[0089] The electronic device 1 may include a processor 12, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and operable on the processor 12.

[0090] Among them, the memory 11 includes at least one type of readable storage medium. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as the mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 1. Further, the memory 11 may also include both the internal storage unit and the external storage device of the electronic device 1. The memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as the code for generating an automated test process, etc., but also be used to temporarily store data that has been output or will be output.

[0091] In some embodiments, the processor 12 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including the combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 12 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and circuits. By running or executing programs or modules stored in the memory 11 (such as executing automated test process generation, etc.), and calling data stored in the memory 11, it performs various functions of the electronic device 1 and processes data.

[0092] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable connection communication between the memory 11 and at least one processor 12, etc.

[0093] Figure 4 Only the electronic device with components is shown. Those skilled in the art can understand that, Figure 4 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have a different component layout.

[0094] For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for powering each component. Preferably, the power source can be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device 1 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0095] Furthermore, the electronic device 1 may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0096] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.

[0097] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0098] The request automation test process generation 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, which can be implemented when running in the processor 10:

[0099] Receiving a test case set input by a user client and a selected automation test framework.

[0100] Inputting the test case set into the automation test framework and performing the following operations in the automation test framework:

[0101] Numbering the test case set with labels to obtain a test case label set.

[0102] Filling in missing values and converting the test case label set into a dictionary format to obtain a dictionary test label set.

[0103] Dividing the dictionary test label set into dictionary levels to obtain hierarchical test labels.

[0104] Adjusting the operation priority of the hierarchical test labels to obtain a test process.

[0105] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 the description of the relevant steps in the corresponding embodiments, which will not be elaborated here.

[0106] Furthermore, if the integrated module / unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory).

[0107] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.

[0108] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0110] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0111] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be encompassed by the present invention. Any reference signs in the claims should not be regarded as limiting the claimed rights.

[0112] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or apparatuses stated in the system claims can also be implemented by one unit or apparatus through software or hardware. Words such as "second" are used to denote names and do not denote any particular order.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An automated test process generation method, characterized in that, The method includes: Receiving a test case set input by a user client and a selected automated test framework; Inputting the test case set into the automated test framework and performing the following operations within the automated test framework: According to the test order of the test cases in the test case set, using a preset test branch division rule to group each test case into test branches, obtaining one or more test branch groups, numbering the test cases in the one or more test branch groups for the test process to obtain a test case label set, where the test process numbering includes a test case set number, a test branch group number, a test branch group identifier, and a test following case identifier; Performing missing value filling and dictionary format conversion on the test case label set to obtain a dictionary test label set; Performing dictionary syntax verification on the dictionary test label set to obtain a standard dictionary test label set, dividing the standard dictionary test label set into one or more sub-dictionary test label sets according to the test branch group number, selecting corresponding standard dictionary test labels from the standard dictionary test label set according to the test branch group identifier and the test following case identifier to fill the sub-dictionary test label sets, and placing the filled sub-dictionary test label sets in a preset dictionary to obtain hierarchical test labels; Adjusting the operation priority of the hierarchical test labels to obtain a test process.

2. The automated test process generation method according to claim 1, wherein The test case set includes multiple test cases and the test order of the multiple test cases.

3. The automated test process generation method according to any one of claims 1 to 2, characterized in that, The automated test framework includes Tellurium test framework, wtd test framework, QTP test framework, and Robot Framework test framework.

4. The automated test process generation method according to any one of claims 1 to 2, characterized in that, The method further includes: Sequentially calling test cases from the test case set for automated testing according to the test process.

5. An automated test process generation device, characterized in that, The device includes: A label numbering module, configured to receive a test case set input by a user client and a selected automated test framework, input the test case set into the automated test framework, and perform the following operations within the automated test framework: According to the test order of the test cases in the test case set, using a preset test branch division rule to group each test case into test branches, obtaining one or more test branch groups, numbering the test cases in the one or more test branch groups for the test process to obtain a test case label set, where the test process numbering includes a test case set number, a test branch group number, a test branch group identifier, and a test following case identifier; A dictionary format conversion module, configured to perform missing value filling and dictionary format conversion on the test case label set to obtain a dictionary test label set; A dictionary level division module, configured to perform dictionary syntax verification on the dictionary test tag set to obtain a standard dictionary test tag set, divide the standard dictionary test tag set into one or more sub-dictionary test tag sets according to the test branch group number, select corresponding standard dictionary test tags from the standard dictionary test tag set according to the test branch group identifier and the test following use case identifier to fill the sub-dictionary test tag set, and place the filled sub-dictionary test tag set in a preset dictionary to obtain hierarchical test tags; An operation priority adjustment module, configured to adjust the operation priority of the hierarchical test tags to obtain a test process.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the automated test process generation method according to any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the automated test process generation method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and equipment for constructing test case set

    CN106980571A

  • Test case file conversion method and device, electronic device and storage medium

    CN110597708A

  • Test case generation method and device

    CN110716865A