Automatic testing method and device, terminal equipment and storage medium

By extracting test substeps and execution parameters in test cases, and automatically determining and replacing the test sequence, the problems of high dependence and low efficiency of test sequence conversion in the prior art are solved, and efficient consistency and rapid implementation of automated tests are achieved.

CN119065951APending Publication Date: 2024-12-03HAOMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310632935.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, the process of converting test cases into test sequences is highly dependent, the conversion results are low consistency, the conversion cycle is long and the efficiency is low, making it difficult to meet the growing testing needs.

Method used

By extracting each test substep and its execution parameters in the preset test case, the target test sequence is determined based on the correspondence between the test substep and the test sequence, and the operation parameters in the target test sequence are replaced with the execution parameters to generate an updated target test Sequence, embedded in an automated test system for automated testing.

Benefits of technology

Reliance on technicians has been reduced, labor investment costs have been saved, automated testing has been shortened, and conversion results have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065951A_ABST
    Figure CN119065951A_ABST
Patent Text Reader

Abstract

The invention is suitable for the field of testing, and provides an automatic testing method and device, terminal equipment and a storage medium, and the method comprises the steps: extracting each test sub-step in a preset test case and an execution parameter corresponding to each test sub-step; determining a target test sequence in one-to-one correspondence with each test sub-step according to the corresponding relationship between the test sub-steps and the test sequence; for each target test sequence, replacing a corresponding operation parameter in the target test sequence with the execution parameter to obtain an updated target test sequence; and embedding all the updated target test sequences into an automatic test system so as to carry out automatic test. The automatic testing method provided by the invention has the beneficial effects of low dependency on technicians, high consistency of conversion results, short conversion period, high conversion efficiency and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of automated testing technology, and in particular, relates to an automated testing method, apparatus, terminal device, and storage medium. Background Art

[0002] Before a product is put into use, it is necessary to conduct relevant test verification. The purpose of the test is to discover various potential errors and defects with the least manpower and time. The main means of testing at present is to convert test cases into test sequences and rely on test sequences to carry out the corresponding automated testing process. However, it is difficult to ensure the conversion efficiency and quality of test cases into test sequences manually. The reasons are as follows: First, the script syntax for writing test sequences is usually complicated, and engineers with certain programming skills are required to design and maintain them, which is highly dependent on technical personnel; second, due to the different understanding and mastery of test case conversion rules and programming languages ​​by different engineers, the consistency of conversion results cannot be guaranteed, and it is usually necessary to modify and debug repeatedly, which is inefficient; finally, if each test case is converted manually, the workload will be very large, which is difficult to meet the growing testing needs. Summary of the invention

[0003] The embodiments of the present application provide an automated testing method, apparatus, terminal device, and storage medium, which can solve the following problems: the manual conversion of test cases into test sequences is highly dependent on technicians, has low consistency in conversion results, a long conversion cycle, and low conversion efficiency.

[0004] In a first aspect, an embodiment of the present application provides an automated testing method, comprising:

[0005] Extract each test sub-step in the preset test case and the execution parameters corresponding to each test sub-step;

[0006] According to the correspondence between the test sub-steps and the test sequences, determine the target test sequence corresponding to each test sub-step one by one;

[0007] For each target test sequence, replacing the corresponding operation parameters in the target test sequence with the execution parameters to obtain an updated target test sequence;

[0008] All updated target test sequences are embedded into an automated testing system to perform automated testing.

[0009] In an optional embodiment, the test case is a table structure, and the test sub-step of extracting the preset test case includes:

[0010] Parsing the header field of each information attribute category in the table structure to determine the information attribute category of the corresponding test sub-step;

[0011] Extract the fields in each cell under the determined information attribute category to obtain each test sub-step.

[0012] In an optional embodiment, the automated testing method further includes:

[0013] Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0014] Compare all the segmented words in turn with the standardized test step description language database;

[0015] If all the word segments are successfully compared, a target test sequence corresponding to the test sub-step is determined according to the correspondence between the test sub-step and the test sequence.

[0016] In an optional embodiment, the automated testing method further includes:

[0017] Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0018] Compare all the segmented words with the standardized test step description language database in turn, and obtain the segmented words that have not been successfully matched;

[0019] Compare the unmatched segmented words based on the synonym database;

