CN106972983A - The automatic test device and method of network interface - Google Patents

The automatic test device and method of network interface Download PDF

Info

Publication number
CN106972983A
CN106972983A CN201710184073.4A CN201710184073A CN106972983A CN 106972983 A CN106972983 A CN 106972983A CN 201710184073 A CN201710184073 A CN 201710184073A CN 106972983 A CN106972983 A CN 106972983A
Authority
CN
China
Prior art keywords
interface
test
module
performance test
performance
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
Application number
CN201710184073.4A
Other languages
Chinese (zh)
Other versions
CN106972983B (en
Inventor
宋园园
孙明星
顾凯鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Ctrip International Travel Agency Co Ltd
Original Assignee
Shanghai Ctrip International Travel Agency Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Ctrip International Travel Agency Co Ltd filed Critical Shanghai Ctrip International Travel Agency Co Ltd
Priority to CN201710184073.4A priority Critical patent/CN106972983B/en
Publication of CN106972983A publication Critical patent/CN106972983A/en
Application granted granted Critical
Publication of CN106972983B publication Critical patent/CN106972983B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The invention discloses a kind of automatic test device of network interface and method, automatic test device includes performing interface requests module, performance test early stage processing module, performance test performing module and results of property analysis module;Perform interface requests module and obtain interface message, automate the execution type of use-case to detect test-types according to current interface, if during interface performance test, interface message is sent to performance test early stage processing module;Performance test early stage processing module automates the performance test script of use-case according to the interface message received come generation adaptation current interface after parsing, and sends to performance test performing module;Performance test performing module performs the performance test script, and exports to results of property analysis module;The results of property source file that the analysis of results of property analysis module is received carrys out generative nature energy implementing result, and is incorporated into interface capability report.Present invention reduces every cost during performance test.

Description

The automatic test device and method of network interface
Technical field
The present invention relates to a kind of automatic test device of network interface and method.
Background technology
The performance test of existing network interface, main users are full-time performance test personnel, dependent on special property Can testing tool, the basic procedure of test is:Understand business scenario, data preparation, performance script is made, performance is performed and result Analysis.
But, there is some following shortcoming in current performance test:
1st, professional performance test personnel are rare, cause the human cost of performance test high;
2nd, performance test personnel, which devote a tremendous amount of time, is understanding in business scenario, data preparation and script making, because This can only shorten the time spent on the interpretation of result stage;
3rd, the charge of special performance testing tool is high, causes the expense cost of performance test high;
4th, time-consuming for the entirety of whole performance test flow, causes the time cost of performance test high.
The content of the invention
The technical problem to be solved in the present invention is to overcome the manpower of the performance test of network interface, expense in the prior art With and the high defect of time cost there is provided a kind of automatic test device of network interface and method.
The present invention is to solve above-mentioned technical problem by following technical proposals:
A kind of automatic test device of network interface, its feature is that the automatic test device connects including execution Mouth request module, performance test early stage processing module, performance test performing module and results of property analysis module;
The execution interface requests module is used to obtain interface message, and according to the execution of current interface automation use-case Type detects test-types, if test-types are interface performance test, and the interface message is sent to the performance and surveyed Try early stage processing module;
The performance test early stage processing module is used to be adapted to generate after parsing according to the interface message received Current interface automates the performance test script of use-case, and the performance test script is sent to performance test execution Module;
The performance test performing module is used to perform the performance test script, and output performance result source file is extremely The results of property analysis module;
The results of property analysis module carrys out generative nature for the results of property source file that analysis is received to be performed As a result, and integrate the performance implementing result to interface capability report on.
It is preferred that the interface message includes URL (the Uniform Resource Locator, unified money of network interface Source finger URL), request message, scene information, performance configuration information and performance test script template.
It is preferred that the performance test performing module is additionally operable to obtain performance probe card, inserted by the performance test Part performs the performance test script.
It is preferred that the results of property analysis module is used to analyze the results of property source file using analysis plug-in unit, The analysis plug-in unit includes interpretation of result plug-in unit, picture generation plug-in unit and error result and obtains plug-in unit.
It is preferred that the automatic test device also includes interface function test module;
If the execution interface requests module is additionally operable to test-types for interface function test, the interface message is sent out The interface function test module is delivered to, the interface function test module is used to perform interface function test, and output connects Mouth function report.
A kind of automated testing method of network interface, its feature is that the automated testing method is using as described above Automatic test device realize that the automated testing method comprises the following steps:
S1, the execution interface requests module obtains interface message, and automates according to current interface the execution of use-case Type detects test-types, if test-types are interface performance test, and the interface message is sent to the performance and surveyed Try early stage processing module;
S2, the performance test early stage processing module according to the interface message received come after parsing generation adaptation work as Front port automates the performance test script of use-case, and the performance test script is sent to performance test execution mould Block;
S3, the performance test performing module perform the performance test script, and output performance result source file is extremely The results of property analysis module;
S4, the results of property source file that receives of results of property analysis module analysis carrys out generative nature can perform knot Really, and integrate the performance implementing result to interface capability report on.
It is preferred that in step S1In, URL of the interface message including network interface, request message, scene information, property Can configuration information and performance test script template.
It is preferred that in step S3In, the performance test performing module obtains performance probe card, is surveyed by the performance Plug-in unit is tried to perform the performance test script.
It is preferred that in step S4In, the results of property analysis module analyzes the results of property using analysis plug-in unit Source file, the analysis plug-in unit includes interpretation of result plug-in unit, picture generation plug-in unit and error result and obtains plug-in unit.
It is preferred that the automatic test device also includes interface function test module;
In step S1In, if test-types are interface function test, the interface message is sent to the interface work( Energy test module, the interface function test module performs interface function test, and output interface function is reported.
On the basis of common sense in the field is met, above-mentioned each optimum condition can be combined, and produce each preferable reality of the present invention Example.
The positive effect of the present invention is:
The present invention is directly connect without expensive special performance testing tool using interface automation use-case to complete network The performance test and functional test of mouth, therefore expense cost is saved, and pass through the present invention, complicated business scenario and data Preparation is responsible for by the functional test personnel for being familiar with business, therefore releases the workload of the performance test personnel of specialty, simplifies work Measure, so as to reduce human cost and time cost, improve testing efficiency.
Brief description of the drawings
Fig. 1 is the structural representation of the automatic test device of the network interface of present pre-ferred embodiments.
Fig. 2 is the flow chart of the automated testing method of the network interface of present pre-ferred embodiments.
Embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to described reality Apply among a scope.
As shown in figure 1, the automatic test device for the network interface that the present embodiment is provided includes performing interface requests module 1st, performance test early stage processing module 2, interface function test module 3, performance test performing module 4 and results of property analysis module 5, the automatic test device directly automates use-case using interface.
Specifically, performing interface requests module 1 is used to obtain from the request module of the invocation framenort of interface automation use-case Interface message is taken, and automates the scene information of use-case to judge test-types according to current interface, if judging the interface certainly When dynamicization use-case execution performance is tested, the interface message is sent to performance test early stage processing module 2, if judging the interface When automating the test of use-case perform function, the interface message is sent to interface function test module 3, the interface message bag Include URL, request message, scene information, performance configuration information (such as performing duration, execution thread number) and the performance of network interface Test script template, when perform function is tested, the interface message also includes functional test relevant information.
When execution performance is tested, performance test early stage processing module 2 is used to carry out the interface message received Secondary parsing, domain, the port numbers of interface, the path of interface, the request method of interface, message format, request where obtaining interface Message, performance checking check post, execution duration, execution thread number, generation adaptation current interface automate the performance test of use-case Script and secondary parsing data, and the performance test script is sent to performance test performing module 4, wherein, performance is surveyed Training originally adds up to three kinds:The first, the survey that the interface URL and request message that interface automation use-case is performed are performed as performance Try data;Second, the test data that interface is automated in the request message of use-case is variable, is obtained using the random device in framework Access evidence;The third, the test data in the request message of interface automation use-case is variable, and performance test script is propped up in itself The form for the reading data file held is obtained automatically.
Performance test performing module 4 is used to obtain performance probe card, that is, obtains the jar relied on required for performance is performed (Java archive) bag, plug-in resource etc., and the performance test script, generative nature are performed by the performance test plug-in unit Energy result source file, the results of property source file is sent to results of property analysis module 5.
Results of property analysis module 5 is used to analyze the results of property source file using analysis plug-in unit, and the analysis is inserted Part includes interpretation of result plug-in unit, picture generation plug-in unit and error result and obtains plug-in unit, and performance implementing result is generated after analysis, and The performance implementing result is integrated to interface capability report.
When perform function is tested, interface function test module 3 is used to perform interface function test, and output interface work( Can report, the response message progress result school of the interface use-case result correction verification module docking port functional test of interface automation use-case Test.
As shown in Fig. 2 the present embodiment also provides a kind of automated testing method of network interface, the automatic test side Method realizes that the automated testing method comprises the following steps using automatic test device described above:
Step 101, execution interface requests module obtain interface message, and according to the execution of current interface automation use-case Type detects test-types, if test-types are interface performance test, interface message sent to performance test early stage Module is managed, and performs step 102;If test-types are interface function test, interface message is sent to interface function and surveyed Die trial block, and perform step 103.
In this step, obtained in the request module for performing the invocation framenort that interface requests module automates use-case from interface Interface message, and automate the scene information of use-case to judge test-types according to current interface, if judging, the interface is automatic When changing the test of use-case execution performance, the interface message is sent to performance test early stage processing module, if judging the interface certainly When dynamicization use-case perform function is tested, the interface message is sent to interface function test module, the interface message includes URL, request message, scene information, performance configuration information and the performance test script template of network interface, when perform function test When, the interface message also includes functional test relevant information.
Generation adaptation is current after step 102, performance test early stage processing module are parsed according to the interface message received Interface automates the performance test script of use-case, and performance test script is sent to performance test performing module.Step 102 Afterwards, step 104 is performed.
In this step, performance test early stage processing module carries out secondary parsing to the interface message received, obtains Domain, the port numbers of interface, the path of interface, the request method of interface, message format, request message, performance inspection where to interface Look into check post, perform duration, execution thread number, the performance test script and secondary solution of generation adaptation current interface automation use-case Data are analysed, and the performance test script is sent to performance test performing module, wherein, performance test script adds up to three Kind:The first, the test data that the interface URL and request message that interface automation use-case is performed are performed as performance;Second, Test data in the request message of interface automation use-case is variable, and data are obtained using the random device in framework;The third, Test data in the request message of interface automation use-case is variable, the reading data file that performance test script is supported in itself Form obtain automatically.
Step 103, interface function test module perform interface function test, and output interface function is reported.
In this step, the response report of the interface use-case result correction verification module docking port functional test of interface automation use-case Text carries out result verification.
Step 104, performance test performing module obtain performance probe card, are surveyed by performance test plug-in unit come execution performance Training sheet, and output performance result source file is to results of property analysis module.After step 104, step 105 is performed.
In this step, performance test performing module obtains performance probe card, that is, obtains required for performance is performed and rely on Jar bags, plug-in resource for arriving etc..
Step 105, results of property analysis module analyze the results of property source file received using analysis plug-in unit, generate Performance implementing result, and integration performance implementing result to interface capability report on.
In this step, the analysis plug-in unit is obtained and inserted including interpretation of result plug-in unit, picture generation plug-in unit and error result Part.
In the present embodiment, without expensive special performance testing tool, directly use-case is automated using interface complete Into the performance test and functional test of network interface, therefore expense cost is saved, and pass through the present invention, complicated business Scape and data prepare to be responsible for by the functional test personnel for being familiar with business, and the performance test personnel of specialty need to only pay close attention to performance test Core:Interpretation of result, professional performance test staff concentration analysis, therefore release the performance test personnel of specialty Workload, simplifies workload, shares out the work and helps one another, so as to reduce human cost and time cost, improve testing efficiency.
Although the embodiment of the present invention is the foregoing described, it will be appreciated by those of skill in the art that this is only For example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially from On the premise of the principle and essence of the present invention, various changes or modifications can be made to these embodiments, but these changes and Modification each falls within protection scope of the present invention.

Claims (10)

1. a kind of automatic test device of network interface, it is characterised in that the automatic test device includes performing interface Request module, performance test early stage processing module, performance test performing module and results of property analysis module;
The execution interface requests module is used to obtain interface message, and according to the execution type of current interface automation use-case To detect test-types, if test-types are interface performance test, the interface message is sent to the performance test Phase processing module;
The performance test early stage processing module is used for current come generation adaptation after parsing according to the interface message received Interface automates the performance test script of use-case, and the performance test script is sent to performance test execution mould Block;
The performance test performing module is used to perform the performance test script, and output performance result source file is to described Results of property analysis module;
The results of property analysis module carrys out generative nature energy implementing result for analyzing the results of property source file received, And the performance implementing result is integrated to interface capability report.
2. automatic test device as claimed in claim 1, it is characterised in that the interface message includes network interface URL, request message, scene information, performance configuration information and performance test script template.
3. automatic test device as claimed in claim 1, it is characterised in that the performance test performing module is additionally operable to obtain Performance test plug-in unit is taken, the performance test script is performed by the performance test plug-in unit.
4. automatic test device as claimed in claim 1, it is characterised in that the results of property analysis module is used to use Analysis plug-in unit analyzes the results of property source file, the analysis plug-in unit include interpretation of result plug-in unit, picture generation plug-in unit and Error result obtains plug-in unit.
5. the automatic test device as described in any one in Claims 1 to 4, it is characterised in that the automatic test Device also includes interface function test module;
If it is described execution interface requests module be additionally operable to test-types for interface function test, by the interface message send to The interface function test module, the interface function test module is used to perform interface function test, and output interface work( Can report.
6. a kind of automated testing method of network interface, it is characterised in that the automated testing method utilizes right such as will The automatic test device described in 1 is asked to realize, the automated testing method comprises the following steps:
S1, the execution interface requests module obtain interface message, and according to current interface automate the execution type of use-case come Test-types are detected, if test-types are interface performance test, the interface message is sent to the performance test early stage Processing module;
S2, the performance test early stage processing module according to the interface message received come after parsing generation adaptation currently connect The performance test script of mouth automation use-case, and the performance test script is sent to the performance test performing module;
S3, the performance test performing module perform the performance test script, and output performance result source file is to the property Can interpretation of result module;
S4, the results of property source file that receives of results of property analysis module analysis carry out generative nature energy implementing result, and And the performance implementing result is integrated to interface capability report.
7. automated testing method as claimed in claim 6, it is characterised in that in step S1In, the interface message includes net URL, request message, scene information, performance configuration information and the performance test script template of network interface.
8. automated testing method as claimed in claim 6, it is characterised in that in step S3In, the performance test performs mould Block obtains performance probe card, and the performance test script is performed by the performance test plug-in unit.
9. automated testing method as claimed in claim 6, it is characterised in that in step S4In, the results of property analyzes mould Block analyzes the results of property source file using analysis plug-in unit, and the analysis plug-in unit includes interpretation of result plug-in unit, picture and generated Plug-in unit and error result obtain plug-in unit.
10. the automated testing method as described in any one in claim 6~9, it is characterised in that the automatic test Device also includes interface function test module;
In step S1In, if test-types are interface function test, the interface message is sent to the interface function and tested Module, the interface function test module performs interface function test, and output interface function is reported.
CN201710184073.4A 2017-03-24 2017-03-24 Automatic testing device and method for network interface Active CN106972983B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710184073.4A CN106972983B (en) 2017-03-24 2017-03-24 Automatic testing device and method for network interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710184073.4A CN106972983B (en) 2017-03-24 2017-03-24 Automatic testing device and method for network interface

Publications (2)

Publication Number Publication Date
CN106972983A true CN106972983A (en) 2017-07-21
CN106972983B CN106972983B (en) 2020-03-17

Family

ID=59330058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710184073.4A Active CN106972983B (en) 2017-03-24 2017-03-24 Automatic testing device and method for network interface

Country Status (1)

Country Link
CN (1) CN106972983B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107659434A (en) * 2017-09-11 2018-02-02 上海斐讯数据通信技术有限公司 A kind of automatic test approach of Devices to test, apparatus and system
CN110232013A (en) * 2019-02-25 2019-09-13 上海蔚来汽车有限公司 Test method, device and controller and medium
CN113055408A (en) * 2021-05-27 2021-06-29 航天中认软件测评科技(北京)有限责任公司 Network security test integrated device
CN113742250A (en) * 2021-11-05 2021-12-03 广州易方信息科技股份有限公司 Automatic interface testing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360920A (en) * 2014-12-02 2015-02-18 微梦创科网络科技(中国)有限公司 Automatic testing method and device for interface
US20150378878A1 (en) * 2013-07-01 2015-12-31 Hcl Technologies Limited Automation testing of gui for non-standard displays
CN105335287A (en) * 2015-10-15 2016-02-17 广东欧珀移动通信有限公司 Automatic test method and device
CN106201846A (en) * 2016-06-30 2016-12-07 微梦创科网络科技(中国)有限公司 Method for monitoring performance in automatic test and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150378878A1 (en) * 2013-07-01 2015-12-31 Hcl Technologies Limited Automation testing of gui for non-standard displays
CN104360920A (en) * 2014-12-02 2015-02-18 微梦创科网络科技(中国)有限公司 Automatic testing method and device for interface
CN105335287A (en) * 2015-10-15 2016-02-17 广东欧珀移动通信有限公司 Automatic test method and device
CN106201846A (en) * 2016-06-30 2016-12-07 微梦创科网络科技(中国)有限公司 Method for monitoring performance in automatic test and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈有为 等: ""基于Jmeter的Web性能自动化测试用例设计应用研究"", 《自动化与仪器仪表》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107659434A (en) * 2017-09-11 2018-02-02 上海斐讯数据通信技术有限公司 A kind of automatic test approach of Devices to test, apparatus and system
CN110232013A (en) * 2019-02-25 2019-09-13 上海蔚来汽车有限公司 Test method, device and controller and medium
CN110232013B (en) * 2019-02-25 2022-09-06 上海蔚来汽车有限公司 Test method, test device, controller and medium
CN113055408A (en) * 2021-05-27 2021-06-29 航天中认软件测评科技(北京)有限责任公司 Network security test integrated device
CN113055408B (en) * 2021-05-27 2021-08-06 航天中认软件测评科技(北京)有限责任公司 Network security test integrated device
CN113742250A (en) * 2021-11-05 2021-12-03 广州易方信息科技股份有限公司 Automatic interface testing method and device

Also Published As

Publication number Publication date
CN106972983B (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
CN106972983A (en) The automatic test device and method of network interface
CN105068925B (en) Software safety defect finds system
CN103312551B (en) The method of testing of CGI(Common gateway interface) and testing apparatus
CN106354634A (en) Interface testing method and device
CN101867501B (en) Method and system for automatically testing consistence of SNMP (Simple Network Management Protocol) interface information model
CN104268079B (en) A kind of method and system of POS Application testings
CN103729294B (en) Method and device for testing performance script of application software
US9461871B2 (en) Client suitability test apparatus and method for a substation automating system
CN109379251A (en) Protective relaying device process layer GOOSE and SV communicate automatic test approach and system
CN107526676B (en) Cross-system test method and device
CN106844204A (en) A kind of utilization mobile terminal generates the method and system of defect report
CN108459850B (en) Method, device and system for generating test script
CN111061696B (en) Method and device for analyzing transaction message log
CN108092835A (en) The detection method and device of electric automobile charging pile
CN104640138B (en) A kind of method and device of orientation problem terminal
CN108804305A (en) A kind of method and device of automatic test
CN104991979B (en) Laboratory data processing method and processing system
CN112597018A (en) Interface test case generation method, device, equipment and storage medium
CN109446075A (en) Interface testing method and device
CN107239398A (en) A kind of interface testing use-case automatic creation system and method based on Postman
CN105117340B (en) URL detection methods and device for iOS browser application quality evaluations
CN110188336A (en) A kind of method and apparatus that expense report is generated based on OA request slip
CN107885627A (en) A kind of server automated test system and method
CN114816980A (en) Automatic testing device and method for embedded communication system

Legal Events

Date Code Title Description
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