Methods, devices and equipment, and storage media for importing interface test result data

By automating the extraction of basic interface information and the acquisition of request information, the problem of high manual costs in inputting interface test results into the automated testing platform has been solved, and efficient import of interface test result data has been achieved.

CN115437963BActive Publication Date: 2026-04-03AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, inputting interface test data into automated testing platforms requires significant manual labor, resulting in low efficiency.

Method used

By acquiring test result data from interface testing tools, basic interface information and request information are automatically extracted using extraction keywords. Requests are then generated and sent to the server. After acquiring interface data, it is stored in historical or new test case sets, thus achieving automated import of interface test result data.

Benefits of technology

It reduced labor costs and improved the efficiency of inputting interface test data into the automated testing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437963B_ABST
    Figure CN115437963B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for importing interface test result data. The method includes: acquiring test result data from an interface testing tool; acquiring extraction keywords, extracting basic interface information from the test result data based on the extraction keywords, and acquiring a request to acquire interface data corresponding to the basic interface information; generating request information based on the basic interface information and the acquisition request; sending the request information to a server, acquiring interface data sent by the server in response to the request information; generating interface information based on the basic interface information and the corresponding interface data; storing the interface information in a historical test case set or a new test case set, thus completing the import of test result data. This method can solve the problem of how to improve the efficiency of inputting interface test data into an automated testing platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to automated testing technology, and more particularly to a method, apparatus, device, and storage medium for importing interface test result data. Background Technology

[0002] Automated testing refers to the automation of software testing. Software testing involves running a system or application under preset conditions and evaluating the results. In the current testing process, testers need to complete interface testing first to confirm the interface is correct and stable before entering the interface tests into the automated testing platform as automated test cases to provide capability for subsequent regression testing.

[0003] However, after confirming that the interface is correct and stable, a lot of manual labor is required to complete the interface test data entry into the automated testing platform. This not only increases the cost of automated interface test data entry into the automated testing platform, but also reduces the efficiency of interface test data entry into the automated testing platform.

[0004] Improving the efficiency of inputting interface test data into automated testing platforms remains an urgent issue to be addressed. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for importing interface test result data, in order to solve the problem of how to improve the efficiency of inputting interface test data into an automated testing platform.

[0006] On one hand, this application provides a method for importing interface test result data, applied to a test import device, wherein the test import device is set in an automated testing platform, and the method includes:

[0007] Obtain test result data from the interface testing tool;

[0008] Obtain extraction keywords, extract basic interface information from the test result data based on the extraction keywords, and obtain the interface data acquisition request corresponding to the basic interface information. Generate request information based on the basic interface information and the acquisition request.

[0009] Send the request information to the server and obtain the interface data sent by the server in response to the request information;

[0010] Based on the basic interface information and the corresponding interface data, interface information is generated, and the interface information is stored in the historical test case set or the new test case set to complete the import of test result data.

[0011] In one embodiment, generating interface information based on the interface basic information and the interface data corresponding to the interface basic information includes:

[0012] Initial interface information is generated based on the interface basic information and the interface data corresponding to the interface basic information, and the initial interface information includes assertions;

[0013] The preset assertions in the initial interface information are supplemented, and the selected assertions are supplemented according to the supplementation operation. The interface information is obtained according to the initial interface information after the supplemented assertions.

[0014] In one embodiment, the method further includes:

[0015] The selected assertions are added to the supplementary assertion set, wherein the supplementary assertion set includes the preset assertions and historically supplemented assertions.

[0016] In one embodiment, the method further includes:

[0017] Obtain the assertion display command to display the supplementary assertion set and the search box;

[0018] Based on the search box, obtain the assertion search command;

[0019] Execute the assertion search command to match and display the target assertion from the supplementary assertion set.

[0020] In one embodiment, the method further includes:

[0021] In response to the display operation, the environment parameter modification interface for the first test case set is displayed;

[0022] Obtain the command to modify the environment parameters of the first test case set from the environment parameter modification interface of the first test case set;

[0023] In response to the environment parameter modification command of the first test case set, update the environment parameters in the interface information of the first test case set to the environment parameters specified by the environment parameter modification command.

[0024] In one embodiment, obtaining the extracted keywords includes:

[0025] When no keyword update operation is detected, the historical keywords are obtained as the extracted keywords;

[0026] When a keyword update operation is detected, the updated keyword is obtained as the extracted keyword.

[0027] In one embodiment, the acquisition of test result data from the interface testing tool includes:

[0028] Obtain test result files using interface testing tools;

[0029] The test result file is parsed to obtain the test result data.

[0030] On the other hand, this application provides an interface test result data import device, comprising:

[0031] The acquisition module is used to acquire test result data from the interface testing tool;

[0032] The processing module is used to obtain extraction keywords, extract basic interface information from the test result data based on the extraction keywords, obtain the interface data acquisition request corresponding to the basic interface information, and generate request information based on the basic interface information and the acquisition request.

[0033] The communication module is used to send the request information to the server and obtain the interface data sent by the server after responding to the request information;

[0034] The storage module is used to generate interface information based on the interface basic information and the interface data corresponding to the interface basic information, store the interface information to the historical test case set or the new test case set, and complete the import of test result data.

[0035] On the other hand, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0036] The memory stores computer-executed instructions;

[0037] The processor executes computer execution instructions stored in the memory to implement the method for importing interface test result data as described in the first aspect.

[0038] On the other hand, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed, cause a computer to perform the method for importing interface test result data as described in the first aspect.

[0039] On the other hand, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method for importing interface test result data as described in the first aspect.

[0040] The interface test result data import method provided in the embodiments of this application is applied to the test import device of an automated testing platform. Specifically, after obtaining the test result data of the interface testing tool, basic interface information is automatically extracted from the test result data based on extraction keywords, and a request to obtain the interface data corresponding to the basic interface information is obtained. After generating request information based on the basic interface information and the request, the interface data sent by the server in response to the request information is obtained. Interface information is generated based on the basic interface information and the interface data corresponding to the basic interface information, and the interface information is stored in a historical test case set or a new test case set, thus completing the import of the test result data.

[0041] The interface test result data contains a lot of basic interface information and corresponding retrieval requests for interface data. When importing interface test result data, there is no need for manual selection of which data to import; it is only necessary to extract the required basic interface information and corresponding retrieval requests based on pre-defined extraction keywords. That is, the extraction of basic interface information and the retrieval of the specific interface data corresponding to the basic interface information from the server are automated. Interface information is generated based on the basic interface information and the corresponding interface data. After storing the interface information in a historical test case set or a new test case set, the import of test result data is complete. In this way, interface test data is automatically entered into the automated testing platform, reducing the manual cost of importing test result data and improving the efficiency of interface test data entry into the automated testing platform. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0043] Figure 1 A schematic diagram illustrating an application scenario of the method for importing interface test result data provided in this application;

[0044] Figure 2 A flowchart illustrating a method for importing interface test result data according to an embodiment of this application;

[0045] Figure 3 A schematic diagram of an environment parameter modification interface provided in one embodiment of this application;

[0046] Figure 4 A schematic diagram of an interface test result data import device provided in one embodiment of this application;

[0047] Figure 5 A schematic diagram of an electronic device provided for one embodiment of this application.

[0048] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0050] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0051] First, let's explain the terms used in this application:

[0052] Interface testing: Interface testing is a type of testing that examines the interfaces between system components. It primarily detects interactions between external systems and the system itself, as well as between internal subsystems. The focus of this testing is on checking data exchange, transmission, and control management processes, as well as the inter-system logic and dependencies.

[0053] Automated testing platform: mainly used to efficiently and effectively complete the execution and result analysis of a large number of business logic coverage tests and regression tests that consume a lot of manual labor.

[0054] Assertion: A programming term that represents a Boolean expression that the programmer believes to be true at a specific point in the program. Assertion verification can be enabled and disabled at any time, so assertions can be enabled during testing and disabled during deployment.

[0055] Automated testing refers to the automation of software testing. Software testing involves running a system or application under preset conditions and evaluating the results. As an important means of improving testing efficiency, automated testing has been gradually incorporated into daily testing work.

[0056] In the current testing process, testers need to complete interface testing first to confirm that the interface is correct and stable before entering the interface test results into the automated testing platform. Interface tests, as automated test cases, provide capabilities for subsequent regression testing.

[0057] However, after confirming that the interface is correct and stable (i.e., confirming that the interface execution result is correct), a lot of manual labor is required to complete the interface test data entry into the automated testing platform. This not only increases the cost of automated interface test data entry into the automated testing platform, but also reduces the efficiency of automated interface test data entry into the automated testing platform.

[0058] Based on this, this application provides a method, apparatus, device, and storage medium for importing interface test result data. The method for importing interface test result data is applied to a test import device, which is installed on an automated testing platform. The method includes acquiring test result data from an interface testing tool; acquiring extraction keywords and extracting basic interface information from the test result data based on these keywords; acquiring a request to acquire the interface data corresponding to the basic interface information; generating request information based on the basic interface information and the acquisition request; sending the request information to a server; acquiring the interface data sent by the server in response to the request information; generating interface information based on the basic interface information and the corresponding interface data; storing the interface information in a historical test case set or a new test case set; and completing the import of the test result data. In other words, it automates the extraction of basic interface information and the acquisition of specific interface data corresponding to the basic interface information from the server. After generating interface information based on the basic interface information and the corresponding interface data, and storing the interface information in a historical test case set or a new test case set, the import of the test result data can be completed. In this way, the automated input of interface test data into the automated testing platform is achieved, reducing the manual cost of importing test results data and improving the efficiency of inputting interface test data into the automated testing platform.

[0059] The method for importing interface test result data provided in this application is applicable to electronic devices, such as computers, servers, and automated testing platforms. Figure 1This diagram illustrates the application of the method for importing interface test result data provided in this application. In the diagram, the electronic device receives test result data from an interface testing tool. It extracts basic interface information from the test result data based on extraction keywords, and obtains a request for acquiring the corresponding interface data. Based on the basic interface information and the acquisition request, it generates request information. After sending this request information to the server, it obtains the interface data sent by the server in response to the request. Based on the basic interface information and the corresponding interface data, it generates interface information and stores this interface information in a historical test case set or a new test case set, thus completing the import of the test result data.

[0060] Please see Figure 2 One embodiment of this application provides a method for importing interface test result data, applied to a test import device, which is set in an automated testing platform. This test import device is directly embedded into the automated testing platform, thus integrating with the environment rules and driving methods of the automation itself, achieving a convenient user experience.

[0061] The methods for importing the interface test result data include:

[0062] S210: Obtain test result data from the interface testing tool.

[0063] Currently, the most common interfaces are HTTP APIs and WebService interfaces. For HTTP APIs, commonly used interface testing tools such as Postman and JMeter support exporting to some extent, with JSON format being the most common. For self-developed WebService tools, the export function and format can be standardized to export JSON files. The test result data described in this embodiment is data from a JSON file.

[0064] The JSON file exported from the API testing tool is generally divided into two parts. The first part is the basic API information, such as the automatically generated ID and name for the test case set when testing the API. This basic information can be obtained from the `Info` field in the exported JSON script. The second part is the request for specific parameters, i.e., the request to retrieve the API data corresponding to the basic API information. This retrieval request is a combination of multiple requests within a `List`, with each `List` containing three parts: `Name`, `Request`, and `Response`. The test result file (JSON file) is obtained through the API testing tool. After parsing the test result file, the test result data is obtained, which includes the basic API information and the requests for retrieving the corresponding API data.

[0065] In an optional embodiment, when using an interface testing tool to perform interface testing, it is necessary to fill in some test parameter configuration information in the interface testing tool. The specific information can be filled in according to actual needs, and this embodiment does not impose any limitations.

[0066] In an optional embodiment, an import button can be set on the interface data import interface of the automated testing platform. When the selection of the import button is detected, step S210 is executed.

[0067] S220: Obtain the extraction keyword, extract the basic interface information from the test result data based on the extraction keyword, and obtain the acquisition request for the interface data corresponding to the basic interface information. Generate request information based on the basic interface information and the acquisition request.

[0068] The extraction keyword can be set according to actual needs, such as "Name xx" or "Number xx". Extracting basic interface information from the test result data based on this keyword essentially means extracting the required basic interface information from the test result data based on this keyword. For example, if the extraction keyword includes "Name A", then the basic interface information extracted from the test result data based on this keyword will include the case set named A. Correspondingly, the request obtained is a request to obtain the interface data for the case set named A.

[0069] Based on the basic interface information and the retrieval request, a request message is generated. This generated request message informs the server of the basic interface information corresponding to the requested interface data, enabling the server to determine the corresponding interface data based on the basic interface information. For example, in the above case, the basic interface information extracted from the test result data based on the extraction keyword includes a case set named A. The request message requests the distribution of the interface data corresponding to the case set named A. After receiving the request message, the server locates the interface data corresponding to the case set named A and distributes it to the electronic device.

[0070] In an optional embodiment, the extracted keyword is a pre-set, default extracted keyword. When the extracted keyword needs to be modified, the operator enters a new keyword on the keyword modification interface of the automated testing platform. Correspondingly, when the electronic device detects a keyword update operation, it obtains the updated keyword as the extracted keyword. The keyword update operation includes a keyword deletion operation and / or a keyword addition operation. When a keyword deletion operation is detected, the extracted keyword deleted by the keyword deletion operation is removed from the default extracted keyword list. When a keyword addition operation is detected, the extracted keyword added by the keyword addition operation is added. The added extracted keyword can be continuously added, that is, when the extracted keyword list is retrieved again, the added extracted keyword can be considered as the default extracted keyword for extraction. The added extracted keyword can also be temporarily added, that is, the extracted keyword list retrieved again does not include the added extracted keyword. Similarly, the deleted extracted keyword can also be continuously deleted or temporarily deleted.

[0071] In an optional embodiment, buttons for temporarily adding / deleting or continuously adding / deleting keywords can be set on the keyword modification interface. The decision to temporarily add / delete or continuously add / delete keywords is determined based on the selected status of the detected buttons.

[0072] S230, send the request information to the server and obtain the interface data sent by the server in response to the request information.

[0073] As described above, this request information is used to request the server to send the interface data (interface parameters) corresponding to the basic interface information. The server responds to this request information by matching the interface data corresponding to the basic interface information. For example, if the basic interface information includes the name A of a case set, then the server matches the interface data based on the name A, obtaining the interface data corresponding to the case set with the name A.

[0074] After the server matches the interface data corresponding to the basic information of the interface, it sends the interface data to the electronic device.

[0075] S240: Generate interface information based on the interface basic information and the corresponding interface data, store the interface information in the historical test case set or the new test case set, and complete the import of test result data.

[0076] Based on the basic information and data of the interface, interface information is generated, which constitutes a complete test case or test case set.

[0077] Specifically, initial interface information is generated based on the basic interface information and the corresponding interface data. This initial interface information includes assertions. Preset assertions in this initial interface information are supplemented, and selected assertions are supplemented according to the supplementation operation. The interface information is then obtained based on the initial interface information with supplemented assertions. The preset assertions can be pre-set and are assertions that need to be supplemented by default each time. The supplementation operation is used to further supplement other assertions that actually need to be supplemented.

[0078] In an optional embodiment, a supplementary assertion set can be constructed based on all supplemented assertions. This supplementary assertion set includes the preset assertion and historically supplemented assertions. After obtaining the supplemented selected assertions, the supplemented selected assertions are added to the supplementary assertion set.

[0079] In an optional embodiment, an assertion display command can also be obtained, and the supplementary assertion set and search box (or search bar) can be displayed. Then, an assertion search command is obtained based on the search box. This assertion search command is used to search for the assertion that needs to be modified. After executing the assertion search command, the target assertion is matched from the supplementary assertion set and displayed. The target assertion refers to the assertion that needs to be modified. For example, the assertion search command can be input as the name of the assertion. When matching the target assertion from the supplementary assertion set, it is done based on the name of the assertion.

[0080] After generating the interface information, store it in either the historical test case set or a new test case set to complete the import of test result data. Storage in the historical test case set or a new test case set can be random or determined by quantity. For example, if there are already enough test cases in the historical test case set, the interface information can be stored in a new test case set.

[0081] During the process of transferring test result data to the automated testing platform, the environment of the interface under test may have changed, thus requiring modification of the environment parameters of the stored test case set. In an optional embodiment, in response to a display operation, an environment parameter modification interface for the first test case set can be displayed, such as... Figure 3 The interface shown. In this embodiment, the first test case set refers to any single test case set or a set including multiple test cases. Then, based on the environment parameter modification interface of the first test case set, the environment parameter modification command for the first test case set is obtained. When the first test case set includes multiple test cases, this environment parameter modification command is used to batch modify the environment parameters of multiple test cases. For example... Figure 3As shown, after selecting at least two test cases from test cases 1 to 4, selecting the "Batch Modify" button allows you to modify the environment parameters of those two test cases in batches. When the first test case set includes multiple test cases, you can add test cases whose environment parameters you want to modify to the first test case set as needed.

[0082] Typically, a test case set might correspond to a set of test cases for a specific service. In the environment parameter modification interface, selection buttons can be added in front of test cases with environment parameter modification mappings. Testers can select the test cases whose environment parameters need modification by choosing these buttons, thus performing a unified environment parameter modification. This environment parameter modification mapping can be understood as having a preset environment parameter modification procedure; the environment parameter modification mappings for different test cases can be different or the same, depending on actual needs. After modifying the environment parameters, the final required test case set can be obtained.

[0083] In summary, the method for importing interface test result data provided in this embodiment is applied to the test import device of an automated testing platform. Specifically, after obtaining the test result data from the interface testing tool, basic interface information is automatically extracted from the test result data based on extraction keywords, along with the request to obtain the corresponding interface data. After generating request information based on the basic interface information and the request, the interface data sent by the server in response to the request information is obtained. Interface information is generated based on the basic interface information and the corresponding interface data, and this interface information is stored in a historical test case set or a new test case set, thus completing the import of the test result data.

[0084] The interface test result data contains a lot of basic interface information and corresponding retrieval requests for interface data. When importing interface test result data, there is no need for manual selection of which data to import. It is only necessary to extract the required basic interface information and corresponding retrieval requests based on pre-defined extraction keywords. That is, the extraction of basic interface information and the retrieval of the specific interface data corresponding to that basic information from the server are automated. Interface information is generated based on this basic interface information and its corresponding interface data. After storing this interface information in a historical test case set or a new test case set, the import of test result data is complete. In this way, interface test data is automatically entered into the automated testing platform, reducing the manual cost of importing test result data and improving the efficiency of interface test data entry into the automated testing platform.

[0085] Please see Figure 4 An embodiment of this application also provides an interface test result data import device 10, comprising:

[0086] Module 11 is used to obtain test result data from the interface testing tool.

[0087] Processing module 12 is used to obtain extraction keywords, extract basic interface information from the test result data based on the extraction keywords, obtain the interface data acquisition request corresponding to the basic interface information, and generate request information based on the basic interface information and the acquisition request.

[0088] The communication module 13 is used to send the request information to the server and obtain the interface data sent by the server in response to the request information.

[0089] The storage module 14 is used to generate interface information based on the interface basic information and the interface data corresponding to the interface basic information, store the interface information to the historical test case set or the new test case set, and complete the import of test result data.

[0090] The storage module 14 is specifically used to generate initial interface information based on the interface basic information and the interface data corresponding to the interface basic information. The initial interface information includes assertions; to supplement the preset assertions in the initial interface information; and to supplement the selected assertions according to the supplementation operation. The interface information is obtained based on the initial interface information after the supplemented assertions.

[0091] The storage module 14 is also used to add the supplemented selected assertions to the supplemented assertion set, wherein the supplemented assertion set includes the preset assertion and historically supplemented assertions.

[0092] The interface test result data import device 10 also includes a display module 15, which is used to obtain an assertion display command, display the supplementary assertion set and the search box; obtain an assertion search command based on the search box; execute the assertion search command, match the target assertion from the supplementary assertion set and display it.

[0093] The display module 15 is also used to respond to display operations, display the environment parameter modification interface of the first test case set; obtain the environment parameter modification command of the first test case set based on the environment parameter modification interface of the first test case set; and respond to the environment parameter modification command of the first test case set, update the environment parameters in each interface information of the first test case set to the environment parameters specified by the environment parameter modification command.