[0020] If the comparison is successful, the current test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step;

[0021] According to the correspondence between the updated test sub-steps and the test sequences, a target test sequence corresponding to the updated test sub-steps is determined.

[0022] In an optional embodiment, the automated testing method further includes:

[0023] comparing the similarity between the feature vector of the test sub-step and the feature vector of a standard test sub-step in a database;

[0024] If the similarity is greater than a preset value, the test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step;

[0025] According to the correspondence between the updated test sub-steps and the test sequences, a target test sequence corresponding to the updated test sub-steps is determined.

[0026] In an optional embodiment, the automated testing method further includes:

[0027] Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0028] Performing part-of-speech judgment on each of the participles to distinguish between verb-type participles and noun-type participles;

[0029] According to the verb-type participle and the noun-type participle, a gerund-noun correspondence table is searched to determine a target test sequence corresponding to the test sub-step.

[0030] In an optional embodiment, the automated testing method further includes:

[0031] Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0032] Performing part-of-speech judgment on each of the participles to distinguish between verb-type participles and noun-type participles;

[0033] According to the verb-type participle and the noun-type participle, a gerund-noun correspondence table is searched to obtain the participle that has not been successfully matched;

[0034] Compare the unmatched segmented words based on the synonym database;

[0035] If the comparison is successful, the current test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step;

[0036] According to the correspondence between the updated test sub-steps and the test sequences, a target test sequence corresponding to the updated test sub-steps is determined.

[0037] In a second aspect, an embodiment of the present application provides an automated testing device, comprising:

[0038] An extraction module, used to extract each test sub-step in a preset test case and the execution parameters corresponding to each test sub-step;

[0039] A test sequence determination module, used to determine a target test sequence corresponding to each test sub-step one by one according to the correspondence between the test sub-steps and the test sequence;

[0040] A test sequence updating module, configured to replace corresponding operation parameters in each target test sequence with the execution parameters to obtain an updated target test sequence;

[0041] The test module is used to embed all updated target test sequences into the automated test system to perform automated testing.

[0042] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described above is implemented.

[0044] Beneficial effects of this application

[0045] The present application provides an automated testing method, apparatus, terminal device and storage medium, which extract each test sub-step in a preset test case and the execution parameters corresponding to each test sub-step; determine a target test sequence corresponding to each test sub-step according to the correspondence between the test sub-step and the test sequence; for each target test sequence, use the execution parameters to replace the corresponding operation parameters in the target test sequence to obtain an updated target test sequence; and embed all the updated target test sequences into an automated testing system to perform automated testing.

[0046] By using the automated testing method proposed in the present application, test cases can be automatically converted into test sequences and embedded into an automated testing system for automated testing. Since the conversion process is automatic, there is no need to manually convert test cases one by one, thereby reducing dependence on the level of technical personnel and saving manpower investment costs. It can also shorten the implementation cycle of automated testing and improve automated testing efficiency. Moreover, since the same test sub-steps correspond to the same target test sequence, the consistency of the automated conversion results can be improved and the conversion quality can be guaranteed.

[0047] In summary, the automated testing method proposed in this application has the beneficial effects of low dependence on technicians, high consistency of conversion results, short conversion cycle and high conversion efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 It is a flowchart of an automated testing method provided by an embodiment of the present application;

[0050] Figure 2It is a flowchart of extracting test sub-steps in a preset test case provided by an embodiment of the present application;

[0051] Figure 3 This is one of the flowcharts of determining a target test sequence provided in an embodiment of the present application;

[0052] Figure 4 This is the second flowchart of determining a target test sequence provided by an embodiment of the present application;

[0053] Figure 5 This is the third flowchart of determining a target test sequence provided by an embodiment of the present application;

[0054] Figure 6 This is a fourth flowchart of determining a target test sequence provided by an embodiment of the present application;

[0055] Figure 7 This is the fifth flowchart of determining a target test sequence provided by an embodiment of the present application;

[0056] Figure 8 A schematic diagram of the structure of an automated testing device provided in an embodiment of the present application;

