CN112486819B - Method and system for batch testing of communication equipment - Google Patents

Method and system for batch testing of communication equipment Download PDF

Info

Publication number
CN112486819B
CN112486819B CN202011361758.XA CN202011361758A CN112486819B CN 112486819 B CN112486819 B CN 112486819B CN 202011361758 A CN202011361758 A CN 202011361758A CN 112486819 B CN112486819 B CN 112486819B
Authority
CN
China
Prior art keywords
robotframe
equipment
database
test case
communication equipment
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
Application number
CN202011361758.XA
Other languages
Chinese (zh)
Other versions
CN112486819A (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.)
CETC 30 Research Institute
Original Assignee
CETC 30 Research Institute
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 CETC 30 Research Institute filed Critical CETC 30 Research Institute
Priority to CN202011361758.XA priority Critical patent/CN112486819B/en
Publication of CN112486819A publication Critical patent/CN112486819A/en
Application granted granted Critical
Publication of CN112486819B publication Critical patent/CN112486819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Abstract

The invention relates to a method for testing communication equipment in batches, which comprises the steps of building a robotframe platform at a PC end, and communicating the PC with a plurality of detected communication equipment through a router; executing a circulating script in a robotframe platform to circularly execute an automatic test case according to IP list variables for the tested communication equipment, simultaneously identifying a local data type by a database operation library through socket communication, calling different interfaces according to the database type to store the address of the IP of the tested equipment into a local database table, calling the database operation library through an imported variable file to obtain the IP of the tested equipment when the automatic test case is called and executed, and finally generating an html test report according to a test result and the IP address of the equipment according to a test result. The method and the device solve the problem that when the robotframe platform executes the automatic test of the communication equipment in batch, the value of the IP list variable in the circulating script cannot be acquired and input by the test case. The robotframe platform can be used by testers to test the communication equipment in batches, and the efficiency of the testers in batch testing of the communication equipment is improved.

Description

