CN102932205B - A kind of automated testing method of network service end interface - Google Patents

A kind of automated testing method of network service end interface Download PDF

Info

Publication number
CN102932205B
CN102932205B CN201210466641.7A CN201210466641A CN102932205B CN 102932205 B CN102932205 B CN 102932205B CN 201210466641 A CN201210466641 A CN 201210466641A CN 102932205 B CN102932205 B CN 102932205B
Authority
CN
China
Prior art keywords
test
unit
testing
interface
case data
Prior art date
Application number
CN201210466641.7A
Other languages
Chinese (zh)
Other versions
CN102932205A (en
Inventor
余恒
梁亚宁
Original Assignee
深圳市亚特尔科技有限公司
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 深圳市亚特尔科技有限公司 filed Critical 深圳市亚特尔科技有限公司
Priority to CN201210466641.7A priority Critical patent/CN102932205B/en
Publication of CN102932205A publication Critical patent/CN102932205A/en
Application granted granted Critical
Publication of CN102932205B publication Critical patent/CN102932205B/en

Links

Abstract

The invention discloses a kind of automated testing method and test platform of network service end interface, the method comprises: import test case data; Extract test case data and encapsulate; Simulant-client sends request, and tests network service end interface; Control and measuring process; Log; Test result analysis, generates test report.This test platform comprises, for importing and the test and management unit of management of test cases data; For the request of packaging and testing use-case data, simulant-client, network service end interface is tested and the unit of testing and controlling of control and measuring process; For the data genaration daily record of feeding back according to unit of testing and controlling, and record is reported to the police, the log unit of wrong parameter value and positional information; For the executing state of test case data fed back according to unit of testing and controlling, be contemplated to benchmark, cumulative statistics analysis of accounts with test and management unit, and automatically generate the test report unit of test report.

Description

A kind of automated testing method of network service end interface
Technical field
The present invention relates to the Function Test Automation field of network service end interface, particularly relate to a kind of automated testing method and test platform of network service end interface.
Background technology
At present for the functional test of network service end interface, generally adopt the business softwares such as QTP, Winrunner, it is expensive and require that tester possesses the technology using patent instrument.
The mode that can also be confirmed by client-requested service end in addition carries out manual indirectly testing, but, for this kind of test mode, if when there is multi input condition, many combination of data types, manual test again very loaded down with trivial details, easily make mistakes and test insufficient.
Summary of the invention
The object of the invention is to overcome deficiency of the prior art, a kind of automated testing method and test platform of network service end interface are provided, simulant-client request instruction can be sent by the method, mutual with service end, realize automatic test, make the test for network service end interface more efficient, operation is simpler, and the probability of makeing mistakes is less.
For achieving the above object, the automated testing method of described network service end interface, is characterized in, comprises the following steps:
Step 1: import test case data;
Step 2: extract test case data and encapsulate;
Step 3: simulant-client sends request, tests network service end interface;
Step 4: control and measuring process;
Step 5: log;
Step 6: test result analysis, generates test report.
Preferably, described step 1 is further comprising the steps of,
Step 11: initialization test administrative unit, completes the basic configuration of test and management unit and drives operation;
Step 12: the test case data that importing presets is to described test and management unit;
Step 13: the correctness and the integrality that verify described test case data, for the test case data not meeting executive condition, prompting mistake.
Preferably, in described step 2, unit of testing and controlling is by calling the test case data be stored in described test and management unit, judge the intention of the test case data called, and the particular data extracted in this test case data, then particular data is encapsulated, generate test script.
Preferably, in described step 3, described unit of testing and controlling is by calling packaged test script, the particular data corresponding according to test script, call the API combination of this unit of testing and controlling, be packaged into HTTP request, the request of simulation B/S, response interaction flow, autonomous simulant-client sends request to target web service end interface to be measured; Described unit of testing and controlling is according to the testing procedure arranged, and simulation test scene, controls the step that sends request and time.
Preferably, in described step 4, target web service end interface, after receiving described HTTP request, can return results to unit of testing and controlling; Described unit of testing and controlling accepts the result that target web service end interface returns, and with desired value comparison; If described in the result that returns identical with desired value, then write-back state pass flag is to test and management unit, otherwise write-back state fail flag is to test and management unit; Described test and management unit accepts the state pass flag that feeds back or state fail flag, and the executing state of test case data according to the more current use of mark of feedback.
Preferably, in described step 5, operation note daily record can be produced in execution scrnario testing process, the error message that the warning error information occurred in operation and network service end interface return is recorded by described unit of testing and controlling, be sent to log unit, this log unit accepts the error message of described unit of testing and controlling feedback, carries out log alarming record.
Preferably, in described step 6, test report unit accepts the executing state of the use-case data of described unit of testing and controlling feedback, obtains the preset condition of test and management unit simultaneously; Above-mentioned two states are carried out accumulation comparison by this test report unit, add up the executing state of all use-case data and generate test analysis report.
The automatic test platform of described network service end interface, is characterized in, described test platform comprises,
For importing and the test and management unit of management of test cases data;
For the request of packaging and testing use-case data, simulant-client, network service end interface is tested and the unit of testing and controlling of control and measuring process;
For the data genaration daily record of feeding back according to unit of testing and controlling, and record is reported to the police, the log unit of wrong parameter value and positional information; And,
For the executing state of test case data fed back according to unit of testing and controlling, be contemplated to benchmark, cumulative statistics analysis of accounts with test and management unit, and automatically generate the test report unit of test report.
Preferably, described test platform also comprises for automatically building network under test service end interface, and disposes business to be measured and dispose service unit to be measured according to test predetermined condition to the structure of this network service end interface.
Beneficial effect of the present invention is, apply automated testing method and the test platform of described network service end interface, reducing manual while, simulant-client request can send instruction, mutual with service end, realize automatic test, make the test for network service end interface more efficient, operation is simpler, and the probability of makeing mistakes is less; The cost of this test platform is low, efficiency is high.
Accompanying drawing explanation
Fig. 1 shows the flow chart of the automated testing method of described network service end interface.
Fig. 2 shows the frame principle figure of the automatic test platform of described network service end interface.
Embodiment
Below in conjunction with accompanying drawing, the present invention will be further described.
Fig. 1 shows the flow chart of the automated testing method of described network service end interface 1, and as shown in Figure 1, the automated testing method of described network service end interface 1, comprises the following steps:
Step 0: carry out test preparation;
Step 1: import test case data S1;
Step 2: extract test case data and carry out encapsulation S2;
Step 3: simulant-client sends request, carries out test S3 to network service end interface 1;
Step 4: control and measuring process S4;
Step 5: log S5;
Step 6: test result analysis, generates test report S6.
Particularly, in described step 0, need the preparation of two aspects.First is will get test data and test case in advance ready.Test data and test case are the objective plans tested as required, the work completed on request by tester in advance, test data of the present invention and test case need to prepare according to the Excel call format of custom built forms, ready use-case can import to test and management unit 2, the master data of composition test.
Secondary need disposes test environment, runs in advance to build and disposes service unit 6 to be measured, automatically build network under test service, disposes business to be measured to network test service end interface according to test predetermined condition.Existing third party technology Hudson task modeling mode can be adopted to realize, build testing service mainly for method of testing of the present invention provides tested object.
Described step 1 is further comprising the steps of,
Step 11: initialization test administrative unit 2, completes the basic configuration of test and management unit 2 and drives operation;
Step 12: the test case data that importing presets is to described test and management unit 2; Described test and management unit 2 manages the information such as the address of service to be measured, interface name to be measured, Interface status, interface input data, test-based examination point, checkpoint desired value;
Step 13: the correctness and the integrality that verify described test case data, for the test case data not meeting executive condition, prompting mistake.
In described step 2, testing and control list 3 is by calling the test case data be stored in described test and management unit 2, judge the intention of the test case data called, and the particular data extracted in this test case data, then particular data (interface name, Interface status, interface parameters value, desired value etc.) is encapsulated, generate test script.
In described step 3, described testing and control list 3 is by calling packaged test script, the particular data corresponding according to test script, call the API combination of this testing and control list 3, be packaged into HTTP request, the request of simulation B/S, response interaction flow, autonomous simulant-client sends request to target web service end interface 1 to be measured; Described testing and control list 3 is according to the testing procedure arranged, and simulation test scene, controls the step that sends request and time.
In described step 4, target web service end interface 1, after receiving described HTTP request, can return results to testing and control list 3; Described testing and control list 3 accepts the result that target web service end interface 1 returns, and with desired value comparison; If described in the result that returns identical with desired value, then write-back state pass flag is to test and management unit 2, otherwise write-back state fail flag is to test and management unit 2; Described test and management unit 2 accepts the state pass flag that feeds back or state fail flag, and the executing state of test case data according to the more current use of mark of feedback.
In described step 5, operation note daily record can be produced in execution scrnario testing process, the error message that the warning error information occurred in operation and network service end interface 1 return is recorded by described testing and control list 3, be sent to log unit 4, this log unit 4 accepts the error message of described testing and control list 3 feedback, carries out log alarming record.
In described step 6, test report unit 5 accepts the executing state of the use-case data of described testing and control list 3 feedback, obtains the preset condition of test and management unit 2 simultaneously; Above-mentioned two states are carried out accumulation comparison by this test report unit 5, add up the executing state of all use-case data and generate test analysis report.
Fig. 2 shows a kind of frame principle figure of automatic test platform of network service end interface 1, and described test platform can utilize test and management unit 2 management data to input, and adaptive by service end, testing and control list 3 simulant-client sends service request.
As shown in Figure 2, the automatic test platform of described network service end interface 1, comprises for importing and the test and management unit 2 of management of test cases data; For the request of packaging and testing use-case data, simulant-client, network service end interface 1 is tested and the testing and control list 3 of control and measuring process; For the data genaration daily record of feeding back according to testing and control list 3, and record is reported to the police, the log unit 4 of wrong parameter value and positional information; And, for the executing state of test case data fed back according to testing and control list 3, be contemplated to benchmark, cumulative statistics analysis of accounts with test and management unit 2, and automatically generate the test report unit 5 of test report.
Particularly, described test and management unit 2 primary responsibility imports and manages the test data imported, and the interface name of management network under test service end interface 1, Interface status, interface input data, test-based examination point, checkpoint desired value and use-case execution result are preset.This test and management unit 2 can encapsulate an Excel class and realize, and custom built forms, attended operation is intuitively easy.
Described testing and control list 3 primary responsibility completes the encapsulation of test data and the request of simulant-client.This testing and control list 3 passes through the mutual of calling excel class implementation and testing administrative unit 2, HTTP request is combined and packaged into after automatic acquisition use-case data, destination server is issued a request to after adaptation, check return value, again by results of execution back test and management unit 2, use-case feedbacks data to test report unit 5 and log unit 4 in performing, and generates daily record and test report.
Described log unit 4 mainly generates daily record according to testing and control list 3 feedback data, record warning, wrong parameter value and positional information etc., the concrete errors present of track and localization.
Described test report unit 5 is mainly according to the test execution state that testing and control list 3 feeds back, benchmark is contemplated to test and management unit 2, cumulative statistics analysis of accounts, generates test report automatically, adopts the Excel chart and figure combination of custom built forms to export.
Further, described test platform also comprises for automatically building network under test service end interface 1, and disposes business to be measured and dispose service unit 6 to be measured according to test predetermined condition to the structure of this network service end interface 1.This structure is disposed service unit 6 to be measured and existing third party technology Hudson task modeling mode can be adopted to realize.Build testing service mainly for method of testing of the present invention provides tested object.
Be only preferred embodiment of the present invention in sum, be not used for limiting practical range of the present invention.Namely all equivalences done according to the content of the present patent application the scope of the claims change and modify, and all should belong to technology category of the present invention.

Claims (2)

1. an automated testing method for network service end interface, comprises the following steps:
Step 1: import test case data;
Step 2: extract test case data and encapsulate;
Step 3: simulant-client sends request, tests network service end interface;
Step 4: control and measuring process;
Step 5: log;
Step 6: test result analysis, generates test report;
It is characterized in that: in described step 2, unit of testing and controlling is by calling the test case data be stored in described test and management unit, judge the intention of the test case data called, and the particular data extracted in this test case data, then particular data is encapsulated, generate test script;
In described step 3, described unit of testing and controlling is by calling packaged test script, the particular data corresponding according to test script, call the API combination of this unit of testing and controlling, be packaged into HTTP request, the request of simulation B/S, response interaction flow, autonomous simulant-client sends request to target web service end interface to be measured; Described unit of testing and controlling is according to the testing procedure arranged, and simulation test scene, controls the step that sends request and time;
In described step 4, target web service end interface, after receiving described HTTP request, can return results to unit of testing and controlling; Described unit of testing and controlling accepts the result that target web service end interface returns, and with desired value comparison; If described in the result that returns identical with desired value, then write-back state pass flag is to test and management unit, otherwise write-back state fail flag is to test and management unit; Described test and management unit accepts the state pass flag that feeds back or state fail flag, and the executing state of test case data according to the more current use of mark of feedback;
In described step 5, operation note daily record can be produced in execution scrnario testing process, the error message that the warning error information occurred in operation and network service end interface return is recorded by described unit of testing and controlling, be sent to log unit, this log unit accepts the error message of described unit of testing and controlling feedback, carries out log alarming record;
In described step 6, test report unit accepts the executing state of the use-case data of described unit of testing and controlling feedback, obtains the preset condition of test and management unit simultaneously; Above-mentioned two states are carried out accumulation comparison by this test report unit, add up the executing state of all use-case data and generate test analysis report.
2. the automated testing method of network service end interface according to claim 1, is characterized in that: described step 1 is further comprising the steps of,
Step 11: initialization test administrative unit, completes the basic configuration of test and management unit and drives operation;
Step 12: the test case data that importing presets is to described test and management unit;
Step 13: the correctness and the integrality that verify described test case data, for the test case data not meeting executive condition, prompting mistake.
CN201210466641.7A 2012-11-19 2012-11-19 A kind of automated testing method of network service end interface CN102932205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210466641.7A CN102932205B (en) 2012-11-19 2012-11-19 A kind of automated testing method of network service end interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210466641.7A CN102932205B (en) 2012-11-19 2012-11-19 A kind of automated testing method of network service end interface

Publications (2)

Publication Number Publication Date
CN102932205A CN102932205A (en) 2013-02-13
CN102932205B true CN102932205B (en) 2016-01-20

Family

ID=47646912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210466641.7A CN102932205B (en) 2012-11-19 2012-11-19 A kind of automated testing method of network service end interface

Country Status (1)

Country Link
CN (1) CN102932205B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095165A (en) * 2014-05-08 2015-11-25 北大方正集团有限公司 Test analysis report generation method and test analysis report generation device
CN105743724A (en) * 2014-12-10 2016-07-06 深圳中兴网信科技有限公司 Method and device for testing services
CN104572469B (en) * 2015-01-23 2017-12-05 广东能龙教育股份有限公司 A kind of automatic interface testing method and system based on simulation http request
CN106201808A (en) * 2015-05-04 2016-12-07 北京畅游天下网络技术有限公司 The automation interface method of testing of a kind of server end and system
CN105138454B (en) * 2015-08-24 2018-05-18 浪潮电子信息产业股份有限公司 A kind of automated testing method for B/S framework security softwares
CN105262608B (en) * 2015-09-01 2018-09-18 北京百度网讯科技有限公司 Monitoring method and device for network service
CN105407012A (en) * 2015-10-27 2016-03-16 浪潮(北京)电子信息产业有限公司 Automatic test method and device
CN105550103B (en) * 2015-12-03 2017-12-05 泰华智慧产业集团股份有限公司 A kind of automated testing method based on self-defined test script
CN105553759A (en) * 2015-12-10 2016-05-04 惠州Tcl移动通信有限公司 Smart card and mobile terminal consistency test method and device
CN105974297B (en) * 2016-04-12 2019-08-27 烽火通信科技股份有限公司 It is a kind of to realize the virtual test instrument and test method efficiently tested
CN106021055A (en) * 2016-05-25 2016-10-12 乐视控股(北京)有限公司 Performance testing method and device for mixed interface
CN107872355A (en) * 2016-09-26 2018-04-03 平安科技(深圳)有限公司 The method and device of interface simulation test
CN106598851A (en) * 2016-12-05 2017-04-26 广州唯品会信息科技有限公司 Software interface test method and system
CN106874188B (en) * 2016-12-30 2020-05-12 北京五八信息技术有限公司 Software interface testing method and device
CN106909481B (en) * 2017-02-28 2021-03-16 北京小米移动软件有限公司 Interface test method, interface test device and electronic equipment
CN107423211B (en) * 2017-03-15 2020-03-13 中国互联网络信息中心 SDNS interface automatic test system and method
CN108694104A (en) * 2017-04-12 2018-10-23 北京京东尚科信息技术有限公司 A kind of interface function contrast test method, apparatus, electronic equipment and storage medium
CN107171889A (en) * 2017-05-27 2017-09-15 北京金山安全软件有限公司 Method of testing, device and the electronic equipment of network application interface
CN107368412A (en) * 2017-07-03 2017-11-21 上海前隆信息科技有限公司 Automated testing method/system, computer-readable recording medium and electronic equipment
CN107634879A (en) * 2017-09-15 2018-01-26 深圳易嘉恩科技有限公司 XBRL platform interface automated testing methods based on PyUnit
CN107948640B (en) * 2017-12-19 2020-09-25 百度在线网络技术(北京)有限公司 Video playing test method and device, electronic equipment and storage medium
CN108270622A (en) * 2018-01-22 2018-07-10 杭州当虹科技有限公司 A kind of method and system that concurrent emulation testing is carried out to video communication service system
CN110445688A (en) * 2019-08-12 2019-11-12 珠海格力电器股份有限公司 Interface service function monitoring method and system based on data collection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006111000A1 (en) * 2005-04-18 2006-10-26 Research In Motion Limited System and method of testing wireless component applications
CN101114953A (en) * 2007-07-03 2008-01-30 中兴通讯股份有限公司 Automatized test method for broadband accessing server
CN101707608A (en) * 2009-11-27 2010-05-12 成都市华为赛门铁克科技有限公司 Method and device for automatically testing application layer protocol
CN102073590A (en) * 2011-01-11 2011-05-25 百度在线网络技术(北京)有限公司 Event simulation-based user interface test method and device
CN102141962A (en) * 2011-04-07 2011-08-03 北京航空航天大学 Safety distributed test framework system and test method thereof
CN102495799A (en) * 2011-12-02 2012-06-13 刘伟 Automatic test system and method of movable terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061625A1 (en) * 2005-09-15 2007-03-15 Acosta Juan Jr Automation structure for software verification testing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006111000A1 (en) * 2005-04-18 2006-10-26 Research In Motion Limited System and method of testing wireless component applications
CN101114953A (en) * 2007-07-03 2008-01-30 中兴通讯股份有限公司 Automatized test method for broadband accessing server
CN101707608A (en) * 2009-11-27 2010-05-12 成都市华为赛门铁克科技有限公司 Method and device for automatically testing application layer protocol
CN102073590A (en) * 2011-01-11 2011-05-25 百度在线网络技术(北京)有限公司 Event simulation-based user interface test method and device
CN102141962A (en) * 2011-04-07 2011-08-03 北京航空航天大学 Safety distributed test framework system and test method thereof
CN102495799A (en) * 2011-12-02 2012-06-13 刘伟 Automatic test system and method of movable terminal

Also Published As

Publication number Publication date
CN102932205A (en) 2013-02-13

Similar Documents

Publication Publication Date Title
DE102016119100A9 (en) Data analysis services for distributed performance monitoring of industrial installations
DE102016119186A1 (en) Distributed power monitoring and analysis in industrial plants
CN103530199B (en) A kind of method, Apparatus and system repairing running software mistake
DE102016119066A1 (en) Distributed performance monitoring and analysis platform for industrial plants
CN104391795B (en) Method and system for automatically testing coverage rate in distributed system
CN103414251B (en) A kind of substation network communication analogue system based on IEC61850
DE102016119084A1 (en) Distributed performance monitoring and analysis of industrial plants
CN103838665B (en) A kind of RFID automatic test device and method
CN104598376B (en) The layering automatization test system and method for a kind of data-driven
CN103150249B (en) A kind of method and system of automatic test
CN104793076B (en) Intelligent Auto-Test System and method of testing
CN103970650B (en) Distributed testing method and device
CN103792448B (en) A kind of digital protection device automatic test control system and control method thereof
CN105302721B (en) The system and method for lumped modelling server integration testing is realized in cloud computing platform
CN103176895B (en) A kind of regression testing method and system
CN100544292C (en) A kind of method of BAS Broadband Access Server automatic test
CN103312551B (en) The method of testing of CGI(Common gateway interface) and testing apparatus
CN103529821B (en) A kind of configurableization method and device of the diagnosing protocol stack system based on CAN bus
WO2013175079A1 (en) Method in manual welding
KR101132560B1 (en) System and method for automatic interface testing based on simulation for robot software components
CN103941207B (en) Automatic power-measuring endpoint detection methods and system thereof
CN103823199B (en) Intelligent substation relay-protection tester automated detection system and detection method
CN103529377B (en) The Auto-Test System of intelligent transformer substation digital protection device and method
CN103164328B (en) The regression testing method of a kind of business function, Apparatus and system
CN104820640B (en) A kind of webpage test method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant