CN109522228A - Interface automatic test data configuration method, apparatus, platform and storage medium - Google Patents
Interface automatic test data configuration method, apparatus, platform and storage medium Download PDFInfo
- Publication number
- CN109522228A CN109522228A CN201811359053.7A CN201811359053A CN109522228A CN 109522228 A CN109522228 A CN 109522228A CN 201811359053 A CN201811359053 A CN 201811359053A CN 109522228 A CN109522228 A CN 109522228A
- Authority
- CN
- China
- Prior art keywords
- data
- target interface
- interface
- automatic test
- template
- 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.)
- Granted
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
-
- 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/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a kind of interface automatic test data configuration method, apparatus, platform and storage mediums.Wherein, this method comprises: according to the programmed statements of the modification of target interface and/or the data type of target interface, the data for constructing target interface generate template;The automatic test data that template building target interface is generated according to the data, for testing the target interface.Technical solution provided in an embodiment of the present invention can construct different test datas, to carry out interface automatic test use.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of interface automatic test data configuration method, apparatus,
Platform and storage medium.
Background technique
As product function is more and more, system architecture becomes increasingly complex, server-side be often related to revision or
Person's system reconfiguration, so that functional test, performance test and GUI (Graphical UserInterface, graphical user circle
Face) automatic regression test etc. is difficult to verify the service logic of bottom.It is expended largely in addition, largely returning need of work
Test resource, therefore interface automatic test comes into being.
Interface automatic test is relied on, the change and reconstruct of system can rely on script and be guaranteed, and automatic test
Logic coverage rate also just relies on the quantity and integrality of automatic test case.But at present realize automatization test system at
This is relatively high, especially makes data link, needs to expend a large amount of human cost.
Summary of the invention
The embodiment of the present invention provides a kind of interface automatic test data configuration method, apparatus, platform and storage medium, energy
Different test datas is constructed, enough to carry out interface automatic test use.
In a first aspect, the embodiment of the invention provides a kind of interface automatic test data configuration methods, this method comprises:
According to the programmed statements of the modification of target interface and/or the data type of target interface, the number of target interface is constructed
According to generation template;
According to the data generate template building target interface automatic test data, for the target interface into
Row test.
Second aspect, the embodiment of the invention also provides a kind of interface automatic test data structuring apparatus, the device packets
It includes:
Template constructs module, for according to the programmed statements of the modification of target interface and/or the data type of target interface,
The data for constructing target interface generate template;
Test data generation module, for generating the automatic test number of template building target interface according to the data
According to for testing the target interface.
The third aspect, the embodiment of the invention also provides a kind of platform, which includes:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes any interface automatic test data configuration method in first aspect.
Fourth aspect, the embodiment of the invention also provides a kind of storage mediums, are stored thereon with computer program, the program
Any interface automatic test data configuration method in first aspect is realized when being executed by processor.
Interface automatic test data configuration method, apparatus, platform and storage medium provided in an embodiment of the present invention are needing
When testing target interface, can according to the programmed statements of the modification of target interface and/or the data type of target interface,
The data for constructing the target interface generate template;Template then, which is generated, according to the data constructed constructs the automatic of the target interface
Change test data, and then automatic test is carried out to target interface using constructed automatic test data.This programme is compared
In existing interface automatic test scheme, different test datas can be constructed automatically, according to distinct interface to be connect
Mouth automatic test uses, without expending a large amount of manpower.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of the interface automatic test data configuration method provided in the embodiment of the present invention one;
Fig. 2 is a kind of flow chart of the interface automatic test data configuration method provided in the embodiment of the present invention two;
Fig. 3 is a kind of flow chart of the interface automatic test data configuration method provided in the embodiment of the present invention three;
Fig. 4 is a kind of structural block diagram of the interface automatic test data structuring apparatus provided in the embodiment of the present invention four;
Fig. 5 is a kind of structural schematic diagram of the platform provided in the embodiment of the present invention five.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
State that the specific embodiments are only for explaining the present invention, rather than limitation of the invention.It also should be noted that for the ease of
Description, only some but not all contents related to the present invention are shown in the drawings.
Embodiment one
Fig. 1 is a kind of flow chart for interface automatic test data configuration method that the embodiment of the present invention one provides, this reality
When applying example and being suitable for carrying out automatic test to interface, the case where test data needed for how constructing interface.This method can be with
It is executed by interface automatic test data structuring apparatus provided in an embodiment of the present invention, which can be used software and/or hard
The mode of part realizes that the device is configured in interface automatic test platform or equipment.Referring to Fig. 1, this method is specifically included:
S110 constructs target interface according to the programmed statements of the modification of target interface and/or the data type of target interface
Data generate template.
In the present embodiment, target interface refers to the interface for needing to carry out automatic test;The programmed statements of modification refer to pair
The programmed statements that function or service logic of target interface etc. are modified.For database language, programmed statements be can wrap
It includes: C++, JAVA or SQL (Structure Query Languge, structured query language) sentence etc..And SQL is a kind of spy
The programming language of different purpose is a kind of data base querying and programming language, for accessing data and inquiry, update and pipe
Relational database system is managed, while being also the extension name of database script file.Therefore, in the present embodiment, the programming language of modification
The SQL statement of sentence preferably modification.
The type of test data needed for the data type of target interface refers to test target interface, the data type can be with
It is determined by the method etc. for including in the service logic or interface of target interface.Illustratively, if to contain part identical for two interfaces
Service logic or two interfaces in containing identical method etc., then can determine and contain identical number in the two interfaces
According to type.
In the present embodiment, data generate template and refer to for data needed for constructing interface automatic test referring to the template
Template.It should be noted that distinct interface, which may correspond to different data, generates template, it is also possible to which corresponding identical data generate
Template.For example, containing identical data type in interface A and interface B, then specification interface A and interface B can share a certain data
Generate template.Optionally, an interface can correspond to one or more data and generate template.It should be noted that under normal circumstances,
The corresponding data of one interface generate template;If but test data needed for an interface include numerous types of data,
Template is generated comprising multiple data.
It is illustrated with target interface for A.Specifically, interface automatic test platform carries out automatically to target interface A
When changing test, if the data class of the data type of test data needed for detecting target interface A and the test data being locally stored
Type is identical, and the test data of the interface B of automatic test is such as completed, then can directly acquire the number of the test data of interface B
Template, and then test data needed for building target interface A are generated according to data of the template as target interface A are generated, and is based on
Constructed test data tests target interface A.I.e. interface automatic test platform can be directly according to target interface
Data type, construct target interface data generate template.
If the data type of test data needed for the data type for the test data being locally stored and target interface A is completely not
Matching or part match, and interface automatic test platform then needs first to obtain the programmed statements of the modification of target interface;Then according to
According to the modification of target interface programmed statements alternatively, target interface modification programmed statements and target interface data type,
The data for constructing target interface generate template.
It illustratively, can also include: that principal and subordinate is based on by sniffer before the data generation template for constructing target interface
Database synchronization principle obtains the programmed statements of the modification of target interface from primary database in real time.
Wherein, sniffer is a kind of software equipment of monitoring network data operation.In the present embodiment, sniffer is configured in
In interface automatic test platform;Main number can also be monitored from database as camouflage independently of interface automatic test platform
According to the data variation in library.In the present embodiment, master-slave database synchronization principles are chosen as MySQL master-slave database synchronization principles,
Obtain the programmed statements of modification in real time from primary database based on asynchronous replication characteristic from database (sniffer).Specifically, connecing
Mouth automatic test platform can obtain the modification of target interface from primary database in real time by the sniffer being configured thereon that
Programmed statements;It can also be that receiving independent sniffer is used as camouflage from database, the target obtained in real time from primary database
The programmed statements of the modification of interface.
Specifically, if the data class of test data needed for the data type for the test data being locally stored and target interface A
Type mismatches completely, and interface automatic test platform then needs first to obtain the programmed statements of the modification of target interface;Then it is based on
The programmed statements of the modification of the target interface of acquisition are analyzed in semantic grammar analysis, are extracted from the programmed statements of the modification
Middle determinant attribute, and then template is generated based on the data that the determinant attribute constructs target interface A.If the test number being locally stored
According to data type and target interface A needed for test data data type portions mismatch, then need to only obtain non-matching part
The programmed statements of the modification of associated target interface;Then target interface A is constructed according to the programmed statements of the target modification obtained
The first data generate template, generate template as target interface A from the local data for obtaining same data type partial association
The second data generate template, the first data generated into template and the second data generate template as the data of target interface A and give birth to
At template.
S120 generates the automatic test data of template building target interface according to data, for carrying out to target interface
Test.
Specifically, constructing target according to the programmed statements of the modification of target interface and/or the data type of target interface
After the data of interface generate template, template and the actually required number of test target interface can be generated according to the data of building
According to amount etc., the automatic test data of target interface are constructed;Then based on the automatic test data of constructed target interface,
Target interface is tested.
Illustratively, after the automatic test data that template building target interface is generated according to data, can also include:
Target interface is obtained from the interface document being locally stored;Automatic test data, and calling interface are requested by target interface
Automatic test engine, the automatic test of performance objective interface.
In the present embodiment, interface document refers to what interface automatic test platform was locally stored, records for clearly a certain
The document of total interface information in system service, can be the forms such as excel table, word or webpage.Automatic test engine can
To be a kind of for carrying out the tool of automatic test.
Specifically, the data volume etc. actually required according to the data generation template and test target interface of building, building
After the automatic test data of target interface, interface automatic test platform stores the automatic test data of target interface
Target interface is obtained in specified location, and from local pre-stored interface document;It is then requested by target interface
Corresponding automatic test data, and calling interface automatic test engine, so that the automatic test engine is by calling tool
The dubbo of body is serviced, and executes the automatic test of the target interface, and correct implementing result is saved as benchmark,
So that subsequent execution and this comparison, if correctly, then it is assumed that case passes through.In addition, mutual between case in order to prevent
Interference, one case of every execution all can be by all data dumps in primary database.
Technical solution provided in an embodiment of the present invention can be according to target interface when needing to test target interface
Modification programmed statements and/or target interface data type, construct the target interface data generate template;Then foundation
The data constructed generate the automatic test data that template constructs the target interface, and then use constructed automatic test
Data carry out automatic test to target interface.This programme can be according to not compared to existing interface automatic test scheme
Different test datas is constructed automatically with interface, to carry out interface automatic test use, without expending a large amount of manpower.
Embodiment two
Fig. 2 is a kind of flow chart of interface automatic test data configuration method provided by Embodiment 2 of the present invention, this reality
It applies example on the basis of the above embodiments, further to the programmed statements according to the modification of target interface, constructs target interface
Data generate template be explained.Referring to fig. 2, this method specifically includes:
S210 extracts programmed statements module from programmed statements.
In the present embodiment, programmed statements module refers to that is extracted from programmed statements forms the main body of the programmed statements,
It may include the object or table of handling function such as insert function or update function etc. and handling function operation, Yi Jibiao
At least one attribute or parameter etc..
For example, the programmed statements obtained from sniffer are as follows: insert into teacher (id, grade_id, name, t_
Field1, t_field2) values (1,1, " teacher A ", " teacher A field 1 ", " teacher A field 2 ");insert into
Teacher (id, grade_id, name, t_field1, t_field2) values (2,1, " teacher B ", " teacher's B field 1 ", "
Teacher's B field 2 ").Above-mentioned programmed statements are analyzed, obtaining handling function is insert function, and teacher is operation letter
The table of number operation, corresponding attribute includes teacher id, class grade_id, name, t_field1, t_field2;It is corresponding
Programmed statements module are as follows: insert into teacher (id, grade_id, name, t_field1, t_field2) values
(id, grade_id, " teacher X ", " teacher's X field 1 ", " teacher's X field 2 ").
S220 determines the pass of programmed statements according at least one attribute for the table and table for including in programmed statements module
Key attribute.
In the present embodiment, determinant attribute refers to the key parameter of table in programmed statements module, rises to the test result of interface
The attribute of key effect may include one or more.When due to interface automatic test, many attributes of table are not concerns
Emphasis will not have an impact test result even if the value of different test cases Attribute Associations is identical.
For example, programmed statements module insert into teacher (id, grade_id, name, t_field1, t_
Field2) values (id, grade_id, " teacher X ", " teacher's X field 1 ", " teacher's X field 2 "), the attribute id of table,
In grade_id, name, t_field1, t_field2, name, t_field1, the value of these three Attribute Associations of t_field2 is simultaneously
It is not the focus of test.Therefore the determinant attribute of programmed statements extracted from programmed statements module are as follows: teacherId and
gradeId。
S230, according to programmed statements module and the determinant attribute of programmed statements, building data generate template.
For example, programmed statements module is insert into teacher (id, grade_id, name, t_field1, t_
Field2) values (id, grade_id, " teacher X ", " teacher's X field 1 ", " teacher's X field 2 "), the crucial of programmed statements belong to
Property are as follows: teacherId and gradeId, the data for constructing target interface generate template are as follows: insert intoteacher (id,
Grade_id, name, t_field1, t_field2) values ([teacherId], [gradeId], " teacher X ", " teacher's X word
Section 1 ", " teacher's X field 2 ").
S240 generates the automatic test data of template building target interface according to data, for carrying out to target interface
Test.
Specifically, can be carried out using for circulation automatic if the quantity of the automatic test data of target interface is 10
Change the construction of test data.Such as in the case where teacher above has 10 data, then can using circulation by the way of into
The construction of row automatic test data.
Illustratively, identical programmed statements module, identified determinant attribute is different, the automatic test data of generation
Also just different.For example, from programmed statements module insert into teacher (id, grade_id, name, t_field1, t_
Field2 the crucial category) extracted in values (id, grade_id, " teacher X ", " teacher's X field 1 ", " teacher's X field 2 ")
Property are as follows: teacherId and gradeId, it may be considered that the automatic test data constructed can be based on identical
GradeId, the data of different teacherId constructions.
If from programmed statements module insert into teacher (id, grade_id, name, t_field1, t_
Field2) the determinant attribute extracted in values (id, grade_id, " teacher X ", " teacher's X field 1 ", " teacher's X field 2 ")
For teacherId, it may be considered that the automatic test data constructed can be the number based on different teacherId construction
According to whether identical not limiting class gradeId yet.
Technical solution provided in an embodiment of the present invention can be according to target interface when needing to test target interface
Modification programmed statements, construct the target interface data generate template;Then template structure is generated according to the data constructed
The automatic test data of the target interface are built, and then target interface is carried out automatically using constructed automatic test data
Change test.This programme can construct automatically different surveys compared to existing interface automatic test scheme according to distinct interface
Data are tried, to carry out interface automatic test use, without expending a large amount of manpower.
Distinct interface can share a data and generate mould if the situation that the data type of required test data is identical
Plate, and then accelerate the speed of automatic test.Illustratively, according to the data type of target interface, target interface is constructed
If data generate the data type that template may include: automatic test data needed for detecting test target interface, with this
The data type of the test data of ground storage is identical, then the data of same data type is generated template as the number of target interface
According to generation template.
Specifically, interface automatic test platform then can detecte target when carrying out automatic test to target interface
Whether the data type of test data needed for interface is identical as the data type for the test data being locally stored, and if they are the same, then may be used
Template is generated using the data that the data of same data type are generated template as target interface, constructs the automation of target interface
Test data, or directly using the test data of same data type as the automatic test data of target interface.This implementation
In example, by the identical situation of the data type needed for distinct interface, it need to only construct a data and generate template, can construct not
With the test data of i.e. interface, and then complete that the automatic test of distinct interface is increased the flexibility of scheme, also simplified
Construct the complexity of data.
Embodiment three
Fig. 3 A is a kind of flow chart for interface automatic test data configuration method that the embodiment of the present invention three provides, Fig. 3 B
A kind of interface automatization test system structural block diagram provided for the embodiment of the present invention three.Base of the present embodiment in above-described embodiment
It is further to optimize on plinth.Referring to Fig. 3 A and 3B, this method is specifically included:
S310 is based on master-slave database synchronization principles by sniffer, obtains repairing for target interface from primary database in real time
The programmed statements changed.
For example, user edits class's data, teacher's data and two student datas on data manipulation backstage
As shown in table 1 to table 3, wherein the grade_id in table 2 and table 3 is class id, corresponding grade table id, and carries out data manipulation
It is converted into SQL statement to be stored as in database, which is equivalent to primary database;Sniffer is used as camouflage from database, base
In master-slave database synchronization principles, in real time from primary database the modification of sniff target interface SQL statement, and sniff is arrived
SQL statement is transmitted in the data manipulation SQL of interface automatic test platform.
Sniffer sniff to SQL statement or the SQL statement that is stored in data manipulation SQL are as follows:
Insert into grade (id, name, c_field1, c_field_2) values (1, " class A ", " class's word
Section 1 ", " class's field 2 ");
Insert into teacher (id, grade_id, name, t_field1, t_field2) values (1,1, " religion
Teacher A ", " teacher A field 1 ", " teacher A field 2 ");
Insert into student (id, grade_id, name, t_field1, t_field2) values (1,1, " is learned
Raw A ", " student A field 1 ", " student A field 2 ");
Insert into student (id, grade_id, name, t_field1, t_field2) values (2,1, " is learned
Raw B ", " student's B field 1 ", " student's B field 2 ").
Table 1grade table
id | 1 |
name | Class A |
c_field1 | Class's field 1 |
c_field2 | Class's field 2 |
2 teacher table of table
id | 1 |
grade_id | 1 |
name | Teacher A |
t_field1 | Teacher A field 1 |
t_field2 | Teacher A field 2 |
3 student table of table
S320, according to the programmed statements of the modification of target interface, the data for constructing target interface generate template.
Specifically, interface automatic test platform obtains the SQL statement of the modification of target interface from data manipulation SQL,
And semantic grammar analysis is carried out to it, therefrom extract programming language module and determinant attribute.For the SQL statement of above-mentioned modification, take out
The determinant attribute taken can be with are as follows: gradeId, teacherId, studentId.The then programmed statements based on extraction and crucial category
Property building target interface data generate template.
For example, the data of building generate template for class grade are as follows: insert into grade (id,
Name, c_field1, c_field_2) values ([gradeId], " class A ", " class's field 1 ", " class's field 2 ");
For teacher teacher, the data of building generate template are as follows: insert into teacher (id,
Grade_id, name, t_field1, t_field2) values ([teacherId], [gradeId], " teacher A ", " teacher's A word
Section 1 ", " teacher A field 2 ");
For student student, the data of building generate template are as follows: insert into student (id,
Grade_id, name, t_field1, t_field2) and values ([studentId]+N, 1, " student N ", " student N field 1 ", "
Student N field 2 ").Wherein, the positive integer that the value of N is 0 to N.
S330 generates the automatic test data of template building target interface according to data, for carrying out to target interface
Test.
For example, after the data for constructing student generate template, it can be according to, to the demand of student data, being adopted in actual test
The construction of automatic test data is carried out with the mode of circulation.
S340 obtains target interface from the interface document being locally stored.
S350 requests automatic test data, and calling interface automatic test engine, performance objective by target interface
The automatic test of interface.
Technical solution provided in an embodiment of the present invention can be according to target interface when needing to test target interface
Modification programmed statements, construct the target interface data generate template;Then template structure is generated according to the data constructed
The automatic test data of the target interface are built, and then target interface is carried out automatically using constructed automatic test data
Change test.This programme can construct automatically different surveys compared to existing interface automatic test scheme according to distinct interface
Data are tried, to carry out interface automatic test use, without expending a large amount of manpower.
Example IV
Fig. 4 is a kind of structural block diagram for interface automatic test data structuring apparatus that the embodiment of the present invention four provides, should
Interface automatic test data configuration method provided by any embodiment of the invention can be performed in device, and it is corresponding to have execution method
Functional module and beneficial effect.As shown in figure 4, the apparatus may include:
Template constructs module 410, for according to the programmed statements of the modification of target interface and/or the data class of target interface
Type, the data for constructing target interface generate template;
Test data generation module 420, for generating the automatic test data of template building target interface according to data,
For testing target interface.
Technical solution provided in an embodiment of the present invention can be according to target interface when needing to test target interface
Modification programmed statements and/or target interface data type, construct the target interface data generate template;Then foundation
The data constructed generate the automatic test data that template constructs the target interface, and then use constructed automatic test
Data carry out automatic test to target interface.This programme can be according to not compared to existing interface automatic test scheme
Different test datas is constructed automatically with interface, to carry out interface automatic test use, without expending a large amount of manpower.
Illustratively, above-mentioned apparatus can also include:
Programmed statements obtain module, for passing through sniffer base before the programmed statements of the modification according to target interface
In master-slave database synchronization principles, the programmed statements of the modification of target interface are obtained from primary database in real time.
Illustratively, template building module 410 can be also used for:
Programmed statements module is extracted from programmed statements;
According at least one attribute for the object and object for including in programmed statements module, the key of programmed statements is determined
Attribute;
According to programmed statements module and the determinant attribute of programmed statements, building data generate template.
Illustratively, template building module 410 can be also used for:
If the data type of automatic test data needed for detecting test target interface, with the test number being locally stored
According to data type it is identical, then the data of same data type are generated into template as the data of target interface generation template.
Illustratively, above-mentioned apparatus can also include:
Target interface obtain module, for according to data generate template building target interface automatic test data it
Afterwards, target interface is obtained from the interface document being locally stored;
Test module, for requesting automatic test data, and calling interface automatic test engine by target interface,
The automatic test of performance objective interface.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for platform that the embodiment of the present invention five provides.Fig. 5, which is shown, to be suitable for being used to realizing this
The block diagram of the exemplary platform 12 of invention embodiment.The platform 12 that Fig. 5 is shown is only an example, should not be to of the invention real
The function and use scope for applying example bring any restrictions.
As shown in figure 5, the platform 12 is showed in the form of universal computing device.The component of the platform 12 may include but not
Be limited to: one or more processor or processing unit 16, system storage 28 connect different system components (including system
Memory 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Platform 12 typically comprises a variety of computer system readable media.These media can be it is any can be by platform 12
The usable medium of access, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (RAM) 30 and/or cache memory 32.Platform 12 may further include it is other it is removable/nonremovable,
Volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for reading and writing irremovable
, non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 5, use can be provided
In the disc driver read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to removable anonvolatile optical disk
The CD drive of (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver can
To be connected by one or more data media interfaces with bus 18.System storage 28 may include that at least one program produces
Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform of the invention each
The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42 can store and store in such as system
In device 28, such program module 42 includes but is not limited to operating system, one or more application program, other program modules
And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 42
Usually execute the function and/or method in embodiment described in the invention.
Platform 12 can also be communicated with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.),
Can also enable a user to the equipment interacted with the equipment communication with one or more, and/or with enable the platform 12 and one
A or a number of other any equipment (such as network interface card, modem etc.) communications for calculating equipment and being communicated.This communication
It can be carried out by input/output (I/O) interface 22.Also, platform 12 can also by network adapter 20 and one or
Multiple networks (such as local area network
(LAN), wide area network (WAN) and/or public network, such as internet) communication.As shown, network adapter 20
It is communicated by bus 18 with other modules of platform 12.It should be understood that although not shown in the drawings, it can be used in conjunction with platform 12
Its hardware and/or software module, including but not limited to: microcode, device driver, redundant processing unit, external disk driving
Array, RAID system, tape drive and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and
Data processing, such as realize interface automatic test data configuration method provided by the embodiment of the present invention.
Embodiment six
The embodiment of the present invention six additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
Program can realize any interface automatic test data configuration method in above-described embodiment when being executed by processor.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium can be for example but not limited to: electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or
Any above combination of person.The more specific example (non exhaustive list) of computer readable storage medium includes: with one
Or the electrical connections of multiple conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM),
The read-only storage (CD-ROM) of erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc, light are deposited
Memory device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer readable storage medium can be with
To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
It is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including but not limited to:
Wirelessly, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
It is related in the situation of remote computer, remote computer can include local area network (LAN) or wide area by the network of any kind
Net (WAN) is connected to subscriber computer, or, it may be connected to outer computer (such as using ISP come
It is connected by internet).
Above-described embodiment serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
Will be appreciated by those skilled in the art that each module of the above invention or each step can use general meter
Device is calculated to realize, they can be concentrated on single computing device, or be distributed in network constituted by multiple computing devices
On, optionally, they can be realized with the program code that computer installation can be performed, so as to be stored in storage
It is performed by computing device in device, perhaps they are fabricated to each integrated circuit modules or will be more in them
A module or step are fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and
The combination of software.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiments, the same or similar part between each embodiment may refer to each other.
The above description is only a preferred embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art
For, the invention can have various changes and changes.All any modifications made within the spirit and principles of the present invention are equal
Replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of interface automatic test data configuration method characterized by comprising
According to the programmed statements of the modification of target interface and/or the data type of target interface, the data for constructing target interface are raw
At template;
The automatic test data that template building target interface is generated according to the data, for being surveyed to the target interface
Examination.
2. the method according to claim 1, wherein also being wrapped before the data of building target interface generate template
It includes:
Master-slave database synchronization principles are based on by sniffer, obtain the programming language of the modification of target interface from primary database in real time
Sentence.
3. the method according to claim 1, wherein constructing mesh according to the programmed statements of the modification of target interface
The data of tag splice mouth generate template, comprising:
Programmed statements module is extracted from the programmed statements;
According at least one attribute for the table and table for including in the programmed statements module, determine that the crucial of programmed statements belongs to
Property;
According to the programmed statements module and the determinant attribute of the programmed statements, constructs the data and generate template.
4. the method according to claim 1, wherein constructing target interface according to the data type of target interface
Data generate template, comprising:
If the data type of automatic test data needed for detecting test target interface, with the test data that is locally stored
Data type is identical, then the data of same data type is generated template as the data of target interface and generate template.
5. the method according to claim 1, wherein generating oneself of template building target interface according to the data
After dynamicization test data, further includes:
The target interface is obtained from the interface document being locally stored;
The automatic test data, and calling interface automatic test engine are requested by the target interface, described in execution
The automatic test of target interface.
6. a kind of interface automatic test data structuring apparatus characterized by comprising
Template constructs module, for according to the programmed statements of the modification of target interface and/or the data type of target interface, building
The data of target interface generate template;
Test data generation module is used for generating the automatic test data of template building target interface according to the data
It is tested in the target interface.
7. device according to claim 6, which is characterized in that further include:
Programmed statements obtain module, for being based on master by sniffer before the programmed statements of the modification according to target interface
From database synchronization principle, the programmed statements of the modification of target interface are obtained from primary database in real time.
8. device according to claim 6, which is characterized in that the template building module is also used to:
Programmed statements module is extracted from the programmed statements;
According at least one attribute for the object and object for including in the programmed statements module, the key of programmed statements is determined
Attribute;
According to the programmed statements module and the determinant attribute of the programmed statements, constructs the data and generate template.
9. a kind of platform, which is characterized in that the platform includes:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as interface automatic test data configuration method as claimed in any one of claims 1 to 5.
10. a kind of storage medium, is stored thereon with computer program, which is characterized in that the realization when program is executed by processor
Such as interface automatic test data configuration method as claimed in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811359053.7A CN109522228B (en) | 2018-11-15 | 2018-11-15 | Interface automation test data construction method, device, platform and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811359053.7A CN109522228B (en) | 2018-11-15 | 2018-11-15 | Interface automation test data construction method, device, platform and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109522228A true CN109522228A (en) | 2019-03-26 |
CN109522228B CN109522228B (en) | 2022-06-24 |
Family
ID=65778043
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811359053.7A Active CN109522228B (en) | 2018-11-15 | 2018-11-15 | Interface automation test data construction method, device, platform and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109522228B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111190811A (en) * | 2019-12-05 | 2020-05-22 | 东方微银科技(北京)有限公司 | Method, device, equipment and storage medium for testing resource allocation system |
CN111611174A (en) * | 2020-05-28 | 2020-09-01 | 北京字节跳动网络技术有限公司 | Test data construction method and device, computer equipment and storage medium |
CN112181832A (en) * | 2020-09-28 | 2021-01-05 | 中国平安财产保险股份有限公司 | Test data generation method and device, computer equipment and storage medium |
CN112199300A (en) * | 2020-11-13 | 2021-01-08 | 新华三大数据技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN112286783A (en) * | 2019-07-23 | 2021-01-29 | 北京中关村科金技术有限公司 | Method and device for generating database insertion statement and performing system test |
CN113535543A (en) * | 2021-06-09 | 2021-10-22 | 卡斯柯信号有限公司 | Test data generation method, device, equipment and medium for TACS system |
CN116627851A (en) * | 2023-07-24 | 2023-08-22 | 恒生电子股份有限公司 | Interface testing method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101430661B (en) * | 2008-11-18 | 2011-06-01 | 阿里巴巴集团控股有限公司 | Method, system and apparatus for test data batch generation |
CN104123227A (en) * | 2014-08-13 | 2014-10-29 | 广东电网公司信息中心 | Method for automatically generating testing cases |
CN106649082A (en) * | 2016-09-05 | 2017-05-10 | 中国银行股份有限公司 | Test data generation method and apparatus |
US20170286279A1 (en) * | 2016-04-01 | 2017-10-05 | Sony Interactive Entertainment America Llc | Game Stream Fuzz Testing and Automation |
-
2018
- 2018-11-15 CN CN201811359053.7A patent/CN109522228B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101430661B (en) * | 2008-11-18 | 2011-06-01 | 阿里巴巴集团控股有限公司 | Method, system and apparatus for test data batch generation |
CN104123227A (en) * | 2014-08-13 | 2014-10-29 | 广东电网公司信息中心 | Method for automatically generating testing cases |
US20170286279A1 (en) * | 2016-04-01 | 2017-10-05 | Sony Interactive Entertainment America Llc | Game Stream Fuzz Testing and Automation |
CN106649082A (en) * | 2016-09-05 | 2017-05-10 | 中国银行股份有限公司 | Test data generation method and apparatus |
Non-Patent Citations (1)
Title |
---|
周绍凯 等: "面向网络游戏的自动化接口测试系统设计", 《现代计算机》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112286783A (en) * | 2019-07-23 | 2021-01-29 | 北京中关村科金技术有限公司 | Method and device for generating database insertion statement and performing system test |
CN111190811A (en) * | 2019-12-05 | 2020-05-22 | 东方微银科技(北京)有限公司 | Method, device, equipment and storage medium for testing resource allocation system |
CN111611174A (en) * | 2020-05-28 | 2020-09-01 | 北京字节跳动网络技术有限公司 | Test data construction method and device, computer equipment and storage medium |
CN111611174B (en) * | 2020-05-28 | 2023-08-11 | 北京火山引擎科技有限公司 | Method and device for constructing test data, computer equipment and storage medium |
CN112181832A (en) * | 2020-09-28 | 2021-01-05 | 中国平安财产保险股份有限公司 | Test data generation method and device, computer equipment and storage medium |
CN112181832B (en) * | 2020-09-28 | 2023-04-11 | 中国平安财产保险股份有限公司 | Test data generation method and device, computer equipment and storage medium |
CN112199300A (en) * | 2020-11-13 | 2021-01-08 | 新华三大数据技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN112199300B (en) * | 2020-11-13 | 2022-08-19 | 新华三大数据技术有限公司 | Interface testing method and device, electronic equipment and storage medium |
CN113535543A (en) * | 2021-06-09 | 2021-10-22 | 卡斯柯信号有限公司 | Test data generation method, device, equipment and medium for TACS system |
CN116627851A (en) * | 2023-07-24 | 2023-08-22 | 恒生电子股份有限公司 | Interface testing method and device |
CN116627851B (en) * | 2023-07-24 | 2023-10-20 | 恒生电子股份有限公司 | Interface testing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109522228B (en) | 2022-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109522228A (en) | Interface automatic test data configuration method, apparatus, platform and storage medium | |
US20200295942A1 (en) | Computer-implemented systems and methods for linking a blockchain to a set of digital twins | |
CN108897691A (en) | Data processing method, device, server and medium based on interface analog service | |
CN107807982B (en) | Consistency checking method and device for heterogeneous database | |
CN109302522A (en) | Test method, device and computer system and medium | |
CN104765621B (en) | A kind of method and system of the deployment program in clustered node | |
CN105808437A (en) | Automation testing method and system based on test case data table | |
CN112052172B (en) | Rapid test method and device for third-party channel and electronic equipment | |
CN108845940A (en) | A kind of enterprise information system automated function test method and system | |
CN102834806A (en) | System structure managing device, method of managing system structure, and program | |
Pfeiffer et al. | Evaluation of conceptual models-a structuralist approach | |
CN111159897B (en) | Target optimization method and device based on system modeling application | |
CN106547658A (en) | A kind of automated testing method and device | |
KR20220031522A (en) | Process to combine semantic descriptions of digital twins with knowledge graphs | |
CN109683917A (en) | For the method for being deployed in application server, equipment and medium will to be applied | |
CN111125066A (en) | Method and device for detecting functions of database audit equipment | |
CN110825538A (en) | MQ-based method for dynamically interacting data by self-defining data types | |
CN110427277A (en) | Data verification method, device, equipment and storage medium | |
CN110362294A (en) | Development task executes method, apparatus, electronic equipment and storage medium | |
CN113342699B (en) | Software radio compliance testing method and system | |
CN105703964A (en) | Online application system test method and equipment | |
CN106330556B (en) | A kind of method and apparatus calling related information for generating service module | |
CN111859985B (en) | AI customer service model test method and device, electronic equipment and storage medium | |
CN111444618B (en) | Simulation method and device based on variable dictionary | |
CN108875374A (en) | Malice PDF detection method and device based on document node type |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |