+

CN112486819A - 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
CN112486819A
CN112486819A CN202011361758.XA CN202011361758A CN112486819A CN 112486819 A CN112486819 A CN 112486819A CN 202011361758 A CN202011361758 A CN 202011361758A CN 112486819 A CN112486819 A CN 112486819A
Authority
CN
China
Prior art keywords
communication equipment
robotframework
database
test
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011361758.XA
Other languages
Chinese (zh)
Other versions
CN112486819B (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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • 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)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

本发明涉及一种批量测试通信设备方法,在PC端搭建robotframework平台,PC通过路由器与多个被检测通信设备通信;在robotframework平台中执行循环脚本按被测试通信设备IP列表变量for循环执行自动化测试用例,同时数据库操作库通过socket通信识别本地数据类型,并根据数据库类型调用不同接口将当前被测试设备IP的地址存入本地数据库表中,自动化测试用例在被调用执行时,通过导入的varible变量文件调用数据库操作库获取被测试设备IP,最终ride根据测试结果按设备IP地址生成html测试报告。本发明解决了robotframework平台在批量执行通信设备自动化测试时,循环脚本中IP列表变量的值无法被测试用例获取输入的问题。使测试人员能够使用robotframework平台去批量测试通信设备,提升了测试人员在通信设备批量测试中的效率。

Figure 202011361758

The invention relates to a method for testing communication equipment in batches. A robotframework platform is built on a PC side, and the PC communicates with a plurality of communication devices to be tested through a router; and a loop script is executed in the robotframework platform to perform automatic testing according to the IP list variable of the communication device to be tested for loop. At the same time, the database operation library identifies the local data type through socket communication, and calls different interfaces according to the database type to store the IP address of the current device under test in the local database table. When the automated test case is called and executed, it passes the imported varible variable. The file calls the database operation library to obtain the IP of the device under test, and finally ride generates an html test report according to the device IP address according to the test result. The invention solves the problem that the value of the IP list variable in the loop script cannot be obtained and input by the test case when the robotframework platform executes the automatic test of the communication equipment in batches. It enables testers to use the robotframework platform to test communication devices in batches, which improves the efficiency of testers in batch testing of communication devices.

Figure 202011361758

Description

Method and system for batch testing of communication equipment
Technical Field
The invention relates to
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 (7)

1.一种批量测试通信设备方法,其特征在于,在PC端搭建robotframework平台,PC通过路由器与多个被检测通信设备通信;在robotframework平台中执行循环脚本按被测试通信设备IP列表变量for循环执行自动化测试用例,同时数据库操作库识别本地数据库类型并依据数据库类型通过调用对应接口将当前被测试设备IP的地址存入本地数据库表中,自动化测试用例在被调用执行时,通过导入的varible变量文件调用数据库操作库获取被测试设备IP,最终ride根据测试结果按设备IP地址生成html测试报告。1. a batch testing communication equipment method, it is characterized in that, build robotframework platform at PC end, PC communicates with a plurality of tested communication equipments by router; In robotframework platform, execute loop script by tested communication equipment IP list variable for loop Execute the automated test case, and the database operation library recognizes the local database type and stores the current IP address of the device under test in the local database table by calling the corresponding interface according to the database type. When the automated test case is called and executed, it passes the imported varible variable. The file calls the database operation library to obtain the IP of the device under test, and finally ride generates an html test report according to the device IP address according to the test result. 2.根据权利要求1所述的一种批量测试通信设备方法,其特征在于,所述robotframework平台的具体工作过程为:创建robot用例,for循环遍历输入的设备IP的列表变量,调用数据库操作库,识别本地数据库类型,并依据数据库类型通过调用对应接口将for循环取出的IP地址存入本地数据库中;通过python subprocess模块调用cmd,调用运行设备已有测试用例库执行自动化测试用例。2. a kind of batch testing communication equipment method according to claim 1 is characterized in that, the concrete working process of described robotframework platform is: create robot use case, for loop traverses the list variable of the equipment IP of input, calls database operation library , identify the local database type, and store the IP address retrieved by the for loop into the local database by calling the corresponding interface according to the database type; call cmd through the python subprocess module to call the existing test case library of the running device to execute automated test cases. 3.根据权利要求2所述的一种批量测试通信设备方法,其特征在于,所述数据操作库为基于robotframework框架的library库,数据库操作库通过socket通信连接本地PC,识别数据库类型并登录本地数据库,依据数据库类型通过调用对应接口将设备IP地址存储入本地数据库的表中或从本地数据库的表中取出存储的设备IP地址。3. a kind of batch testing communication equipment method according to claim 2 is characterized in that, described data manipulation library is the library library based on robotframework framework, and database manipulation library connects local PC by socket communication, identifies database type and logs in local The database, according to the database type, stores the device IP address in the table of the local database or retrieves the stored device IP address from the table of the local database by calling the corresponding interface. 4.根据权利要求3所述的一种批量测试通信设备方法,其特征在于,根据权利要求1所述的一种批量测试通信设备方法,其特征在于,所述已有测试用例库为已开发好的设备测试用例库,从varible变量文件中获取被测通信设备的IP地址,根据被测设备的IP地址,与被测设备通信连接,运行自动化测试用例。4. The method for batch testing communication equipment according to claim 3, wherein the method for batch testing communication equipment according to claim 1, wherein the existing test case library is developed A good device test case library obtains the IP address of the communication device under test from the varible variable file, communicates with the device under test according to the IP address of the device under test, and runs automated test cases. 5.根据权利要求4所述的一种批量测试通信设备方法,其特征在于,所述varible变量文件为用于导入变量的python文件,通过调用数据库操作库的封装关键字,获取当前被测试设备的IP地址。5. a kind of batch testing communication equipment method according to claim 4, is characterized in that, described varible variable file is the python file that is used for importing variable, by calling the encapsulation keyword of database operation library, obtains currently tested equipment IP address. 6.根据权利要求5所述的一种批量测试通信设备方法,其特征在于,所述生成html测试报告的方法为:运行自动化测试用例前,robotframework开启sockect通信绑定本地端口;测试运行时,robotframework通过sockect通信监听实时运行数据;自动化测试用例运行完毕之后,robotframework关闭sockect通信;robotframework根据数据产生log日志,并生成html报告。6. a kind of batch testing communication equipment method according to claim 5 is characterized in that, the described method of generating html test report is: before running automated test case, robotframework opens socket communication to bind local port; Robotframework monitors real-time running data through socket communication; after the automated test case runs, robotframework closes socket communication; robotframework generates log logs and html reports according to the data. 7.一种批量测试通信设备的系统,其特征在于,包括在PC端搭建robotframework平台,PC通过路由器与多个被检测通信设备通信,所述robotframework平台用于执行权利要求1-6任一所述的批量测试通信设备方法。7. a system of batch testing communication equipment, is characterized in that, comprises in PC end and builds robotframework platform, PC communicates with a plurality of detected communication equipment by router, and described robotframework platform is used for carrying out any one of claim 1-6. The method for batch testing communication equipment described above.
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 true CN112486819A (en) 2021-03-12
CN112486819B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114428726A (en) * 2021-12-01 2022-05-03 珠海全志科技股份有限公司 Automated testing method, system and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140138A1 (en) * 2002-01-24 2003-07-24 Dygon John G. Remotely driven system for multi-product and multi-platform testing
CN105573904A (en) * 2014-10-11 2016-05-11 中兴通讯股份有限公司 Test resource dynamic application method and device
CN106209515A (en) * 2016-07-12 2016-12-07 中国南方电网有限责任公司电网技术研究中心 Automatic test system for access network equipment
CN106789391A (en) * 2016-11-14 2017-05-31 上海斐讯数据通信技术有限公司 A kind of automated testing method and device of router DHCP functions
CN109902017A (en) * 2019-03-06 2019-06-18 厦门商集网络科技有限责任公司 A kind of method and terminal based on RobotFramework test Dubbo interface
US20190245755A1 (en) * 2018-02-02 2019-08-08 Sony Corporation Network testing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030140138A1 (en) * 2002-01-24 2003-07-24 Dygon John G. Remotely driven system for multi-product and multi-platform testing
CN105573904A (en) * 2014-10-11 2016-05-11 中兴通讯股份有限公司 Test resource dynamic application method and device
CN106209515A (en) * 2016-07-12 2016-12-07 中国南方电网有限责任公司电网技术研究中心 Automatic test system for access network equipment
CN106789391A (en) * 2016-11-14 2017-05-31 上海斐讯数据通信技术有限公司 A kind of automated testing method and device of router DHCP functions
US20190245755A1 (en) * 2018-02-02 2019-08-08 Sony Corporation Network testing
CN109902017A (en) * 2019-03-06 2019-06-18 厦门商集网络科技有限责任公司 A kind of method and terminal based on RobotFramework test Dubbo interface

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
S THEJASHWINI等: ""IMS Based Session Initiation Protocol in Robot Framework for Telephony Services"", 《2018 INTERNATIONAL CONFERENCE ON INVENTIVE RESEARCH IN COMPUTING APPLICATIONS (ICIRCA)》 *
SURESH KANAGALA: ""Robot Framework for Auto Test"", 《HTTPS://EOS.ARISTA.COM/ROBOT-FRAMEWORK-FOR-AUTO-TEST/》 *
周寻 等: "基于Python和Robotframework的继电保护装置自动化集成测试方法", 《电气时代》 *
张瑾: ""基于Robot Framework的主板自动化测试系统的研究与实现"", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *
朱韶松: ""基于Robot Framework的自动化测试系统的设计与实现"", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *
杨欣 等: ""基于Robot Framework的自动化接口测试框架的设计与实现"", 《电子质量》 *
点点寒彬: ""RobotFramework的奇淫技巧——变量"", 《HTTPS://WWW.JIANSHU.COM/P/0A25A34BB4E0》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114428726A (en) * 2021-12-01 2022-05-03 珠海全志科技股份有限公司 Automated testing method, system and medium

