Test file generation method and system, server and storage medium
A technology for testing files and files, which is applied in the computer field, can solve problems such as boring work, difficult maintenance of use cases, incomplete testing functions, etc., and achieve the effect of reducing development costs and saving script writing time
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0052] figure 1A flow chart of a method for generating a test file provided by Embodiment 1 of the present invention. This embodiment takes locust developed based on the Python language as an example. The technical solutions of this embodiment and the following embodiments can also be applied to other test files that can be tested. The programming language of the use case and the corresponding open source performance testing tools.
[0053] Specifically include the following steps:
[0054] S101. Read the interface information from the database;
[0055] The interface information in this step is parameter information for generating the simulation request. Exemplarily, the interface information includes but not limited to csv parameters, interface dependency identifiers and / or assertion functions, etc., which may be one or more of them. The interface information is read from a database of the test platform, and the database includes different interface information based on di...
Embodiment 2
[0077] Such as figure 2 As shown, this embodiment provides a method for generating a test file, and refines the steps of the file test method in the above embodiment, specifically as follows:
[0078] S201. Read interface information from a database.
[0079] S202. Convert the interface information into a dictionary object.
[0080] Since python cannot directly serialize objects, for ordinary python objects, it is necessary to return the instance attributes of the instance objects of the class in the form of a dictionary, which is simply used to store instance variables. This step is added in this embodiment, and the non-serialized dictionary object can be parsed to return the interface dictionary object.
[0081] Dictionary object Dictionary object is a variable container model, and can store any type of object. Each key-value (key=>value) pair of the dictionary is separated by a colon, and each pair is separated by a comma. The entire dictionary is included in curly brac...
Embodiment 3
[0113] Such as image 3 As shown, this embodiment provides a test file generation system 3 that can execute the test file generation method provided by the above embodiments of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0114] Specifically include:
[0115] The data acquisition module 301 is configured to read interface information from a database.
[0116] The first generating module 302 is configured to generate a first template based on the csv parameters.
[0117] The second generation module 303 is configured to generate a second template based on the interface dependency identifier.
[0118] The third generation module 304 is configured to generate a third template based on the assertion verification.
[0119] The splicing module 305 is configured to splice the first template, the second template and / or the third template to generate a test script file.
[0120] Such as Figure 4 As shown, in an...
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