Method and system for batch testing of communication equipment
Technical Field
The present invention relates to the field of communication device testing, and in particular, to a method and a system for batch testing of communication devices.
Background
Currently, robotframe automation frameworks are widely applied to various automation test scenes, but when robotframe automation is applied to communication equipment-oriented test, it is difficult to automatically test communication equipment in batches and generate corresponding test reports based on communication equipment IP sets. The reason is that when the robotframe runs the test case, the pybot command is actually called in the background to run the automation case. When each use case runs, the use cases are all the pybot commands newly called by the interpreter, so that the memories among the use cases cannot be shared when the use cases are run every time, and therefore common variables in the use cases cannot be shared among the use cases. Therefore, when a batch of communication equipment needs to be tested in batch according to the established test case library, the equipment IP address variables imported by the for-loop script cannot be automatically acquired by the automatic test case library. Therefore, when a tester faces the test requirements of a large amount of communication equipment, the tester cannot automatically build and operate a test case at one time, and the test efficiency is low in the scene. The conventional robotframe platform lacks a method for automatically testing communication equipment in batches, and similar patents are not available at home at present.
Disclosure of Invention
Aiming at the problem that the value of an IP list variable in a circulating script cannot be acquired and input by a test case when a robotframe platform executes the automatic test of communication equipment in batch, the method and the system for automatically storing the variable and acquiring the variable based on the identification of the type of a local general database and finally completing the batch automatic test of the communication equipment are provided.
The technical scheme adopted by the invention is as follows: a method for testing communication equipment in batches is characterized in that a robotframe platform is built at a PC end, and the PC is communicated with a plurality of detected communication equipment through a router; and executing a circulating script in the robotframe platform to circularly execute an automatic test case according to the IP list variable for the tested communication equipment, simultaneously storing the address of the IP of the current tested equipment into a local database table through a database operation library, calling the database operation library through an imported variable file to acquire the IP of the tested equipment when the automatic test case is called and executed, and finally generating an html (hypertext markup language) test report according to the test result and the IP address of the equipment.
Further, the concrete working process of the robotframe platform is as follows: creating a robot case, traversing the input list variables of the equipment IP for circulation, calling a database operation library to identify the type of a local general database, and storing the IP address taken out for circulation into the local database by calling a corresponding interface according to the type of the database; calling cmd through a python subpacess module, and calling an existing test case library of the running equipment to execute the automatic test case.
Furthermore, the data operation library is a library based on a robotframe framework, the database operation library is connected with the local through socket communication, identifies and logs in the local database, and stores the equipment IP address into a table of the local database or takes out the stored equipment IP address from the table of the local database by calling a corresponding interface according to the type of the database.
Further, the existing test case library is a developed device test case library, acquires the IP address of the tested communication device from the variable file, and is in communication connection with the tested device according to the IP address of the tested device to run the automated test case.
Further, the variable file is a python file for importing variables, and the IP address of the current device to be tested is acquired by calling the encapsulation keywords of the database operation library.
Further, the method for generating the html test report includes: before an automatic test case is operated, a robotframe opens a socket communication binding local port; during test operation, the robotframe monitors real-time operation data through socket communication; after the automatic test case is operated, the robotframe closes socket communication; robotframe generates log logs from the data and generates html reports.
The invention also provides a system for testing the communication equipment in batches, which comprises a robotframe platform set up at the PC end, the PC is communicated with a plurality of communication equipment to be tested through a router, and the robotframe platform is used for executing the method for testing the communication equipment in batches.
Compared with the prior art, the beneficial effects of adopting the technical scheme are as follows: the method and the device solve the problem that when the robotframe platform executes the automatic test of the communication equipment in batch, the value of the IP list variable in the circulating script cannot be acquired and input by the test case. The robotframe platform can be used by testers to test the communication equipment in batches, and the efficiency of the testers in batch testing of the communication equipment is improved.
Drawings
Fig. 1 is an automated testing platform for communication equipment according to the present invention.
FIG. 2 is a flow chart of a method of batch testing communication devices of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Example 1
The invention provides a method for storing variables and acquiring variables based on a universal database and finally completing batch automatic testing of communication equipment, aiming at the problem that when a robotframe platform executes the batch automatic testing of the communication equipment, the values of IP list variables in a circulating script cannot be acquired and input by a test case.
The method is based on a robotframwork framework, and communication equipment testing is completed by socket communication identification, connection with a local general database and data acquisition. The tester can perform the batch test of the communication equipment only by deploying the test environment at the beginning of the test, as shown in fig. 1. The specific scheme is as follows:
as shown in fig. 2, in the method for testing communication devices in batches, a robotframe platform is built at a PC end, and the PC communicates with a plurality of detected communication devices through a router; and executing a circulating script in a robotframe platform to circularly execute an automatic test case according to the IP list variable for the tested communication equipment, simultaneously identifying the type of a local general database by a database operation library, storing the IP address of the tested equipment into a local database table by calling a corresponding interface according to the type of the database, calling the database operation library by an imported variable file to obtain the IP of the tested equipment when the automatic test case is called and executed, and finally generating an html (hypertext markup language) test report according to the test result and the IP address of the equipment.
Example 2
On the basis of the embodiment 1, the specific working process of the robotframe platform is as follows: creating a robot case, circularly traversing the input list variables of the equipment IP, calling a database operation library to identify the type of a local database, and storing the IP address taken out circularly for in the local database through a corresponding interface according to the type of the database; calling cmd through a python subpacess module, and calling an existing test case library of the running equipment to execute the automatic test case.
Example 3
On the basis of the embodiment 2, the data operation library is a library based on a robotframe framework, the database operation library communicates locally through a socket, identifies and logs in a local database, and stores the device IP address into a table of the local database or takes out the stored device IP address from the table of the local database by calling a corresponding interface according to the type of the database.
Example 4
On the basis of the embodiment 3, the existing test case library is a developed device test case library, the IP address of the tested communication device is obtained from the variable file, and the test case library is in communication connection with the tested device according to the IP address of the tested device to run an automatic test case.
Example 5
On the basis of embodiment 4, the variable file is a python file for importing variables, and the IP address of the current device under test is acquired by calling the encapsulation key of the database operation library.
Example 6
On the basis of the embodiment 5, the method for generating the html test report comprises the following steps: before an automatic test case is operated, a robotframe opens a socket communication binding local port; during test operation, the robotframe monitors real-time operation data through socket communication; after the automatic test case is operated, the robotframe closes socket communication; robotframe generates log logs from the data and generates html reports.
By adopting the scheme provided by the invention, the problem that the value of the IP list variable in the circulating script cannot be acquired and input by the test case when the robotframe platform executes the automatic test of the communication equipment in batches can be effectively solved. The robotframe platform can be used by testers to test the communication equipment in batches, and the efficiency of the testers in the batch test of the communication equipment is improved
Example 6
The invention also provides a system for testing the communication equipment in batches, which comprises a robotframe platform set up at a PC end, wherein the PC is communicated with a plurality of communication equipment to be tested through a router, and the robotframe platform is used for executing the method for testing the communication equipment in batches as in any one of embodiments 1-5.
The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed. Those skilled in the art to which the invention pertains will appreciate that insubstantial changes or modifications can be made without departing from the spirit of the invention as defined by the appended claims.
All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.
Any feature disclosed in this specification may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.

