CN112486809A - Automatic testing method, system and equipment based on white box switch - Google Patents

Automatic testing method, system and equipment based on white box switch Download PDF

Info

Publication number
CN112486809A
CN112486809A CN202011319156.8A CN202011319156A CN112486809A CN 112486809 A CN112486809 A CN 112486809A CN 202011319156 A CN202011319156 A CN 202011319156A CN 112486809 A CN112486809 A CN 112486809A
Authority
CN
China
Prior art keywords
test
switch
testing
white box
box switch
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.)
Withdrawn
Application number
CN202011319156.8A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011319156.8A priority Critical patent/CN112486809A/en
Publication of CN112486809A publication Critical patent/CN112486809A/en
Withdrawn legal-status Critical Current

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/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • 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/3676Test management for coverage analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an automatic testing method, system and equipment based on a white box switch, comprising the following steps: creating an automatic test task, including a firmware test and a software test of the white box switch; configuring a physical topology between the switch and a port of the network tester according to the test task; selecting a test script to be executed, and setting the running turn and the execution time of the test script; and sending the test script to the corresponding switch to be tested and the server to be executed. The invention aims at the automatic test of the white box switch, covers the test of various firmware and software, realizes the test integration of the switch, improves the automatic test efficiency of the switch and ensures the product quality.

Description