[0057] Fig. 9 A schematic diagram of the structure of an automated test terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0059] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0060] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0061] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0062] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0063] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0064] With the deepening of strategic planning such as "intelligent manufacturing" in China, my country's manufacturing industry is developing rapidly, steadily and scientifically, striving to develop in the direction of comprehensive digitalization, automation, networking and intelligence. However, in almost every link of the product development process, there are difficulties such as high labor costs, poor automation and low work efficiency. As one of the most important links in the manufacturing R&D and manufacturing process, whether it can achieve automated testing and automated testing, and whether it can improve test efficiency, ensure test quality and reduce personnel input are urgent problems that need to be solved.

[0065] The main means of testing at present is to convert test cases into test sequences, and then use the test sequences to carry out the corresponding automated testing process. However, it is difficult to guarantee the conversion efficiency and quality of test cases into test sequences manually for the following reasons: First, the script syntax for writing test sequences is usually complex, and engineers with certain programming skills are required to design and maintain them, which is highly dependent on technical personnel; second, due to the different understanding and mastery of test case conversion rules and programming languages ​​by different engineers, the consistency of conversion results cannot be guaranteed, and repeated modification and debugging are usually required, which is inefficient; finally, if each test case is converted manually, the workload will be very large, which is difficult to meet the growing testing needs.

[0066] Therefore, there are problems such as high reliance on technical personnel, low consistency of conversion results, long conversion cycle and low conversion efficiency in the manual conversion of test cases into test sequences.

[0067] The present application provides an automated testing method, apparatus, terminal device and storage medium, which extract each test sub-step in a preset test case and the execution parameters corresponding to each test sub-step; determine a target test sequence corresponding to each test sub-step according to the correspondence between the test sub-step and the test sequence; for each target test sequence, use the execution parameters to replace the corresponding operation parameters in the target test sequence to obtain an updated target test sequence; and embed all the updated target test sequences into an automated testing system to perform automated testing.

[0068] By using the automated testing method proposed in the present application, test cases can be automatically converted into test sequences and embedded into an automated testing system for automated testing. Since the conversion process is automatic, there is no need to manually convert test cases one by one, thereby reducing dependence on the level of technical personnel and saving manpower investment costs. It can also shorten the implementation cycle of automated testing and improve automated testing efficiency. Moreover, since the same test sub-steps correspond to the same target test sequence, the consistency of the automated conversion results can be improved and the conversion quality can be guaranteed.

[0069] In summary, the automated testing method proposed in this application has the beneficial effects of low dependence on technicians, high consistency of conversion results, short conversion cycle and high conversion efficiency.

[0070] In order to better understand the present invention, first, a brief introduction to automated testing is given. Automated testing is a process that converts human-driven test behavior into machine execution. Usually, after designing a test case and passing the review, the tester performs the test step by step according to the procedures described in the test case to obtain a comparison between the actual results and the expected results. In this process, in order to save manpower, time or hardware resources and improve test efficiency, the concept of automated testing is introduced.

[0071] In order to illustrate the technical solution of the present application, specific embodiments are provided below.

[0072] See also Figure 1 The process of an embodiment of the automated testing method shown, as an example but not a limitation, includes the following steps:

[0073] S1: extract each test sub-step in the preset test case and the execution parameters corresponding to each test sub-step;

[0074] S2: According to the correspondence between the test sub-steps and the test sequences, determine a target test sequence corresponding to each test sub-step one by one;

[0075] S3: for each target test sequence, replacing the corresponding operation parameters in the target test sequence with the execution parameters to obtain an updated target test sequence;

[0076] S4: Embed all updated target test sequences into the automated testing system to perform automated testing.

[0077] In the embodiments of the present application, a test case refers to a description of a test task for a specific software product, which embodies the test plan, method, technology and strategy. Simply put, a test case is a set of test inputs, execution conditions and expected results compiled for a specific goal, used to verify whether a specific software requirement is met; a test sequence is a machine language converted from a test case for embedding in an automated testing system.

[0078] When performing automated testing through the above method, since the same test sub-step corresponds to the same target test sequence, the target test sequence corresponding thereto can be determined by the test sub-step extracted from the test case, thereby ensuring the consistency of the conversion result, improving the conversion quality, and shortening the implementation cycle of automated testing; and, since the same test sub-step may have different execution parameters in different test processes, the present application also extracts the execution parameters corresponding to each test sub-step while extracting the test sub-steps in the test case, and replaces the corresponding operation parameters in the target test sequence with the execution parameters to obtain an updated target test sequence, and finally embeds the updated target test sequence into the automated testing system to complete the test. It can be seen from this that the above automated testing method does not rely on technicians to convert test cases into test sequences one by one, so the dependence on technicians can be reduced, and at the same time has the beneficial effects of short test cycle and high test efficiency.

