CN107341099A - The automatic test cases generation system and generation method of a kind of instrument arrangement - Google Patents

The automatic test cases generation system and generation method of a kind of instrument arrangement Download PDF

Info

Publication number
CN107341099A
CN107341099A CN201710370070.XA CN201710370070A CN107341099A CN 107341099 A CN107341099 A CN 107341099A CN 201710370070 A CN201710370070 A CN 201710370070A CN 107341099 A CN107341099 A CN 107341099A
Authority
CN
China
Prior art keywords
parameter
instrument
instrument arrangement
test
module
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
Application number
CN201710370070.XA
Other languages
Chinese (zh)
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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201710370070.XA priority Critical patent/CN107341099A/en
Publication of CN107341099A publication Critical patent/CN107341099A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of automatic test cases of instrument arrangement to generate system and generation method, including:Global parameter module, for setting global parameter according to the preset parameter of instrument arrangement;Local parameter module, for the variable element according to the test case currently write, local parameter is set;Instrument arrangement module, for according to testing requirement, calling global parameter module and local parameter module, and instrument arrangement module importing library file, and instrument arrangement is write according to the global parameter, local parameter and library file;Use-case execution module, for writing the testing procedure of test case according to testing requirement.The present invention can break away from therefrom, strengthen the compatibility of test case.

Description