Claims (5)

1. A method for testing communication equipment in batches is characterized in that a robotframe platform is set up at a PC end, and the PC is communicated with a plurality of detected communication equipment through a router; executing a circulating script in a robotframe platform to circularly execute an automatic test case according to IP list variables for the tested communication equipment, simultaneously identifying the type of a local database by a database operation library, storing the IP address of the tested equipment into the local database table by calling a corresponding interface according to the type of the database, calling the database operation library by an imported variable file to obtain the IP of the tested equipment when the automatic test case is called and executed, and finally generating an html test report by a ride according to the test result and the IP address of the equipment;
the database operation library is a library based on a robotframe framework, is in communication connection with a local PC through a socket, identifies the type of the database and logs in the local database, and stores the equipment IP address into a table of the local database or takes out the stored equipment IP address from the table of the local database by calling a corresponding interface according to the type of the database; the variable file is a python file used for importing variables, and the IP address of the current tested device is obtained by calling the packaging keywords of the database operation library.
2. The method for batch testing of communication devices as claimed in claim 1, wherein the robotframe platform comprises the following specific working processes: creating a robot case, circularly traversing the input list variables of the equipment IP, calling a database operation library, identifying the type of a local database, and storing the IP address taken out circularly for in the local database by calling a corresponding interface according to the type of the database; calling cmd through a python subpacess module, and calling an existing test case library of the running equipment to execute the automatic test case.
3. The method according to claim 2, wherein the existing test case library is a developed device test case library, the IP address of the tested communication device is obtained from a variable file, and the test case library is in communication connection with the tested device according to the IP address of the tested device to run an automated test case.
4. The method of claim 1, wherein the method of generating html test reports comprises: before an automatic test case is operated, a robotframe opens a socket communication binding local port; during test operation, the robotframe monitors real-time operation data through socket communication; after the automatic test case is operated, the robotframe closes socket communication; robotframe generates log logs from the data and generates html reports.
5. A system for testing communication equipment in batches is characterized by comprising a robotframe platform set up at a PC end, wherein the PC is communicated with a plurality of communication equipment to be tested through a router, and the robotframe platform is used for executing the method for testing the communication equipment in batches as claimed in any one of claims 1 to 4.
CN202011361758.XA 2020-11-27 2020-11-27 Method and system for batch testing of communication equipment Active CN112486819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011361758.XA CN112486819B (en) 2020-11-27 2020-11-27 Method and system for batch testing of communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011361758.XA CN112486819B (en) 2020-11-27 2020-11-27 Method and system for batch testing of communication equipment

Publications (2)

Publication Number Publication Date
CN112486819A CN112486819A (en) 2021-03-12
CN112486819B true CN112486819B (en) 2022-04-22

Family

ID=74936602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011361758.XA Active CN112486819B (en) 2020-11-27 2020-11-27 Method and system for batch testing of communication equipment

Country Status (1)

