Method and device for automatically separating test data and test code of interface
A technology for automated testing and testing code, applied in the network field, can solve the problems of high industry threshold, frequent human intervention, cumbersome and complex interface testing process, etc., to reduce labor costs, save testing resources, and lower the writing threshold.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0054] Please refer to Figure 1 to Figure 3 As shown, an embodiment of the present invention discloses a method for separating interface automation test data and test code, including:
[0055] S11, according to the diversity of request elements and the complexity of parameters, create a test data table request_info and a request record table request_record.
[0056] Due to the diversity of request elements and the complexity of parameters, many factors need to be considered in the design of the test data table request_info, please refer to figure 1 ,including but not limited to:
[0057] Request method: get, post, etc.;
[0058] Request type: application / x-www-form-urlencoded, application / json, multipart / form-data;
[0059] Authentication method: login verification (cookie or session), signature verification, etc.;
[0060] Parameter types: path parameters, request parameters, and request parameters can be further divided into: variable parameters (whether there are rules...
no. 2 example
[0071] Please refer to figure 1 , figure 2 and Figure 4 As shown, the embodiment of the present invention discloses another method for separating interface automation test data and test code, including:
[0072] S21, create a test data table request_info and a request record table request_record according to the diversity of the request elements and the complexity of the parameters.
[0073] S21 is the same as the corresponding steps in the first embodiment, and will not be repeated here.
[0074] As an improved solution but not a limitation, this embodiment S21 further includes creating an account configuration table user_info.
[0075] S22, add assignment data to the corresponding field in the test data table request_info according to the test requirement.
[0076] When testing tasks for different interfaces, business testers can add assignment data to the corresponding fields in the test data table request_info according to the test requirements, so that this embodime...
no. 3 example
[0141] Please refer to Figure 5 As shown, the present invention also provides an interface automation test data and test code separation device 100, including a creation module 110, an execution module 120, a verification module 130 and an output module 140, wherein:
[0142] The creation module 110 is connected with the execution module 120, and is used for creating the test data table request_info and the request record table request_record according to the diversity of the request elements and the complexity of the parameters;
[0143] The execution module 120, connected with the verification module 130, is used for traversing the request_info to filter the data that meets the conditions, executing the test request in turn, using the assignment data to perform parameter assignment before a single test request, and performing assignments corresponding to the number of rounds according to different types of parameters operate;
[0144] The verification module 130, connected...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