Automatic testing method, system and equipment based on white box switch
Technical Field
The invention belongs to the technical field of switch testing, and particularly relates to an automatic testing method, system and equipment based on a white box switch.
Background
Firmware of a data center white box switch, which is self-developed by the wave tide, includes BMC (Baseboard management Controller), BIOS (Basic Input Output System), CPLD (complex programmable logic device), and software includes SONiC (Open source switch operating System), ONIE (Open Network installation Environment, which is an Open source plan and defines an Open installation Environment for modern Network hardware) and Diag (diagnostic System). Because the data center white box switch is composed of a plurality of firmware and software, a method which is effective and can cover a plurality of firmware and software needs to be designed, so that the automatic testing of all modules of the switch can be ensured to run on the system, and the method comprises the steps of establishing a testing task, executing the testing, collecting a testing result and the like. There is no technology for performing both software and hardware tests on a white box switch.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides an automated testing method, system and device based on a white box switch, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides an automated testing method based on a white box switch, including:
creating an automatic test task, including a firmware test and a software test of the white box switch;
configuring a physical topology between the switch and a port of the network tester according to the test task;
selecting a test script to be executed, and setting the running turn and the execution time of the test script;
and sending the test script to the corresponding switch to be tested and the server to be executed.
Further, the method further comprises:
and recording the test log and uploading the test log to a server for archiving.
Further, the configuring the physical topology between the switch and the port of the network tester according to the test task includes:
setting a connection mode of physical ports among the switches to be tested;
setting a connection mode of a physical port between a switch to be tested and a network tester;
setting the speed of each port of the network tester;
setting a protocol for message sending;
and setting flow modes, wherein the flow modes comprise one-way flow and two-way flow.
Further, the method further comprises: and selecting the model, the number and the IP address of the switch according to the test task, thereby determining the switch to be tested.
Further, the firmware testing includes: BMC test, BIOS test and CPLD test; the software test comprises the following steps: open source switch operating system testing, open source installation environment testing, and diagnostic system testing.
In a second aspect, the present invention provides an automated testing system based on a white box switch, including:
the task creating unit is configured for creating automatic testing tasks, including a firmware test and a software test of the white box switch;
the topology connection unit is used for configuring the physical topology between the switch and the port of the network tester according to the test task;
the script development unit is configured for selecting a test script to be executed and setting the running turn and the execution time of the test script;
and the test execution unit is configured to issue the test script to the corresponding switch to be tested and the server to be executed.
Further, the system further comprises:
and the test archiving unit is configured to record the test log and upload the test log to the server for archiving.
In a third aspect, the present invention provides an automated testing device based on a white box switch, including: the system comprises a server, a white box switch, a network tester, an optical cable and an optical module; the server is used for deploying the automatic test system according to any claim, storing an automatic test script, and storing test task related data, test logs and results;
the switch to be tested is used for configuring one or more switches to execute the automated test according to the test task;
the white box switch is used for being interconnected with the white box switch through an optical cable and an optical module or being interconnected with a network tester;
the network tester is used for sending and counting network data packets, and port simulation protocol testing or functional testing of the network tester needs the data packets according to different testing tasks.
The beneficial effect of the invention is that,
the automatic testing method, the system and the equipment based on the white box switch, provided by the invention, aim at the automatic testing of the white box switch, cover the testing of various firmware and software, realize the testing integration of the switch, improve the automatic testing efficiency of the switch and ensure the product quality. Meanwhile, the management of the test script, the management of the test task and the management of the switch to be tested are realized.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a flow diagram of test task processing for a method of one embodiment of the invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
BMC: basebard Manager Controller, substrate management Controller.
BIOS: basic Input Output System, Basic Input Output System.
CPLD: a complex programmable logic device.
SONiC: the open source switch operates the system.
ONIE: the Open Network instrumentation Environment is an Open source plan, and defines an Open installation Environment for modern Network hardware.
Diag: a diagnostic system.
The embodiment of the invention provides an automated testing method based on a white box switch, and fig. 1 is a schematic flow chart of the method of the embodiment of the invention. The execution subject of fig. 1 may be an automated testing system based on a white box switch.
As shown in fig. 1, the method includes:
step 110, creating an automatic test task, including a firmware test and a software test of the white box switch;
step 120, configuring a physical topology between the switch and a port of the network tester according to the test task;
step 130, selecting a test script to be executed, and setting the running turn and the execution time of the test script;
and 140, sending the test script to the corresponding switch to be tested and the server to be executed.
Optionally, as an embodiment of the present invention, the method further includes:
and recording the test log and uploading the test log to a server for archiving.
Optionally, as an embodiment of the present invention, the configuring, according to the test task, a physical topology between the switch and the port of the network tester includes:
setting a connection mode of physical ports among the switches to be tested;
setting a connection mode of a physical port between a switch to be tested and a network tester;
setting the speed of each port of the network tester;
setting a protocol for message sending;
and setting flow modes, wherein the flow modes comprise one-way flow and two-way flow.
Optionally, as an embodiment of the present invention, the method further includes: and selecting the model, the number and the IP address of the switch according to the test task, thereby determining the switch to be tested.
Optionally, as an embodiment of the present invention, the firmware testing includes: BMC test, BIOS test and CPLD test; the software test comprises the following steps: open source switch operating system testing, open source installation environment testing, and diagnostic system testing.
In order to facilitate understanding of the present invention, the principle of the automated testing method based on the white box switch of the present invention is combined with the process of managing the white box switch in the embodiment to further describe the automated testing method based on the white box switch of the present invention.
Specifically, as shown in fig. 2, the automated testing method based on the white box switch includes:
1. creation of a test task: the test engineer can create a test task in the automatic test system, the test task comprises a firmware test and a software test of the white box switch, the firmware comprises BMC, BIOS and CPLD, the software comprises SONiC, ONIE and Diag, and the specific steps are as follows:
(1) selecting the switch to be tested, including the model, the number and the IP address of the switch (needing to be maintained in the system in advance);
(2) configuring a physical topology between the switch and the ports of the network tester, namely how the physical ports between the switch and the switch are connected, how the physical ports between the switch and the network tester are connected, the speed of each port of the network tester, and what protocol message is sent, namely bidirectional flow or unidirectional flow;
(3) selecting a script to be executed, and setting the running turn of the script;
(4) setting the script execution time;
2. judging whether the script is executed on the switch to be tested or the server according to the created test task, issuing the script and the test task to the corresponding switch and the server, and starting to execute the automatic test;
3. and recording a log in the execution process of each script and the result of each round of test, and uploading to a server for filing.
The automatic testing method provided by the embodiment is suitable for automatic testing of the white box switch, can save testing time, can improve testing accuracy, is performed in multiple aspects from management of a testing script, management of a testing task and management of the switch to be tested, and is currently applied to actual testing of projects.
(II) to implement the method described in embodiment 1, an embodiment of the present invention provides an automated testing system based on a white box switch, which is mainly to build a set of automated testing software system by adopting a pytest automated testing framework, and includes:
the task creating unit is configured for creating automatic testing tasks, including a firmware test and a software test of the white box switch;
the topology connection unit is used for configuring the physical topology between the switch and the port of the network tester according to the test task;
the script development unit is configured for selecting a test script to be executed and setting the running turn and the execution time of the test script; aiming at the development and debugging of the script, an automated test development engineer carries out the development and debugging of the script on the system, and all the scripts are ensured to run and pass on the switch and the server to be tested;
and the test execution unit is configured to issue the test script to the corresponding switch to be tested and the server to be executed.
Optionally, as an embodiment of the present invention, the system further includes:
and the test archiving unit is configured to record the test log and upload the test log to the server for archiving. After the automatic test development engineer submits the script, a corresponding auditor can be selected, the auditor can log in the system for auditing after receiving the mail notification audited by the system script, the script can be filed in the script library after the auditing is passed, the corresponding test script can be selected from the script library when the automatic test task is subsequently established, and if the script is rejected, the script submitter can search the mail notification and log in the system for modification.
(III) the embodiment of the invention provides an automatic test device based on a white box switch, which comprises: the system comprises a server, a white box switch, a network tester, an optical cable and an optical module; the server is used for deploying the automatic test system according to any claim, storing an automatic test script, and storing test task related data, test logs and results;
the switch to be tested is used for configuring one or more switches to execute the automated test according to the test task;
the white box switch is used for being interconnected with the white box switch through an optical cable and an optical module or being interconnected with a network tester;
the network tester is used for sending and counting network data packets, and port simulation protocol testing or functional testing of the network tester needs the data packets according to different testing tasks.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. An automated testing method based on a white box switch is characterized by comprising the following steps:
creating an automatic test task, including a firmware test and a software test of the white box switch;
configuring a physical topology between the switch and a port of the network tester according to the test task;
selecting a test script to be executed, and setting the running turn and the execution time of the test script;
and sending the test script to the corresponding switch to be tested and the server to be executed.
2. The automated white-box switch-based testing method according to claim 1, further comprising:
and recording the test log and uploading the test log to a server for archiving.
3. The automated testing method based on a white box switch according to claim 1, wherein the configuring of the physical topology between the switch and the network tester port according to the testing task comprises:
setting a connection mode of physical ports among the switches to be tested;
setting a connection mode of a physical port between a switch to be tested and a network tester;
setting the speed of each port of the network tester;
setting a protocol for message sending;
and setting flow modes, wherein the flow modes comprise one-way flow and two-way flow.
4. The automated white-box switch-based testing method according to claim 1, further comprising: and selecting the model, the number and the IP address of the switch according to the test task, thereby determining the switch to be tested.
5. The automated white-box switch-based testing method according to claim 1, wherein the firmware testing comprises: BMC test, BIOS test and CPLD test; the software test comprises the following steps: open source switch operating system testing, open source installation environment testing, and diagnostic system testing.
6. An automated testing system based on a white box switch, comprising:
the task creating unit is configured for creating automatic testing tasks, including a firmware test and a software test of the white box switch;
the topology connection unit is used for configuring the physical topology between the switch and the port of the network tester according to the test task;
the script development unit is configured for selecting a test script to be executed and setting the running turn and the execution time of the test script;
and the test execution unit is configured to issue the test script to the corresponding switch to be tested and the server to be executed.
7. The white-box switch based automated testing system of claim 6, further comprising:
and the test archiving unit is configured to record the test log and upload the test log to the server for archiving.
8. An automated test equipment based on white box switch, characterized by comprising: the system comprises a server, a white box switch, a network tester, an optical cable and an optical module; the server is used for deploying the automatic test system according to any claim, storing an automatic test script, and storing test task related data, test logs and results;
the switch to be tested is used for configuring one or more switches to execute the automated test according to the test task;
the white box switch is used for being interconnected with the white box switch through an optical cable and an optical module or being interconnected with a network tester;
the network tester is used for sending and counting network data packets, and port simulation protocol testing or functional testing of the network tester needs the data packets according to different testing tasks.
CN202011319156.8A 2020-11-23 2020-11-23 Automatic testing method, system and equipment based on white box switch Withdrawn CN112486809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011319156.8A CN112486809A (en) 2020-11-23 2020-11-23 Automatic testing method, system and equipment based on white box switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011319156.8A CN112486809A (en) 2020-11-23 2020-11-23 Automatic testing method, system and equipment based on white box switch

