CN109408357A - A kind of automatic interface testing method and device - Google Patents
A kind of automatic interface testing method and device Download PDFInfo
- Publication number
- CN109408357A CN109408357A CN201711263726.4A CN201711263726A CN109408357A CN 109408357 A CN109408357 A CN 109408357A CN 201711263726 A CN201711263726 A CN 201711263726A CN 109408357 A CN109408357 A CN 109408357A
- Authority
- CN
- China
- Prior art keywords
- interface
- test
- service logic
- parameter
- product service
- 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/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)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a kind of automatic interface testing method and devices, this method comprises: being packaged to the library Python to form interface automated test tool;Base class defining interface is tested by the general-purpose interface inherited in the interface automated test tool, and the interface is assembled into product service logic, the library Python is loaded onto Robot Framework platform so that the product service logic runs on the Robot Framework platform, and writes the test case of the product service logic by the calling interface;The test case is executed by the Robot Framework platform, and generates the first test report.The invention has the benefit that by realizing an interface automated test frame, largely reduce the interaction of people and data, instead built by frame, it then allows machine that people is replaced to go to check the accuracy of data, largely reduces the pressure of functional test personnel.
Description
Technical field
The present invention relates to software automated testing technical field more particularly to a kind of automatic interface testing methods and dress
It sets.
Background technique
The fast development of internet, intra-company's system or more and more with being associated with for external system, an operation flow
It is associated with multiple back-end systems.Back-end services may result in client when there is dysfunction or when discharge abnormal data
Dysfunction, or even the phenomenon that collapse.And client due to data the problem of and collapse, if fault-tolerant not in place, may
Cause client that can not start forever.This injury is all huge to user, for company.It is therefore desirable to carry out
The test of api interface, the test for carrying out each interface are to guarantee the effective way of mass of system.
Most of webpage, Android app, IOS app and the Mobile web of current internet company exploitation are bases
In Http agreement.The interface testing tool of Http has very much, and the mode that can carry out Http request also has very much, but interface testing
Currently main application tool has PostMan, SoapUI in field, wherein the most commonly used with PostMan.PostMan is a kind of net
Chrome plug-in unit page debugging and send webpage Http request, user can be scanned for and be pacified by the application shop of Chrome
Dress.User can only go manually implementation of test cases by these tools, and function is relatively simple, for a large amount of, repetitive operation
It realizes relatively difficult.
Interface testing mainly sends Http and requests and receive response, parses to response, whether checks response results
Meet expected (current most of Internet companies are to carry out storing data with Json).This data structure of Json is with certain
Existing for algorithm, check that data are a very difficult things by visually.
Although PostMan can be used to simulate get or post or the request of other modes carrys out debugging interface, verification
Mode is less, returns the result and still needs to the user effort a large amount of time and go to analyze;PostMan supports batch operation use-case, but transports
Scanning frequency degree is very slow, inefficiency;PostMan can be generated test code, but its environment and data configuration and certain to be measured answer
Service logic and tool all blend together, and the redundancy and the degree of coupling of code are very high;There are service logic according to
Bad interface, wherein a change need to just put layers apart layer manually modifies whole interface use-cases, case management is very inconvenient;
PostMan can not with database combination, for that can not be tested in relation to one piece of database of use-case;The survey that PostMan is provided
Examination report is very coarse, can only simply check some test case success or not, be unfavorable for analyzing and positioning interface error problem.
Summary of the invention
The function of interface testing tool in the prior art is more single, interface is unfriendly it is an object of the invention to solving and
Be unfavorable for repetitive operation and PostMan there are the problem of, a kind of automatic interface testing method and device are provided.
The technical solution adopted by the present invention to solve the technical problems is:
On the one hand, a kind of automatic interface testing method is provided characterized by comprising
The library Python is packaged to form interface automated test tool;
Base class defining interface is tested by the general-purpose interface inherited in the interface automated test tool, and is connect described
Mouth is assembled into product service logic, and the library Python is loaded onto Robot Framework platform so that the product service logic
The Robot Framework platform is run on, and the interface is called to write the test case of the product service logic;
The test case is executed by the Robot Framework platform, and generates the first test report.
In automatic interface testing method of the present invention, further includes:
Script is provided by the interface automated test tool, and by Jenkins platform configuration and calls the foot
This is to be timed monitoring to business and generate the second test report.
In automatic interface testing method of the present invention, further includes:
If being modified and being triggered certainly by function described in the Jenkins platform monitoring there are function modification in development process
The execution of dynamicization use-case is operated to do Automation regression testing.
It is described the library Python to be packaged to form interface certainly in automatic interface testing method of the present invention
Dynamicization testing tool, comprising:
Host, url, header, body, params and cookie are encapsulated into inside class using as basic input unit
Point;The interface automated test tool includes the basic importation;
It is written as the data inspection to json to check function and is encapsulated into the basic importation, the inspection function
Including to interface return code, json error in data code code and the basic correctness verified for returning to field.
It is described by inheriting the interface automated test tool in automatic interface testing method of the present invention
In general-purpose interface test base class defining interface, and the interface is assembled into product service logic, the library Python is loaded onto
Robot Framework platform is so that the product service logic runs on the Robot Framework platform, and calls institute
State the test case that interface writes the product service logic, comprising:
Background application interface is defined the interface by the basic importation, and by the interface inheritance institute
State basic importation;
It realizes that apiLaunch class realizes run api method by the library Python, is connect by the run api method
Four parameters are received, first parameter of four parameters is interface name, and second parameter is input parameter, and third parameter is
Check that output par, c, the 4th parameter are a free parameter;
The run api method is called by the Robot Framework platform and writes the test case.
On the other hand, a kind of interface automatic test device is provided, wherein be stored with a plurality of instruction, described instruction be suitable for by
Processor is loaded and is executed, comprising:
The library Python is packaged to form interface automated test tool;
Base class defining interface is tested by the general-purpose interface inherited in the interface automated test tool, and is connect described
Mouth is assembled into product service logic, and the library Python is loaded onto Robot Framework platform so that the product service logic
The Robot Framework platform is run on, and the test by calling the interface to write the product service logic is used
Example;
The test case is executed by the Robot Framework platform, and generates the first test report.
In interface automatic test device of the present invention, further includes:
Script is provided by the interface automated test tool, and by Jenkins platform configuration and calls the foot
This is to be timed monitoring to business and generate the second test report.
In interface automatic test device of the present invention, further includes:
If being modified and being triggered certainly by function described in the Jenkins platform monitoring there are function modification in development process
The execution of dynamicization use-case is operated to do Automation regression testing.
It is described the library Python to be packaged to form interface certainly in interface automatic test device of the present invention
Dynamicization testing tool, comprising:
Host, url, header, body, params and cookie are encapsulated into inside class using as basic input unit
Point;The interface automated test tool includes the basic importation;
It is written as the data inspection to json to check function and is encapsulated into the basic importation, the inspection function
Including to interface return code, json error in data code code and the basic correctness verified for returning to field.
It is described by inheriting the interface automated test tool in interface automatic test device of the present invention
In general-purpose interface test base class defining interface, and the interface is assembled into product service logic, the library Python is loaded onto
Robot Framework platform is so that the product service logic runs on the Robot Framework platform, and calls institute
State the test case that interface writes the product service logic, comprising:
Background application interface is defined the interface by the basic importation, and by the interface inheritance institute
State the common segment of basic importation;
It realizes that apiLaunch class realizes run api method by the library Python, is connect by the run api method
Four parameters are received, first parameter of four parameters is interface name, and second parameter is input parameter, and third parameter is
Check that output par, c, the 4th parameter are a free parameter;
The run api method is called by the Robot Framework platform and writes the test case.
Disclosed above a kind of automatic interface testing method and device have the advantages that by way of code
It realizes an interface automated test frame, largely reduces the interaction of people and data, instead pass through
Frame is built, and is then allowed machine that people is replaced to go to check the accuracy of data, is largely reduced the pressure of functional test personnel
Power;By one automation framework of realization, that is, a tool layer is realized, general part abstract is come out, then will
This tool layer and the service logic of application to be measured are spliced, so that it may reach the automatic test to certain application to be measured.The tool
It is separated completely with service logic, that is to say, that user only needs to safeguard the service logic of its examining system;Bottom tool
After packaged, user only needs to be concerned about its service logic, and functional test personnel can also be in the case where being ignorant of code
Use-case is equally write by narration, and arbitrarily retouching to the description of use-case and failure checkpoint can be added when writing use-case
It states, these descriptions very carefully and neatly done beautiful can be embodied in test report, and related personnel is facilitated to check.
Detailed description of the invention
Fig. 1 is a kind of flow chart for automatic interface testing method that one embodiment of the invention provides;
Fig. 2 is the platform relation schematic diagram that one embodiment of the invention provides.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.
Referring to Fig. 1, Fig. 1 is a kind of flow chart for automatic interface testing method that one embodiment of the invention provides, this connects
Mouth automated testing method mainly passes through computer program and realizes, including step S1-S3:
S1, the library Python is packaged to form interface automated test tool;Referring to fig. 2, Fig. 2 is that the present invention one is real
The platform relation schematic diagram of example offer is applied, Python is a glue language, and the present invention realizes one with Python code
Adhesive is combined together Python and current more powerful automation hosted platform RobotFramework, mutually ties
It closes but does not depend on.The hosted platform of current automatic test is many and irregular, if there is better trustship flat in the future
Platform can be bonded together with the service logic that this adhesive applies certain with new platform, and answer without rewriting certain
Service logic, this ensure that maintainable well, the life cycle of the test code of the service logic of certain application
It will be longer.Step S1 includes sub-step S11-S12:
S11, host, url, header, body, params and cookie are encapsulated into it is defeated based on inside class
Enter part;The interface automated test tool includes the basic importation;Programming language used in the present invention is Python,
Python third party library is subjected to secondary encapsulation, forms an interface automated test tool.In terms of basic class wrapper: the present invention
The more powerful third party library requests of current python is packaged into a testing tool, which has included test
The most basic importation of interface, current overwhelming majority internet web pages application or app application backstage using http agreement come
Request interface data.One good automatic test cases to have it is gem-pure output and input, while should also have good
Good readability.The present invention calls the call method of the interface requests based on http agreement (most common is get and post)
Host, url, header, body, params and cookie used in interface are encapsulated into the base inside a class as test interface
Plinth importation, this class is called test base class BaseApi by us.
S12, it is written as the data inspection to json to check function and is encapsulated into the basic importation, the inspection
Function includes to interface return code, json error in data code code and the basic correctness verified for returning to field.It is current most
From the background using json format come storing data, the data inspection to json is written as by the present invention for number web application and app application
General inspection function is simultaneously encapsulated into the tool-class, checks that function is contained to interface return code, json error in data code
Code and some basis for returning to field verify, and what is be such as compared asserts, there is "=", " > ", " contains " etc..
After bottom tool is packaged, user only needs to be concerned about its service logic, functional test personnel are being ignorant of generation
Use-case can also equally be write by narration in the case where code, and can add when writing use-case arbitrarily to the description of use-case and
The description of failure checkpoint, these descriptions very carefully and neatly done beautiful can be embodied in test report, and related personnel is facilitated to check.
Interface testing is automated, by making third party's tool, to provide intelligent automation for Internet company
Test reduces a large amount of repetitive operations of manual test, improves testing efficiency, mitigates the test pressure of functional test personnel.
S2, base class defining interface is tested by the general-purpose interface inherited in the interface automated test tool, and by institute
It states interface and is assembled into product service logic, the library Python is loaded onto Robot Framework platform so that the product business
Logic operation calls the interface in the Robot Framework platform to write the test of the product service logic
Use-case;User tests the interface definition that base class applies company by inheriting the general-purpose interface that tool layer has had been carried out, so
Different interface definition is assembled into product service logic afterwards, the adhesive provided by tool layer compares by Python and currently
Powerful automation hosted platform Robot Framework is combined together, and user can call as narration have been determined
The good interface testing class of justice writes test case.In this way, the industry of the application of the automated test tool and Internet company's exploitation
Business logical separation, tool layer is separated with service logic completely, user only needs the business for being concerned about and writing product to be measured to patrol
The test code and then generation test case collected.
Step S2 includes sub-step S21-S23:
S21, background application interface are defined the interface by the basic importation, and by the interface after
Hold the basic importation;Aspect is inherited in interface definition: certain enterprise backend application interface, which passes through, inherits tool-class BaseApi,
Interface is defined, these interface inheritances common segment of tool-class BaseApi, since the request of different interfaces is joined
Number is different, and user only needs to state the required parameter of the interface in defining interface.Such as:
S22、
It realizes that apiLaunch class realizes run api method by the library Python, is connect by the run api method
Four parameters are received, first parameter of four parameters is interface name, and second parameter is input parameter, and third parameter is
Check that output par, c, the 4th parameter are a free parameter;
;In terms of adhesive layer implementation method: by the application to the static library inside robot framework, defining one
The class of a entitled apiLaunch of adhesive layer encapsulates run api in such, the adhesive is quoted in test case, calling is asked
Certain interface is sought, the inspection test to the interface is completed at the same time.Received first parameter of run api is interface name, second ginseng
Number is input parameter, and third parameter is to check output par, c, and the 4th parameter is a free parameter description, is made
For the description to test purpose.By incoming interface name, run api function can search for the interface name of defined mistake automatically,
Corresponding interface name is found to output and input parameter by incoming come to the interface complete call.
S23, the run api method is called by the Robot Framework platform and writes the test case.
Use-case writes aspect: user can be by calling the run api of invention offer come assembling test use-case, and input and output are simply bright
Really, use case description is clearly carefully and neatly done, and test case has very strong readability, easy-to-use.
Format is as follows:
Parameter needed for run apixxxApi (interface name) input=requests the interface
... output=returned data checks part
In short, can customize addition arbitrary content to the description of use-case and the checkpoint that fails when writing test case
Description, enhances the readability of use-case, the execution without will affect use-case;And these use case descriptions can very carefully and neatly done beautiful embodiment
In test report, facilitate tester and developer's positioning analysis failure details.Preferably, it provides use-case and unsuccessfully alerts machine
System is extracted key message and is issued informing related personnel in the form of wechat or short message, facilitate phase when there is test case failure
Pass personnel are flat-footed to know unsuccessfully overview.
S3, the test case is executed by the Robot Framework platform, and generate the first test report.I.e.
Implementation of test cases is called with Robot Framework basic command, and generates test report.
Preferably, which further includes step S4-S5:
S4, script is provided by the interface automated test tool, and by described in Jenkins platform configuration and calling
Script is to be timed monitoring to business and generate the second test report.Meanwhile use-case executes aspect: can be direct
RobotFramework is executed, and can also be executed in order line, is also provided script in Jenkins and is configured execution.Execute use-case process
In, when there is use-case failure, key content can be extracted and issue informing related personnel in the form of wechat or short message, conveniently think people
Member is flat-footed to know unsuccessfully overview.
If there are function modifications in S5, development process, modifies and trigger by function described in the Jenkins platform monitoring
The execution for automating use-case is operated to do Automation regression testing.I.e. the invention can also carry out the sustainable collection of automatic test
At the tool layer provides perform script and gives Jenkins platform, and the script that Jenkins configuration calls the invention to provide can be to certain
The core business of company is timed monitoring, if functional modification in the process of development, Jenkin can monitor modification part
Then triggering automation use-case executes to accomplish Automation regression testing.
By Jenkins continuous integrating, after new code is submitted in exploitation, can automatic trigger automatized script returned
Test, using mechanism is unsuccessfully run again, we only show the test report that last time generates, and only repeatedly still fail comprising running again
Test case, functional test personnel need to only verify the test case for being performed a plurality of times and still failing, also avoid some because uncertain
Fail caused by factor and delay analysis time of related personnel, less will the functional all verifyings of institute, largely save survey
Try personnel time.
Product main flow function on line is monitored by Jenkins configuration script, it can be anti-in time the problem of discovery
Feedback, which is persistently to carry out within 24 hours and manual test personnel cannot achieve, so as to preferably guarantee product matter
Amount;And during monitoring on line, using mechanism is run again, the test report after running-in again simultaneously is finally shown repeatedly, thus
More accurate statistics success rate, avoid because some uncertain factors cause use-case it is unstable due to cause the mistake of success rate
Sentence;Monitor when the same day, last time executed can automatic trigger issue the same day and summarize mail, include building number, the frequency of failure
And number of success, enable the very open-and-shut stability for knowing product on same day line of related personnel.
The implementing result public lecture of automatic test cases generates on Jenkins platform, and this report contains the round
Whole use-cases of execution, the functional module for including, failure use-case, success rate failure rate etc., and very detailed print
Failure details and timing node and current IP node, facilitate related personnel to check positioning failure cause.
Mechanism is unsuccessfully run in offer again, and user may be selected to run number again, only executes the failure use-case executed for the last time every time,
It is not run again without failure use-case, after the completion of whole numbers execute, optional displaying test report is for combined test report or most
The latter test report generated;Reaching automation continuous integrating in conjunction with Jenkins can after new code is submitted in exploitation
Our automatized script of automatic trigger carries out regression test, and functional test personnel only need the test case of authentication failed, without
It will the functional all verifyings of institute;Research staff can manually perform wheel Jenkins building before proposing survey, be surveyed according to automation
The inspection result of example on probation, proposes the service quality before surveying;After proposing survey, tester can carry out a wheel again and smolder survey
Examination checks that result returns to comparison, promotes testing efficiency;Also automatic test foot is triggered using Jenkins configuring timing tasks
This execution carries out the main flow business function interface on line to continue monitoring, guarantee company's product quality;Automatic test is used
The implementing result of example reports refinement, and test crash details print in html report, and related personnel is facilitated to check positioning failure
Reason reaches visualization.
The present invention also provides a kind of interface automatic test devices, wherein be stored with a plurality of instruction, described instruction be suitable for by
Processor is loaded and is executed, to realize the above method.
The present invention proposition interface is automated, repeated work (request interface whether effectively, parameter verification, returned data school
Test) it can be solved with the mode of automation, and research staff can first carry out a wheel smoke test before proposing survey, according to
Automatic test cases inspection result proposes the service quality before surveying;After proposing survey, tester further takes turns survey of smoldering
Examination, emphasis point, which is fallen on, to be returned the result in comparison, and the efficiency tested in this way can be greatly improved.
There is provided herein the various operations of embodiment.In one embodiment, described one or operation may be constructed one
The computer-readable instruction stored on a or computer-readable medium will be held when being executed by electronic equipment so that calculating equipment
The row operation.Describing the sequences of some or all of operations, to should not be construed as to imply that these operations necessarily order dependent
's.It will be appreciated by those skilled in the art that the alternative sequence of the benefit with this specification.Furthermore, it is to be understood that not being institute
There is operation that must exist in each embodiment provided in this article.
Moreover, word " preferred " used herein means serving as example, example or illustration.Feng Wen is described as " preferably
" any aspect or design be not necessarily to be construed as than other aspect or design it is more advantageous.On the contrary, the use purport of word " preferred "
Concept is being proposed in specific ways.Term "or" as used in this application is intended to mean the "or" for including and non-excluded
"or".That is, unless specified otherwise or clear from the context, " X uses A or B " means that nature includes any one of arrangement.
That is, if X uses A;X uses B;Or X uses A and B both, then " X uses A or B " is met in aforementioned any example.
Moreover, although the disclosure, those skilled in the art has shown and described relative to one or implementation
Member will be appreciated that equivalent variations and modification based on the reading and understanding to the specification and drawings.The disclosure includes all such
Modifications and variations, and be limited only by the scope of the following claims.In particular, to being held by said modules (such as element etc.)
Capable various functions, term for describing such components be intended to correspond to execute the component specified function (such as its
Functionally of equal value) random component (unless otherwise instructed), even if in structure with execute the disclosure shown in this article
Exemplary implementations in function open structure it is not equivalent.In addition, although the special characteristic of the disclosure relative to
Only one in several implementations is disclosed, but this feature can with such as can be the phase for a given or particular application
It hopes and one of other advantageous implementations or the combination of other features.Moreover, with regard to term " includes ", " having ", " containing " or
For its deformation is used in specific embodiments or claims, such term is intended to side similar to the term " comprising "
Formula includes.
Each functional unit in the embodiment of the present invention can integrate in a processing module, be also possible to each unit list
Solely be physically present, can also the multiple or multiple above units be integrated in a module.Above-mentioned integrated module can both use
Formal implementation of hardware can also be realized in the form of software function module.If the integrated module is with software function
The form of module is realized and when sold or used as an independent product, also can store in computer-readable storage Jie
In matter.Storage medium mentioned above can be read-only memory, disk or CD etc..Above-mentioned each device or system, can be with
Execute the storage method in correlation method embodiment.
In conclusion although the present invention has been disclosed above in the preferred embodiment, but above preferred embodiment is not to limit
The system present invention, those skilled in the art can make various changes and profit without departing from the spirit and scope of the present invention
Decorations, therefore protection scope of the present invention subjects to the scope of the claims.
Claims (10)
1. a kind of automatic interface testing method characterized by comprising
The library Python is packaged to form interface automated test tool;
Base class defining interface is tested by the general-purpose interface inherited in the interface automated test tool, and by the interface group
Product service logic is dressed up, the library Python is loaded onto Robot Framework platform so that the product service logic is run
In the Robot Framework platform, and by calling the interface to write the test case of the product service logic;
The test case is executed by the Robot Framework platform, and generates the first test report.
2. automatic interface testing method according to claim 1, which is characterized in that further include:
There is provided script by the interface automated test tool, and by Jenkins platform configuration and call the script with
Monitoring is timed to business and generates the second test report.
3. automatic interface testing method according to claim 2, which is characterized in that further include:
If there are function modifications in development process, is modified by function described in the Jenkins platform monitoring and trigger automation
The execution of use-case is operated to do Automation regression testing.
4. automatic interface testing method according to claim 1, which is characterized in that described to be packaged to the library Python
To form interface automated test tool, comprising:
Host, url, header, body, params and cookie are encapsulated into inside class using as basic importation;
The interface automated test tool includes the basic importation;
It is written as the data inspection to json to check function and is encapsulated into the basic importation, the inspection function includes
To interface return code, json error in data code code and the basic correctness verified for returning to field.
5. automatic interface testing method according to claim 4, which is characterized in that described by inheriting the interface certainly
General-purpose interface in dynamicization testing tool tests base class defining interface, and the interface is assembled into product service logic, will
The library Python is loaded onto Robot Framework platform so that the product service logic runs on the Robot
Framework platform, and the interface is called to write the test case of the product service logic, comprising:
Background application interface is defined the interface by the basic importation, and by base described in the interface inheritance
Plinth importation;
It realizes that apiLaunch class realizes run api method by the library Python, receives four by the run api method
A parameter, first parameter of four parameters are interface name, and second parameter is input parameter, and third parameter is to check
Output par, c, the 4th parameter are a free parameter;
The run api method is called by the Robot Framework platform and writes the test case.
6. a kind of interface automatic test device, wherein being stored with a plurality of instruction, described instruction is suitable for being loaded and being held by processor
Row characterized by comprising
The library Python is packaged to form interface automated test tool;
Base class defining interface is tested by the general-purpose interface inherited in the interface automated test tool, and by the interface group
Product service logic is dressed up, the library Python is loaded onto Robot Framework platform so that the product service logic is run
In the Robot Framework platform, and the interface is called to write the test case of the product service logic;
The test case is executed by the Robot Framework platform, and generates the first test report.
7. interface automatic test device according to claim 6, which is characterized in that further include:
There is provided script by the interface automated test tool, and by Jenkins platform configuration and call the script with
Monitoring is timed to business and generates the second test report.
8. interface automatic test device according to claim 7, which is characterized in that further include:
If there are function modifications in development process, is modified by function described in the Jenkins platform monitoring and trigger automation
The execution of use-case is operated to do Automation regression testing.
9. interface automatic test device according to claim 6, which is characterized in that described to be packaged to the library Python
To form interface automated test tool, comprising:
Host, url, header, body, params and cookie are encapsulated into inside class using as basic importation;
The interface automated test tool includes the basic importation;
It is written as the data inspection to json to check function and is encapsulated into the basic importation, the inspection function includes
To interface return code, json error in data code code and the basic correctness verified for returning to field.
10. interface automatic test device according to claim 9, which is characterized in that described by inheriting the interface
General-purpose interface in automated test tool tests base class defining interface, and the interface is assembled into product service logic, will
The library Python is loaded onto Robot Framework platform so that the product service logic runs on the Robot
Framework platform, and the interface is called to write the test case of the product service logic, comprising:
Background application interface is defined the interface by the basic importation, and by base described in the interface inheritance
The common segment of plinth importation;
It realizes that apiLaunch class realizes run api method by the library Python, receives four by the run api method
A parameter, first parameter of four parameters are interface name, and second parameter is input parameter, and third parameter is to check
Output par, c, the 4th parameter are a free parameter;
The run api method is called by the Robot Framework platform and writes the test case.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711263726.4A CN109408357A (en) | 2017-12-04 | 2017-12-04 | A kind of automatic interface testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711263726.4A CN109408357A (en) | 2017-12-04 | 2017-12-04 | A kind of automatic interface testing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109408357A true CN109408357A (en) | 2019-03-01 |
Family
ID=65462832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711263726.4A Pending CN109408357A (en) | 2017-12-04 | 2017-12-04 | A kind of automatic interface testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109408357A (en) |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109992504A (en) * | 2019-03-07 | 2019-07-09 | 苏州浪潮智能科技有限公司 | A kind of server Redfish test method, system, terminal and storage medium |
CN110825647A (en) * | 2019-11-14 | 2020-02-21 | 广东华晟数据固态存储有限公司 | Test method for automatically testing logical equipment interface |
CN110909319A (en) * | 2019-11-29 | 2020-03-24 | Oppo(重庆)智能科技有限公司 | Application processing method and related product |
CN111240989A (en) * | 2020-01-17 | 2020-06-05 | 众能联合数字技术有限公司 | Interface automation test framework and method |
WO2020186680A1 (en) * | 2019-03-15 | 2020-09-24 | 集奥聚合(北京)人工智能科技有限公司 | Interface testing method based on modeling platform |
CN111813665A (en) * | 2020-06-29 | 2020-10-23 | 四川长虹电器股份有限公司 | Big data platform interface data testing method and system based on python |
CN111835590A (en) * | 2020-07-03 | 2020-10-27 | 紫光云技术有限公司 | Automatic interface test architecture and test method for cloud host product |
CN112100080A (en) * | 2020-11-03 | 2020-12-18 | 广州市玄武无线科技股份有限公司 | Control testing method and device, terminal equipment and computer readable storage medium |
CN112256582A (en) * | 2020-10-28 | 2021-01-22 | 太仓市同维电子有限公司 | HTTP-based Robot Framework automatic script management system and method |
CN112380144A (en) * | 2020-12-24 | 2021-02-19 | 福建新大陆支付技术有限公司 | POS application testing method, equipment and computer storage medium |
CN112511386A (en) * | 2020-12-09 | 2021-03-16 | 爱瑟福信息科技(上海)有限公司 | Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment |
CN112650686A (en) * | 2020-12-30 | 2021-04-13 | 北京华胜天成科技股份有限公司 | Method and device for obtaining test result, electronic equipment and storage medium |
CN112732322A (en) * | 2021-04-01 | 2021-04-30 | 上海钐昆网络科技有限公司 | Data verification method and device, electronic equipment and computer storage medium |
CN113190449A (en) * | 2021-05-07 | 2021-07-30 | 广东美房智高机器人有限公司 | Management platform and robot MQTT protocol testing method, system, equipment and medium |
CN113495829A (en) * | 2020-03-20 | 2021-10-12 | 北京海致星图科技有限公司 | Automatic interface testing method and system |
CN113505065A (en) * | 2021-07-09 | 2021-10-15 | 深圳市泛海检测认证有限公司 | Implementation method based on Android platform automatic test |
CN113691415A (en) * | 2021-07-27 | 2021-11-23 | 曙光网络科技有限公司 | Calling method, device, equipment and storage medium of network tester |
CN113778896A (en) * | 2021-09-26 | 2021-12-10 | 杭州安恒信息技术股份有限公司 | Interface test method, device, equipment and medium |
CN113806209A (en) * | 2020-06-16 | 2021-12-17 | 腾讯科技(深圳)有限公司 | Interface testing method, frame, computer device and storage medium |
CN114546858A (en) * | 2022-02-23 | 2022-05-27 | 霖久智慧(广东)科技有限公司 | Interface automatic testing platform based on property industry |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2913757A1 (en) * | 2014-02-26 | 2015-09-02 | FMC Feindt Management Consulting GmbH | Method, system, and computer software product for test automation |
CN105320599A (en) * | 2015-11-26 | 2016-02-10 | 上海斐讯数据通信技术有限公司 | System and method for web automatic tests |
CN106095677A (en) * | 2016-06-08 | 2016-11-09 | 上海爱数信息技术股份有限公司 | The RESTful Webservice automatic interface testing method realized based on Robot Framework |
-
2017
- 2017-12-04 CN CN201711263726.4A patent/CN109408357A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2913757A1 (en) * | 2014-02-26 | 2015-09-02 | FMC Feindt Management Consulting GmbH | Method, system, and computer software product for test automation |
CN105320599A (en) * | 2015-11-26 | 2016-02-10 | 上海斐讯数据通信技术有限公司 | System and method for web automatic tests |
CN106095677A (en) * | 2016-06-08 | 2016-11-09 | 上海爱数信息技术股份有限公司 | The RESTful Webservice automatic interface testing method realized based on Robot Framework |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109992504A (en) * | 2019-03-07 | 2019-07-09 | 苏州浪潮智能科技有限公司 | A kind of server Redfish test method, system, terminal and storage medium |
WO2020186680A1 (en) * | 2019-03-15 | 2020-09-24 | 集奥聚合(北京)人工智能科技有限公司 | Interface testing method based on modeling platform |
CN110825647B (en) * | 2019-11-14 | 2022-05-13 | 广东华晟数据固态存储有限公司 | Test method for automatically testing logical device interface |
CN110825647A (en) * | 2019-11-14 | 2020-02-21 | 广东华晟数据固态存储有限公司 | Test method for automatically testing logical equipment interface |
CN110909319B (en) * | 2019-11-29 | 2022-03-29 | Oppo(重庆)智能科技有限公司 | Application processing method and related product |
CN110909319A (en) * | 2019-11-29 | 2020-03-24 | Oppo(重庆)智能科技有限公司 | Application processing method and related product |
CN111240989A (en) * | 2020-01-17 | 2020-06-05 | 众能联合数字技术有限公司 | Interface automation test framework and method |
CN113495829A (en) * | 2020-03-20 | 2021-10-12 | 北京海致星图科技有限公司 | Automatic interface testing method and system |
CN113806209A (en) * | 2020-06-16 | 2021-12-17 | 腾讯科技(深圳)有限公司 | Interface testing method, frame, computer device and storage medium |
CN111813665A (en) * | 2020-06-29 | 2020-10-23 | 四川长虹电器股份有限公司 | Big data platform interface data testing method and system based on python |
CN111835590A (en) * | 2020-07-03 | 2020-10-27 | 紫光云技术有限公司 | Automatic interface test architecture and test method for cloud host product |
CN112256582A (en) * | 2020-10-28 | 2021-01-22 | 太仓市同维电子有限公司 | HTTP-based Robot Framework automatic script management system and method |
CN112100080A (en) * | 2020-11-03 | 2020-12-18 | 广州市玄武无线科技股份有限公司 | Control testing method and device, terminal equipment and computer readable storage medium |
CN112100080B (en) * | 2020-11-03 | 2021-02-26 | 广州市玄武无线科技股份有限公司 | Control testing method and device, terminal equipment and computer readable storage medium |
CN112511386A (en) * | 2020-12-09 | 2021-03-16 | 爱瑟福信息科技(上海)有限公司 | Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment |
CN112511386B (en) * | 2020-12-09 | 2022-07-26 | 爱瑟福信息科技(上海)有限公司 | Vehicle-mounted Ethernet test method and system based on robotframe and Ethernet test equipment |
CN112380144A (en) * | 2020-12-24 | 2021-02-19 | 福建新大陆支付技术有限公司 | POS application testing method, equipment and computer storage medium |
CN112650686A (en) * | 2020-12-30 | 2021-04-13 | 北京华胜天成科技股份有限公司 | Method and device for obtaining test result, electronic equipment and storage medium |
CN112732322A (en) * | 2021-04-01 | 2021-04-30 | 上海钐昆网络科技有限公司 | Data verification method and device, electronic equipment and computer storage medium |
CN113190449A (en) * | 2021-05-07 | 2021-07-30 | 广东美房智高机器人有限公司 | Management platform and robot MQTT protocol testing method, system, equipment and medium |
CN113505065A (en) * | 2021-07-09 | 2021-10-15 | 深圳市泛海检测认证有限公司 | Implementation method based on Android platform automatic test |
CN113691415A (en) * | 2021-07-27 | 2021-11-23 | 曙光网络科技有限公司 | Calling method, device, equipment and storage medium of network tester |
CN113778896A (en) * | 2021-09-26 | 2021-12-10 | 杭州安恒信息技术股份有限公司 | Interface test method, device, equipment and medium |
CN114546858A (en) * | 2022-02-23 | 2022-05-27 | 霖久智慧(广东)科技有限公司 | Interface automatic testing platform based on property industry |
CN114546858B (en) * | 2022-02-23 | 2024-04-30 | 霖久智慧(广东)科技有限公司 | Automatic interface test platform based on property industry |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109408357A (en) | A kind of automatic interface testing method and device | |
CN109101415A (en) | Interface test method, system, equipment and the storage medium compared based on database | |
US8813039B2 (en) | Method and system for software defect reporting | |
US7945426B2 (en) | Method to improve requirements, design manufacturing, and transportation in mass manufacturing industries through analysis of defect data | |
US7823132B2 (en) | Automated test case verification that is loosely coupled with respect to automated test case execution | |
US8832658B2 (en) | Verification framework for business objects | |
US9218270B2 (en) | Functional software testing framework for determinate level testing | |
BR112019020226A2 (en) | methods and systems for testing web applications | |
US20200019488A1 (en) | Application Test Automate Generation Using Natural Language Processing and Machine Learning | |
CN111124919A (en) | User interface testing method, device, equipment and storage medium | |
CN108108297A (en) | The method and apparatus of automatic test | |
CN107526676B (en) | Cross-system test method and device | |
US8918762B2 (en) | Generating test plans and test cases from service-oriented architecture and process models | |
CN107301130A (en) | A kind of VR all-in-ones testing tool and its method | |
CN103810105B (en) | application version detection method and device | |
US20190079854A1 (en) | Systems and methods for executing tests | |
CN111752844A (en) | Interface testing method and device, computing equipment and storage medium | |
US7783927B2 (en) | Intelligent processing tools | |
CN106126389B (en) | Hardware detection method and system | |
Aho et al. | Challenges in automated testing through graphical user interface | |
CN112650688A (en) | Automated regression testing method, associated device and computer program product | |
CN110287700B (en) | iOS application security analysis method and device | |
EP3514680B1 (en) | Identification of changes in functional behavior and runtime behavior of a system during maintenance cycles | |
US10176087B1 (en) | Autogenic test framework | |
CN109189679A (en) | Interface test method and system, electronic equipment, storage medium |
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: 20190301 |