The automatic test cases generation system and generation method of a kind of instrument arrangement
Technical field
The present invention relates to communication products testing field, and in particular to a kind of automatic test cases generation of instrument arrangement System and generation method.
Background technology
At present, known in various products development process, it is often necessary to utilize automatic test platform (The Automated Test Platform) carry out regression test.By accumulating test case, then returned on test platform Put, obtain test result.Spirent testcenter series of tests instrument, it is the very powerful testing tool of a function, The testing field of communication products is had a wide range of applications, and many practical businesses can be imitated by testcenter, while can be with Accurate test data is obtained, test result is analyzed in help.
There is price height in traditional commercial test platform, test case accumulation (Test Case Accumulation) is tired Difficulty, complex operation, because being also difficult to large-scale application the reason for copyright and high cost.And tradition is based on the automatic of script Change test case, it is necessary to which the instrument arrangement first configured under visualization interface, then preserves into xml document, in test case In imported into instrument and come into force by order.Although this method can break away from the limitation of platform, because configuration file is consolidated Change, the port number that result in test case is not modifiable, the poor compatibility of use-case, for different port number destinations Jaws equipment substantially increases the script quantity of exploitation, it is necessary to develop different test cases, and due to the physical medium of port Difference, need when test to configure instrument port according to physical medium, but also due to the solidification of configuration file, result in The physical medium of networking cannot be selected, and limit Test Networking.
The content of the invention
For defect present in prior art, it is an object of the invention to provide a kind of automatic test of instrument arrangement Use-case generates system and generation method, can break away from therefrom, strengthen the compatibility of test case.
To achieve the above objectives, the present invention adopts the technical scheme that:
A kind of automatic test cases generation system of instrument arrangement, including:
Global parameter module, for setting global parameter according to the preset parameter of instrument arrangement;
Local parameter module, for the variable element according to the test case currently write, local parameter is set;
Instrument arrangement module, for according to testing requirement, calling global parameter module and local parameter module, and the instrument Table configuration module imports library file, and writes instrument arrangement according to the global parameter, local parameter and library file;
Use-case execution module, for writing the testing procedure of test case according to testing requirement.
On the basis of above-mentioned technical proposal, the global parameter includes number, test lead corresponding to test port type Physical medium parameter, some meter parameter arrays and Devices to test parameter corresponding to mouth type.
On the basis of above-mentioned technical proposal, the meter parameter array includes port name, and with the port name Corresponding IP address, slot number and port numbers.
On the basis of above-mentioned technical proposal, the Devices to test parameter includes Devices to test IP, Devices to test slot number With Devices to test port numbers.
On the basis of above-mentioned technical proposal, the local parameter include service VLAN, crucial IP, test case title and Test case is numbered.
On the basis of above-mentioned technical proposal, the instrument arrangement includes instrument logic interfacing, instrument simulation instrument, instrument Data flow and filter.
The automatic test cases generation method of a kind of instrument arrangement, by instrument arrangement parameter between different test cases Constant parameter is joined as global parameter using the parameter of instrument arrangement changeable parameters between different test cases as local Number, when generating different test cases, change the local parameter and complete writing for instrument arrangement, then according to different Instrument arrangement corresponding to test case completes writing for corresponding testing procedure.
On the basis of above-mentioned technical proposal, in addition to:Discharge the resource related to the test case for completing test.
On the basis of above-mentioned technical proposal, during the testing procedure of instrument arrangement and test case is write, increase The variable element added is as local parameter.
On the basis of above-mentioned technical proposal, library file is imported when writing instrument arrangement, and according to global parameter, change Local parameter and library file afterwards completes writing for instrument arrangement.
Compared with prior art, the advantage of the invention is that:
(1) the automatic test cases generation system of a kind of instrument arrangement of the invention, including global parameter module, part Parameter module, instrument arrangement module, use-case execution module and resource release module, the code of Test cases technology are to increase income generation Code, is not limited by platform, when writing the protos test suite PROTOS comprising multiple test cases, the global parameter of global parameter module and The code of resource release module can be multiplexed, and reduced the exploitation amount of script, reduced cost;Surveyed for the difference in protos test suite PROTOS Example on probation only needs to change variable element, instrument arrangement and the testing procedure in local parameter module, to test platform and instrument Software does not have particular/special requirement, can improve the efficiency of test case accumulation, simplifies the operating process of tester, effectively reduces certainly The development cost of dynamicization use-case and the maintenance cost of automatically testing platform, so as to reduce the accumulation cost of automation use-case.
(2) the automatic test cases generation system of a kind of instrument arrangement of the invention, by corresponding to test port type Quantity, test port physical medium parameter, meter parameter and Devices to test parameter carry out being configured at the overall situation using array form In parameter module, by state modulator, the influence of physical medium can be broken away from so that the flexibility of networking is higher, for various The strong adaptability of engineering-environment, test case it is practical.
Brief description of the drawings
Fig. 1 is the system block diagram of the embodiment of the present invention;
Fig. 2 is the method flow diagram of the embodiment of the present invention.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
Shown in Figure 1, the embodiment of the present invention provides a kind of automatic test cases generation system of instrument arrangement, bag Include:Global parameter module, local parameter module, instrument arrangement module, use-case execution module and resource release generation module.
Global parameter module is used to set global parameter according to the preset parameter of instrument arrangement;Wherein, global parameter includes Number corresponding to test port type, physical medium parameter corresponding to test port type, some meter parameter arrays and to be measured Device parameter.Meter parameter array includes port name, and corresponding with port name IP address, slot number and port numbers.Treat Measurement equipment parameter includes Devices to test IP, Devices to test slot number and Devices to test port numbers.Generally according to uni port and NNI Port is divided.Such as the test of PON (Passive Optical Network) system, it is possible to which port type is divided into The generic port of the ONU and OLT first line of a couplet two, parameter and quantity are determined according to species.
Local parameter module is used for the variable element according to the test case currently write, and sets local parameter;Wherein, office Portion's parameter includes service VLAN, crucial IP, test case title and test case numbering etc..
Instrument arrangement module is used to, according to testing requirement, call global parameter module and local parameter module, and instrument is matched somebody with somebody Put module and import library file, and instrument arrangement is write according to global parameter, local parameter and library file.Wherein, instrument arrangement bag Include instrument logic interfacing, instrument simulation instrument, instrumented data stream and filter.
Use-case execution module is used for the testing procedure that test case is write according to testing requirement.Testing procedure and instrument arrangement Adaptation.
Resource release generation module is used to generate resource release module, and resource release module is used to discharge after the completion of test Fall the resource relevant with completing test case.Execution for a test case is prepared.
The embodiment of the present invention provides a kind of automatic test cases generation method of instrument arrangement, by different test cases Between instrument arrangement parameter constant parameter as global parameter, by instrument arrangement changeable parameters between different test cases Parameter, when generating different test cases, changes local parameter and completes writing for instrument arrangement, then as local parameter Instrument arrangement according to corresponding to different test cases completes writing for corresponding testing procedure.
A kind of automatic test cases generation method of instrument arrangement, is comprised the following steps that:
S1, global parameter module set global parameter according to test environment, while local parameter module is according to currently writing Test case variable element, set local parameter;
S2, instrument arrangement module call global parameter module and local parameter module, import library text according to testing requirement Part, and according to the global parameter, local parameter and library file, write instrument arrangement, writing instrument arrangement and test case Testing procedure during, increased variable element writes global parameter module as local parameter.When add it is new can After variable element is as local parameter, instrument arrangement is adjusted correspondingly with testing procedure according to local parameter.
Library file is imported when writing instrument arrangement, and it is complete according to the local parameter after global parameter, change and library file Into writing for instrument arrangement, comprise the following steps that:
S21, the instrument automation software kit in library file is loaded, obtain meter type;
S22, load the instrument built-in function matched in library file with the meter type;
S23, global parameter is called to create instrument logic interfacing;
S24, local parameter is called to create instrument simulation instrument;
S25, local parameter is called to create instrumented data flow table;
S26, local parameter is called to create filter;
S27, complete instrument arrangement;
S3, use-case execution module write the testing procedure of test case, and testing procedure and the instrument according to testing requirement Table configuration adaptation;
S4, resource release generation module write resource release module, resource release module after test case completes test, Discharge the resource related to the test case for completing test.Execution for a test case is prepared.
All test cases of the global parameter module service in whole test suite, all test cases can use Global parameter in global parameter module writes test case, and the code of the global parameter of global parameter module can be multiplexed, Reduce the exploitation amount of script, reduce cost, only need to change local parameter mould for the different test cases in protos test suite PROTOS Variable element, instrument arrangement and testing procedure in block, do not have particular/special requirement to test platform and instrument software, can improve survey The efficiency of example accumulation on probation, simplifies the operating process of tester, and the development cost for effectively reducing automation use-case is surveyed with automatic The maintenance cost of platform is tried, so as to reduce the accumulation cost of automation use-case.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from On the premise of the principle of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as the protection of the present invention Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.

