Interface testing method and system, electronic device, and storage medium
A technology of interface testing and interface, which is applied in the field of testing, can solve the problems of low efficiency and accuracy of interface testing, and achieve the effect of improving test accuracy, avoiding overhead, and improving accuracy
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0072] This embodiment provides a general interface testing method, such as figure 1 As shown, the interface testing method of the present embodiment includes the following steps:
[0073] Step 101. Obtain the result data of the interface execution test case.
[0074] Among them, the test cases include:
[0075] Interface test configuration parameters, including interface address, call timeout, call method, call protocol name, etc.;
[0076] Interface call parameters, including various data types, such as JSON, xml, etc., are used as input parameters for organizational testing;
[0077] The interface parameter strategy is used to analyze specific parameters using different strategies according to the parameter type, and to check and convert the format and type of the input parameters;
[0078] The returned result type is convenient for specific analysis of the returned result data; in order to achieve targeted analysis of the result data of the relevant use c...
Embodiment 2
[0091] On the basis of Embodiment 1, this embodiment provides a possible implementation manner of parsing result data whose data type is basic data. Step 104 specifically includes:
[0092] Determine whether the data value in the result data is the same as the data value in the expected result.
[0093] If the judgment is negative, the test result in step 105 is that the test fails.
[0094] If the judgment is yes, the test result in step 105 is that the test is passed.
[0095] In this embodiment, data matching is performed on basic data such as string data, Boolean data, integer data, and long data, so as to ensure that key information is not missed in the judgment process and improve the accuracy of the test.
Embodiment 3
[0097] On the basis of Embodiment 1, this embodiment provides a possible implementation manner for parsing result data whose data type is set data. Step 104 specifically includes:
[0098] Determine whether the data length, data sequence, and data value of the result data are the same as those of the expected result.
[0099] If the judgment is negative, it means that at least one parameter of the two data length, data sequence and data value is different, and the test result in step 105 is that the test fails.
[0100] If the judgment is yes, it means that the data length, data sequence and data value of the two are the same, and the test result in step 105 is that the test is passed.
[0101] In this embodiment, for order-sensitive set data, such as List data, not only the data is fully matched, but also the length and order of the data are matched, which avoids misjudgment caused by the order and improves the accuracy of the test.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com