Method for automatically backfilling test data, storage medium and computer equipment
By filling in the configuration information of the data form in the automated test tool, establishing a connection with the platform data form, and automatically backfilling the test results, it solves the problem that testers manually backfill the test results and error-prone, and improves the testing efficiency and data backfill accuracy .
Patent Information
- Application Number
- CN202411265206.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-02-07
AI Technical Summary
Testers need to manually enter the test results after each test case is completed, which leads to cumbersome and prone to errors, and lacks tools to automatically backfill the test results to improve efficiency.
Provide a method of automatically backfilling test data. By filling in the configuration information of the data form in the automated test tool, it establishes connection with the data form of the corresponding platform, runs the automated test tool to obtain test results, and will tests that meet preset conditions. The results are backfilled in the data form.
Automatic backfill of test results is realized, reducing manual operations, improving data backfill efficiency, reducing the work burden of testers, and improving testing efficiency.
Smart Images

Figure CN119396709A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, storage medium and computer equipment for automatic backfilling of test data. Background Art
[0002] As popular enterprise collaboration tools, WeChat, DingTalk, and Feishu open platforms provide great convenience for testers with their powerful spreadsheet functions, which are often used to store and manage test cases. However, after completing each test case, testers still need to manually enter the test results, which is not only cumbersome but also prone to errors.
[0003] Currently, there is still a lack of a set of tools that can automatically fill the test results back into the corresponding data tables on each platform to improve the work efficiency of testers. Summary of the invention
[0004] The present application mainly provides a method, storage medium and computer equipment for automatically backfilling test data to solve the problem of low efficiency of testers backfilling test results.
[0005] In order to solve the above technical problems, a technical solution adopted by the present application is: to provide a method for automatically backfilling test data. The method for automatically backfilling test data includes: in response to configuration information received by an automated testing tool, establishing a connection between the automated testing tool and a data table, wherein the configuration information includes the type of test results; running the automated testing tool to test preset test cases and record the test results of the test cases; and backfilling the test results that meet preset conditions into the data table, wherein the preset conditions are consistent with the type of test results defined in the configuration information.
[0006] By filling in the configuration information of the data table in the automated testing tool, the automated testing tool can establish a connection with the data table of the corresponding platform to facilitate data interaction. After that, the automated testing tool can be run to obtain the corresponding test results, and the test results that meet the preset conditions can be backfilled into the data table. That is, after the automated testing tool completes the test of the test case, the test results that meet the preset conditions can be automatically backfilled into the data table. There is no need for manual backfilling, and filling errors that are easily caused by manual backfilling can also be eliminated, which effectively improves the efficiency of data backfilling, reduces the workload of testers, and improves the work efficiency of testers.
[0007] In some embodiments, the method for automatically backfilling test data further includes:
[0008] The configuration information includes the address of the data table, and the permissions of the data table are configured as external permissions; the response to the configuration information received by the automated testing tool enables the automated testing tool to establish a connection with the data table, including: the automated testing tool obtains the application programming interface calling permissions of the data table based on the address of the data table to establish a connection with the data table.
[0009] By establishing a connection between automated testing tools and data tables, the testing process is automated, human intervention is reduced, the probability of errors is reduced, and testing efficiency is improved; through external permission configuration and application programming interface call permission management, data security and access control can be ensured to prevent unauthorized access.
[0010] In some embodiments, the method for automatically backfilling test data further includes:
[0011] After the automated testing tool obtains the application programming interface calling authority of the data table based on the address of the data table, the method further includes: obtaining a request token of the data table based on the address of the data table.
[0012] By obtaining a request token for the data table based on the address of the data table, it is possible to ensure that the automated testing tool can interact with the data table safely and efficiently, thereby achieving automated testing.
[0013] In some embodiments, the method for automatically backfilling test data further includes:
[0014] The method of backfilling the test results that meet the preset conditions into the data table includes: the automated testing tool splicing the address of the data table and the appropriate request header based on the name of the test case and the request token to find out whether the test case exists in the data table; in response to the test case existing in the data table, the automated testing tool issues a first request to the data table to obtain a table identifier of the test result corresponding to the test case in the data table; the automated testing tool splices a second request based on the address of the data table, the test result and the table identifier of the test result, and backfills the test result into the test result column of the data table based on the second request and the test round of the test case.
[0015] By using automated testing tools to stitch together the data table address and appropriate request headers based on the test case name and request token, it is possible to accurately find out whether the test case exists in the data table. Obtaining the table identifier ensures that the test results can be accurately filled back into the correct test case record. Automated testing tools construct a second request to ensure that the test results can be recorded in the correct test round.
[0016] In some embodiments, the method for automatically backfilling test data further includes:
[0017] The automated testing tool concatenates the address of the data table and the appropriate request header based on the name of the test case and the request token, and also includes: in response to the test case not existing in the data table, prompting backfill failure and executing backfill of the test result of the next test case.
[0018] By responding to the test case not existing in the data table, prompting a backfill failure and executing backfill of the test result of the next test case, the efficiency and continuity of the automation process can be ensured.
[0019] In some embodiments, the method for automatically backfilling test data further includes:
[0020] After the automated testing tool concatenates the address of the data table and the appropriate request header based on the name of the test case and the request token, it also includes: in response to the test case not existing in the data table, adding the name of the test case in the data table.
[0021] By adding non-existent test cases to the data table, the automated testing tool improves the automation level of test data management, ensures the integrity and accuracy of the test results, and also improves the efficiency and reliability of the testing process.
[0022] In some embodiments, the method for automatically backfilling test data further includes:
[0023] After backfilling the test results into the test result column of the data table based on the second request and the test round of the test case, it also includes: backfilling the corresponding tester name and current test date into the corresponding column of the data table.
[0024] By filling in the corresponding tester name and current test date into the corresponding column of the data table, the test performer can be identified, which helps to analyze the timeline and frequency of testing activities.
[0025] In some embodiments, the method for automatically backfilling test data further includes:
[0026] The data table is a data table of the Feishu platform, and the automated testing tool is integrated with a Feishu platform data interface; and / or the data table is a data table of the WeChat platform, and the automated testing tool is integrated with a WeChat platform data interface; and / or the data table is a data table of the DingTalk platform, and the automated testing tool is integrated with a DingTalk platform data interface.
[0027] The data table can be a data table for multiple platforms, and the data interfaces of multiple platforms can also be integrated into the automated testing tools, which can reduce the workload of testers using platforms such as Feishu, WeChat or DingTalk, and improve the work efficiency of testers.
[0028] To solve the above technical problem, another technical solution adopted by the present application is to provide a storage medium having program data stored thereon, and the program data, when executed by a processor, implements the steps of the above method for automatically backfilling test data.
[0029] To solve the above technical problem, another technical solution adopted by the present application is to provide a computer device. The computer device includes a processor and a memory connected to each other, the memory stores a computer program, and when the processor executes the computer program, the steps of the method for automatic backfilling of test data as described above are implemented.
[0030] The beneficial effect of the present application is that, different from the prior art, the present application discloses a method, storage medium and computer device for automatic backfilling of test data. By filling in the configuration information of the data table in the automated testing tool, the automated testing tool can establish a connection with the data table of the corresponding platform to facilitate data interaction, and then the automated testing tool is run to obtain the corresponding test results, and the test results that meet the preset conditions are backfilled into the data table, that is, after the automated testing tool completes the test of the test case, the test results that meet the preset conditions can be automatically backfilled into the data table, without manual backfilling, and filling errors that are easily caused by manual backfilling can be eliminated, effectively improving the efficiency of data backfilling, reducing the workload of testers, and improving the work efficiency of testers. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] 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 prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0032] Figure 1It is a flowchart of an embodiment of a method for automatic backfilling of test data provided by the present application;
[0033] Figure 2 yes Figure 1 A flowchart of an embodiment of step 30 in a method for automatically backfilling test data;
[0034] Figure 3 It is a structural schematic diagram of an embodiment of the storage medium provided by the present application;
[0035] Figure 4 It is a structural schematic diagram of an embodiment of a computer device provided by the present application. DETAILED DESCRIPTION
[0036] 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.
[0037] The terms "first", "second", "third" in the embodiments of the present application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0038] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0039] This application provides a method for automatically backfilling test data. Figure 1 , Figure 11 is a flow chart of an embodiment of a method for automatically backfilling test data provided by the present application. The method for automatically backfilling test data includes:
[0040] Step 10: In response to the configuration information received by the automated testing tool, the automated testing tool is caused to establish a connection with the data table, wherein the configuration information includes the type of the test result.
[0041] Automated testing tools are used to test test cases and output test results.
[0042] The data table may be a data table in WeChat, DingTalk or Lark open platform, and the data table mainly includes columns such as test case name, test steps, expected results, test rounds, test results, testers and test time.
[0043] Optionally, the data table may be pre-built by the tester on the corresponding platform, or the test table may be pre-stored on the corresponding platform, and it may be one of a set of pre-stored test tables.
[0044] Optionally, the data table may also be automatically generated on a corresponding platform based on the configuration information.
[0045] Configuration information is set by testers in automated testing tools and can be used to define the address, type, format, and test results of data tables.
[0046] For example, if the data table is pre-built by the tester on the platform, the configuration information may include an address that can locate the data table; or, if the data table is one of the test tables in the platform, the configuration information may include an address that defines the test table set and the type of test table required therein.
[0047] Alternatively, the configuration information includes the platform address and definition information of the data table, so that when the automated testing tool establishes a connection with the platform, a corresponding data table can be automatically generated on the platform, and the automated testing tool then establishes a connection with the data table, wherein the definition information may include the number of rows and columns of the data table and the names of each item in the table.
[0048] In this embodiment, the configuration information includes the type of the test result, so that the test result that matches the type of the test result can be filled back into the data table.
[0049] For test results that do not match the specified type, the tester chooses not to fill in the test result, so that the cause of the test failure can be analyzed and modified, and a second test or multiple tests can be performed until the test result matches the specified type, and the test data is automatically filled in the data table.
[0050] Optionally, the data table is a data table of the Feishu platform, and the automated testing tool is integrated with a Feishu platform data interface; and / or, the data table is a data table of the WeChat platform, and the automated testing tool is integrated with a WeChat platform data interface; and / or, the data table is a data table of the DingTalk platform, and the automated testing tool is integrated with a DingTalk platform data interface.
[0051] Among them, the automated testing tool integrates at least one of the Feishu platform data interface, the WeChat platform data interface and the DingTalk platform data interface, so it can obtain the information of the data table from the corresponding platform and backfill it, which greatly expands the platform on which the automated testing tool can backfill test data, broadens the application scenarios of the automated testing tool, and avoids the problem that the automated testing tool cannot support backfilling due to switching between different platforms.
[0052] Step 20: Run the automated testing tool to test the preset test cases and record the test results of the test cases.
[0053] The automated testing tool has a user interface, and the tester selects the test cases to be tested through the user interface, so that the automated testing tool runs the test cases.
[0054] The test result is the result automatically generated by the automated testing tool after running the test case, which can include pass, fail or no status, where no status means that the automated testing tool cannot obtain the test result after running the test case.
[0055] For example, if the configuration information defines the type of test result as pass, then the test result of pass will be automatically filled back into the data table. For the test result of fail or no status, it will not be filled back into the data table.
[0056] Automatically backfilling the test result types defined in the configuration information into the data table improves the backfill efficiency of the test results.
[0057] Step 30: Fill the test results that meet the preset conditions back into the data table, where the preset conditions are consistent with the type of test results defined in the configuration information.
[0058] The preset conditions of the test are consistent with the type of test results defined in the configuration information to ensure the logical consistency of the test. If the conditions and result types do not match, it may lead to incorrect interpretation of the test results.
[0059] In this embodiment, the configuration information includes the address of the data table, and the authority of the data table is configured as an external authority.
[0060] The configuration information includes the address of the data table, ensuring that the automated testing tool can access the data table and fill in the test results through the integrated data interface.
[0061] By configuring the permissions of the data table as external permissions, the integrated data interface on the automated testing tool can obtain the access permissions of the data table, establish a connection with the data table, and fill the test results of the test case back into the test table. In addition, the external permission configuration and the management of application programming interface call permissions can ensure data security and access control to prevent unauthorized access.
[0062] See also Figure 2 , Figure 2 for Figure 1 The flowchart of step 30 of an embodiment of the method for automatic backfilling of test data includes:
[0063] Step 31: Get a request token for the data table based on the address of the data table.
[0064] The request token is an encrypted string generated by the server. After the automated testing tool is connected to the data table through the integrated data interface, the next access only requires requesting the token to request data within the valid time, without reconnecting the automated testing tool and the data table.
[0065] Specifically, obtaining a request token for a data table based on the address of the data table includes the following steps: tester identity verification, server-side token generation, token issuance, requesting with the token, and server-side token verification. The tester identity verification varies depending on the authentication mechanism used.
[0066] Optionally, when the automated testing tool uses Open Authorization 2.0, the tester needs to go through a series of authorization processes to obtain an access token.
[0067] Optionally, when the automated testing tool uses an application programming interface, the tester directly sends the application programming interface key as a parameter or header information to the server for verification when making a request.
[0068] By using request tokens, you can ensure that only authorized testers or APIs can access the data tables, thereby improving data security.
[0069] Step 32: The automated testing tool concatenates the address of the data table and the appropriate request header based on the name of the test case and the request token to find out whether the test case exists in the data table.
[0070] The request header is used to specify the request attributes of the automated testing tool. Feishu platform, WeChat platform, and DingTalk platform will process the request based on the information in the request header.
[0071] By concatenating the address of the data table and the appropriate request header, the automated testing tool can effectively connect to the data table based on the name of the test case and the request token, ensuring the correct transmission and processing of the test results while also enhancing security.
[0072] The automated testing tool concatenates the address of the data table and the appropriate request header through a string according to the format required by the Feishu platform, WeChat platform, and DingTalk platform, and then searches whether the test case exists in the data table based on the name of the test case and the request token. This can improve query efficiency, reduce query errors caused by human errors, and improve the accuracy of the search process.
[0073] Step 33: In response to the test case existing in the data table, the automated testing tool sends a first request to the data table to obtain a table identifier of the test result corresponding to the test case in the data table; the automated testing tool splices a second request based on the address of the data table, the test result and the table identifier of the test result, and fills the test result back into the test result column of the data table based on the second request and the test round of the test case.
[0074] The first request is sent to the data table through a data interface integrated with the automated testing tool, and is used to obtain a table identifier of a test result corresponding to a test case in the data table.
[0075] The second request is formed by the automated testing tool based on the address of the data table, the test result and the table identifier of the test result. The automated testing tool fills the test result back into the test result column of the data table based on the second request and the test round of the test case.
[0076] The test rounds of a test case can be used to identify different versions of test results in the same table, avoiding the creation of a new table for each project or version, thereby simplifying maintenance work.
[0077] In this embodiment, after filling the test results back into the test result column of the data table based on the test round of the second request and the test case, the automated testing tool also needs to fill in the corresponding tester name and the current test date into the corresponding column of the data table, which can clarify the test executor and help analyze the timeline and test frequency of the test activities.
[0078] Step 34: In response to the test case not existing in the data table, prompt that the backfill fails and execute the backfill test result of the next test case.
[0079] If the automated testing tool finds that the test case does not exist in the data table based on the name of the test case, the address of the request token spliced data table, and the appropriate request header, it will prompt the tester on the user interface that the backfill failed, and continue to execute the above steps to backfill the test results of the next test case, thereby improving the efficiency of backfilling test results.
[0080] Specifically, the test case does not exist in the data table. Adding the name of the test case in the data table makes it easier for testers to analyze the test results, which can ensure the completeness and accuracy of the test results and improve the efficiency and reliability of the test process.
[0081] See also Figure 3 , Figure 3 It is a structural diagram of an embodiment of the storage medium provided by the present application.
[0082] The storage medium 40 stores program data 41. When the program data 41 is executed by the processor, the following is achieved: Figure 1 and Figure 2 The steps of the method for automatic backfilling of test data are described.
[0083] The program data 41 is stored in a storage medium 40, and includes a number of instructions for enabling a network device (such as a router, a personal computer, a server, or other network device) or a processor to execute all or part of the steps of the method described in each embodiment of the present application.
[0084] Optionally, the storage medium 40 may be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or other medium that can store the program data 41 .
[0085] See also Figure 4 , Figure 4 The computer device 50 includes a processor 52 and a memory 51 connected to each other. The memory 51 stores a computer program. When the processor 52 executes the computer program, the steps of the method for automatic backfilling of test data as described above are implemented.
[0086] Different from the prior art, the present application discloses a method, storage medium and computer device for automatic backfilling of test data. By filling in the configuration information of the data table in the automated testing tool, the automated testing tool can establish a connection with the data table of the corresponding platform to facilitate data interaction. After that, the automated testing tool is run to obtain the corresponding test results, and the test results that meet the preset conditions are backfilled into the data table. That is, after the automated testing tool completes the test of the test case, the test results that meet the preset conditions can be automatically backfilled into the data table, without manual backfilling, and filling errors that are easily caused by manual backfilling can be eliminated, effectively improving the efficiency of data backfilling, reducing the workload of testers, and improving the work efficiency of testers.
[0087] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the storage medium embodiment and the electronic device embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0088] The present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for automatic backfilling of test data, characterized in that: The method for automatically backfilling test data includes: In response to configuration information received by the automated testing tool, causing the automated testing tool to establish a connection with the data table, the configuration information including a type of test result; Running the automated testing tool to test preset test cases and record the test results of the test cases; The test results that meet the preset conditions are filled back into the data table, and the preset conditions are consistent with the type of test results defined in the configuration information.
2. The method for automatic backfilling of test data according to claim 1, characterized in that: The configuration information includes the address of the data table, and the authority of the data table is configured as an external authority; The step of establishing a connection between the automated testing tool and the data table in response to the configuration information received by the automated testing tool includes: The automated testing tool obtains the application programming interface calling authority of the data table based on the address of the data table to establish a connection with the data table.
3. The method for automatic backfilling of test data according to claim 2, characterized in that: After the automated testing tool obtains the application programming interface calling authority of the data table based on the address of the data table, the automated testing tool further includes: A request token for the data table is obtained based on the address of the data table.
4. The method for automatic backfilling of test data according to claim 3, characterized in that: The step of filling the test results meeting the preset conditions back into the data table includes: The automated testing tool concatenates the address of the data table and an appropriate request header based on the name of the test case and the request token to find out whether the test case exists in the data table; In response to the test case existing in the data table, the automated testing tool sends a first request to the data table to obtain a table identifier of a test result corresponding to the test case in the data table; The automated testing tool assembles a second request based on the address of the data table, the test result and the table identifier of the test result, and fills the test result back into the test result column of the data table based on the second request and the test round of the test case.
5. The method for automatic backfilling of test data according to claim 4, characterized in that: After the automated testing tool splices the address of the data table and the appropriate request header based on the name of the test case and the request token, it also includes: In response to the test case not existing in the data table, a prompt is given that the backfill fails and the test result of the next test case is backfilled.
6. The method for automatic backfilling of test data according to claim 4, characterized in that: After the automated testing tool splices the address of the data table and the appropriate request header based on the name of the test case and the request token, it also includes: In response to the test case not existing in the data table, adding the name of the test case in the data table.
7. The method for automatic backfilling of test data according to claim 4, characterized in that: After the test result is filled back into the test result column of the data table based on the second request and the test round of the test case, the method further includes: The corresponding tester name and current test date are filled back into the corresponding columns of the data table.
8. The method for automatic backfilling of test data according to claim 1, characterized in that: The data table is a data table of the Feishu platform, and the automated testing tool is integrated with a data interface of the Feishu platform; and / or The data table is a data table of the WeChat platform, and the automated testing tool is integrated with a WeChat platform data interface; and / or The data table is a data table of the DingTalk platform, and the automated testing tool is integrated with a DingTalk platform data interface.
9. A storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the steps of the method for automatic backfilling of test data as claimed in any one of claims 1 to 8 are implemented.
10. A computer device, characterized in that: The method comprises a processor and a memory connected to each other, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for automatic backfilling of test data as claimed in any one of claims 1 to 8 are implemented.