[0079] In an optional embodiment of the present application, the test case is a table structure, see Figure 2 The process of extracting the test sub-steps in the preset test case provided by an embodiment of the present application is shown as an example but not a limitation, including the following steps:

[0080] S101: parsing the header field of each information attribute category in the table structure to determine the information attribute category of the corresponding test sub-step;

[0081] S102: Extract the fields in each cell under the determined information attribute category to obtain each test sub-step.

[0082] Each test sub-step is obtained by parsing the header field of each information attribute category in the table structure and extracting the field in each cell under the information attribute category corresponding to the test sub-step.

[0083] In a possible implementation, the test case includes: the file name of the test scenario Test_Senario_Scripts, the description of the test step Test_Step and the expected result Expect_Results. Parse the header field of each information attribute category in the table structure, determine that the column Test_Step is a test sub-step, then extract the fields in each cell under the information attribute category to obtain each test sub-step.

[0084] For example, in the test case shown in Table 1, the header field of each information attribute category in the table structure is parsed, and the Test_Step column is determined to be a test sub-step. Then, the fields in each cell under the information attribute category are extracted to obtain each test sub-step, including: (1) check the ACC status, (2) click Cruise once, (3) check the ACC status, (4) check the cruise speed value, (5) click cancel once, and (6) check the ACC status.

[0085] In the embodiments of the present application, each test sub-step in the test case is written in natural language, which can intuitively reflect the test intent and reduce reading and maintenance costs.

[0086]

[0087]

[0088] Table 1

[0089] Figure 3 This is one of the flowcharts of determining a target test sequence provided in an embodiment of the present application, which is provided as an example but not as a limitation, and includes the following steps:

[0090] S201: Perform word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0091] S202: comparing all the segmented words with the standardized test step description language database in sequence;

[0092] S203: If all the word segments are successfully compared, a target test sequence corresponding to the test sub-step is determined according to the correspondence between the test sub-step and the test sequence.

[0093] In step S201, a word segmentation process is performed for a certain test sub-step to obtain each word segmentation included in the test sub-step. When performing the word segmentation process, the word segmentation methods that can be used include: forward maximum matching method, reverse maximum matching method, minimum segmentation method or bidirectional maximum matching method, etc. This specification does not limit the word segmentation method.

[0094] Exemplarily, the process of word segmentation for the test sub-step "check ACC status" by the forward maximum matching method is as follows: Assume that Max_len=3, that is, the maximum length of a word is 3. The words in the preset dictionary are: "check", "check", "check", "ACC", "A", "C", "status", "state", and "state".

[0095] First, perform the first round of matching and enter "Check A". The matching process is as follows:

[0096] Take "Check A", scan the three-character words in the dictionary, no match, reduce the substring length by 1 to become "Check";

[0097] Take "Check", scan the two-character words in the dictionary, match successfully, output "Check";

[0098] Next, perform the second-round matching. Input "ACC", and the matching process is as follows:

[0099] Take the substring "ACC", scan the three-character words in the dictionary, match successfully, output "ACC";

[0100] Next, perform the third-round matching. Input "Status", and the matching process is as follows:

[0101] Take the substring "Status", scan the two-character words in the dictionary, match successfully, output "Status".

[0102] Finally, the result obtained by the forward maximum matching algorithm is: Check / ACC / Status.

[0103] Furthermore, compare the three word segments "Check", "ACC", and "Status" obtained in step S201 with the standardized test step description language database in sequence. If the standardized test step description language database includes the phrase unit composed of the three word segments Check / ACC / Status, the comparison is successful. Furthermore, according to the test sub-step "Check ACC Status" and the corresponding relationship between the test sub-step and the test sequence, the target test sequence corresponding to the test sub-step "Check ACC Status" can be determined.

[0104] Through the above process, the target test sequence corresponding to the test sub-step can be determined by using the method of word segment comparison.

[0105] Figure 4 It is the second flow schematic diagram for determining the target test sequence provided by an embodiment of the present application. By way of example and not limitation, it includes the following steps:

[0106] S211: Perform word segmentation processing on the test sub-step, and segment the test sub-step into at least one word segment;

[0107] S212: Compare all the word segments with the standardized test step description language database in sequence to obtain the word segments that are not successfully compared;

[0108] S213: Compare the word segments that are not successfully compared based on the synonym database;

[0109] S214: If the comparison is successful, replace the current test sub-step with the standard test sub-step to obtain the updated test sub-step;

[0110] S215: Determine a target test sequence corresponding to the updated test sub-step according to the correspondence between the updated test sub-step and the test sequence.

[0111] In the actual test case writing process, not all test sub-steps are written in a standardized test step description language. Non-standardized test step description languages ​​may appear. In order to accurately correspond to the test sequence, the test cases written in the non-standardized test step description languages ​​need to be processed. Through steps S211 to S215, the non-standardized descriptive words in the test sub-steps can be screened out, and it is determined whether they are synonyms with the standardized descriptive words. If they are synonyms, the non-standardized test sub-steps can be replaced by standard test sub-steps.

[0112] In a possible implementation, the synonym database includes words with the same or similar semantics as the standardized test step description language, different tenses and singular and plural forms of the same English word, uppercase and lowercase forms of the same English word, and abbreviations, full names or aliases of the same word.

[0113] For example, the non-standard test sub-step "detecting ACC status" is used as an example to explain the above process. First, the test sub-step "detecting ACC status" is segmented in step S211. The segmentation process is the same as that in step S201 and is not described here. After segmentation, three segmented words "detection", "ACC" and "status" are obtained.

[0114] Further, the three participles "detection", "ACC" and "status" obtained in step S211 are compared with the standardized test step description language database in turn. The standardized test step description language database includes a phrase unit consisting of three participles: check / ACC / status. The participles "ACC" and "status" are successfully compared, while the participle "check" may not be a successful participle. Further, the participle "check" that has not been successfully compared is compared based on the synonym database. The synonym database contains words "check", "inspection", "test" and "test" that are similar in meaning to the standard test step description word "detection", so the comparison is successful. Further, the current test sub-step "check ACC status" is replaced by the standard test sub-step "detect ACC status", and the target test sequence is determined based on the test sub-step "check ACC status" and the correspondence between the test sub-step and the test sequence.

[0115] By checking whether the distinguishing words between non-standard test sub-steps and standard test sub-steps are synonyms, it is possible to map non-standard test sub-steps to the correct test sequence. In this way, even if non-standard description languages ​​are used in the process of writing test cases, it will not affect the determination of the target test sequence.

[0116] Figure 5 This is a third flowchart of determining a target test sequence provided by an embodiment of the present application, which is provided as an example but not as a limitation, and includes the following steps:

[0117] S221: comparing the similarity between the feature vector of the test sub-step and the feature vector of a standard test sub-step in a database;

[0118] S222: If the similarity is greater than a preset value, replacing the test sub-step with the standard test sub-step to obtain an updated test sub-step;

[0119] S223: Determine a target test sequence corresponding to the updated test sub-step according to the correspondence between the updated test sub-step and the test sequence.

[0120] In the previous embodiment, the test sub-steps in the test case are segmented, and the segmented words are compared one by one with the text in the database to filter out non-standardized descriptive words. This method is suitable for scenarios with a small amount of text in the database. If the amount of text in the database is very large, we can compare the similarity between the feature vector of the test sub-step and the feature vector of the standard test step description language in the database, and when the similarity is greater than a preset value, replace the test sub-step with the standard test sub-step, and test the sequence according to the updated test sub-step target.

[0121] Specifically, in a possible implementation, the acquired test sub-step is firstly subjected to word segmentation processing, the processing process is as described above, and the word vector corresponding to each word segmentation is determined in the Word2vec model, and the mean of the word vector corresponding to each word segmentation is used as the feature vector; wherein the Word2vec model is a related model for generating word vectors, which can map each word segmentation in the text to a word vector;

[0122] For the standard test sub-step, the same method is used to determine the feature vector, that is, the standard test sub-step is segmented, and the word vector corresponding to each segmentation is determined in the Word2vec model, and finally the mean of the word vector corresponding to each segmentation is used as the feature vector;