Claims (10)

  1. A kind of 1. automatic test cases generation system of instrument arrangement, it is characterised in that including:
    Global parameter module, for setting global parameter according to the preset parameter of instrument arrangement;
    Local parameter module, for the variable element according to the test case currently write, local parameter is set;
    Instrument arrangement module, for according to testing requirement, calling global parameter module and local parameter module, and the instrument is matched somebody with somebody Put module and import library file, and instrument arrangement is write according to the global parameter, local parameter and library file;
    Use-case execution module, for writing the testing procedure of test case according to testing requirement.
  2. A kind of 2. automatic test cases generation system of instrument arrangement as claimed in claim 1, it is characterised in that:It is described complete Office's parameter includes number corresponding to test port type, physical medium parameter, some meter parameters corresponding to test port type Array and Devices to test parameter.
  3. A kind of 3. automatic test cases generation system of instrument arrangement as claimed in claim 2, it is characterised in that:The instrument Table parameter array includes port name, and corresponding with the port name IP address, slot number and port numbers.
  4. A kind of 4. automatic test cases generation system of instrument arrangement as claimed in claim 2, it is characterised in that:It is described to treat Measurement equipment parameter includes Devices to test IP, Devices to test slot number and Devices to test port numbers.
  5. A kind of 5. automatic test cases generation system of instrument arrangement as claimed in claim 1, it is characterised in that:The office Portion's parameter includes service VLAN, crucial IP, test case title and test case numbering.
  6. A kind of 6. automatic test cases generation system of instrument arrangement as claimed in claim 1, it is characterised in that:The instrument Table configuration includes instrument logic interfacing, instrument simulation instrument, instrumented data stream and filter.
  7. A kind of 7. automatic test cases generation method of instrument arrangement, it is characterised in that:By instrument between different test cases The constant parameter of table configuration parameter makees the parameter of instrument arrangement changeable parameters between different test cases as global parameter For local parameter, when generating different test cases, change the local parameter and complete writing for instrument arrangement, Ran Hougen Writing for corresponding testing procedure is completed according to the instrument arrangement corresponding to different test cases.
  8. 8. the automatic test cases generation method of a kind of instrument arrangement as claimed in claim 7, it is characterised in that also wrap Include:Discharge the resource related to the test case for completing test.
  9. A kind of 9. automatic test cases generation method of instrument arrangement as claimed in claim 7, it is characterised in that:Writing During instrument arrangement and the testing procedure of test case, increased variable element is as local parameter.
  10. A kind of 10. automatic test cases generation method of instrument arrangement as claimed in claim 7, it is characterised in that:Compiling Library file is imported when writing instrument arrangement, and instrument arrangement is completed according to the local parameter after global parameter, change and library file Write.
CN201710370070.XA 2017-05-23 2017-05-23 The automatic test cases generation system and generation method of a kind of instrument arrangement Pending CN107341099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710370070.XA CN107341099A (en) 2017-05-23 2017-05-23 The automatic test cases generation system and generation method of a kind of instrument arrangement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710370070.XA CN107341099A (en) 2017-05-23 2017-05-23 The automatic test cases generation system and generation method of a kind of instrument arrangement