Also Published As

Publication number Publication date
CN112486819B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
CN109361562B (en) Automatic testing method based on associated network equipment access
US8489926B2 (en) System and method for grammar based test planning
CN111475417A (en) Automatic testing method, device, equipment and storage medium
CN112115029B (en) Performance test method and device, computer equipment and computer readable storage medium
CN106452975B (en) A kind of method and system of test router
CN106326088B (en) Method and device for realizing construction of test object and device for realizing service configuration test
CN109885499B (en) Robot automatic test system and test method
CN102546266B (en) Method and platform for diagnosing network failures
CN111651365B (en) Automatic interface testing method and device
CN113055408A (en) Network security test integrated device
DE102024204216A1 (en) Methods, systems, and computer-readable media for network test configuration and execution using mediated communication with a large language model (LLM)
CN112486819A (en) Method and system for batch testing of communication equipment
CN113157592A (en) Visual defect positioning method
CN113219940A (en) FCT test system with one computer controlling multiple test stations and control method
CN114205789B (en) 5G site opening method, system and storage medium
US20050203717A1 (en) Automated testing system, method and program product using testing map
CN114676043A (en) Test method and device for intelligent voice module, storage medium and electronic device
CN105243015B (en) Method and system for automatically testing software
CN115237759B (en) Method and system for automatically testing API (application program interface) performance
CN113590464A (en) Method and device for generating interface test template script
CN117421234B (en) Multi-platform multi-concurrency automatic threading testing system
CN112422693A (en) User online short video draft queue exporting method
CN111813665A (en) Big data platform interface data testing method and system based on python
CN105487861B (en) The method and device of securing component calling amount
US12445347B2 (en) Identification of root causes in data processing errors

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载