[0094] Specifically, the processing module 12 is used to obtain historical keywords as the extracted keywords when no keyword update operation is detected, and to obtain the updated keywords as the extracted keywords when a keyword update operation is detected.

[0095] The acquisition module 11 is specifically used to acquire the test result file through the interface testing tool; parse the test result file to obtain the test result data.

[0096] Please see Figure 5 One embodiment of this application also provides an electronic device 20, including: a processor 21, and a memory 22 communicatively connected to the processor 21. The memory 22 stores computer-executable instructions, and the processor 21 executes the computer-executable instructions stored in the memory 22 to implement the method for importing interface test result data as provided in any of the above embodiments.

[0097] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed, cause the computer-executable instructions to be executed by a processor to implement the method for importing interface test result data as provided in any of the preceding embodiments.

[0098] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method for importing interface test result data as provided in any of the preceding embodiments.

[0099] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc. It can also be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0100] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0101] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0106] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for importing interface test result data, characterized in that, The method, applied to a test import device located on an automated test platform, includes: Obtain test result data from the interface testing tool; Obtain extraction keywords, extract basic interface information matching the extraction keywords from the test result data based on the extraction keywords, and obtain the interface data acquisition request corresponding to the basic interface information from the test result data, and generate request information based on the basic interface information and the acquisition request; Send the request information to the server and obtain the interface data sent by the server in response to the request information; Based on the interface basic information and the corresponding interface data, interface information is generated, and the interface information is stored in a historical test case set or a new test case set to complete the import of test result data; the interface information is a test case or a test case set. The step of generating interface information based on the interface basic information and the interface data corresponding to the interface basic information includes: Initial interface information is generated based on the interface basic information and the interface data corresponding to the interface basic information, and the initial interface information includes assertions; The preset assertions in the initial interface information are supplemented, and the selected assertions are supplemented according to the supplementation operation. The interface information is obtained according to the initial interface information after the supplemented assertions.

2. The method according to claim 1, characterized in that, The method further includes: The selected assertions are added to the supplementary assertion set, wherein the supplementary assertion set includes the preset assertions and historically supplemented assertions.

3. The method according to claim 2, characterized in that, The method further includes: Obtain the assertion display command to display the supplementary assertion set and the search box; Based on the search box, obtain the assertion search command; Execute the assertion search command to match and display the target assertion from the supplementary assertion set.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: In response to the display operation, the environment parameter modification interface for the first test case set is displayed; Obtain the command to modify the environment parameters of the first test case set from the environment parameter modification interface of the first test case set; In response to the environment parameter modification command of the first test case set, update the environment parameters in the interface information of the first test case set to the environment parameters specified by the environment parameter modification command.

5. The method according to any one of claims 1-3, characterized in that, The keywords to be obtained include: When no keyword update operation is detected, the historical keywords are obtained as the extracted keywords; When a keyword update operation is detected, the updated keyword is obtained as the extracted keyword.

6. The method according to any one of claims 1-3, characterized in that, The test result data obtained from the interface testing tool includes: Obtain test result files using interface testing tools; The test result file is parsed to obtain the test result data.

7. A device for importing interface test result data, characterized in that, include: The acquisition module is used to acquire test result data from the interface testing tool; The processing module is used to obtain extraction keywords, extract interface basic information matching the extraction keywords from the test result data based on the extraction keywords, obtain the interface data acquisition request corresponding to the interface basic information from the test result data, and generate request information based on the interface basic information and the acquisition request. The communication module is used to send the request information to the server and obtain the interface data sent by the server after responding to the request information; The storage module is used to generate interface information based on the interface basic information and the interface data corresponding to the interface basic information, store the interface information to a historical test case set or a new test case set, and complete the import of test result data; the interface information is a test case or a test case set; The storage module is specifically used for: Initial interface information is generated based on the interface basic information and the interface data corresponding to the interface basic information, and the initial interface information includes assertions; The preset assertions in the initial interface information are supplemented, and the selected assertions are supplemented according to the supplementation operation. The interface information is obtained according to the initial interface information after the supplemented assertions.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the method for importing interface test result data as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed, cause the computer to perform the method for importing interface test result data as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Service interface test method and device, electronic equipment and storage medium

    CN112905459A

  • Method and system for implementing a test automation results importer

    US20130086420A1