Interface testing method and device, electronic equipment and medium
An interface test and interface technology, applied in the field of data processing, can solve problems such as high development costs and inflexible test frameworks, and achieve the effect of saving development costs
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0041] refer to figure 1 , which shows a flow chart of an interface testing method in Embodiment 1 of the present invention, which may specifically include:
[0042] Step 101, encapsulating the request method of the Rest-Assured framework, the assertion method and the annotation method of the TestNG framework, to obtain a custom framework for interface testing.
[0043] The Rest-Assured (Representational State Transfer-Assured, representational state transfer testing framework) framework is a Java DSL based on REST service testing (a computer programming language with limited expressiveness for a certain field), which can simplify A process for testing and validating REST services built on top of HTTP Builder, a network request / response builder. The Rest-Assured framework supports sending POST, GET, PUT, DELETE, OPTIONS, PATCH and HEAD requests, and can verify the relevant information of the request.
[0044] The TestNG (Test Next Generation, next-generation testing) framewo...
Embodiment 2
[0065] refer to figure 2 , which shows a flow chart of an interface testing method in Embodiment 2 of the present invention, which may specifically include:
[0066] Step 201, the request method class of the Rest-Assured framework, the assertion method class and annotation method class of the TestNG framework, the test case base class, the test case execution result base class, the test cases of the Rest-Assured framework and the TestNG framework The execution method class is encapsulated to obtain a custom framework for the interface test.
[0067] In the embodiment of the present invention, the custom framework includes encapsulated test case base class, encapsulated test case execution result base class, encapsulated request method enumeration class, encapsulated assertion method enumeration class, encapsulated test report generation Annotated method classes, test case execution method classes of the encapsulated Rest-Assured framework and TestNG framework.
[0068]Among...
Embodiment 3
[0083] refer to image 3 , which shows a structural block diagram of an interface testing device in Embodiment 3 of the present invention, which may specifically include:
[0084] The encapsulation module 301 is used to encapsulate the request method of the Rest-Assured framework, the assertion method and the annotation method of the TestNG framework, and obtain a custom framework for interface testing;
[0085] The request module 302 is configured to provide a request parameter to the interface to be tested by using the request method encapsulated in the custom framework, and obtain a return value of the interface to be tested based on the request parameter;
[0086] An assertion module 303, configured to use the assertion method encapsulated in the custom framework to verify the return value and obtain a verification result;
[0087] The report generating module 304 is configured to generate configuration information of a test report by using the annotation method encapsula...
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