Automatic test execution method, platform and equipment based on use case template and medium

Through automated test execution methods based on use case templates, automatic screening and execution of use cases are solved, and the problem of long output time for test case screening and reporting in the product development stage is improved, and testing efficiency and quality are improved.

CN119166530APending Publication Date: 2024-12-20SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411335662.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

During the product development stage, the demand scenarios faced by the test continue to change, resulting in a lot of time spent on test case screening and test report output, affecting the testing efficiency and unable to ensure the quality of the test.

Method used

Using an automated test execution method based on use case templates, automatically filter and execute use cases and generate test reports to reduce manual intervention and write test case sets by analyzing the use case basic data templates, test report statistics templates and use case filter templates in the use case template. need.

Benefits of technology

Automatic use case filtering and test report output are implemented, which shortens the test report output time, improves testing efficiency, reduces the error rate of test case set writing, and improves test quality and targeting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166530A_ABST
    Figure CN119166530A_ABST
Patent Text Reader

Abstract

The invention provides an automatic test execution method, platform and equipment based on a use case template and a medium, and belongs to the technical field of automatic testing. A use case basic data template in the use case template is analyzed; analyzing a test report statistical template in the case template, and defining a data source executed by the computational logic; screening out a use case label name and expected label value information; screening and matching a use case label name and expected label value information; associating the screened use cases meeting the test requirements with an automatic script, and executing the use cases by a test executor; and updating a test result into the use case template, and generating a test report. The time of case screening and test report output is shortened, the test efficiency is improved, testers are more focused on test result analysis and test design perfection, and the test quality is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of automated testing technology, and in particular relates to an automated testing execution method, platform, device and medium based on a use case template. Background Art

[0002] Generally, during testing, the system's software and hardware need to be tested. The test goal is to check whether the system meets the original requirements. A complete test cycle is mainly divided into 5 stages:

[0003] (1) Requirements analysis phase: Understand and analyze requirements, and clarify test scope and test objectives.

[0004] (2) Test design phase: clarify the required test points, test plan, testability interface and test environment, write the input and output of the test case, and the output products are the test plan and test case description documents.

[0005] (3) Automated coding phase: Convert the use case description into an automated script.

[0006] (4) Test execution phase: According to the requirements and scope supported by the release version, build the test environment, select test cases, execute the test cases and output the test report. Based on the test results analysis, supplement and improve the test design to improve the test quality.

[0007] (5) Test evaluation phase: Evaluate version quality based on multiple dimensions such as use case execution, defect resolution, requirement coverage, and remaining issues and risks.

[0008] Currently in the product development stage, the demand scenarios faced by testing are constantly changing, and a lot of time is needed to screen test cases and output test reports, which affects test efficiency and cannot guarantee test quality. If the test requirements are not met after the test, it is necessary to re-screen the test cases and adjust the test items, which further prolongs the time for case screening and case set writing, reduces test efficiency, and cannot analyze the test process in a targeted manner, resulting in the test failing to meet requirements. Summary of the invention

[0009] The present invention provides an automated test execution method based on a use case template, so as to at least solve the problem that the test demand scenarios in the related technology are constantly changing, a lot of time is needed to screen test cases and output test reports, which affects the test efficiency and cannot guarantee the test quality.

[0010] Methods include:

[0011] S201: parsing a use case basic data template in a use case template, and defining the use case basic data template as a use case basic information structure set based on a use case;

[0012] S202: parsing the test report statistics template in the use case template to obtain statistics items and calculation logic corresponding to the statistics items, and defining the data source for the execution of the calculation logic as a use case basic information structure set;

[0013] S203: Parse the use case template to obtain a use case screening template, screened use case tag names and expected tag value information;

[0014] S204: traverse all use cases in the use case basic information structure set, filter out all use case labels that meet the test requirements, and match the use case label name and expected label value information;

[0015] S205: Associating the screened use cases that meet the test requirements with the automation script, and executing the use cases by the test execution body;

[0016] S206: Update the test results returned by the test execution body into the use case template, and generate a test report based on the test report statistics template.

[0017] It should be further explained that the use case basic information structure set includes: use case label;

[0018] The use case tag includes: use case tag name and tag value information.

[0019] It should be further explained that, after step S204, the following steps are also included:

[0020] When the use case tags and corresponding use case tag names required for the test are not filtered out, the missing use case tags are recorded based on the log recording method, and the test task is exited at the same time.

[0021] It should be further explained that, after step S204, the following steps are also included:

[0022] When the use case labels and corresponding use case label names required for the test are filtered out, it is determined whether the use case label value corresponding to the current use case satisfies the value information corresponding to the test requirements;

[0023] If not, it means that the current use case does not match the current test task, and the judgment of the next use case will continue;

[0024] If satisfied, save the current use case and proceed to the next use case label judgment.

[0025] It should be further explained that step S205 also includes: converting the screened use cases into automated scripts, and executing them by the test execution body;

[0026] Specifically include:

[0027] Define and obtain the use case number label of the use case, and use the use case number corresponding to the use case number label as the starting position of the automation script parameter;

[0028] Define the use case description tag of the use case, set the use case description tag as the test point of the use case, and define the use case description tag as a non-executable item of the automation script;

[0029] Define the use case parameter tag terminator of the use case to obtain the value corresponding to the use case parameter tag;

[0030] Unify the use case label values ​​into string format;

[0031] Call the use cases according to the execution order of the use cases corresponding to the automation script, package the use cases into message format through MQTT publishing, send them to the test executor, and execute the test tasks;

[0032] When executing the use case, record the start time and end time of the use case, and calculate the test duration of the use case.

[0033] It should be further explained that, before step S201, the following steps are also included:

[0034] In response to the cut and fill instructions, configure a use case base data template of the use case template;

[0035] In response to the trimming and filling instructions, configuring a test report statistics template of the use case template;

[0036] In response to the trimming and filling instructions, a use case screening template of the use case template is configured.

[0037] It should be further explained that the use case basic data template in the method includes: execution class tags, scenario class tags and automation tags;

[0038] The execution class label is automatically filled in after the use case is executed;

[0039] The scene labels are trimmed or supplemented according to the test task requirements;

