Automatic test case test method and device, storage medium and computer equipment
By generating a list of project domain branches, filtering differential interfaces, and deploying target environments, the test case set is automatically tested, which solves the problem of poor enterprise system maintenance efficiency and quality, enables rapid locking of affected use cases, and improves system maintenance efficiency and quality.
Patent Information
- Application Number
- CN202410861017.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-11
AI Technical Summary
In the existing technology, the maintenance efficiency and quality of enterprise systems are poor. This is mainly due to the lack of uniformity in data preparation and use case design caused by business complexity and tester habits, resulting in the high frequency of use of key interfaces and scheduled tasks in automation projects. Affect system maintenance.
Provides an automatic testing method for test cases. It generates a project domain branch list by accepting the user's project test information, filters the difference interfaces, deploys the target environment, and generates a test case set based on the analysis results for automatic testing, and obtains the test results of the test module. , thereby quickly locking the affected test cases and conducting automatic testing.
It improves the efficiency and quality of system maintenance, reduces the amount of test data, locks the scope of business influence, avoids the interface affecting other modules, and improves the accuracy and efficiency of system maintenance.
Smart Images

Figure CN118760596A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a test case automatic testing method, device, storage medium and computer equipment. Background Art
[0002] As business needs in enterprises grow, the complexity of enterprise systems increases. Simple interface dimension automated testing can no longer guarantee the quality of the system, so it is necessary to design application scenario test cases that are more in line with the actual business. For example, E2E integrated automated testing combines data production and verification of applications and components such as interfaces, scheduled tasks, redis, vms, and configuration centers. It is suitable for use case scenario design with complicated steps, making use case design more comprehensive and interface automated embedding more convenient, thereby improving the overall coverage of the system.
[0003] However, due to the complexity of the business and the personal habits of testers, the specifications for data preparation and use case design are not unified, resulting in the high frequency of use of most key interfaces and scheduled tasks in the system in the entire automation project. Based on this, when the business changes and the system needs to be maintained, the interfaces or scheduled tasks involved in the business will affect the entire automation project, resulting in poor system maintenance efficiency and quality. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect in the prior art that when maintaining the system, the interfaces or scheduled tasks involved in the business will affect the entire automation project, resulting in poor maintenance efficiency and quality of the system.
[0005] The present application provides a test case automatic testing method, the method comprising:
[0006] When receiving the project test request information sent by the test request module from the user, generating a project domain branch list according to the project test request information;
[0007] Generate a list of difference interfaces of the test module and a target environment for deploying the test module according to the project domain branch list;
[0008] Performing requirement difference analysis on the difference interface list, and generating a test case set according to the analysis results;
[0009] Each test case in the test case set is tested based on the target environment to obtain the test result of the test module.
[0010] Optionally, the project test information includes release task information, requirement project information and module domain branch information;
[0011] The generating a project domain branch list according to the project test information includes:
[0012] Obtaining a release domain group corresponding to the release plan ID in the release task information in the test submission module, and generating a release task list; wherein the release domain group includes multiple release domains;
[0013] Determine the target release time period in the demand project information, and filter out the release domains within the target release time period from each release domain group in the release task list to form a demand project list;
[0014] The branch information in the module domain branch information is determined, and the project content corresponding to the branch information is extracted from each release domain to generate a project domain branch list.
[0015] Optionally, generating the difference interface list of the testing module according to the project domain branch list includes:
[0016] Obtaining the domain name and branch corresponding to each project content in the project domain branch list, and determining the interface corresponding to each project content according to the domain name and the branch;
[0017] The external interface call details of the test module are obtained, and based on the external interface call details, interfaces with changes are screened out from various interfaces as difference interfaces, and a difference interface list of the test module is generated according to each difference interface.
[0018] Optionally, the deploying the target environment of the testing module according to the branch list includes:
[0019] Obtaining the domain name and branch corresponding to each project content in the project domain branch list, and determining the environment requirements of each project content according to the domain name and the branch;
[0020] According to various environmental requirements, the environment is deployed in the test module to obtain the target environment of the test module.
[0021] Optionally, generating a test case set according to the analysis result includes:
[0022] According to the analysis result, the difference interfaces directly executed by the use case are filtered out from the difference interface list, and the test cases of the filtered difference interfaces are obtained to form a test case set.
[0023] Optionally, obtaining the test case of the filtered difference interface includes:
[0024] Obtaining an interface use case mapping table of the test module, and obtaining a test case of the filtered difference interface based on the interface use case mapping table;
[0025] The interface case mapping table is pre-constructed with the association relationship between each interface in the test module and the corresponding test case.
[0026] Optionally, the method further comprises:
[0027] An information sending interface corresponding to the user is obtained, and the test result of the testing module is sent to the user through the information sending interface.
[0028] The present application also provides a test case automatic testing device, comprising:
[0029] A list generation module, configured to generate a project domain branch list according to the project test information when receiving the project test information from the test module sent by the user;
[0030] An interface acquisition module, used to generate a difference interface list of the test module and a target environment for deploying the test module according to the project domain branch list;
[0031] A test case generation module is used to perform a demand difference analysis on the difference interface list and generate a test case set according to the analysis results;
[0032] The use case testing module is used to test each test case in the test case set based on the target environment to obtain the test results of the test module.
[0033] The present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the test case automatic testing method as described in any of the above embodiments.
[0034] The present application also provides a computer device, comprising: one or more processors, and a memory;
[0035] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the test case automatic testing method described in any one of the above embodiments are performed.
[0036] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0037] The test case automatic testing method, device, storage medium and computer equipment provided by the present application, when receiving the project test information of the test module sent by the user, can generate a project domain branch list according to the project test information, so as to quickly lock the business impact range, reduce the amount of test data, and thus improve efficiency; then, a difference interface list of the test module and the target environment for deploying the test module can be generated according to the project domain branch list, so as to provide basic data and basic environment for automatic testing of test cases; the present application can also perform demand difference analysis on the difference interface list, and generate a test case set according to the analysis results, and test each test case in the test case set based on the target environment to obtain the test result of the test module, and by testing the test case set, the problems of the interface in the test module can be obtained in a targeted manner, thereby improving the maintenance efficiency and quality of the system. The present application can quickly lock the affected test cases in the test module and perform automatic testing, so when performing system maintenance according to the test results, it can avoid the interfaces involved from affecting other modules, thereby improving the maintenance efficiency and quality of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, 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 creative labor.
[0039] Figure 1 A flowchart of a test case automatic testing method provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of a project domain branch list generation process provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the structure of a test case automatic testing device provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] Due to the complexity of the business and the personal habits of testers, the specifications for data preparation and use case design are not unified, resulting in a high frequency of use of most key interfaces and scheduled tasks in the system in the entire automation project. Based on this, when the business changes and the system needs to be maintained, the interfaces or scheduled tasks involved in the business will affect the entire automation project, resulting in poor system maintenance efficiency and quality.
[0045] Based on this, this application proposes the following technical solutions, see below for details:
[0046] In one embodiment, Figure 1 As shown, Figure 1 A flow chart of a test case automatic testing method provided in an embodiment of the present application; the present application provides a test case automatic testing method, which specifically includes the following:
[0047] S110: When receiving the project test request information from the test request module sent by the user, a project domain branch list is generated according to the project test request information.
[0048] In this step, when the project business in the enterprise changes, that is, after the version of any module in the enterprise system is updated, the user needs to test the module corresponding to the project to identify the interfaces or scheduled tasks affected by the changes in the business. Here, the user can use the system module as a testing module and enter the project testing information corresponding to the testing module in the testing system, so that the testing system can generate a corresponding project domain branch list based on the project testing information.
[0049] Among them, the project test information refers to the relevant information of the project content that needs to be tested due to changes in the project business. In this application, it may include the location of the project content, the reason and purpose of the test, the version and branch of the test, the list of use cases included, etc., which are not limited here. The project domain branch list refers to a summary list formed by the relevant information of the corresponding project content in multiple project domain branches to be tested.
[0050] It is understandable that the enterprise system in this application can be composed of multiple modules, so the module is the basic unit of the enterprise system, which can be divided and organized according to function or business logic, and usually contains relevant code, resources and configuration information, etc.; and the main line or trunk in the module is called the domain, which usually contains the latest code and functions and is the core of module control. In addition, developers will create multiple branches based on the module domain for the development and testing of new functions in the system. The branches here can be created according to different business needs and purposes, such as development branches, test branches, release branches, etc.
[0051] S120: Generate a list of difference interfaces of the test module and a target environment for deploying the test module according to the project domain branch list.
[0052] In this step, after obtaining the project domain branch list of the test module through step S110, the test system can generate a difference interface list of the test module according to the project domain branch list. At the same time, it can also determine the environment required for testing the test module according to the project domain branch list and deploy it, thereby obtaining the target environment of the test module.
[0053] The difference interface list refers to a list of related information of interfaces that are different from the previous version in the test module. The different interfaces here may include interfaces that have changes such as newly added interfaces, modified interfaces, and deleted interfaces.
[0054] It is understandable that the testing module can automatically identify the affected interfaces in the testing module through the project domain branch list, and then obtain the relevant information of the identified interfaces and put them into a table to form a differential interface list of the testing module. Furthermore, in order to ensure that the testing module can operate normally and stably during the test process, the testing module can also determine the target environment required for the testing of the testing module through the project domain branch list and deploy it, so as to provide the testing module with a test environment similar to the production environment.
[0055] S130: Perform a requirement difference analysis on the difference interface list, and generate a test case set according to the analysis result.
[0056] In this step, after obtaining the difference interface list of the test module in step S120, the test module can perform difference analysis on the difference interface list, and then generate a test case set according to the analysis result.
[0057] The test case set refers to the set of test cases corresponding to the interfaces in the difference interface list in the test module.
[0058] Specifically, when the present application performs a demand difference analysis on the difference interface list, the testing system can first construct a complete interface use case mapping table in the testing module based on the existing system automation use case engineering, and then analyze the changes of each interface through demand difference analysis to obtain the difference interface list. Finally, the testing system can filter out the corresponding use cases in the interface use case mapping table according to the difference interface list to form a test case set. The test cases here include use case information such as use case number, use case name, execution conditions, expected results and actual results, which are not limited here.
[0059] S140: Testing each test case in the test case set based on the target environment to obtain the test result of the test module.
[0060] In this step, after obtaining the test case set through step S130, the testing system can test each test case in the test case set based on the target environment to obtain the test results of the testing module. The present application can quickly lock the affected test cases in the testing module and perform automatic testing, so that when the user performs system maintenance according to the test results, the interface involved can be avoided from affecting other modules, thereby improving the maintenance efficiency and quality of the system.
[0061] Specifically, when the testing system tests each test case in the test case set, for each test case, the testing system can select a corresponding test tool to execute the test case; the test tools here can include automated test tools, performance test tools, security test tools, etc., which are not limited here. During the execution of the test case, the testing system can record the test case execution log, including information such as whether the test case passes, whether there are defects, and the severity of the defects.
[0062] Furthermore, for test cases that fail the test, the testing system can also manage and repair their defects and re-execute the corresponding test cases until the test case passes or reaches the maximum number of tests. Defect management and repair can be performed through defect tracking tools, such as Bugzilla, JIRA, etc., which are not limited here.
[0063] Finally, after the testing of each test case in the test case set is completed, the testing system can record the test results of each test case and then perform statistics and analysis on each test result, including the test pass rate, number of defects, defect resolution rate and other indicators of the test case set.
[0064] In the above embodiment, when the project test information of the test module sent by the user is received, a project domain branch list can be generated according to the project test information, so that the business impact range can be quickly locked, the amount of test data can be reduced, and the efficiency can be improved; then, a difference interface list of the test module and the target environment for deploying the test module can be generated according to the project domain branch list, so as to provide basic data and basic environment for automatic testing of test cases; the present application can also perform demand difference analysis on the difference interface list, and generate a test case set according to the analysis results, and test each test case in the test case set based on the target environment to obtain the test result of the test module. By testing the test case set, the problems of the interface in the test module can be obtained in a targeted manner, thereby improving the maintenance efficiency and quality of the system. The present application can quickly lock the affected test cases in the test module and perform automatic testing, so when performing system maintenance according to the test results, the interfaces involved can be avoided from affecting other modules, thereby improving the maintenance efficiency and quality of the system.
[0065] In one embodiment, Figure 2 As shown, Figure 2 A flowchart of a project domain branch list generation process provided in an embodiment of the present application; the project test information in step S110 includes release task information, requirement project information and module domain branch information; Figure 2 In the example, generating a project domain branch list according to the project test information may include:
[0066] S111: Obtain a release domain group corresponding to the release plan ID in the release task information in the test submission module, and generate a release task list; wherein the release domain group includes multiple release domains.
[0067] S112: Determine the target release time period in the demand project information, and filter out the release domains within the target release time period from each release domain group in the release task list to form a demand project list.
[0068] S113: Determine the branch information in the module domain branch information, extract the project content corresponding to the branch information from each release domain, and generate a project domain branch list.
[0069] In this embodiment, the project test information may include release task information, demand project information, and module domain branch information. Therefore, when generating a project domain branch list, the test system may first obtain the release domain group in the test module corresponding to the release plan ID in the release task information to generate a release task list; then, the target release time period in the demand project information may be determined, and the release domains within the target release time period may be screened out from each release domain group in the release task list to form a demand project list; finally, the test system may determine the branch information in the module domain branch information, and extract the project content corresponding to the branch information from each release domain to generate a project domain branch list.
[0070] It can be understood that the release task information contains the release plan ID specified in the project, and each release plan ID has its corresponding release domain group, where the basic component unit of the release domain group is the release domain; further, the number of release domains in the release domain group can be one or more, and there is no restriction here. In the demand project information, you can view the demand information in the project, including project name, demand number, demand name, demand status, target release time period, etc. Therefore, the testing system can analyze according to the demand project information, and form a demand project list from the release domains with corresponding requirements in the release task list according to the analysis results. The module domain branch information records all branch information under each release domain in the project, including branch name, status, associated project requirement number, etc. Therefore, the testing system can extract the project content corresponding to the branch information from each release domain based on the module domain branch information to generate a project domain branch list.
[0071] In one embodiment, generating a list of difference interfaces of the testing module according to the project domain branch list in step S120 may include:
[0072] S121: Obtain the domain name and branch corresponding to each project content in the project domain branch list, and determine the interface corresponding to each project content according to the domain name and branch.
[0073] S122: Obtain the external interface call details of the test module, filter out the changed interfaces from various interfaces based on the external interface call details as difference interfaces, and generate a difference interface list of the test module according to the difference interfaces.
[0074] In this embodiment, when generating a list of differential interfaces for a test module, the test system may first obtain the domain name and branch corresponding to each project content in the project domain branch list, and determine the interface corresponding to each project content based on the domain name and branch. Then, the test system may obtain the external interface call details of the test module, and based on the external interface call details, filter out interfaces with changes from each interface as differential interfaces, and generate a list of differential interfaces for the test module based on each differential interface.
[0075] It can be understood that the external interface call details refer to the interface call details for communication and interaction between the testing module and the external system or service, which usually exist in the form of interface documents or interface testing tools. The interface document here is a document that explains and describes the external interface, including interface name, interface method, request parameters, response parameters, return value type and other information.
[0076] Specifically, the testing module can use the code management tool to determine the domain name and branch from the code repository to determine the interface corresponding to each project content. At the same time, it can also obtain the external interface call details of the testing module through the interface testing tool or interface document. In this way, the testing module can filter out the changed interfaces from each interface as the difference interface according to the external interface call details; among them, the difference interface can specifically include interfaces with changes such as newly added interfaces, modified interfaces and deleted interfaces. Finally, the testing module can list each difference interface to obtain a difference interface list.
[0077] Furthermore, when the difference interface list of the test module is generated, if the test system receives a test interface input by the user, the test interface may be used as the difference interface of the test module and added to the difference interface list.
[0078] In one embodiment, the target environment of deploying the testing module according to the project domain branch list in step S120 may include:
[0079] S123: Obtain the domain name and branch corresponding to each project content in the project domain branch list, and determine the environment requirement of each project content according to the domain name and branch.
[0080] S124: Performing environment deployment in the test module according to various environment requirements to obtain a target environment for the test module.
[0081] In this embodiment, when deploying the target environment of the testing module, the testing module can first obtain the domain name and branch corresponding to each project content in the project domain branch list, and determine the environmental requirements of each project content based on the domain name and branch. Then, the testing module can perform environmental deployment in the testing module according to each environmental requirement to obtain the target environment of the testing module.
[0082] Specifically, the testing module can use code management tools to determine the domain name and branch from the code repository to determine the environmental requirements corresponding to each project content. Then the testing module can perform environmental deployment of the testing module according to the environmental requirements of each project content. The environmental deployment includes installation and configuration of related software and tools, creation of test cases and test data, and other deployment steps. It should be noted that the environmental deployment needs to be adjusted and optimized according to the actual situation to ensure the smooth preparation and deployment of the target environment.
[0083] Furthermore, after the target environment of the test module is deployed, the test system can also perform environmental testing and verification to ensure that the target environment of the test module can meet the requirements of testing and deployment. Among them, environmental testing and verification can include functional testing, performance testing, security testing and other aspects. After the environmental testing and verification are passed, the test system can execute and track the test work of the test module in the target environment. In addition, during the execution and tracking of the test work, the test system needs to fully consider factors such as the preparation and configuration of the test environment, the execution and management of test cases, and the analysis and evaluation of test results to ensure the effectiveness and reliability of the test work.
[0084] In one embodiment, generating a test case set according to the analysis result in step S130 may include:
[0085] S131: Filter out the difference interfaces directly executed by the use case from the difference interface list according to the analysis result, and obtain test cases of the filtered difference interfaces to form a test case set.
[0086] In this embodiment, when generating a test case set, the testing system can filter out the difference interfaces directly executed by the test case from the difference interface list according to the analysis results, and obtain the test cases of the filtered difference interfaces to form a test case set.
[0087] Specifically, the testing system can perform a requirement difference analysis on each difference interface based on the difference interface list, and filter out the difference interfaces that can be directly executed by the use case based on the requirement difference analysis results; the difference interfaces directly executed by the use case here refer to interfaces that can be directly tested through existing test cases without the need to rewrite new test cases. Finally, the testing system can integrate the test cases of the difference interfaces that can be directly executed by the use case into a test case set, and sort and classify them according to the execution order and priority of the test cases. Among them, the test case set should include all test cases of the difference interfaces that can be directly executed by the use case, as well as the corresponding test environment, test data and other information.
[0088] In one embodiment, obtaining the test cases of the filtered difference interfaces in step S131 may include:
[0089] S132: Obtain an interface use case mapping table of the test module, and obtain test cases of the filtered difference interfaces based on the interface use case mapping table.
[0090] In this embodiment, when obtaining the test cases of the filtered difference interfaces, the testing system may first obtain the interface case mapping table of the testing module, and obtain the test cases of the filtered difference interfaces based on the interface case mapping table.
[0091] Specifically, the interface case mapping table pre-builds the association relationship between each interface in the test module and the corresponding test case. Therefore, for each filtered difference interface, the test system can directly retrieve the association relationship corresponding to the difference interface from the interface case mapping table, and then determine the test case corresponding to the difference interface based on the association relationship.
[0092] In one embodiment, the method may further include:
[0093] S150: Acquire an information sending interface, and send the test result of the test module to the user through the information sending interface.
[0094] In this embodiment, the testing system may also obtain an information sending interface, and send the test result of the testing module to the user through the information sending interface.
[0095] Specifically, the testing system can send the test results of the testing module to the user in the form of a custom email. To elaborate, the testing system can access the information sending interface of the email. When the testing system obtains the test results of the testing module, it can determine the relevant information of the user based on the project testing information, including the email subject, email content, recipient address, cc address and other information. Then the testing system can generate a custom email based on the user's relevant information and test results, and send the custom email to the user through the information sending interface. Other methods that can implement the sending of test results in this application can all be used as the preferred solution of this application and are not limited here.
[0096] The following is a description of a test case automatic testing device provided in an embodiment of the present application. The test case automatic testing device described below and the test case automatic testing method described above can refer to each other.
[0097] In one embodiment, Figure 3 As shown, Figure 3 A schematic diagram of the structure of a test case automatic testing device provided in an embodiment of the present application; the present application also provides a test case automatic testing device, including a list generation module 210, an interface acquisition module 220, a case generation module 230 and a case testing module 240, specifically including the following:
[0098] The list generating module 210 is used to generate a project domain branch list according to the project testing information when receiving the project testing information from the testing module sent by the user.
[0099] The interface acquisition module 220 is used to generate a difference interface list of the test module and a target environment for deploying the test module according to the project domain branch list.
[0100] The use case generation module 230 is used to perform requirement difference analysis on the difference interface list and generate a test case set according to the analysis result.
[0101] The case test module 240 is used to test each test case in the test case set based on the target environment to obtain the test result of the test module.
[0102] In the above embodiment, when the project test information of the test module sent by the user is received, a project domain branch list can be generated according to the project test information, so that the business impact range can be quickly locked, the amount of test data can be reduced, and the efficiency can be improved; then, a difference interface list of the test module and the target environment for deploying the test module can be generated according to the project domain branch list, so as to provide basic data and basic environment for automatic testing of test cases; the present application can also perform demand difference analysis on the difference interface list, and generate a test case set according to the analysis results, and test each test case in the test case set based on the target environment to obtain the test result of the test module. By testing the test case set, the problems of the interface in the test module can be obtained in a targeted manner, thereby improving the maintenance efficiency and quality of the system. The present application can quickly lock the affected test cases in the test module and perform automatic testing, so when performing system maintenance according to the test results, the interfaces involved can be avoided from affecting other modules, thereby improving the maintenance efficiency and quality of the system.
[0103] In one embodiment, the list generation module 210 may include:
[0104] The release domain group determination submodule is used to obtain the release domain group corresponding to the release plan ID in the release task information in the test module, and generate a release task list; wherein the release domain group includes multiple release domains.
[0105] The release domain screening submodule is used to determine the target release time period in the demand project information, and screen the release domains within the target release time period from each release domain group in the release task list to form a demand project list.
[0106] The project content extraction submodule is used to determine the branch information in the module domain branch information, and extract the project content corresponding to the branch information from each release domain to generate a project domain branch list.
[0107] In one embodiment, the interface acquisition module 220 may include:
[0108] The interface determination submodule is used to obtain the domain name and branch corresponding to each project content in the project domain branch list, and determine the interface corresponding to each project content according to the domain name and branch.
[0109] The interface screening submodule is used to obtain the external interface call details of the test module, screen out the changed interfaces from various interfaces based on the external interface call details as the difference interfaces, and generate a difference interface list of the test module based on each difference interface.
[0110] In one embodiment, the interface acquisition module 220 may further include:
[0111] The requirement determination submodule is used to obtain the domain name and branch corresponding to each project content in the project domain branch list, and determine the environmental requirements of each project content based on the domain name and branch.
[0112] The environment deployment submodule is used to deploy the environment in the test module according to various environmental requirements to obtain the target environment of the test module.
[0113] In one embodiment, the use case generation module 230 may include:
[0114] The use case acquisition submodule is used to filter out the difference interfaces directly executed by the use case from the difference interface list according to the analysis results, and obtain the test cases of the filtered difference interfaces to form a test case set.
[0115] In one embodiment, the use case acquisition submodule may include:
[0116] The use case acquisition unit is used to obtain the interface use case mapping table of the test module, and obtain the test cases of the filtered difference interfaces based on the interface use case mapping table.
[0117] The interface case mapping table pre-builds the association relationship between each interface in the test module and the corresponding test case.
[0118] In one embodiment, the apparatus may further include:
[0119] The result sending module is used to obtain the information sending interface and send the test results of the test module to the user through the information sending interface.
[0120] In one embodiment, the present application also provides a storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the test case automatic testing method described in any of the above embodiments.
[0121] In one embodiment, the present application also provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the test case automatic testing method as described in any of the above embodiments.
[0122] Indicatively, Figure 4 As shown, Figure 4 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 4The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301, for storing instructions that can be executed by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the test case automatic testing method of any of the above embodiments.
[0123] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0124] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0126] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0127] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those 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 application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A test case automatic testing method, characterized in that: The method comprises: When receiving the project test request information sent by the test request module from the user, generating a project domain branch list according to the project test request information; Generate a list of difference interfaces of the test module and a target environment for deploying the test module according to the project domain branch list; Performing requirement difference analysis on the difference interface list, and generating a test case set according to the analysis results; Each test case in the test case set is tested based on the target environment to obtain the test result of the test module.
2. The test case automatic testing method according to claim 1, characterized in that: The project test information includes release task information, required project information and module domain branch information; The generating a project domain branch list according to the project test information includes: Obtaining a release domain group corresponding to the release plan ID in the release task information in the test submission module, and generating a release task list; wherein the release domain group includes multiple release domains; Determine the target release time period in the demand project information, and filter out the release domains within the target release time period from each release domain group in the release task list to form a demand project list; The branch information in the module domain branch information is determined, and the project content corresponding to the branch information is extracted from each release domain to generate a project domain branch list.
3. The test case automatic testing method according to claim 1, characterized in that: The step of generating the difference interface list of the testing module according to the project domain branch list includes: Obtaining the domain name and branch corresponding to each project content in the project domain branch list, and determining the interface corresponding to each project content according to the domain name and the branch; The external interface call details of the test module are obtained, and based on the external interface call details, interfaces with changes are screened out from various interfaces as difference interfaces, and a difference interface list of the test module is generated according to each difference interface.
4. The test case automatic testing method according to claim 1, characterized in that: The target environment of the test module is deployed according to the project domain branch list, including: Obtaining the domain name and branch corresponding to each project content in the project domain branch list, and determining the environment requirements of each project content according to the domain name and the branch; According to various environmental requirements, the environment is deployed in the test module to obtain the target environment of the test module.
5. The test case automatic testing method according to claim 1, characterized in that: The generating of a test case set according to the analysis result includes: According to the analysis result, the difference interfaces directly executed by the use case are filtered out from the difference interface list, and the test cases of the filtered difference interfaces are obtained to form a test case set.
6. The test case automatic testing method according to claim 5, characterized in that: The test case of obtaining the filtered difference interface includes: Obtaining an interface use case mapping table of the test module, and obtaining a test case of the filtered difference interface based on the interface use case mapping table; The interface case mapping table is pre-constructed with the association relationship between each interface in the test module and the corresponding test case.
7. The test case automatic testing method according to claim 1, characterized in that: The method further comprises: An information sending interface corresponding to the user is obtained, and the test result of the testing module is sent to the user through the information sending interface.
8. A test case automatic testing device, characterized in that: include: A list generation module, configured to generate a project domain branch list according to the project test information when receiving the project test information from the test module sent by the user; An interface acquisition module, used to generate a difference interface list of the test module and a target environment for deploying the test module according to the project domain branch list; A test case generation module is used to perform a demand difference analysis on the difference interface list and generate a test case set according to the analysis results; The use case testing module is used to test each test case in the test case set based on the target environment to obtain the test results of the test module.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the test case automatic testing method as described in any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the test case automatic testing method according to any one of claims 1 to 7 are executed.