[0123] Finally, the similarity between the feature vector of the test sub-step and the feature vector of the standard test sub-step is compared. If the step similarity comparison result is greater than a preset value, the test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step; and based on the correspondence between the updated test sub-step and the test sequence, the target test sequence corresponding to the updated test sub-step is determined.

[0124] In the above embodiment, there is no need to compare each word segment with the text in the database one by one, and only the similarity between feature vectors needs to be compared, thereby shortening the time required for the entire test process and improving the test efficiency.

[0125] In another possible implementation, since the feature vector of the standard test sub-step is used in each comparison, we can save it and directly call it in the subsequent use process, thereby reducing the calculation process and improving efficiency.

[0126] Figure 6 This is a fourth flowchart of determining a target test sequence provided by an embodiment of the present application, which is provided as an example but not as a limitation, and includes the following steps:

[0127] S231: Perform word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0128] S232: performing part-of-speech judgment on each of the participles to distinguish between verb-type participles and noun-type participles;

[0129] S233: Searching a gerund-noun correspondence table according to the verb-type participle and the noun-type participle to determine a target test sequence corresponding to the test sub-step.

[0130] In each test step, there is only one verb, and the participles after the verb are all noun attributes. Therefore, the target test sequence corresponding to the test sub-step can be determined by first locating the verb and then locating the noun.

[0131] In a possible implementation, taking the sub-step of “checking ACC status” extracted from the test case as an example, in step S231, firstly, it is segmented to obtain three segmentations of “check”, “ACC” and “status”;

[0132] In step S232, the part of speech is determined for each of the segmented words. For example, a lexical analysis tool may be called to tag the segmented words with the part of speech. For example, LAC (Lexical Analysis of Chinese) may be called. LAC is a joint lexical analysis tool developed by the Natural Language Processing Department of Baidu, which can realize functions such as Chinese segmentation, part of speech tagging, and proper name recognition. The tagging results are "Check / v", "ACC / n", and "Status / n".

[0133] In step S233, the gerund correspondence table is searched according to the verb type participle and the noun type participle. Exemplarily, the gerund correspondence table is shown in Table 2. First, the gerund correspondence table is searched according to the verb type participle, i.e., "check", and the first three rows of the table are located. Then, the gerund correspondence table is searched according to the noun type participle "ACC", and the first two rows of the table are located. Finally, the gerund correspondence table is searched according to the noun type participle "status", and the first row of the table is located, that is, the test sub-step is determined to be "check ACC status", and the corresponding target test sequence is determined according to the test sub-step being "check ACC status".

[0134] Through the above process, the test sequence corresponding to the test sub-step can be located according to the verbs and nouns in the test sub-step. Since there is only one verb in a test step, the relevant test sub-step can be quickly located through the verb, and then accurately located according to the noun participle. This method can quickly determine the test sequence corresponding to the test sub-step from the correspondence table.

[0135]

[0136] Table 2

[0137] Figure 7 This is a fifth flowchart of determining a target test sequence provided in an embodiment of the present application, which is provided as an example but not as a limitation, and includes the following steps:

[0138] S241: Perform word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation;

[0139] S242: performing part-of-speech judgment on each of the participles to distinguish between verb-type participles and noun-type participles;

[0140] S243: searching a gerund-noun correspondence table according to the verb-type participle and the noun-type participle to obtain the participle that has not been successfully matched;

[0141] S244: comparing the unmatched segmented words based on a synonym database, wherein the synonym database includes synonyms corresponding to a standardized test step description language;

[0142] S245: If the comparison is successful, the current test sub-step is replaced with the standard test sub-step to obtain an updated test sub-step;

[0143] S246: Determine a target test sequence corresponding to the updated test sub-step according to the correspondence between the updated test sub-step and the test sequence.

[0144] Also, in the actual test case writing process, not all test sub-steps are written in a standardized test step description language. Non-standardized test step description languages ​​may appear. In order to ensure that they still accurately correspond to the test sequence, the test cases written in non-standardized test step description languages ​​need to be processed.

[0145] In one possible implementation, non-standardized descriptive words in the test sub-steps are screened out and it is determined whether they are synonyms with the standardized descriptive words. If they are synonyms, standard test sub-steps can be used to replace the non-standard test sub-steps, and the target test sequence corresponding to the test sub-steps is determined based on the correspondence between the standard test sub-steps and the test sequences.