Publications (1)

Publication Number Publication Date
CN112486809A true CN112486809A (en) 2021-03-12

Family

ID=74932866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011319156.8A Withdrawn CN112486809A (en) 2020-11-23 2020-11-23 Automatic testing method, system and equipment based on white box switch

Country Status (1)

Country Link
CN (1) CN112486809A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315675A (en) * 2021-05-08 2021-08-27 山东英信计算机技术有限公司 White box switch U-Boot automatic testing method, system and storage medium
CN113821226A (en) * 2021-09-17 2021-12-21 锐捷网络股份有限公司 ONIE system installation method, apparatus, device and medium
CN114328182A (en) * 2021-11-30 2022-04-12 苏州浪潮智能科技有限公司 Switch PSU test method and related device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315675A (en) * 2021-05-08 2021-08-27 山东英信计算机技术有限公司 White box switch U-Boot automatic testing method, system and storage medium
CN113315675B (en) * 2021-05-08 2023-02-24 山东英信计算机技术有限公司 White box switch U-Boot automatic testing method, system and storage medium
CN113821226A (en) * 2021-09-17 2021-12-21 锐捷网络股份有限公司 ONIE system installation method, apparatus, device and medium
CN114328182A (en) * 2021-11-30 2022-04-12 苏州浪潮智能科技有限公司 Switch PSU test method and related device
CN114328182B (en) * 2021-11-30 2023-11-10 苏州浪潮智能科技有限公司 Switch PSU testing method and related device