Publications (1)

Publication Number Publication Date
CN107341099A true CN107341099A (en) 2017-11-10

Family

ID=60220293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710370070.XA Pending CN107341099A (en) 2017-05-23 2017-05-23 The automatic test cases generation system and generation method of a kind of instrument arrangement

Country Status (1)

Country Link
CN (1) CN107341099A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809755A (en) * 2018-05-18 2018-11-13 烽火通信科技股份有限公司 The home gateway automatic test approach and system of compatible command row and WEB interface
CN111723006A (en) * 2020-05-25 2020-09-29 四川九洲电器集团有限责任公司 Automatic test frame and industrial computer based on C #

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158370A (en) * 2011-04-12 2011-08-17 瑞斯康达科技发展股份有限公司 Automated testing method and system
CN103812726A (en) * 2014-01-26 2014-05-21 烽火通信科技股份有限公司 Automated testing method and device for data communication equipment
CN104980317A (en) * 2015-06-18 2015-10-14 南京南瑞集团公司 Automatic test system and test method for dispatching data network equipment
CN105004984A (en) * 2015-06-25 2015-10-28 深圳市芯海科技有限公司 Automatic chip testing method
CN105162664A (en) * 2015-09-29 2015-12-16 上海斐讯数据通信技术有限公司 Automatic platform testing method and system developed based on intermediate layers of instruments

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158370A (en) * 2011-04-12 2011-08-17 瑞斯康达科技发展股份有限公司 Automated testing method and system
CN103812726A (en) * 2014-01-26 2014-05-21 烽火通信科技股份有限公司 Automated testing method and device for data communication equipment
CN104980317A (en) * 2015-06-18 2015-10-14 南京南瑞集团公司 Automatic test system and test method for dispatching data network equipment
CN105004984A (en) * 2015-06-25 2015-10-28 深圳市芯海科技有限公司 Automatic chip testing method
CN105162664A (en) * 2015-09-29 2015-12-16 上海斐讯数据通信技术有限公司 Automatic platform testing method and system developed based on intermediate layers of instruments

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809755A (en) * 2018-05-18 2018-11-13 烽火通信科技股份有限公司 The home gateway automatic test approach and system of compatible command row and WEB interface
CN108809755B (en) * 2018-05-18 2020-10-30 烽火通信科技股份有限公司 Automatic testing method and system for home gateway compatible with command line and WEB interface
CN111723006A (en) * 2020-05-25 2020-09-29 四川九洲电器集团有限责任公司 Automatic test frame and industrial computer based on C #

Similar Documents

Publication Publication Date Title
CN105068818B (en) Generate the method, apparatus of channel packet and method, the system of Mass production channel packet
CN105512036A (en) Test template for automatically generating test case according to preset rules and test method
CN103560829A (en) Method and system for automatic testing of UNI ports
CN106407108B (en) A kind of test method and system of train network logout software
CN102063355B (en) Automatic test server and system of disk array
CN103036740B (en) To the method for testing of network terminal gigabit ethernet interface signal in a kind of EPON system
CN105302115B (en) Train network application layer control software automated testing method
CN104268078A (en) Automatic chip validation method based on parameterized IP test case set
CN105005015A (en) Circuit fault simulation system based on hardware circuit fault injection
CN107783902A (en) A kind of Selenium automated testing methods and system from coding
CN106059853A (en) Network connectivity test method and device
CN107341099A (en) The automatic test cases generation system and generation method of a kind of instrument arrangement
CN103746746A (en) Business system of network device
CN104836686B (en) A kind of method and device for the configuration file generating server
CN105158673B (en) A kind of generation method and device of ATE boards file
CN103488562A (en) Automated testing method and device
CN104601768A (en) Android mobile phone automatic testing system and testing method thereof
CN106199323A (en) A kind of virtual terminals of intelligent substation connects correctness method of discrimination
CN101625705A (en) Verification environment system and construction method thereof
CN114460925B (en) Automatic test method for CAN interface HIL of electric automobile controller
CN111176989A (en) Fault injection test scenario case model and framework based on service arrangement
CN1996265A (en) Method and system for implementing automatic testing
CN103838664A (en) Pressure testing method and device
CN107122307B (en) Internet of things execution system
CN109491854A (en) A kind of SoC prototype verification method based on FPGA

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: 20171110