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 PDFInfo
- 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
- service end
- case data
- 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.)
- Active
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
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.
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 Active 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 (34)
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 | 北京金山安全软件有限公司 | Network application interface test method and device and electronic equipment |
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 |
CN109213682A (en) * | 2018-09-06 | 2019-01-15 | 郑州云海信息技术有限公司 | A kind of method of test client, client, server-side and readable storage medium storing program for executing |
CN109656822A (en) * | 2018-12-12 | 2019-04-19 | 郑州云海信息技术有限公司 | A kind of guard method of automatic test and device |
CN109933522B (en) * | 2019-01-25 | 2022-04-22 | 畅捷通信息技术股份有限公司 | Test method, test system and storage medium for automatic case |
CN110245079A (en) * | 2019-05-28 | 2019-09-17 | 深圳市六度人和科技有限公司 | A kind of interface processing method, apparatus and storage device |
CN110445688B (en) * | 2019-08-12 | 2021-04-23 | 珠海格力电器股份有限公司 | Interface service function monitoring method and system based on data collection |
CN110928774B (en) * | 2019-11-07 | 2023-05-05 | 杭州顺网科技股份有限公司 | Automatic test system based on node type |
CN111555928A (en) * | 2020-04-14 | 2020-08-18 | 珠海格力电器股份有限公司 | Method and device for monitoring system abnormity, computer equipment and storage medium |
CN112035363A (en) * | 2020-09-01 | 2020-12-04 | 中国银行股份有限公司 | Automatic interface testing method and device |
CN112769655B (en) * | 2021-03-02 | 2022-08-12 | 北京百家科技集团有限公司 | Network variation testing method, device and system |
CN113207146B (en) * | 2021-07-07 | 2021-09-07 | 广东南方电信规划咨询设计院有限公司 | Wireless communication network quality monitoring system and method |
CN115686463B (en) * | 2022-12-30 | 2023-04-11 | 科讯嘉联信息技术有限公司 | Python and Excel-based interface automation framework control system |
CN117033032A (en) * | 2023-09-28 | 2023-11-10 | 北京谷器数据科技有限公司 | Platform for automatically analyzing and calling third-party service interface |
Citations (6)
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)
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 |
-
2012
- 2012-11-19 CN CN201210466641.7A patent/CN102932205B/en active Active
Patent Citations (6)
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 |
---|---|---|
CN102932205B (en) | A kind of automated testing method of network service end interface | |
CN108400908B (en) | Automatic checking and accepting method for monitoring information of transformer substation | |
CN103746882B (en) | The method of intelligent substation station level test | |
CN102141962B (en) | Safety distributed test framework system and test method thereof | |
CN104820635B (en) | A kind of self-closing ring gauge about robustness testing method based on the semantic parsing of dynamic script | |
CN104483842B (en) | One kind regulation and control one automation main website comparison method | |
CN104407971A (en) | Method for automatically testing embedded software | |
CN106330618A (en) | Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses | |
CN102750301A (en) | Blueprint generating method for integrated avionic system model aiming at architecture analysis and design language (AADL) description | |
CN101907696B (en) | Electric energy meter production detecting system and method | |
US9916331B2 (en) | Method and device for automatically processing static test data of rail transit vehicle | |
CN102014016A (en) | System and method for testing defects of network protocol | |
CN104965507A (en) | Method used for generating open diagnostic data exchange database and device | |
CN104850495A (en) | Automatic detection method and device | |
CN105301419A (en) | Cloud-technology-based automatic test system for protective relaying device | |
CN104614601B (en) | A kind of terminal fault localization method, apparatus and system | |
CN110568284B (en) | Intelligent substation one-key sequential control automatic test verification method, device and system | |
CN204291050U (en) | A kind of dispatching and monitoring information check system | |
CN106549810A (en) | Cloud service platform redaction issues front method of testing, device and system | |
CN102043719A (en) | Method for testing IEC61850 configuration description file | |
CN111580501A (en) | Test equipment and method for vehicle electronic stability system | |
CN109726830A (en) | Equipment routing inspection method, apparatus, electronic equipment and storage medium | |
CN110209584A (en) | A kind of automatic generation of test data and relevant apparatus | |
CN106330560B (en) | Realize that the method and device of interior switching server is arranged in system when IOS system testing | |
CN107819611B (en) | Client test method based on IEC61850 multi-server simulation |
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 |