Country Link
CN (1) CN112486819B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573904A (en) * 2014-10-11 2016-05-11 中兴通讯股份有限公司 Test resource dynamic application method and device
CN106209515A (en) * 2016-07-12 2016-12-07 中国南方电网有限责任公司电网技术研究中心 Access network equipment automatization test system
CN106789391A (en) * 2016-11-14 2017-05-31 上海斐讯数据通信技术有限公司 A kind of automated testing method and device of router DHCP functions

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7299451B2 (en) * 2002-01-24 2007-11-20 International Business Machines Corporation Remotely driven system for multi-product and multi-platform testing
GB2570697A (en) * 2018-02-02 2019-08-07 Sony Corp Network testing
CN109902017A (en) * 2019-03-06 2019-06-18 厦门商集网络科技有限责任公司 A kind of method and terminal based on RobotFramework test Dubbo interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573904A (en) * 2014-10-11 2016-05-11 中兴通讯股份有限公司 Test resource dynamic application method and device
CN106209515A (en) * 2016-07-12 2016-12-07 中国南方电网有限责任公司电网技术研究中心 Access network equipment automatization test system
CN106789391A (en) * 2016-11-14 2017-05-31 上海斐讯数据通信技术有限公司 A kind of automated testing method and device of router DHCP functions

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
"IMS Based Session Initiation Protocol in Robot Framework for Telephony Services";S Thejashwini等;《2018 International Conference on Inventive Research in Computing Applications (ICIRCA)》;20190103;第1218-1223页 *
"Robot Framework for Auto Test";Suresh Kanagala;《https://eos.arista.com/robot-framework-for-auto-test/》;20180614;第1-7页 *
"RobotFramework的奇淫技巧——变量";点点寒彬;《https://www.jianshu.com/p/0a25a34bb4e0》;20171210;第1-5页 *
"基于Robot Framework的主板自动化测试系统的研究与实现";张瑾;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20200415(第04期);I138-189 *
"基于Robot Framework的自动化接口测试框架的设计与实现";杨欣 等;《电子质量》;20181020(第10期);第40-45页 *
"基于Robot Framework的自动化测试系统的设计与实现";朱韶松;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20180415(第04期);I138-1142 *
基于Python和Robotframework的继电保护装置自动化集成测试方法;周寻 等;《电气时代》;20180310(第03期);第78-84页 *

Also Published As

Publication number Publication date
CN112486819A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN109361562B (en) Automatic testing method based on associated network equipment access
US8132053B2 (en) System and method for grammar based test planning
CN109426237B (en) Hardware-in-loop test method and device for Electronic Control Unit (ECU)
CN109344053B (en) Interface coverage test method, system, computer device and storage medium
CN110768863B (en) Scheme for simulating and testing AIOT equipment
CN102707712B (en) Electronic equipment fault diagnosis method and system
CN104657262A (en) High-real-time automatic testing system and testing method
CN103731663A (en) Method and device for testing smart television
CN113219940A (en) FCT test system with one computer controlling multiple test stations and control method
CN112486819B (en) Method and system for batch testing of communication equipment
CN111984529A (en) APP software compatibility automatic test method
CN115237759A (en) Method and system for automatic API performance test
CN114500178A (en) Intelligent internet of things gateway capable of self-operation and self-maintenance
CN110188370B (en) Automatic reusable rapid modeling method for processing geographic space information
CN109104322B (en) Method, device, readable storage medium and system for solving FL-NET communication fault
CN113094258A (en) Precise test method and device, computer equipment and medium
CN111708538A (en) Transaction circulation method, device, computer equipment and computer readable storage medium
CN111800296B (en) Method, system, equipment and storage medium for capturing and analyzing network data of real-time system
CN111813665A (en) Big data platform interface data testing method and system based on python
CN111294254B (en) Equipment site-oriented method, case site-oriented execution method and automatic test platform
CN116610511B (en) Storage test equipment and test method thereof
CN114826615B (en) Mobile terminal acquisition method and system based on mobile phone simulator
CN115248775A (en) Test system, test method, test terminal, and storage medium
CN116633815A (en) Debugging method, device, electronic equipment and storage medium
CN115656777A (en) Parallel analysis method for test logs of multi-channel chip

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
GR01 Patent grant
GR01 Patent grant