CN109446072A - The generation method and device of test script - Google Patents
The generation method and device of test script Download PDFInfo
- Publication number
- CN109446072A CN109446072A CN201811128633.5A CN201811128633A CN109446072A CN 109446072 A CN109446072 A CN 109446072A CN 201811128633 A CN201811128633 A CN 201811128633A CN 109446072 A CN109446072 A CN 109446072A
- Authority
- CN
- China
- Prior art keywords
- interface
- document
- message
- destination item
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Abstract
This application provides a kind of generation method of test script and devices, this method comprises: passing through the interface document for obtaining the destination item write according to predefined format, the interface document includes the interface message of target interface, wherein, which includes: interface name, interface IP address, resource path, request method, head information, content type, the definition of required parameter, the multinomial information in the definition of response message;The interface document is parsed, the interface message of the target interface is obtained;In the list object that the interface message of the target interface is stored in memory;According to the list object, the test script of the destination item is generated.Using the generation method and device of the test script of the application, test script flexibly can be updated according to the variation of interface document, to improve testing efficiency.
Description
Technical field
This application involves the field of test technology, and more particularly, to the generation of test script in the field of test technology
Method and apparatus.
Background technique
After the completion of software development, tester needs to test interface by interface testing script.Interface is answered
With Program Interfaces (application programming interface, API).Interface testing is to system or component
Between interface tested, mainly verify data exchange, transmitting and control management process, and mutually logic rely on close
System.Existing test script is to be obtained by technical staff according to interface document hand-coding.
Design when due to software development is inconsiderate or in response to quick variation, needs the test foot often to interface
Originally it is updated.At this moment, tester needs to make corresponding adjustment to the test script of interface by hand.
However, with the increase of interface quantity and the increase of interface document renewal frequency, the test script of hand-coding
Rate do not catch up with the renewal rate of interface document.Therefore, using the method for the test script of existing manual compiling, flexibility
Poor, testing efficiency is lower.
Summary of the invention
The application provides the generation method and device of a kind of test script, can flexibly be updated according to the variation of interface document
Test script, to improve testing efficiency.
To achieve the above object, the application provides a kind of generation method of test script, including the following contents:
The interface document for the destination item write according to predefined format is obtained, the interface document includes target interface
Interface message, wherein the interface message includes: interface name, interface IP address, resource path, request method, head information, interior
Hold type, the definition of required parameter, the multinomial information in the definition of response message;
The interface document is parsed, the interface message of the target interface is obtained;
In the list object that the interface message of the target interface is stored in memory;
According to the list object, the test script of the destination item is generated.
In one possible implementation, the target interface includes at least one interface, and the interface document includes
The interface message of each interface at least one described interface, the list object include at least one object, and described at least one
A object and at least one described interface correspond.
In one possible implementation, the method also includes: by each object at least one described object
It is stored under the destination item into database according to data storage object predetermined, the mesh in the database
It include at least one record under mark project, at least one described record is corresponded at least one described object.
In one possible implementation, the method also includes: obtain script request, the script request carries institute
State target item purpose mark;According to the target item purpose mark, obtains and stored under destination item described in the database
At least one described record;At least one described record is loaded into the memory, the list object is obtained;According to described
List object generates the test script of the destination item.
It in one possible implementation, include customized multiple fields in the data storage object, it is described more
The multinomial information that a field and the interface message include corresponds.
In one possible implementation, the method also includes: run the test script of the destination item.
In one possible implementation, the interface text for obtaining the destination item write according to predefined format
Shelves, comprising: the interface document for obtaining manual compiling and uploading;Or obtain the interface text that interface document generator generates
Shelves.
To achieve the above object, the application also provides a kind of protective device of application program in operating system, device tool
Body includes:
Acquiring unit, for obtaining the interface document for the destination item write according to predefined format, the interface document
Interface message including target interface, wherein the interface message includes: interface name, interface IP address, resource path, request
Mode, head information, content type, the definition of required parameter, the multinomial information in the definition of response message;
Resolution unit, the interface document for obtaining to the acquiring unit parse, and obtain the target and connect
The interface message of mouth;
Storage unit, what the interface message of the target interface for parsing the resolution unit was stored in memory
In list object;
Generation unit, the list object for being stored according to the storage unit, generates the survey of the destination item
Training sheet.
To achieve the above object, the application also provides a kind of computer equipment, including memory, processor, communication interface
And it is stored in the computer program that can be run on the memory and on the processor, wherein the memory, described
It is communicated with each other between processor and the communication interface by internal connecting path, the processor executes the computer journey
The following steps of the above method are realized when sequence:
The interface document for the destination item write according to predefined format is obtained, the interface document includes target interface
Interface message, wherein the interface message includes: interface name, interface IP address, resource path, request method, head information, interior
Hold type, the definition of required parameter, the multinomial information in the definition of response message;
The interface document is parsed, the interface message of the target interface is obtained;
In the list object that the interface message of the target interface is stored in memory;
According to the list object, the test script of the destination item is generated.
To achieve the above object, the application also provides computer readable storage medium, is stored thereon with computer program, institute
State the following steps of above method when computer program is executed by processor:
The interface document for the destination item write according to predefined format is obtained, the interface document includes target interface
Interface message, wherein the interface message includes: interface name, interface IP address, resource path, request method, head information, interior
Hold type, the definition of required parameter, the multinomial information in the definition of response message;
The interface document is parsed, the interface message of the target interface is obtained;
In the list object that the interface message of the target interface is stored in memory;
According to the list object, the test script of the destination item is generated.
Generation method, device, computer equipment and the computer readable storage medium of test script provided by the present application lead to
The interface document for obtaining the destination item write according to predefined format is crossed, the interface document includes the interface letter of target interface
Breath, wherein the interface message include: interface name, interface IP address, resource path, request method, head information, content type,
Multinomial information in the definition of required parameter, the definition of response message;The interface document is parsed, the target is obtained
The interface message of interface;In the list object that the interface message of the target interface is stored in memory;According to the object
List generates the test script of the destination item.It is set using the generation method of the test script of the application, device, computer
Standby and computer readable storage medium flexibly can update test script according to the variation of interface document, to improve test effect
Rate.
Detailed description of the invention
Fig. 1 is the schematic flow chart of the generation method of test script provided by the embodiments of the present application;
Fig. 2 is the schematic flow chart of the generation method of another test script provided by the embodiments of the present application;
Fig. 3 is the schematic block diagram of the generating means of test script provided by the embodiments of the present application;
Fig. 4 is the schematic block diagram of the generating means of test script provided by the embodiments of the present application.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the application, not
For limiting the application.Based on the embodiment in the application, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall in the protection scope of this application.
In the prior art, in the development phase of software, in most cases, research staff can write the interface text of interface
Shelves.Correspondingly, in the software test stage, tester can write corresponding test script according to interface document, thus to interface
It is tested.
However, research staff in development phase may only carry out written in code in reality, and each interface is not write and is connect
Mouth document;Or the research staff of each research and development company does not use same lattice frame when writing interface document;Or by
In designing inconsiderate or software upgrading, interface document needs are updated.In the case of these, requires tester and be directed to one by one not
Same situation carries out different degrees of modification and update to test script, not only has higher requirement to the level of tester,
And testing efficiency is lower.
The generation method and device of test script provided by the present application, by obtaining the target write according to predefined format
The interface document of project, the interface document include the interface message of target interface, wherein the interface message includes: interface
Title, interface IP address, resource path, request method, head information, content type, the definition of required parameter, the definition of response message
In multinomial information;The interface document is parsed, the interface message of the target interface is obtained;By the target interface
The list object that is stored in memory of interface message in;According to the list object, the test foot of the destination item is generated
This, flexibly can update test script according to the variation of interface document, to improve testing efficiency.
Fig. 1 shows the schematic flow chart of the generation method 100 of test script provided by the embodiments of the present application.Ying Li
Solution, this method 100 can be executed by the generating means of test script, hereinafter referred to as device, which can be for example test foot
This tool.
S110 obtains the interface document for the destination item write according to predefined format, and the interface document includes target
The interface message of interface, wherein the interface message includes: interface name, interface IP address, resource path, request method, head letter
Breath, content type, the definition of required parameter, the multinomial information in the definition of response message.
Optionally, which can obtain the interface of the destination item write according to predefined format in several ways
Document, the embodiment of the present application are not construed as limiting this.
In one possible implementation, the available manual compiling of the device and the interface document uploaded.
In alternatively possible implementation, the interface that the available interface document generator of the device generates is literary
Shelves.
For example, the document generator for example can be swagger tool.Swagger can be with giving birth to automatically according to service code
At relevant api interface document, particularly for the project in restful style, developer can almost not have to specially go to tie up
Restapi is protected, this frame can generate the api of restfut style for your service code automatically, but also provide corresponding
Test interface, the automatic response for showing json format.
That is, the note that swagger can write according to developer in the development process of service code for interface
It releases and automatically generates interface document.
Optionally, the interface message may include: interface name, interface IP address, resource path, request method, head information,
Content type, the definition of required parameter, one or more information in the definition of response message, the embodiment of the present application do not limit this
It is fixed.
In one possible implementation, which includes: interface name, interface IP address, resource path, request
Mode, head information, content type, the definition (field name, type, constraint) of required parameter, the definition of response message (field name,
Type, constraint).
It should be understood that the interface document for the destination item write described in the embodiment of the present application according to predefined format, it can
To be interpreted as the every terms of information in the interface document that the frame according to regulation and standardization is write included, so that being either directed to
The format of which interface, the interface document write is consistent.
S120 parses the interface document, obtains the interface message of the target interface.
Specifically, which can be according to analytic method corresponding with the compiling form of the interface document, to the target item
Purpose interface document is parsed, and interface message included in the interface document is obtained.
It should be understood that analytic method corresponding with predefined compiling form can be understood as the interface message in interface document
With the mapping relations of position of the interface message in interface document.
In one possible implementation, if interface document is manual compiling and uploads, the format of the interface document
It is predefined.Therefore, the device is according to analytic method corresponding with the predefined format, to the interface text of the destination item
Shelves are parsed, and interface message included in the interface document is obtained.
For example, if by taking the interface message in the interface document includes interface name and interface IP address as an example, the destination item
The format of interface document can be as shown in Table 1:
A | B | C | D | |
1 | Interface name 1 | Adsf | Interface IP address 1 | 1256 |
2 | Interface name 2 | Sfrw | Interface IP address 2 | 5156 |
3 | Interface name 3 | Egkt | Interface IP address 3 | 8152 |
As shown in Table 1, the 1st row column b is the content of interface name 1, and the 1st row D is with being classified as the interface of interface name 1
The content of location 1;2nd row column b is the content of interface name 2, and the 2nd row D is classified as the content of the interface IP address 2 of interface name 2;
3rd row column b is the content of interface name 3, and the 3rd row D is classified as the content of the interface IP address 3 of interface name 3.
In alternatively possible implementation, if interface document is that swagger tool generates, the swagger tool
The interface document of generation also has format defined in the swagger tool.Therefore, the device according to the swagger tool
Defined in the corresponding analytic method of format, the interface document of the destination item is parsed, institute in the interface document is obtained
The interface message for including.Process is similar with manual compiling, and to avoid repeating, details are not described herein again.
S130, in the list object that the interface message of the target interface is stored in memory.
Optionally, the target interface may include one or more interfaces, and the embodiment of the present application is not construed as limiting this.
In one possible implementation, which includes at least one interface, the interface text of the destination item
Shelves include the interface message of each interface at least one interface.
Correspondingly, which includes at least one object, at least one object and at least one described interface one
One is corresponding.
For example, the list object in memory may include following content:
The interface name of object 1- interface 1, interface IP address, resource path, request method, head information, content type, request
Definition (field name, type, constraint), the definition of response message (field name, type, constraint) of parameter;
The interface name of object 2- interface 2, interface IP address, resource path, request method, head information, content type, request
Definition (field name, type, constraint), the definition of response message (field name, type, constraint) of parameter;
………
S140 generates the test script of the destination item according to the list object.
Optionally, which can be with the test script of the templating destination item, so that the test script generated can also
To unify to reach code spice, be easy to be managed collectively, facilitate extension, for example, will own according to predefined fixed frame
Script inherit an abstract class, the fixing means of setting is realized, to form standardized test script.
Optionally, before S140, which can be pre-configured with each object and each object in list object
Mapping relations between the position in the test script.
Correspondingly, S140 is it is to be understood that the device according to the list object and the mapping relations, generates the destination item
Test script.
It should be understood that method 100 suitable for database from the catalogue for not setting up destination item, and the target item destination directory
Under not stored record corresponding with the interface message of each interface in the destination item.I.e. this method 100 is suitable for for the first time in number
The destination item is established according to library.
Optionally, after S130, this method further include: by each object at least one described object according to preparatory
The data storage object of definition stores under the destination item into database, under the destination item in the database
Including at least one record, at least one described record is corresponded at least one described object.
That is, the device can establish the target item destination directory in the database, it is arranged for the destination item and marks
Know, and the list object stored in memory is stored into database under the target item destination directory, so that subsequent need again
Will the destination item test script when, can be directly from calling list object, nothing under the target item destination directory in database
Again the interface document of the destination item need to be parsed, improves the formation efficiency of test script.
For example, the target item 111 in database can store following content:
Destination item 111:
Record 1- object 1;
Record 2- object 2;
………
Optionally, data storage object can be understood as a class, and the class includes customized multiple fields, multiple
The multinomial information for including in field and interface message corresponds.
For example, may include interface name field, interface IP address field, resource path field, request method in the class
Field, head information field, content type field, definition (field name, the type, constraint) field of required parameter and response message
Define (field name, type, constraint) field etc..
Optionally, script request is obtained, the script request carries the target item purpose mark;According to the target item
Purpose mark finds the destination item, and obtain stored under destination item described in the database it is described at least one
Record;At least one described record is loaded into the memory, the list object is obtained;It is raw according to the list object
At the test script of the destination item.
Optionally, after S140, the method also includes: run the test script of the destination item.
That is, can be run in batches after the interface testing script for generating each interface in the destination item
These interfaces improve the efficiency of interface testing.
The generation method of test script provided by the present application, by obtaining the destination item write according to predefined format
Interface document, the interface document include the interface message of target interface, wherein the interface message includes: interface name, connects
It is port address, resource path, request method, head information, content type, the definition of required parameter, more in the definition of response message
Item information;The interface document is parsed, the interface message of the target interface is obtained;By the interface of the target interface
In the list object that information is stored in memory;According to the list object, the test script of the destination item is generated.Using
The generation method of the test script of the application flexibly can update test script according to the variation of interface document, to improve survey
Try efficiency.
Fig. 2 shows the schematic flow charts of the generation method 200 of test script provided by the embodiments of the present application.Ying Li
Solution, this method 200 can be executed by above-mentioned apparatus.
It should be understood that method 200 has built up target item destination directory, and the target item destination directory suitable for database
Under be stored with record corresponding with the interface message of interface each in the destination item.I.e. this method 200 exists for the first time suitable for non-
The Database destination item.
That is, being stored with the destination item under the target item destination directory in the database before S210
At least one record, the interface message at least one interface that at least one described record includes with described destination item is one by one
It is corresponding.
Optionally, the interface message of each interface includes: interface name, interface IP address, resource at least one interface
Path, request method, head information, content type, the definition of required parameter, the multinomial information in the definition of response message.
Optionally, each record is stored according to data storage object predetermined at least one record.
Optionally, data storage object can be understood as a class in database, and the class includes customized multiple words
The multinomial information for including in section, multiple field and interface message corresponds.
S210, obtains script request, and the script request carries target item purpose mark.
Optionally, it can establish at least one destination directory in database, each project at least one project
At least one corresponding record of the project is stored under catalogue, wherein at least one project includes the destination item.Accordingly
Ground, the device can find the target item stored in database according to the target item purpose mark carried in the script request
Destination directory.
S220 obtains at least one stored under destination item described in database according to the target item purpose mark
Record.
At least one described record is loaded into the memory, obtains the list object by S230.
Optionally, which includes at least one object, at least one object and at least one described interface one
It is a pair of.
S240 generates the test script of the destination item according to the list object.
Optionally, which can be with the test script of the templating destination item, so that the test script generated can also
To unify to reach code spice, be easy to be managed collectively, facilitate extension, for example, will own according to predefined fixed frame
Script inherit an abstract class, the fixing means of setting is realized, to form standardized test script.
The generation method of test script provided by the present application, has been established the target item destination directory in the database, and
It is subsequent to need again in the case where the corresponding record of interface message for being stored with the total interface in the destination item under the catalogue
When obtaining the test script of the destination item, can directly from calling list object under the target item destination directory in database,
Without parsing again to the interface document of the destination item, the formation efficiency of test script is improved.
The generation method that test script provided by the embodiments of the present application is described above in conjunction with Fig. 1 and Fig. 2, below in conjunction with
Fig. 3 and Fig. 4 introduces the generation method of test script provided by the embodiments of the present application.
Fig. 3 shows the schematic frame of the protective device 300 of application program in operating system provided by the embodiments of the present application
Figure.The device 300 includes:
Acquiring unit 310, for obtaining the interface document for the destination item write according to predefined format, the interface text
Shelves include the interface message of target interface, wherein the interface message includes: interface name, interface IP address, resource path, asks
Ask mode, head information, content type, the definition of required parameter, the multinomial information in the definition of response message;
Resolution unit 320, the interface document for obtaining to the acquiring unit 310 parse, and obtain described
The interface message of target interface;
Storage unit 330, the interface message of the target interface for parsing the resolution unit 320 are stored in interior
In the list object deposited;
Generation unit 340, the list object for being stored according to the storage unit 330, generates the target item
Purpose test script.
Optionally, the target interface includes at least one interface, and the interface document includes at least one described interface
In each interface interface message, the list object includes at least one object, at least one described object and it is described at least
One interface corresponds.
Optionally, the method also includes: by each object at least one described object according to number predetermined
It is stored under the destination item into database according to storage object, includes at least under the destination item in the database
One record, at least one described record are corresponded at least one described object.
Optionally, the method also includes: obtain script request, the script request carries the mark of the destination item
Know;According to the target item purpose mark, at least one the described note stored under destination item described in the database is obtained
Record;At least one described record is loaded into the memory, the list object is obtained;According to the list object, generate
The test script of the destination item.
It optionally, include customized multiple fields, the multiple field and the interface in the data storage object
The multinomial information that information includes corresponds.
Optionally, the method also includes: run the test script of the destination item.
Optionally, the interface document for obtaining the destination item write according to predefined format, comprising: obtain on artificial
The interface document passed;Or obtain the interface document that interface document generator generates.
Fig. 4 shows the schematic block diagram of the generating means 400 of test script provided by the embodiments of the present application.The device
400 can use hardware structure as shown in Figure 4 for device 400 described in Fig. 4, the device 400.The device 400 can
To include processor 410, communication interface 420 and memory 430, the processor 410, communication interface 420 and memory 430 pass through
Internal connecting path communicates with each other.Resolution unit 320, storage unit 330 in Fig. 3 are realized related to generation unit 340
Function can be realized that the correlation function that acquiring unit 310 is realized can be controlled by processor 410 and be communicated by processor 410
Interface 420 is realized.
The processor 410 may include be one or more processors, for example including one or more central processing unit
(central processing unit, CPU), in the case where processor is a CPU, which can be monokaryon CPU,
It can be multi-core CPU.
Specifically, which is used to obtain the interface document for the destination item write according to predefined format, described
Interface document includes the interface message of target interface, wherein the interface message includes: interface name, interface IP address, resource road
Diameter, request method, head information, content type, the definition of required parameter, the multinomial information in the definition of response message;To described
Interface document is parsed, and the interface message of the target interface is obtained;The interface message of the target interface is stored in interior
In the list object deposited;According to the list object, the test script of the destination item is generated.
The communication interface 420 is for inputting and/or outputting data.The communication interface may include that transmission interface and reception connect
Mouthful, transmission interface is used for output data, and receiving interface is used for input data.
The memory 430 include but is not limited to be random access memory (random access memory, RAM), only
Read memory (read-only memory, ROM), erasable and programable memory (erasable programmable read
Only memory, EPROM), CD-ROM (compact disc read-only memory, CD-ROM), the memory 430
For storing dependent instruction and data.
Memory 430 is used to store the program code and data of the device, for individual device or can be integrated in processing
In device 410.
Specifically, the processor 410 is for controlling communication interface 420 and other assemblies, for example, document preparation device, into
Row communication.For details, reference can be made to the descriptions in embodiment of the method, and details are not described herein.
It is designed it is understood that Fig. 4 illustrate only simplifying for device.In practical applications, it can also separately include
Necessary other elements, including but not limited to any number of communication interface, processor, controller, memory etc., and it is all can
To realize the device of the application all within the scope of protection of this application.
In a kind of possible design, which may alternatively be chip apparatus, such as can be that can be used for the dress
Chip in setting, for realizing the correlation function of processor 410 in the device.The chip apparatus can be realization correlation function
Field programmable gate array, special integrated chip, System on Chip/SoC, central processing unit, network processing unit, Digital Signal Processing electricity
Road, microcontroller can also use programmable controller or other integrated chips.It optionally may include one in the chip
Or multiple memories, for storing program code, when the code is performed, so that processor realizes corresponding function.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
Scope of the present application.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code
Medium.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.Therefore, the protection scope of the application should be based on the protection scope of the described claims.
Claims (10)
1. a kind of generation method of test script characterized by comprising
The interface document for the destination item write according to predefined format is obtained, the interface document includes the interface of target interface
Information, wherein the interface message includes: interface name, interface IP address, resource path, request method, head information, content class
Type, the definition of required parameter, the multinomial information in the definition of response message;
The interface document is parsed, the interface message of the target interface is obtained;
In the list object that the interface message of the target interface is stored in memory;
According to the list object, the test script of the destination item is generated.
2. described to connect the method according to claim 1, wherein the target interface includes at least one interface
Mouth document includes the interface message of each interface at least one described interface, and the list object includes at least one object,
At least one described object and at least one described interface correspond.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Each object at least one described object is stored according to data storage object predetermined into database
It include at least one record under the destination item, under the destination item in the database, at least one described record
It is corresponded at least one described object.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
Script request is obtained, the script request carries the target item purpose mark;
According to the target item purpose mark, at least one the described note stored under destination item described in the database is obtained
Record;
At least one described record is loaded into the memory, the list object is obtained;
According to the list object, the test script of the destination item is generated.
5. according to the method described in claim 3, it is characterized in that, including customized multiple words in the data storage object
The multinomial information that section, the multiple field and the interface message include corresponds.
6. the method according to any one of claims 1 to 5, which is characterized in that the method also includes:
Run the test script of the destination item.
7. the method according to any one of claims 1 to 5, which is characterized in that the acquisition is compiled according to predefined format
The interface document for the destination item write, comprising:
The interface document for obtaining manual compiling and uploading;Or
Obtain the interface document that interface document generator generates.
8. a kind of generating means of test script characterized by comprising
Acquiring unit, for obtaining the interface document for the destination item write according to predefined format, the interface document includes
The interface message of target interface, wherein the interface message include: interface name, interface IP address, resource path, request method,
Head information, content type, the definition of required parameter, the multinomial information in the definition of response message;
Resolution unit, the interface document for obtaining to the acquiring unit parse, and obtain the target interface
Interface message;
Storage unit, the object that the interface message of the target interface for parsing the resolution unit is stored in memory
In list;
Generation unit, the list object for being stored according to the storage unit, generates the test foot of the destination item
This.
9. a kind of computer equipment, including memory, processor, display and it is stored on the memory and can be described
The computer program run on processor, wherein pass through inside between the memory, the processor and the display
Connecting path communicates with each other, which is characterized in that the processor is controlled when the display executes the computer program and realized
The step of method described in any one of the claims 1 to 7.
10. a kind of computer readable storage medium, for storing computer program, which is characterized in that the computer program quilt
The step of method described in any one of the claims 1 to 7 is realized when processor executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811128633.5A CN109446072A (en) | 2018-09-27 | 2018-09-27 | The generation method and device of test script |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811128633.5A CN109446072A (en) | 2018-09-27 | 2018-09-27 | The generation method and device of test script |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109446072A true CN109446072A (en) | 2019-03-08 |
Family
ID=65544500
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811128633.5A Withdrawn CN109446072A (en) | 2018-09-27 | 2018-09-27 | The generation method and device of test script |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109446072A (en) |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110083537A (en) * | 2019-04-26 | 2019-08-02 | 田金月 | The method and system of cell phone application port test |
CN110134584A (en) * | 2019-04-12 | 2019-08-16 | 深圳壹账通智能科技有限公司 | A kind of generation method, device, storage medium and the server of interface testing use-case |
CN110262962A (en) * | 2019-05-21 | 2019-09-20 | 钛马信息网络技术有限公司 | Generate the method and device of test script |
CN110471698A (en) * | 2019-07-29 | 2019-11-19 | 深圳数位传媒科技有限公司 | The generation method and device, storage medium and computer equipment of API document |
CN110716877A (en) * | 2019-09-30 | 2020-01-21 | 拉扎斯网络科技(上海)有限公司 | Automatic test method, device, computer system and readable storage medium |
CN110798376A (en) * | 2019-10-09 | 2020-02-14 | 苏宁云计算有限公司 | Interface testing method and device, computer equipment and storage medium |
CN110908920A (en) * | 2019-12-03 | 2020-03-24 | 浪潮商用机器有限公司 | Interface function testing method and device and related components |
CN111240653A (en) * | 2019-12-31 | 2020-06-05 | 瑞庭网络技术(上海)有限公司 | Interface document generation method and device and readable storage medium |
CN111258832A (en) * | 2020-01-22 | 2020-06-09 | 泰康保险集团股份有限公司 | Interface parameter checking method, device, equipment and medium |
CN111930635A (en) * | 2020-09-17 | 2020-11-13 | 深圳微品致远信息科技有限公司 | Swagger-based rapid automatic testing method and system |
CN112328503A (en) * | 2020-11-30 | 2021-02-05 | 武汉空心科技有限公司 | Task acceptance method for software development working platform |
CN112346991A (en) * | 2020-11-27 | 2021-02-09 | 新华三大数据技术有限公司 | Interface test script generation method and device |
CN112395184A (en) * | 2019-08-19 | 2021-02-23 | 中移(苏州)软件技术有限公司 | Information acquisition method, equipment and computer storage medium |
CN112416742A (en) * | 2019-12-27 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Automatic generation method of JMeter test script, interface test method and system |
CN112597018A (en) * | 2020-12-22 | 2021-04-02 | 未来电视有限公司 | Interface test case generation method, device, equipment and storage medium |
CN113495829A (en) * | 2020-03-20 | 2021-10-12 | 北京海致星图科技有限公司 | Automatic interface testing method and system |
CN113535531A (en) * | 2020-04-14 | 2021-10-22 | 浙江大搜车软件技术有限公司 | Interface document generation method, interface test method and device |
CN114328274A (en) * | 2022-03-07 | 2022-04-12 | 深圳开源互联网安全技术有限公司 | Test template generation method and device, computer equipment and storage medium |
CN114356786A (en) * | 2022-03-11 | 2022-04-15 | 中电云数智科技有限公司 | IAM interface authority verification method and device based on automatic interface generation |
-
2018
- 2018-09-27 CN CN201811128633.5A patent/CN109446072A/en not_active Withdrawn
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134584A (en) * | 2019-04-12 | 2019-08-16 | 深圳壹账通智能科技有限公司 | A kind of generation method, device, storage medium and the server of interface testing use-case |
CN110083537A (en) * | 2019-04-26 | 2019-08-02 | 田金月 | The method and system of cell phone application port test |
CN110262962A (en) * | 2019-05-21 | 2019-09-20 | 钛马信息网络技术有限公司 | Generate the method and device of test script |
CN110471698A (en) * | 2019-07-29 | 2019-11-19 | 深圳数位传媒科技有限公司 | The generation method and device, storage medium and computer equipment of API document |
CN112395184A (en) * | 2019-08-19 | 2021-02-23 | 中移(苏州)软件技术有限公司 | Information acquisition method, equipment and computer storage medium |
CN110716877A (en) * | 2019-09-30 | 2020-01-21 | 拉扎斯网络科技(上海)有限公司 | Automatic test method, device, computer system and readable storage medium |
CN110798376A (en) * | 2019-10-09 | 2020-02-14 | 苏宁云计算有限公司 | Interface testing method and device, computer equipment and storage medium |
CN110908920A (en) * | 2019-12-03 | 2020-03-24 | 浪潮商用机器有限公司 | Interface function testing method and device and related components |
CN112416742A (en) * | 2019-12-27 | 2021-02-26 | 上海哔哩哔哩科技有限公司 | Automatic generation method of JMeter test script, interface test method and system |
CN111240653B (en) * | 2019-12-31 | 2024-02-02 | 瑞庭网络技术(上海)有限公司 | Interface document generation method, device and readable storage medium |
CN111240653A (en) * | 2019-12-31 | 2020-06-05 | 瑞庭网络技术(上海)有限公司 | Interface document generation method and device and readable storage medium |
CN111258832B (en) * | 2020-01-22 | 2023-06-20 | 泰康保险集团股份有限公司 | Interface parameter verification method, device, equipment and medium |
CN111258832A (en) * | 2020-01-22 | 2020-06-09 | 泰康保险集团股份有限公司 | Interface parameter checking method, device, equipment and medium |
CN113495829A (en) * | 2020-03-20 | 2021-10-12 | 北京海致星图科技有限公司 | Automatic interface testing method and system |
CN113535531A (en) * | 2020-04-14 | 2021-10-22 | 浙江大搜车软件技术有限公司 | Interface document generation method, interface test method and device |
CN111930635B (en) * | 2020-09-17 | 2021-06-29 | 深圳微品致远信息科技有限公司 | Swagger-based rapid automatic testing method and system |
CN111930635A (en) * | 2020-09-17 | 2020-11-13 | 深圳微品致远信息科技有限公司 | Swagger-based rapid automatic testing method and system |
CN112346991A (en) * | 2020-11-27 | 2021-02-09 | 新华三大数据技术有限公司 | Interface test script generation method and device |
CN112346991B (en) * | 2020-11-27 | 2022-03-22 | 新华三大数据技术有限公司 | Interface test script generation method and device |
CN112328503A (en) * | 2020-11-30 | 2021-02-05 | 武汉空心科技有限公司 | Task acceptance method for software development working platform |
CN112597018A (en) * | 2020-12-22 | 2021-04-02 | 未来电视有限公司 | Interface test case generation method, device, equipment and storage medium |
CN114328274A (en) * | 2022-03-07 | 2022-04-12 | 深圳开源互联网安全技术有限公司 | Test template generation method and device, computer equipment and storage medium |
CN114356786A (en) * | 2022-03-11 | 2022-04-15 | 中电云数智科技有限公司 | IAM interface authority verification method and device based on automatic interface generation |
CN114356786B (en) * | 2022-03-11 | 2022-06-07 | 中电云数智科技有限公司 | IAM interface authority verification method and device based on automatic interface generation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109446072A (en) | The generation method and device of test script | |
CN105302710B (en) | The method and apparatus that a kind of determination needs the test case of regression test | |
CN108153670B (en) | Interface testing method and device and electronic equipment | |
CN108287694B (en) | Application program construction method, system, computer device and storage medium | |
CN109408375A (en) | The generation method and device of interface document | |
KR101314949B1 (en) | Integration environment generator | |
CN109656538A (en) | Generation method, device, system, equipment and the medium of application program | |
CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
CN109446218A (en) | SQL statement generation method, device and computer readable storage medium | |
CN107609004B (en) | Application program embedding method and device, computer equipment and storage medium | |
CN110554958B (en) | Graph database testing method, system, device and storage medium | |
CN104123187B (en) | Create the method and hardware component of the software of hardware component | |
CN109783388A (en) | UI automated testing method, device and electronic equipment | |
CN107832207A (en) | Interface performance test method, apparatus, storage medium and computer equipment | |
CN110275861A (en) | Date storage method and device, storage medium, electronic device | |
CN111190810B (en) | Method, device, server and storage medium for executing test task | |
TW201439792A (en) | System and method for accessing database | |
CN108776587B (en) | Data acquisition method and device, computer equipment and storage medium | |
CN114244717B (en) | Configuration method and device of virtual network card resources, computer equipment and medium | |
CN109558191A (en) | A kind of method, apparatus, storage medium and computer equipment configuring the page | |
KR20190061060A (en) | Profile-based content and services | |
CN109446648A (en) | Service of simulation method for building up and device | |
CN106873970A (en) | The installation method and device of a kind of operating system | |
CN107273250A (en) | The method of testing and device of electronic declaration form automatic cover system | |
CN112527459B (en) | Log analysis method and device based on Kubernetes cluster |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190308 |
|
WW01 | Invention patent application withdrawn after publication |