Similar Documents

Publication Publication Date Title
CN109388530B (en) Blade server-oriented automatic test platform and test method
CN112486809A (en) Automatic testing method, system and equipment based on white box switch
US20180013657A1 (en) Consolidation of network test automation tools
CN110050441B (en) Capturing traffic in real time for protocol debugging in case of failure
CN104954189A (en) Automatic server cluster detecting method and system
CN108092854B (en) Test method and device for train-level Ethernet equipment based on IEC61375 protocol
CN104461854B (en) A kind of Ship Equipment software generic simulation test platform
KR20090065747A (en) System for load regenerating using packets of load test and its method
US7380168B2 (en) System development tool
CN105071982A (en) Method for rapid measurement of performance of network card under Linux
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
CN109462495A (en) A kind of ship hardware and communication system detection system and method
CN111427781A (en) Logic function testing method and platform compatible with simulation and entity
CN108737163B (en) SDN controller application performance analysis method based on OpenFlow protocol
CN111930078B (en) Network testing device for nuclear control system
Cohen et al. Introducing new deformable surfaces to segment 3D images
CN116633836A (en) Method and system for testing switch by digital twin technology
CN102750143B (en) Based on the DSP development approach that MATLAB com component calls
CN104638767B (en) Spacer layer data source simulation method and device for intelligent substation test
CN102291274A (en) System and method for realizing automatic adaptation of network testing instrument
CN105991322B (en) Processing method and device for acquisition adapter management system
CN113031969B (en) Equipment deployment inspection method and device, computer equipment and storage medium
CN108304292A (en) A kind of method and system of nodal test hard disk disk sequence
CA3144852A1 (en) Automatic generation of integrated test procedures using system test procedures
Niehaus et al. Modern ict network simulator for co-simulations in smart grid applications

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210312

WW01 Invention patent application withdrawn after publication