[0146] In a possible implementation, the synonym database includes words with the same or similar semantics as the standardized test step description language, different tenses and singular and plural forms of the same English word, uppercase and lowercase forms of the same English word, and abbreviations, full names or aliases of the same word.

[0147] For example, the non-standard test sub-step "detecting ACC status" is used as an example to explain the above process. First, the test sub-step "detecting ACC status" is segmented in step S241. The segmentation process is the same as that in step S201 and is not described here. After segmentation, three segmented words "detection", "ACC" and "status" are obtained.

[0148] In step S242, the part of speech is determined for each of the segmented words. This process is the same as that in step S232 and will not be repeated here. The final labeling results are "detection / v", "ACC / n", and "status / n".

[0149] In step S243, the gerund correspondence table is searched according to the verb type participle and the noun type participle. Exemplarily, the gerund correspondence table is shown in Table 2. First, the gerund correspondence table is searched according to the verb type participle, i.e., "detection". If the verb "detection" is not found in the table, the word "detection" is determined as a participle that has not been successfully matched; then, the gerund correspondence table is searched according to the noun type participle "ACC", and the first two rows of the table are located; finally, the gerund correspondence table is searched according to the noun type participle "condition". If the verb "condition" is not found in the table, the word "condition" is determined as a participle that has not been successfully matched. Through the above process, the participles that have not been successfully matched, i.e., "detection" and "condition", are obtained.

[0150] In step S244, the unmatched segmented word “check” is compared based on the synonym database, and the synonym database contains words “check”, “examination”, “test” and “test” that are similar in meaning to the standard test step description word “detection”, so the comparison is successful, that is, “check” and “detection” are recognized as synonyms; similarly, the unmatched segmented word “condition” is compared based on the synonym database, and the synonym database contains words “condition”, “situation” and “circumstance” that are similar in meaning to the standard test step description word “status”, so the comparison is successful, that is, “condition” and “status” are recognized as synonyms; through the above process, it can be recognized that the test sub-step “detect ACC condition” is the test sub-step “check ACC status”;

[0151] In step S245, the current test sub-step "check ACC status" is replaced by the standard test sub-step "detect ACC status", and the target test sequence is determined according to the test sub-step "check ACC status" and the correspondence between the test sub-step and the test sequence.

[0152] In step S246, according to the correspondence between the test sub-step "checking the ACC status" and the test sequence, the target test sequence corresponding to the test sub-step is determined.

[0153] Through the above process, it can be achieved that non-standard test sub-steps can also be mapped to the correct test sequence, so that even if a non-standard description language is used in the process of writing test cases, it will not affect the determination of the target test sequence.

[0154] Figure 8 An automated testing device provided in an embodiment of the present application includes:

[0155] An extraction module 301 is used to extract each test sub-step in a preset test case and execution parameters corresponding to each test sub-step;

[0156] A test sequence determination module 302, configured to determine a target test sequence corresponding to each test sub-step according to a correspondence between the test sub-steps and the test sequences;

[0157] A test sequence updating module 303 is used to replace the corresponding operation parameters in each target test sequence with the execution parameters to obtain an updated target test sequence;

[0158] The testing module 304 is used to embed all the updated target test sequences into the automated testing system to perform automated testing.

[0159] By using the above four modules in combination, when performing automated testing, since the same test sub-steps correspond to the same target test sequence, the target test sequence corresponding thereto can be determined by the test sub-steps extracted from the test case, thereby ensuring the consistency of the conversion result, improving the conversion quality, and shortening the implementation cycle of automated testing; and, since the same test sub-steps may have different execution parameters in different test processes, the present application extracts the execution parameters corresponding to each test sub-step while extracting the test sub-steps in the test case, and replaces the corresponding operation parameters in the target test sequence with the execution parameters to obtain an updated target test sequence, and finally embeds the updated target test sequence into the automated testing system to complete the test. It can be seen that the above automated testing device does not rely on technicians to convert test cases into test sequences one by one, so the dependence on technicians can be reduced, and at the same time has the beneficial effects of short test cycle and high test efficiency.

[0160] Fig. 9 The present invention provides a schematic diagram of the structure of an automated test terminal device. The terminal device 400 includes: at least one processor 401 ( Fig. 9 Only one is shown in the figure) a processor, a memory 402, and a computer program 403 stored in the memory 402 and executable on the at least one processor 401, and when the processor 401 executes the computer program 403, the steps in the above-mentioned automated testing method embodiment are implemented.

[0161] The terminal device 400 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Fig. 9 It is only an example of the terminal device 400 and does not constitute a limitation on the terminal device 400. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0162] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0163] In some embodiments, the memory 402 may be an internal storage unit of the terminal device 400, such as a hard disk or memory of the terminal device 400. In other embodiments, the memory 402 may also be an external storage device of the terminal device 400, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 400. Further, the memory 402 may also include both an internal storage unit of the terminal device 400 and an external storage device. The memory 402 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 402 may also be used to temporarily store data that has been output or is to be output.

[0164] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0165] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0166] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0167] If the integrated unit 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. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0168] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0169] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0170] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0172] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An automated testing method, It is characterized in that include: Extract each test sub-step in the preset test case and the execution parameters corresponding to each test sub-step; According to the correspondence between the test sub-steps and the test sequences, determine the target test sequence corresponding to each test sub-step one by one; For each target test sequence, replacing the corresponding operation parameters in the target test sequence with the execution parameters to obtain an updated target test sequence; All updated target test sequences are embedded into an automated testing system to perform automated testing.

2. The automated testing method according to claim 1, It is characterized in that The test case is a table structure, and the test sub-steps of extracting the preset test case include: Parsing the header field of each information attribute category in the table structure to determine the information attribute category of the corresponding test sub-step; Extract the fields in each cell under the determined information attribute category to obtain each test sub-step.

3. The automated testing method according to claim 1, It is characterized in that The automated testing method further comprises: Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation; Compare all the segmented words in turn with the standardized test step description language database; If all the word segments are successfully compared, a target test sequence corresponding to the test sub-step is determined according to the correspondence between the test sub-step and the test sequence.

4. The automated testing method according to claim 1, It is characterized in that The automated testing method further comprises: Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation; Compare all the segmented words with the standardized test step description language database in turn, and obtain the segmented words that have not been successfully matched; Compare the unmatched segmented words based on the synonym database; If the comparison is successful, the current test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step; According to the correspondence between the updated test sub-steps and the test sequences, a target test sequence corresponding to the updated test sub-steps is determined.

5. The automated testing method according to claim 1, It is characterized in that The automated testing method further comprises: comparing the similarity between the feature vector of the test sub-step and the feature vector of a standard test sub-step in a database; If the similarity is greater than a preset value, the test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step; According to the correspondence between the updated test sub-steps and the test sequences, a target test sequence corresponding to the updated test sub-steps is determined.

6. The automated testing method according to claim 1, It is characterized in that The automated testing method further comprises: Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation; Performing part-of-speech judgment on each of the participles to distinguish between verb-type participles and noun-type participles; According to the verb-type participle and the noun-type participle, a gerund-noun correspondence table is searched to determine a target test sequence corresponding to the test sub-step.

7. The automated testing method according to claim 1, It is characterized in that The automated testing method further comprises: Performing word segmentation processing on the test sub-step, dividing the test sub-step into at least one word segmentation; Performing part-of-speech judgment on each of the participles to distinguish between verb-type participles and noun-type participles; According to the verb-type participle and the noun-type participle, a gerund-noun correspondence table is searched to obtain the participle that has not been successfully matched; Compare the unmatched segmented words based on the synonym database; If the comparison is successful, the current test sub-step is replaced by the standard test sub-step to obtain an updated test sub-step; According to the correspondence between the updated test sub-steps and the test sequences, a target test sequence corresponding to the updated test sub-steps is determined.

8. An automated testing device, It is characterized in that include: An extraction module, used to extract each test sub-step in a preset test case and the execution parameters corresponding to each test sub-step; A test sequence determination module, used to determine a target test sequence corresponding to each test sub-step one by one according to the correspondence between the test sub-steps and the test sequence; A test sequence updating module, configured to replace corresponding operation parameters in each target test sequence with the execution parameters to obtain an updated target test sequence; The test module is used to embed all updated target test sequences into the automated test system to perform automated testing.

9. An automated test terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.