[0040] In the test report statistics template, various statistics table items are formulated according to the preset test report statistics items;

[0041] Based on the description items of the labels in the use case basic data template and the logic of various statistical data of each requirement, formulate various statistical table items, and fill the status information of the use case execution into the statistical table items when the use case is running;

[0042] It also defines the item name information of the statistical table items and the value or statistical formula of each cell in the test report statistical template;

[0043] In the use case filtering template, support is provided for filtering by a certain value in a specified use case tag, filtering by a certain type of value in a specified use case tag, and complex combination filtering by multiple use case tags.

[0044] The present application also provides an automated test execution platform based on a use case template, the system comprising:

[0045] A basic data template parsing module, used for parsing a use case basic data template in a use case template, and defining the use case basic data template as a use case basic information structure set based on a use case;

[0046] A report statistics template parsing module is used to parse the test report statistics template in the use case template, obtain statistics items and calculation logic corresponding to the statistics items, and define the data source for the execution of the calculation logic as a use case basic information structure set;

[0047] A screening template processing module is used to parse the use case template to obtain a use case screening template, a screened use case tag name, and expected tag value information;

[0048] A use case traversal and screening module is used to traverse all use cases in the use case basic information structure set, screen out all use case labels that meet the test requirements, and match the use case label name and expected label value information;

[0049] A use case execution module is used to associate the screened use cases that meet the test requirements with the automation script, and execute the use cases by the test execution body;

[0050] The update and report generation module is used to update the test results returned by the test execution body into the use case template and generate a test report based on the test report statistics template.

[0051] According to another embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the use case template-based automated test execution method when executing the program.

[0052] According to another embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the automated test execution method based on the use case template are implemented.

[0053] It can be seen from the above technical solutions that the present invention has the following advantages:

[0054] The automated test execution method based on use case templates provided in the present application realizes automatic use case screening by using use case templates and the use case basic data templates included therein, thereby eliminating the need for writing a test case set; the use cases are automatically executed according to the screening results and the test results are automatically refreshed to output a test report, thereby effectively shortening the test report output time and indirectly improving the test efficiency.

[0055] The test report statistics template based on the use case template of this application labels the use case related parameters, uses the use case number as a bridge, and associates the use case automation parameter labels, the use case execution result labels, and the various test scenario labels applicable to the use case. Through a table for data maintenance and management, automatic docking of upper test cases and demand management and lower test execution is achieved, supporting data statistics in various dimensions, and effectively reducing maintenance costs. The test report statistics template can also automatically refresh the statistical results according to the statistical item specifications after the use case is executed by presetting statistical items and statistical item calculation logic, and realize automatic output of test reports, which effectively shortens the output time of test reports and improves test efficiency.

[0056] For the use case screening template of the present application, automatic screening based on use case labels can be performed without having to write a test case set. At the same time, the annotated test labels can support arbitrary addition, deletion or modification to meet the requirements of scope changes in different versions delivered, effectively reducing the time for test case screening and reducing the error rate in test case set writing.

[0057] Through the close cooperation of these two technical key points, management and maintenance based on use case tags, automatic screening based on use case tags, automatic execution based on use case tags, automatic execution result annotation based on use case tags, and automatic test report statistics update based on use case tags are realized. The time for use case screening and test report output is shortened, the test efficiency is improved, and testers are more focused on test result analysis and test design improvement, further improving the quality of testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0059] Figure 1 A flow chart of an embodiment of an automated test execution method based on a use case template;

[0060] Figure 2 A flowchart of a preferred embodiment of the automated test execution method based on a use case template of the present application;

[0061] Figure 3 A flow chart of an embodiment of a method for configuring a carrier of a use case basic data template;

[0062] Figure 4 A flow chart of an embodiment of a method for loading a carrier of a test report statistics template;

[0063] Figure 5 A flowchart of an embodiment of an automated test execution process based on a use case template;

[0064] Figure 6 It is a schematic diagram of an embodiment of an automated test execution platform based on a use case template;

[0065] Figure 7 It is a schematic diagram of the implementation of the automated test execution platform;

[0066] Figure 8 Schematic diagram of an electronic device. DETAILED DESCRIPTION

[0067] The following will describe in detail the steps of the automated test execution method based on the use case template. For the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are provided to facilitate 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 can also be implemented in other embodiments without these specific details.

[0068] It should be understood that when used in the present specification, the term "includes" indicates the presence of the described features, integral bodies, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integral bodies, steps, operations, elements, components and / or their collections. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0069] The phrases such as "one embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases such as "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments" etc. that appear in different places in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0070] For the automated test execution method based on the use case template provided in this application, the steps of executing the test may include the following implementation process, which is of course not limited to the following steps and processes, and can also be adjusted and expanded according to actual needs:

[0071] like Figure 1As shown, S3001: build a physical environment.

[0072] According to the test requirements and test task needs, configure the test equipment and connect them, and then configure the corresponding test environment. In this way, you only need to replace the software and hardware versions after the version is released for each test.

[0073] S3002: Select a test case.

[0074] In mature products, the test version delivery requirements are fixed, and the test case automation scripts are fixed. Fixed test suites required for version testing can be written in advance, and different testing objectives can be achieved by running different test suites.

[0075] For example, the minimum threshold test case set after the version is submitted. However, in the product development stage, requirements are delivered bit by bit, and automated use cases are also developed bit by bit. The corresponding full set of use cases and automated threshold use case sets are also constantly changing. It is necessary to write new test case sets or adjust existing test case sets according to the different requirements faced by the test.

[0076] In one embodiment, the premise of writing or adjusting the test case set is that the corresponding test case has been selected, and the premise of selecting the test case is that the test point description of the test case meets the test requirements.

[0077] In one embodiment, whether it is a linear script test framework or a keyword-driven test framework, each automated use case corresponds to an entry function, the function name is the use case number, the function header comment is the use case description, that is, the test point, the function parameter is the test data required for the use case test point, and the function step is the test step in the test description document, which makes it difficult to screen the use case description based on the automated script. At this time, with the help of the test case description document, the use case number and the use case description in the use case description document correspond one to one, and the test point description can be intuitively and conveniently screened, thereby selecting the corresponding use case number, and then writing the test case set in the automated script based on the selected use case number. This not only takes a long time but is also prone to errors, such as incomplete use cases in the use case set, or repeated use cases.

[0078] S3003: Execute test cases.

[0079] This embodiment can be divided into two parts: manual execution and automatic execution. Manual execution performs tests according to the use case steps in the use case description document and determines whether each step of the operation meets the test expectations, while automatic execution performs tests by calling the corresponding automation script and outputs the test judgment results.

[0080] S3004: Output test report.

[0081] This embodiment reports the progress of the test and the coverage of the requirements based on the results of the test execution, so that the project can understand the progress and risks of the test in a timely manner.

[0082] During the product development stage, the requirements for each version delivery are different, and the delivery rate of each requirement is also different. The results of the test case set output by automation can only present the current test success rate. If it cannot show the overall use case execution status and requirement coverage, the test results can be imported into the test case description document for overall result statistical analysis.

[0083] S3005: Analyze test results and improve test design.

[0084] In one embodiment, high-risk modules are analyzed based on the feedback of the current test situation, and the test design is improved for the high-risk modules. Or the gradual deepening of random testing leads to a more complete understanding of the requirements, and the existing test design needs to be supplemented and improved.

[0085] For the above method, during testing, the scenario may change constantly, and a lot of time will be needed to screen test cases and output test reports, which will affect the test efficiency and fail to ensure the test quality.

[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention, thereby solving the above-mentioned technical problems. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0087] See also Figure 2 FIG. 1 is a flowchart of an automated test execution method based on a use case template in a specific embodiment, the method comprising:

[0088] S201: Parse a use case basic data template in a use case template, and define the use case basic data template as a use case basic information structure set based on a use case.

[0089] In some embodiments, the use case template is configured with a use case basic data template, a test report statistics template, and a use case screening template.

[0090] The use case test template is the basis for automated test execution. It provides basic data related to the use case and uses the test case number as a bridge to associate acceptance requirements, test case descriptions, automation parameters, and test scenarios. The use case attributes are reflected in the test template as use case tags.

[0091] The test report statistics template can preset statistical items and statistical item calculation logic to automatically refresh the statistical results according to the statistical item specifications after the use case is executed, and automatically output the test report, which effectively shortens the output time of the test report and improves the test efficiency.

[0092] The test case screening template is based on the test case label, which can realize automatic screening without writing the test case set. At the same time, the marked test labels can support arbitrary addition, deletion or modification to meet the requirements of the scope changes of different versions, effectively shorten the test case screening time, and reduce the error rate of test case set writing.

[0093] In some embodiments, a use case basic data template in a use case template is parsed. The use case basic data template may include basic information of multiple use cases, such as use case ID, use case name, description, preconditions, execution steps, expected result information, etc.

[0094] In this embodiment, parsing the use case template may involve reading relevant information in the use case basic data template, which may be in Excel, JSON, YAML, etc. format, and converting text data into a data structure that can be operated by the device, such as a dictionary or list in Python. The data of the use case basic data template is configured as a set of use case basic information structures, each of which contains all basic information of a use case.

[0095] It can be seen that this embodiment stores the basic data of the use case in a structured form, which is convenient for subsequent processing and addition, deletion, modification and query. With the template configuration, new use case attributes can be easily added as needed, which facilitates the program to automatically traverse and query the information of each use case.

[0096] S202: Parse the test report statistics template in the use case template to obtain statistics items and calculation logic corresponding to the statistics items, and define the data source for the execution of the calculation logic as a set of use case basic information structures.

[0097] In some embodiments, the test report statistics template can be parsed to determine the test items that need to be counted. The test items may involve success rate, failure rate, total execution time, etc. and the calculation logic of each item. The calculation logic may involve operations such as aggregation and calculation of multiple use case data in the use case basic information structure set. The data source for the calculation logic execution is defined as the use case basic information structure set parsed in the previous step.

[0098] This embodiment is based on the setting of the test report statistics template, which can reduce the workload of manual statistics of test results and improve accuracy and efficiency. The template supports flexible configuration of statistical items and calculation logic according to needs. It is easy to present statistical results in the form of reports, which is convenient for project members to understand and evaluate the test situation.

[0099] S203: Parse the use case template to obtain a use case screening template, screened use case tag names, and expected tag value information.

[0100] In some embodiments, a use case screening template in the use case template may be parsed to obtain screening conditions, and the use case screening template includes but is not limited to information such as the use case tag name and the expected tag value.

[0101] Of course, the filtering conditions can also be used to filter out the use cases that meet the test requirements from all use cases in the future.

[0102] In this way, the use cases that need to be executed can be accurately selected through the screening template, which improves the test efficiency and pertinence. The test process supports multiple screening condition combinations to meet the needs of different test scenarios.

[0103] S204: Traverse all use cases in the use case basic information structure set, filter out all use case labels that meet the test requirements, and match the use case label name and expected label value information.

[0104] In some embodiments, each use case in the use case basic information structure set is traversed to check whether the use case tag conforms to the tag name and expected value defined in the screening template. For the use cases that meet the conditions, they are marked or extracted for subsequent execution.

[0105] It should be noted that this embodiment can define a use case structure set, each use case is a dictionary or object, and can specifically include multiple attributes, such as ID, name, description, and a set of tags.

[0106] For example, the test requirement can be set to filter out all use cases with high priority. Set a filter tag function. Traverse all use cases to check whether the current use case meets the test requirements. If there are use cases that meet the test requirements, extract and store the tag name and expected tag value of the use case that meets the conditions. Of course, you can also store only specific tag information.

[0107] As can be seen, this embodiment defines a specific function that accepts each use case and test requirement as input. The function traverses the use case set and uses a list derivation or conditional judgment to check whether each use case meets the test requirements, that is, whether it contains all specified tag names and corresponding expected values.

[0108] If the conditions are met, store the name and label information of the use case in a list and return the list.

[0109] In some embodiments, it is defined that the keys and values ​​of all tags are string types, and the test requirement is a dictionary containing all tag names that need to be matched and the corresponding expected values. In this way, it is ensured that only test cases that meet specific test requirements are executed, reducing the execution of invalid test cases and improving the efficiency and effectiveness of test execution.

