CN109376091A - A kind of generation method and device of interface testing data - Google Patents
A kind of generation method and device of interface testing data Download PDFInfo
- Publication number
- CN109376091A CN109376091A CN201811288563.XA CN201811288563A CN109376091A CN 109376091 A CN109376091 A CN 109376091A CN 201811288563 A CN201811288563 A CN 201811288563A CN 109376091 A CN109376091 A CN 109376091A
- Authority
- CN
- China
- Prior art keywords
- interface
- business
- tested
- testing data
- obtains
- 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.)
- Pending
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/362—Software debugging
- G06F11/3648—Software debugging using additional hardware
- G06F11/3656—Software debugging using additional hardware using a specific debug interface
-
- 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
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 invention discloses a kind of generation methods of interface testing data, comprising: is directed to business to be tested, obtains the corresponding setting interface model of its business rule;It identifies the interface model, obtains the corresponding interface structure of the business to be tested;According to the business rule of the business to be tested, the parameter in the interface structure is combined, obtains interface testing data.By obtaining interface automatically, then identify that interface model obtains interface agency, the parameter of combined interface structure obtains interface testing data.It realizes that automation generates interface testing data, reduces and prepare the higher error rate of interface testing data bring by hand, ensure that the accuracy of interface testing data.Another aspect of the present invention also discloses a kind of generating means of interface testing data corresponding with the method.
Description
Technical field
The present invention relates to interface testing technical field, in particular to a kind of the generation method and device of interface testing data.
Background technique
Interface testing, stress test be data exchange.Before interface testing, need to prepare interface testing data,
It is tested again by exchanging the interface testing data.Preparation for interface testing data, now still by volume by hand
The mode translated is prepared.
Interface testing is often directed to multiple business scene, and tester will be directed to different business scenarios, and different connects
Mouth carries out the preparation of interface testing data, and workload is very big.And for complicated interface, interface data is also very multiple
It is miscellaneous, not only interface field is more, value possibility is more and field between there is also certain logical relations etc..Huge work
Amount and complicated interface case, suffer from higher requirement to the knowledge of tester, technical ability, experience, patience and carefulness etc..And
And tester wrongly writes any one interface testing data field in every case, leading to entire interface testing data cannot use,
Influencing entire business function can not continue to test.So by manual mode setup test data not only inefficient, it is more crucial
It is to be difficult that total interface test data is accurately set out comprehensively due to human factor, does not can guarantee the accurate of interface testing data
Property.
Summary of the invention
In view of this, the present invention provides the generation method and device of a kind of interface testing data, interface testing is automatically generated
Data prepare interface testing data bring higher error rates to reduce by hand, guarantee the accuracy of interface testing data.
One aspect of the present invention provides a kind of generation method of interface testing data, comprising:
For business to be tested, the corresponding setting interface model of its business rule is obtained;
It identifies the interface model, obtains the corresponding interface structure of the business to be tested;
According to the business rule of the business to be tested, the parameter in the interface structure is combined, obtains interface testing number
According to.
Optionally, in the above-mentioned methods, the interface structure includes: interface field and interface level, the interface structure
In interface field and/or interface level, for according to different business rule definition.
Optionally, in the above-mentioned methods, the interface structure includes: interface field and interface level, wherein the foundation
The business rule of the business to be tested, combines the parameter in the interface structure, obtains interface testing data, comprising:
According to the requirement of the business rule of the business to be tested, splices the interface level, combines the interface field,
Obtain the interface testing data.
Optionally, in the above-mentioned methods, described to be directed to business to be tested, the corresponding interface model of its business rule is obtained,
Include:
Under local computer catalogue, the corresponding interface model of business rule of the business to be tested is obtained.
Optionally, in the above-mentioned methods, further includes:
Based on the interface testing data, test cases is generated.
Another aspect of the present invention provides a kind of generating means of interface testing data, comprising:
Acquiring unit obtains the corresponding interface model of its business rule for being directed to business to be tested;
Recognition unit, the interface model, obtains the corresponding interface structure of the business to be tested for identification;
Test data generation unit combines in the interface structure for the business rule according to the business to be tested
Parameter, obtain interface testing data.
Optionally, in above-mentioned apparatus, the interface structure includes: interface field and interface level, the interface knot
Interface field and/or interface level in structure, for according to different business rule definition.
Optionally, in above-mentioned apparatus, the interface structure includes: interface field and interface level, the test number
According to generation unit, comprising:
Test data generation subelement connects described in splicing for the requirement of the business rule according to the business to be tested
Mouth level, combines the interface field, obtains the interface testing data.
Optionally, in above-mentioned apparatus, the acquiring unit, comprising:
Subelement is obtained, under local computer catalogue, the business rule for obtaining the business to be tested to be corresponding
Interface model.
Optionally, in above-mentioned apparatus, further includes:
Test cases generation unit generates test cases for being based on the interface testing data.
A kind of generation method of interface testing data provided by the invention, by being directed to business to be tested, obtaining automatically should
Interface model corresponding to business, and identify that the interface model can be obtained by the corresponding interface structure of the business.Automatically
Acquisition business corresponding interface structure, be not required to for the different corresponding distinct interfaces of business, will be manual go configuration to connect
The structure of mouth.After obtaining interface structure, according to the business rule of the business to be tested, the ginseng in the interface structure is combined
Number, can obtain interface testing data.The generation of entire test data, realizes automation.Manual Compile interface is reduced to survey
Data bring mistake is tried, to also ensure the accuracy of interface testing data.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of the generation method of interface testing data disclosed in the embodiment of the present application;
Fig. 2 is the structural schematic diagram of the generating means of interface testing data disclosed in the embodiment of the present application.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of generation methods of interface testing data to specifically include referring to Fig. 1:
S101, it is directed to business to be tested, obtains the corresponding interface model of its business rule.
In embodiments of the present invention, the interface model is pre-configured model.The interface model is according to corresponding
Interface document, be configured by unified rule and format, connect to obtain the consistent standardization of format to different interfaces
Mouth mold type.
The function for the system to be tested that the business to be tested refers to, such as registration, login and the cancellation of system.It is described to
Test business is to suffer from corresponding business rule, different business and corresponding different interface, and the interface is for realizing institute
State business.So the business rule is corresponding with the interface model of the interface for realizing the business.To business to be measured
When test, the interface model corresponding with its business rule pre-set is obtained.
Optionally, configured interface model can be placed under local computer catalogue by user.It does not need again additional
Configuration storage equipment.At this point, described be directed to business to be tested, the corresponding interface model of its business rule is obtained, specifically: at this
Under ground computer directory, the corresponding interface model of business rule of the business to be tested is obtained.
Wherein, the interface model can use Electronic forms Excel format, by the Excel of the interface model set
File is stored under local computing catalogue, can easily obtain the interface model according to the path of storage.It can also be used
Interface model is arranged in the file format that he can be read.
S102, the identification interface model, obtain the corresponding interface structure of the business to be tested.
It should be noted that the interface model cannot be used directly for generating interface testing data, need by identifying
Configured good content in the corresponding interface model of the business rule, obtains the corresponding interface structure of the business to be tested,
Obtained recognition result is recycled to generate interface testing data.
Optionally, the interface structure includes: interface field and interface level.Interface field in the interface structure
And/or interface level, for according to different business rule definition.In the embodiment of the present invention, advised according to the business of different business
Then configure corresponding interface model.In a model according to the business rule defining interface structure.Interface structure defines interface
Building form, including interface level and interface field.The function for the system that different business is tested is different, so different business
The corresponding interface level of rule and interface field be not also identical.User is according to specific business rule situation, in interface model
According to business rule to the value of the number of interface layering and customized each level appearance and the field of interface and each field.
By identifying the interface model, the level concrete condition of the corresponding interface of the business rule and matching for interface field are obtained
Set situation.
S103, according to the business rule of the business to be tested, combine the parameter in the interface structure, obtain interface survey
Try data.
Optionally, in another specific embodiment of the present invention, the interface structure includes: interface field and interface level,
In, the business rule according to the business to be tested combines the parameter in the interface structure, obtains interface testing number
According to, specifically: according to the requirement of the business rule of the business to be tested, splice the interface level, combines the interface word
Section, obtains the interface testing data.
Interface testing data based on function of the interface rules to system for being tested.It is divided into multiple connect in interface structure
Mouth level, the number of the appearance of each interface level are not only identical.It further include having multiple interface fields, Mei Gejie in interface structure
The value of mouth field is also not only identical.For, the parameter of complicated interface structure is spliced and is combined according to business, just
To the interface testing data for the business for meeting test request.
In embodiments of the present invention by identifying the content of the interface model, obtain that the business to be tested is corresponding to be connect
Mouth structure includes multinomial parameter in the interface structure, carries out group according to parameter of the business rule to the interface agency
Close the interface testing data that can just obtain meeting the business.
Embodiment provided by the invention obtains the corresponding interface knot of business by obtaining and identifying the interface model of setting
Structure obtains interface testing data according still further to the parameter of business rule combined interface structure.By utilizing interface model, realize
Automation generates interface testing data, instead of the mode for preparing interface testing by hand.Not only increase interface testing data
Formation efficiency, it is prior to reduce compiling bring mistake by hand, it ensure that the accuracy of interface testing data.
It should also be noted that, interface model also has very big reusability, can significantly be mentioned using interface model
For the formation efficiency of interface testing data.For example, not needing again hand again when interface change needs to adjust interface testing data
Work recompilates interface testing data, it is only necessary to which carrying out change appropriate to interface model can obtain newly according to interface model
Interface testing data.Significantly reduce the workload of tester, also manually compiles out first mistake to reduce
Probability.And when carrying out different business scenario test, when there are multiple business to be tested for two different business scenarios, and
And two scenes more can greatly reduce the workload of compiling there are when identical operational trials.
For example, business scenario one are as follows: new logging in system by user downloads resource.New user registers, when having registered
At can direct login system, then download resource.Business scenario two are as follows: old user's login system downloads resource.Old user
It is verified by login interface, then login system, downloads resource.In two business scenarios, require to carry out login system
System, with downloading two business of resource person.The different business that only scene one will be registered, and second scene is to pass through login
The business that interface is verified.If interface testing data will be carried out to three business of two business scenarios by by hand
Prepare, identical test data will do it writes twice.And by interface model, the identical services of two scenes can obtain
Interface model goes to generate interface testing data.The preparation efficiency of interface testing data greatly improved.
Optionally, in another specific embodiment of the present invention, the method is carrying out step S103, obtains the interface and surveys
After trying data, can also include:
Based on the interface testing data, test cases is generated.
Wherein, on the basis of the interface testing data, increase test cases number, case input, output result, case
Example executes the description languages such as step, test test cases is obtained, convenient for later management and use.
Another embodiment of the present invention provides a kind of generating means of interface testing data, referring to fig. 2, comprising:
Acquiring unit 201 obtains the corresponding interface model of its business rule for being directed to business to be tested.
Recognition unit 202, the interface model, obtains the corresponding interface structure of the business to be tested for identification;
Test data generation unit 203 combines the interface structure for the business rule according to the business to be tested
In parameter, obtain interface testing data.
Optionally, the interface structure includes: interface field and interface level, the interface field in the interface structure
And/or interface level, for according to different business rule definition.
Optionally, when the interface structure includes: interface field and interface level, at this point, the Test data generation list
Member 203, comprising: Test data generation subelement 2031, for the requirement of the business rule according to the business to be tested, splicing
The interface level, combines the interface field, obtains the interface testing data.
Optionally, configured interface model can be placed under local computer catalogue by user, at this point, the acquisition
Unit 201, comprising: subelement 2011 is obtained, under local computer catalogue, obtaining the business rule of the business to be tested
Then corresponding interface model.
In the embodiment of the present invention, interface model, the interface model Excel file that will be set can be arranged using Excel
It is stored under local computing catalogue.Store path is supplied to acquiring unit 201, can easily be obtained according to the path of the storage
Take the interface model.Recognition unit 202 identifies the content in the Excel file, obtains interface structure.Test data generation
Unit 203, then according to the business rule of the business to be tested, combine the parameter in the interface structure, obtain interface testing
Data file.The interface testing data can be finally stored under local computer specified directory.
Optionally, in another embodiment of the present invention, see also Fig. 2, described device can also include: that test cases is raw
Test cases is generated for being based on the interface testing data at unit 204.
The interface testing data that the test data generation unit 203 obtains are obtained, in the interface testing data basis
On, increase the description languages such as test cases number, case input, output result, case execution step, obtains test test case
Example, convenient for later management and use.
It should be noted that in the present invention in main control end disclosed in each embodiment each unit specific works mistake
Journey, reference can be made to corresponding embodiment of the method content, details are not described herein again.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other
The difference of embodiment, same or similar part may refer to each other between each embodiment.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
1. a kind of generation method of interface testing data characterized by comprising
For business to be tested, the corresponding interface model of its business rule is obtained;
It identifies the interface model, obtains the corresponding interface structure of the business to be tested;
According to the business rule of the business to be tested, the parameter in the interface structure is combined, obtains interface testing data.
2. the method according to claim 1, wherein the interface structure includes: interface field and interface level,
Interface field and/or interface level in the interface structure, for according to different business rule definition.
3. the method according to claim 1, wherein the interface structure includes: interface field and interface level,
Wherein, the business rule according to the business to be tested, combines the parameter in the interface structure, obtains interface testing number
According to, comprising:
According to the requirement of the business rule of the business to be tested, splices the interface level, combine the interface field, obtain
The interface testing data.
4. obtaining its business rule pair the method according to claim 1, wherein described be directed to business to be tested
The interface model answered, comprising:
Under local computer catalogue, the corresponding interface model of business rule of the business to be tested is obtained.
5. the method according to claim 1, wherein further include:
Based on the interface testing data, test cases is generated.
6. a kind of generating means of interface testing data characterized by comprising
Acquiring unit obtains the corresponding interface model of its business rule for being directed to business to be tested;
Recognition unit, the interface model, obtains the corresponding interface structure of the business to be tested for identification;
Test data generation unit combines the ginseng in the interface structure for the business rule according to the business to be tested
Number, obtains interface testing data.
7. device according to claim 6, which is characterized in that the interface structure includes: interface field and interface level,
Interface field and/or interface level in the interface structure, for according to different business rule definition.
8. device according to claim 6, which is characterized in that the interface structure includes: interface field and interface level,
Wherein, the test data generation unit, comprising:
Test data generation subelement splices the interface layer for the requirement of the business rule according to the business to be tested
Grade, combines the interface field, obtains the interface testing data.
9. device according to claim 6, which is characterized in that the acquiring unit, comprising:
Subelement is obtained, for obtaining the corresponding interface of business rule of the business to be tested under local computer catalogue
Model.
10. device according to claim 6, which is characterized in that further include:
Test cases generation unit generates test cases for being based on the interface testing data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811288563.XA CN109376091A (en) | 2018-10-31 | 2018-10-31 | A kind of generation method and device of interface testing data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811288563.XA CN109376091A (en) | 2018-10-31 | 2018-10-31 | A kind of generation method and device of interface testing data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109376091A true CN109376091A (en) | 2019-02-22 |
Family
ID=65391083
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811288563.XA Pending CN109376091A (en) | 2018-10-31 | 2018-10-31 | A kind of generation method and device of interface testing data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109376091A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134587A (en) * | 2019-04-12 | 2019-08-16 | 平安普惠企业管理有限公司 | A kind of test method, test device and computer readable storage medium |
CN110955600A (en) * | 2019-11-27 | 2020-04-03 | 中国银行股份有限公司 | Interface test method and device |
CN113342693A (en) * | 2021-07-06 | 2021-09-03 | 阳光电源股份有限公司 | Test data generation method, device and system and controller |
CN113568838A (en) * | 2021-08-02 | 2021-10-29 | 工银科技有限公司 | Test data generation method, device, equipment, storage medium and program product |
CN117171056A (en) * | 2023-11-02 | 2023-12-05 | 绿城科技产业服务集团有限公司 | Test method and device based on automatic interface |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9069898B2 (en) * | 2012-05-31 | 2015-06-30 | Dell Products, Lp | System for providing regression testing of an integrated process development system and method therefor |
CN105681126A (en) * | 2015-12-30 | 2016-06-15 | 合一网络技术(北京)有限公司 | Automatic test method and system based on protocol interface |
CN107943694A (en) * | 2017-11-21 | 2018-04-20 | 中国农业银行股份有限公司 | A kind of test data generating method and device |
-
2018
- 2018-10-31 CN CN201811288563.XA patent/CN109376091A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9069898B2 (en) * | 2012-05-31 | 2015-06-30 | Dell Products, Lp | System for providing regression testing of an integrated process development system and method therefor |
CN105681126A (en) * | 2015-12-30 | 2016-06-15 | 合一网络技术(北京)有限公司 | Automatic test method and system based on protocol interface |
CN107943694A (en) * | 2017-11-21 | 2018-04-20 | 中国农业银行股份有限公司 | A kind of test data generating method and device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134587A (en) * | 2019-04-12 | 2019-08-16 | 平安普惠企业管理有限公司 | A kind of test method, test device and computer readable storage medium |
CN110955600A (en) * | 2019-11-27 | 2020-04-03 | 中国银行股份有限公司 | Interface test method and device |
CN110955600B (en) * | 2019-11-27 | 2023-11-10 | 中国银行股份有限公司 | Interface testing method and device |
CN113342693A (en) * | 2021-07-06 | 2021-09-03 | 阳光电源股份有限公司 | Test data generation method, device and system and controller |
CN113568838A (en) * | 2021-08-02 | 2021-10-29 | 工银科技有限公司 | Test data generation method, device, equipment, storage medium and program product |
CN117171056A (en) * | 2023-11-02 | 2023-12-05 | 绿城科技产业服务集团有限公司 | Test method and device based on automatic interface |
CN117171056B (en) * | 2023-11-02 | 2024-01-09 | 绿城科技产业服务集团有限公司 | Test method and device based on automatic interface |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109376091A (en) | A kind of generation method and device of interface testing data | |
US11561772B2 (en) | Low-code development platform | |
US8689177B2 (en) | Integration environment generator | |
CN109656538A (en) | Generation method, device, system, equipment and the medium of application program | |
Garlan et al. | Evolution styles: Foundations and tool support for software architecture evolution | |
CN104679488B (en) | A kind of flow custom development platform and flow custom development approach | |
US11237822B2 (en) | Intelligent discovery and application of API changes for application migration | |
US20140068546A1 (en) | Automated Deployment of a Configured System into a Computing Environment | |
US20200065235A1 (en) | White box code concurrency testing for transaction processing | |
CN109977012A (en) | Joint debugging test method, device, equipment and the computer readable storage medium of system | |
US20150254740A1 (en) | Non-Intrusive Cloud Services Billing | |
CN110096424A (en) | Processing method, device, electronic equipment and the storage medium of test | |
CN107426335A (en) | A kind of system and application method for automatically generating cloud environment configuration file | |
CN109495584A (en) | Internet of things equipment cut-in method, device, equipment and medium | |
Bocciarelli et al. | A model-driven method for building distributed simulation systems from business process models | |
Rossini et al. | The cloud application modelling and execution language (CAMEL) | |
Varela-Vaca et al. | CARMEN: A framework for the verification and diagnosis of the specification of security requirements in cyber-physical systems | |
CN113434175A (en) | Data processing method, device, storage medium and equipment | |
Sorgalla et al. | AjiL: enabling model-driven microservice development | |
US20170364390A1 (en) | Automating enablement state inputs to workflows in z/osmf | |
CN114995808A (en) | Method and device for quickly building micro-service engineering | |
US10547506B2 (en) | Determining identities for executing cloud processing and approvers of the executing | |
CN113220561A (en) | Test case management method, device, equipment and medium | |
US20170288967A1 (en) | Environment manager for continuous deployment | |
US10762461B2 (en) | Automatic comparison of enterprise profile analytics |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190222 |