[0110] S205: Associating the screened use cases that meet the test requirements with the automation script, and executing the use cases by the test execution body.

[0111] In some embodiments, the selected test cases that meet the test requirements are associated with corresponding automation scripts. The automation scripts may exist in the form of code and are used to execute specific test steps and verify the results. The test cases are executed by the test execution body.

[0112] In this way, this embodiment realizes automated testing, reduces manual intervention, and improves the automation level of testing. Moreover, the automated script can accurately execute the test steps and verify the expected results, thereby improving the accuracy and reliability of the test.

[0113] S206: Update the test results returned by the test execution body into the use case template, and generate a test report based on the test report statistics template.

[0114] In some embodiments, the test execution body returns the execution result of each use case. In this embodiment, the result can be updated to the corresponding position in the use case template. Then, a test report is generated according to the statistical items and calculation logic defined in the test report statistical template. The test report contains key information such as the statistical information of the test and the execution results of each use case.

[0115] In some specific embodiments, after completing the execution of the use case, the test execution body will generate or output the execution result of each use case. The result usually includes key information such as test success, test failure, test blocking, etc., actual results, execution time, etc.

[0116] The system needs to collect these results and store them in a preset data structure for subsequent processing. The collected test results are mapped to the use cases in the use case template. This embodiment is implemented through unique identifiers such as use case IDs and use case names.

[0117] Traverse each use case in the use case template, find the corresponding test result according to the mapping relationship, and update it to the corresponding position of the use case template.

[0118] If the use case template is stored in the form of an Excel file or a JSON file, you need to write code to update the file content.

[0119] After the update is completed, save the modified use case template to the original location or specified location for subsequent reference and use.

[0120] This embodiment extracts the items to be counted and the calculation logic of each item from the test report statistics template. The statistics items of this embodiment may include success rate, failure rate, total execution time, average execution time, etc.

[0121] Determine the calculation method and data source of each statistical data, that is, the use case basic information structure set or test result set.

[0122] In some embodiments, the collected test results are summarized and calculated based on the extracted statistical items and calculation logic, which may require traversing the entire test result set and classifying, counting and analyzing the data.

[0123] During the calculation process, it may be necessary to deal with outliers or special cases to ensure the accuracy and reliability of the statistical results.

[0124] Through the above steps, step S206 can update the test results returned by the test execution body to the use case template, and generate a detailed test report based on the test report statistics template. And the test results are updated to the template in real time, which is convenient for timely discovery of problems. It can also enable testers to understand the test situation. Of course, the test report can be in PDF format or Excel format for easy use.

[0125] In an embodiment of the present invention, based on the process before step S201, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0126] In some embodiments, the use case template is configured with a use case basic data template, a test report statistics template, and a use case screening template.

[0127] Specifically, the use case basic data template is the basis for implementing the test process of this embodiment. The use case basic data template provides basic data related to the use case, and uses the test case number as a bridge to associate the acceptance requirements, test case descriptions, automation parameters and test scenarios. These use case attributes are reflected in the test template as use case tags.

[0128] Tags can be divided into three categories according to their functions.

[0129] The first category is execution result labels, as shown in the following table:

[0130] Test Results Run time Log path Question sheet Testing time Test version

[0131] In some embodiments, the use case labels are automatically filled in by the use case result processing module after the use case is executed. The function of each use case label is described in detail below for each execution result label:

[0132] Test results are used to indicate the results of the use case execution, such as success, fail, timeout, etc.

[0133] Running time: It is used to indicate the execution time of the use case and provides a basis for time estimation in the test plan.

[0134] Log path: used to indicate the path where the use case log is located, which is important information when filing a problem ticket.

[0135] Problem ticket: A tracking keyword used to indicate the failure of a use case. It can also be used as a condition for screening use cases during regression testing. If the defect tracking system supports a command line interface, it can automatically call the ticket and record the problem ticket number when the use case fails. Otherwise, it needs to be manually raised and recorded.

[0136] Test time: used to represent the test data of the day for the daily test progress statistics of the use case.

[0137] Test version: used to indicate the test object information displayed in the use case test report. After the version test is completed, the label of the version result can be added to the scenario use case label to facilitate the defect resolution status statistics in the version dimension.

[0138] According to an embodiment of the present application, the second category is scene class tags, as shown in the following table:

[0139] Custom X Version Networking Product form Smoke coming out of the warehouse Threshold Use Cases Environmental testing automation Priority need

[0140] The labels in this embodiment are all optional attributes and can be cut or supplemented according to project needs. The function of each set of data is as follows:

[0141] Custom: This column can be used to mark the use cases that need to be tested when a special version is released and cannot be filtered based on other use case tags. For example, rerunning the use cases that failed due to environmental reasons.

[0142] X version: used to indicate the use cases that a version should support.

[0143] Networking: used to match use cases according to different test environments.

[0144] Product form: When used as a universal platform, it marks the common features and differential features supported by different versions.

[0145] Smoke test before upload: A test set that needs to verify the quality of the code when it is uploaded to the repository as an automated script.

[0146] Threshold use cases: The minimum set of use cases used to verify the quality of a version in advance when it is transitioned to testing. They vary with the scope of each version delivered.

[0147] Environment detection: A set of use cases for detecting the environment status after the environment is set up.

[0148] Automation: As the key use case label for automatic screening and automatic execution of use cases in this application, some use cases that cannot be automated or have not yet been automated also need to track their testing progress and quality.

[0149] Priority: When the number of use cases is large and the version testing cycle is short, this use case label can be used to filter the use cases that are executed first.

[0150] Requirements: Used to indicate the relationship between use cases and requirements, to facilitate statistics on requirement coverage, and to filter use cases based on requirements.

[0151] According to the embodiment of the present application, the third category is the automation category, as shown in the following table:

[0152] Use Case Number Use case description Parameter 1 Parameter n

[0153] The automation class of this embodiment is used to interact with the test execution body. Since the number of test case parameters varies, it is required to concentrate on the end of the test case basic data template structure to facilitate subsequent interaction with the test execution body with only the basic information of the test case:

[0154] Use case number: a basic element of the use case, serving as the primary key value of the use case basic data template, and associating various use case tags of the use case.

[0155] Use case description: serves as the basis for labeling use cases.

[0156] Parameter 1: at least one test data for the test case in the test execution body. When the automation script does not require any test parameters, the agreed test case parameter tag terminator needs to be filled in here. The parameters here can be keywords and their values ​​in the keyword-driven automation framework, or test data in the linear script test framework.

[0157] Parameter n: As the test data of the use case in the test execution body, the number of test data required by the use case varies. Here, the maximum constraint n=31, that is, a maximum of 30 test data are supported, which depends on the actual needs of the project. Fill in the number of parameters actually used, and the last one is the end of the use case parameter tag.

[0158] In some embodiments, the test report statistics template is determined by the data required in each time period test report presented to the outside, and its format can be: [

[0160] Statistical item name 1: Statistical logical set 1.

[0161] Statistics item name 2: Statistics logic set 2,

[0162] …

[0163] Statistical item name m: Statistical logical set m ]

[0165] There are three types of statistical items in this embodiment, namely, requirement coverage, execution status of certain versions, and test progress in each time period.

[0166] The requirements covered in this embodiment are summarized as follows:

[0167] Statistics on the overall acceptance progress of requirements are used to analyze which requirements are progressing slowly and which requirements are of relatively poor quality.

[0168] This embodiment can pre-set different requirement description items and the logic of various statistical data of each requirement based on the data in the use case basic template, so as to facilitate updating when the use case is running. The corresponding format is:

[0169] The demand statistics table is expressed in the form of: [statistical logic of the number of associated use cases, statistical logic of the number of executed use cases, statistical logic of the number of successful executions, statistical logic of demand execution rate, statistical logic of demand success rate].

[0170] After each use case is executed, the value corresponding to the requirement description tag associated with the use case is found, and the statistical item corresponding to the requirement description in the statistical table is updated according to the statistical logic of the requirement statistical table.

[0171] Requirement Description Number of associated use cases Number of execution cases Number of successful executions Demand execution rate Demand success rate

[0172] For example, the execution status of some versions is summarized as follows:

[0173] Statistics on the test progress of certain versions are used to analyze the version quality. Based on the data in the use case basic template, the logic of statistical data can be preset in advance to facilitate updates when the use case is running. The corresponding format is:

[0174] Some version statistics tables are: [use case number statistics logic, execution case number statistics logic, execution success number statistics logic, execution rate statistics logic, success rate statistics logic].

[0175] After each use case is executed, the value corresponding to the use case test version label is found, and according to the statistical logic of certain version statistical tables, the statistical items corresponding to certain versions in the statistical tables are updated.

[0176] Version Information Number of use cases Number of execution cases Number of successful executions Execution rate Success rate

[0177] The test progress statistics for each time period can include: statistics on daily test progress for real-time analysis of test progress deviations. The logic of statistical data can be preset in advance based on the data in the use case basic template, so that it can be updated when the use case is running. The corresponding format is:

[0178] Daily testing progress: [test time statistical logic, test version logic, execution case number statistical logic, execution rate statistical logic, success rate statistical logic].

[0179] Each time a use case is executed, the corresponding statistical items in the statistical table are updated according to the values ​​corresponding to the test time label and the test version label in the use case basic information template and the statistical logic of the daily test statistical table.

[0180] Testing time Test version Number of execution cases Number of successful executions Execution rate Success rate

[0181] In some embodiments, the use case screening template has a constraint that the use case screening configuration file is in json format and is used to automatically screen use cases based on use case tags. The formats supported by the use case screening template are divided into three categories.

[0182] Format 1: Simple screening.

[0183] For example, {"use case label name", "label value"}

[0184] Supports filtering by a value in a specified use case tag, such as {"environment detection", "Y"}, to verify the availability of the environment after it is ready.

[0185] Format 2: Compound screening.

[0186] For example,

[0187] {"Use Case Tag Name", ["Tag Value 1", "Tag Value 2"]}

[0188] Supports filtering by a certain type of value in the specified use case tag, such as {"Product Form", ["Unique Value 1", "General"]}, and selects the feature use cases of "Unique Value 1" and "General" based on the product form.

[0189] Format three: combined screening.

[0190] For example, {"use case label name 1", "label value 1", "use case label name 2", ["label value 2", "label value 3"]}.

[0191] In this embodiment, complex combination screening is supported according to multiple use case labels. For example, the following format is used to select use cases with use case priorities of P1.0 and P1.1 and that are automated:

[0192] {"Automation","Y"}"Priority",["P1.0","P1.1"]}.

[0193] Furthermore, as a refinement and expansion of the specific implementation methods of the above-mentioned embodiments, in order to fully illustrate the specific implementation process in this embodiment, a more specific implementation method of the automated test execution method based on the use case template is provided, and the specific steps include: cutting and filling in the test case template and automated test execution based on the test case template.

[0194] In some specific embodiments, the method of cutting and filling in the use case template may include: cutting and filling in the use case basic data template.

[0195] This embodiment uses Excel as a carrier of the use case basic data template for illustration.

[0196] like Figure 3 As shown, the specific implementation method is:

[0197] S4001: Tailor the scenario label class in the use case basic data template according to the scenario targeted by the test.

[0198] S4002: Import the use case number, use case description and use case-related requirements in the use case description document into the use case parameter class label in the use case basic data template.

[0199] S4003: Fill in the use case parameter class label in the use case basic data template based on the implementation of the automation script.

[0200] S4004: Combining the cropped scene class label, write the value of the scene class label.

[0201] As an example, Table 1 is an example of a possible use case basic data template, usually different columns in Excel represent different use case labels.

[0202] Table 1 is an example of a use case basic data template

[0203]

[0204]

[0205] As for the cutting and filling of the test report statistics template, we still take Excel as the carrier of the test report statistics template as an example. Figure 4 As shown, the implementation process includes:

[0206] S5001: Formulate various statistical table items according to the planned test report statistical items.

[0207] S5002: Clarify the statistical logic of different statistical items based on the data in the basic test data template.

[0208] S5003: Specify the statistical item name, and the value or statistical formula of each cell in the table.

[0209] This embodiment takes the statistical items of demand statistics as an example for description.

[0210] As shown in Table 2, fill in the requirement description in advance to ensure that the values ​​in this column are different, and then fill in the Excel statistical formulas corresponding to other cells in the table. In this way, after the use case result processing module backfills the execution class label in the use case basic data template, the data in the statistical table will be automatically updated.

[0211] Table 2 Example of demand statistics template

[0212] Requirement Description Number of associated use cases Number of execution cases Number of successful executions Demand Execution Rate Demand success rate Requirement 1 Requirement 2

[0213] In some embodiments, the test case screening template may be cut and filled in as follows:

[0214] Formulate use case label filtering rules based on the targeted test scenarios. For example, use cases with automatic execution priorities of P1.0 and P1.1 adopt the following format: {"Automation", "Y", "Priority", ["P1.0", "P1.1"]}.

[0215] According to an embodiment of the present application, based on the automated test execution of the use case template, the delivery to the test execution body is realized by directly calling the automated script, such as Figure 5 As shown, the specific processing steps include:

[0216] S6001: Parse the use case basic template tab in the Excel table specified in the input parameter, read the use case label information of each use case row by row, and obtain a list of all use cases. Each element in the list represents a use case, and each use case consists of a dictionary format of use case label key-value pairs.

[0217] S6002: Configure the test report statistics template tab in the Excel table specified in the input parameter. This is based on the Excel method, and the statistical logic is implemented through the built-in Excel formula.

[0218] S6003: Parse the use case screening template to obtain a key-value pair of use case label: label value.

[0219] S6004: Traverse each use case in step S6001.

[0220] S6005: Determine whether the expected use case tag in step S6003 exists in the current use case, and whether the corresponding tag value meets the screening requirements.

[0221] If all conditions are met, proceed to step S6006; if any use case tag does not exist, record the missing log of "use case tag name" for easy positioning, and exit the current automation drive task; if the value corresponding to a use case tag does not meet the filtering conditions, return to step S6004.

[0222] S6006: Obtain the use case labels and values ​​in the automation labels of the current use case except for the use case description.

[0223] S6007: Confirm the number and value of valid use case parameters according to the use case parameter terminator.

[0224] S6008: Convert the use case valid parameters to strings.

[0225] S6009: Record the start time of the use case execution.

[0226] S6010: Convert the use case number into a test entry function of the automation script, use the string converted in step S6008 as a function input parameter, and call the test execution body in the form of a function call.

[0227] S6011: Obtain the return value of the test execution body, calculate the test running time, and collect the path where the test case log is located according to the log recording specification of the test execution body.

[0228] S6012: Update the execution class label value corresponding to the current use case.

[0229] S6013: Excel automatically updates the values ​​in the statistical table according to the formula corresponding to the cell format in the test statistical template, thereby achieving the effect of automatic data test report.

[0230] S6014: Analyze and improve the test design based on the test situation, which needs to be performed manually by the tester.

[0231] The automated test execution method based on the use case template provided in this embodiment can call the scenario, be triggered by the scheduled task of the operating system, can be triggered by the task of Jenkins, and can also be triggered manually, realizing multiple testing methods. This embodiment realizes automatic use case screening by configuring the use case template and a series of modules based on the use case template operation, eliminating the test case set writing link; automatically executes the use case according to the screening results and automatically refreshes the test results to output the test report, effectively shortening the test report output time and indirectly improving the test efficiency.

[0232] The following is an embodiment of an automated test execution platform based on a use case template provided in an embodiment of the present disclosure. The system and the automated test execution method based on a use case template in the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the automated test execution platform based on a use case template, please refer to the above-mentioned embodiment of the automated test execution method based on a use case template.

[0233] The system includes: a basic data template parsing module, which is used to parse the use case basic data template in the use case template and define the use case basic data template as a use case basic information structure set based on the use case.

[0234] The report statistics template parsing module is used to parse the test report statistics template in the use case template, obtain the statistics items and the calculation logic corresponding to the statistics items, and define the data source for the execution of the calculation logic as the use case basic information structure set.

[0235] The screening template processing module is used to parse the use case template to obtain the use case screening template, the screened use case tag name and the expected tag value information.

[0236] The use case traversal and screening module is used to traverse all use cases in the use case basic information structure set, screen out all use case tags that meet the test requirements, and match the use case tag name and expected tag value information.

[0237] The use case execution module is used to associate the screened use cases that meet the test requirements with the automation script, and the test execution body executes the use cases.

[0238] The update and report generation module is used to update the test results returned by the test execution body into the use case template and generate a test report based on the test report statistics template.

[0239] In one embodiment, if Figure 6 As shown, a schematic diagram of another automated test execution platform based on use case templates provided according to an embodiment of the present invention is provided. In this embodiment, based on the above embodiments, the principle of the automated execution system based on use case templates is composed of a set of rules for use case templates and operation of the use case templates, so as to realize the process of automatically screening use cases without writing test case sets, automatically executing selected automated use cases, automatically backfilling test results and automatically updating the data required for the test report, which will be further optimized and expanded below.

[0240] like Figure 7As shown, a schematic diagram of the process of executing a test by an automated test execution platform based on a use case template is shown. In the automated test execution platform based on a use case template provided in this embodiment, a use case template parsing module, a use case label screening processing module, a use case parameter conversion module, a use case result processing module and a test report processing module can also be configured.

[0241] In some embodiments, the use case template parsing module may parse the use case basic data template in the use case template, and define the use case basic data template as a set of use case basic information structures based on use cases.

[0242] The use case basic information of this embodiment may include a use case tag and a use case tag value.

[0243] Furthermore, the use case template parsing module can also parse the test report statistics template in the use case template to obtain the statistics items and the structure of the calculation logic corresponding to the statistics items. Here, the data for the calculation logic operation is required to come from the use case basic information set.

[0244] For the use case label screening processing module of this embodiment, the corresponding process can be performed in the following manner:

[0245] S301: Parse the use case screening template in the use case template to obtain the use case tag name and expected tag value information of the screening focus.

[0246] S302: Traverse each use case in the use case basic information structure set output by the use case template parsing module one by one to ensure that all use cases are involved in the screening.

[0247] S303: Traverse all use case tags of the current use case and search for a predefined filtering use case tag name.

[0248] The processing scenarios that may occur during the execution of this embodiment are:

[0249] When the use case tags and corresponding use case tag names required for the test are not filtered out, the missing use case tags are recorded based on the log recording method, and the test task is exited at the same time.

[0250] Specifically, when the use case tags and corresponding use case tag names required for the test are not screened out, or the use case template is not the latest, a log of the missing corresponding use case tag name is recorded for easy positioning, and the current automated driving task is exited.

[0251] If there is a use case tag name that is of interest to the filter, it is further determined whether the use case tag value corresponding to the current use case meets the value requirement corresponding to the filter use case tag.

[0252] If there is inconsistency, it means that the use case is not the use case that this task driver is concerned about, and then continue to judge the next use case; otherwise, it means that the current judgment use case label value meets the requirements, and then enter the judgment of the next screening use case label.

[0253] In this embodiment, only if the current use case meets all the use case labels and value requirements of the screening focus, will it enter the use case parameter conversion module.

[0254] In other words, if the conditions are met, the current use case is saved and the judgment of the next use case label is entered.

[0255] In some embodiments, the use case parameter conversion module will filter out the use cases that meet the test requirements and transfer them to the automated script for execution, eliminating the need to write a test case set. In this embodiment, the test data required in the automated script is filled in the use case basic information template to achieve a bridge between the template and the automated script.

[0256] In this embodiment, when converting the use case parameters, it is considered that the number of test data for each use case is uncertain, the type of test data for each use case is different, and how to identify the starting test parameters of each use case.

[0257] Based on the above problem, in the use case basic information template involved in this embodiment, it is possible to predefine that the starting position of the test data of the use case is consistent. In this way, a unified constraint is adopted to require that the use case label starting from the use case number in the use case basic information is used as the use case test data and is set at the last position of the use case basic information template. The value corresponding to the use case parameter label agrees on a special character as the terminator of the use case parameter, and can also be empty, or any value that will not be used as a valid use case label. For the purpose of unification of the platform, the valid use case parameter labels are uniformly converted to string format here.

[0258] On the basis of the above embodiments, in order to further improve the reliability of the use case parameter conversion provided by the above embodiments, the following is an implementable method. In one embodiment, the use case number can be used as the starting point of the automation-related parameters, and the obtained parameters include a use case number label, a use case description label and a use case parameter label.

[0259] In this embodiment, the use case description label is used to facilitate a clear understanding of the test points of the use case, to facilitate labeling of the use case in combination with the test scenario, and to lay a foundation for filtering use cases based on the use case label.

[0260] In this embodiment, the use case description process does not participate in the use case automation script execution, so that it is skipped to avoid too many invalid tests being passed in when interacting with the automation script, that is, the interface of the automation script needs to be modified for adaptation, which increases the workload and resource consumption. For example, directly calling the automation use case entry function increases the stack space, and calling it through the network takes up network resources.

[0261] In this embodiment, when the number of parameters of each use case is unclear, a unified use case parameter tag terminator is agreed upon, and the use case parameter conversion module can obtain the value corresponding to the valid use case parameter tag. The tag parameter value is unified into a string format to shield the difference of the use case automation script. The start time of the use case is recorded to facilitate the calculation of the running time of the use case.

[0262] The use case parameter conversion module of this embodiment can be connected with the automation script to send the information required by the automation script to the test execution body according to the calling method expected by the test execution body.

[0263] It can be seen that the use case parameter conversion module provided in this embodiment can directly call the function, and the platform and the test execution body are effectively integrated. It only needs to convert the use case number into a function name, and the value corresponding to the use case parameter label is directly called as the input parameter of the function;

[0264] The platform and the test executor can be called through any network socket. In this case, the use case number and use case parameters need to be packaged into the required message format and sent to the test executor.

[0265] Of course, the platform and the test executor can also publish through MQTT. In this case, the use case number and use case parameters need to be packaged into the required message format, and the message topic required by the other party needs to be published.

[0266] The use case parameter conversion module of this embodiment is also directly called by means of a shell command. If the test execution body is compiled into an executable binary file, it is spliced ​​according to the command line format required by the test execution body.

[0267] The above-mentioned methods of calling the test execution body can be converted into the calling format required by the test execution body according to actual needs.

[0268] According to the embodiments of the present application, the use case result processing module can be truly connected to the test executor, and automatically fill the test results returned by the test executor back into the use case template after processing, so as to facilitate the subsequent automatic test report data statistics.

[0269] The use case result processing module implemented in this embodiment involves docking with the test executor. Like the above-mentioned automated use case parameter conversion module, it can cooperate with the test executor to implement the test process. Of course, it can also choose the corresponding acceptance implementation method to accept the results, parse the results, and update the results to the use case template.

[0270] The test report processing module implemented in this embodiment updates the test statistical items based on the test report statistical items and statistical logic obtained by the use case template parsing module, thereby realizing automatic output of the test report, saving the time of test report statistics and writing, and improving test efficiency.

[0271] Figure 8 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0272] The electronic device 500 includes, but is not limited to, components such as a processor 501, a network module 502, an audio output unit 503, an input unit 504, a display unit 506, a user input unit 507, an interface unit 508, and a memory 509. Those skilled in the art will appreciate that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0273] In embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0274] In the embodiment of the present application, the processor 501 can be implemented by using at least one of a digital signal processor (DSP, Digital Signal Processing), a digital signal processing device (DSPD, Digital Signal Processing Device), a field programmable gate array (FPGA, Field Programmable Gate Array), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein. In some cases, such an implementation can be implemented in a controller. For software implementation, implementations such as processes or functions can be implemented with separate software modules that allow execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any appropriate programming language, and the software code can be stored in a memory and executed by a controller.

[0275] The processor 501 provides wireless Internet access to the user through the network module 502, thereby realizing the transmission and communication of data information in this application. The audio output unit 503 includes a speaker, a buzzer, and a receiver.

[0276] The input unit 504 is used to receive audio or video signals. The display unit 506 is used to display the automated test execution process and information test report information.

[0277] The user input unit 507 can be used to receive input digital or character information, and in response to the cutting and filling instructions, configure the use case basic data template of the use case template; in response to the cutting and filling instructions, configure the test report statistics template of the use case template; in response to the cutting and filling instructions, configure the use case screening template of the use case template. The user input unit 507 may include but is not limited to a physical keyboard, a function key, a trackball, a mouse, and a joystick, which will not be described in detail here.

[0278] The memory 509 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0279] In addition, the electronic device 500 includes some functional modules not shown, which will not be described in detail here.

[0280] The storage medium provided in the present application stores a program product that can implement the automated test execution method based on the use case template involved in this specification.

[0281] In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to perform the following steps involved in the present disclosure described in the above “Exemplary Method” section of this specification:

[0282] Parsing a use case basic data template in a use case template, and defining the use case basic data template as a use case basic information structure set based on a use case;

[0283] Parse the test report statistics template in the use case template to obtain statistics items and calculation logic corresponding to the statistics items, and define the data source for the execution of the calculation logic as a use case basic information structure set;

[0284] Parse the use case template to obtain a use case screening template, screened use case tag names, and expected tag value information;

[0285] Traverse all use cases in the use case basic information structure set, filter out all use case labels that meet the test requirements, and match the use case label name and expected label value information;

[0286] Associating the selected test cases that meet the test requirements with the automation script, and having the test executor execute the test cases;

[0287] The test results returned by the test execution body are updated to the use case template, and a test report is generated based on the test report statistics template.

[0288] The storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0289] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An automated test execution method based on a use case template, characterized in that: Methods include: S201: parsing a use case basic data template in a use case template, and defining the use case basic data template as a use case basic information structure set based on a use case; S202: parsing the test report statistics template in the use case template to obtain statistics items and calculation logic corresponding to the statistics items, and defining the data source for the execution of the calculation logic as a use case basic information structure set; S203: Parse the use case template to obtain a use case screening template, screened use case tag names and expected tag value information; S204: traverse all use cases in the use case basic information structure set, filter out all use case labels that meet the test requirements, and match the use case label name and expected label value information; S205: Associating the screened use cases that meet the test requirements with the automation script, and executing the use cases by the test execution body; S206: Update the test results returned by the test execution body into the use case template, and generate a test report based on the test report statistics template.

2. The automated test execution method based on use case template according to claim 1, characterized in that: The use case basic information structure set includes: use case label; The use case tag includes: use case tag name and tag value information.

3. The automated test execution method based on use case template according to claim 1, characterized in that: After step S204, the following steps are also included: When the use case tags and corresponding use case tag names required for the test are not filtered out, the missing use case tags are recorded based on the log recording method, and the test task is exited at the same time.

4. The automated test execution method based on use case template according to claim 1, characterized in that: After step S204, the following steps are also included: When the use case labels and corresponding use case label names required for the test are filtered out, it is determined whether the use case label value corresponding to the current use case satisfies the value information corresponding to the test requirements; If not, it means that the current use case does not match the current test task, and the judgment of the next use case will continue; If satisfied, save the current use case and proceed to the next use case label judgment.

5. The automated test execution method based on use case template according to claim 1, characterized in that: Step S205 also includes: converting the screened use cases into automated scripts, and executing them by the test execution body; Specifically include: Define and obtain the use case number label of the use case, and use the use case number corresponding to the use case number label as the starting position of the automation script parameter; Define the use case description tag of the use case, set the use case description tag as the test point of the use case, and define the use case description tag as a non-executable item of the automation script; Define the use case parameter tag terminator of the use case to obtain the value corresponding to the use case parameter tag; Unify the use case label values ​​into string format; Call the use cases according to the execution order of the use cases corresponding to the automation script, package the use cases into message format through MQTT publishing, send them to the test executor, and execute the test tasks; When executing the use case, record the start time and end time of the use case, and calculate the test duration of the use case.

6. The automated test execution method based on use case template according to claim 1, characterized in that: Before step S201, the following steps are also included: In response to the cut and fill instructions, configure a use case base data template of the use case template; In response to the trimming and filling instructions, configuring a test report statistics template of the use case template; In response to the trimming and filling instructions, a use case screening template of the use case template is configured.

7. The automated test execution method based on use case template according to claim 6, characterized in that: The use case basic data template in the method includes: execution class label, scenario class label and automation label; The execution class label is automatically filled in after the use case is executed; The scene labels are trimmed or supplemented according to the test task requirements; In the test report statistics template, various statistics table items are formulated according to the preset test report statistics items; Based on the description items of the labels in the use case basic data template and the logic of various statistical data of each requirement, formulate various statistical table items, and fill the status information of the use case execution into the statistical table items when the use case is running; It also defines the item name information of the statistical table items and the value or statistical formula of each cell in the test report statistical template; In the use case filtering template, support is provided for filtering by a certain value in a specified use case tag, filtering by a certain type of value in a specified use case tag, and complex combination filtering by multiple use case tags.

8. An automated test execution platform based on a use case template, characterized in that: The system is used to implement the automated test execution method based on the use case template as described in any one of claims 1 to 7; The system includes: A basic data template parsing module, used for parsing a use case basic data template in a use case template, and defining the use case basic data template as a use case basic information structure set based on a use case; A report statistics template parsing module is used to parse the test report statistics template in the use case template, obtain statistics items and calculation logic corresponding to the statistics items, and define the data source for the execution of the calculation logic as a use case basic information structure set; A screening template processing module is used to parse the use case template to obtain a use case screening template, a screened use case tag name, and expected tag value information; A use case traversal and screening module is used to traverse all use cases in the use case basic information structure set, screen out all use case labels that meet the test requirements, and match the use case label name and expected label value information; A use case execution module is used to associate the screened use cases that meet the test requirements with the automation script, and execute the use cases by the test execution body; The update and report generation module is used to update the test results returned by the test execution body into the use case template and generate a test report based on the test report statistics template.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the automated test execution method based on the use case template as described in any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automated test execution method based on the use case template as claimed in any one of claims 1 to 7 are implemented.