CN113852516B - Method, system, terminal and storage medium for generating switch diagnostic program - Google Patents

Method, system, terminal and storage medium for generating switch diagnostic program Download PDF

Info

Publication number
CN113852516B
CN113852516B CN202110994484.6A CN202110994484A CN113852516B CN 113852516 B CN113852516 B CN 113852516B CN 202110994484 A CN202110994484 A CN 202110994484A CN 113852516 B CN113852516 B CN 113852516B
Authority
CN
China
Prior art keywords
test
file
files
target
description
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
CN202110994484.6A
Other languages
Chinese (zh)
Other versions
CN113852516A (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.)
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 CN202110994484.6A priority Critical patent/CN113852516B/en
Publication of CN113852516A publication Critical patent/CN113852516A/en
Application granted granted Critical
Publication of CN113852516B publication Critical patent/CN113852516B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements

Abstract

The invention provides a method, a system, a terminal and a storage medium for generating a switch diagnosis program, which comprise the following steps: pre-constructing a test library, storing test related files in the test library, wherein the test related files comprise main program files, various test script files and description files of switch hardware, and summarizing storage paths of all the test related files in the test library into a path list; receiving a customization request sent by a front end, and analyzing target hardware and target test items from the customization request; searching a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and respectively calling the description file of the target hardware and the target test script file from the first path and the second path; and calling the main program file, and generating a diagnostic program by using the main program file, the description file of the target hardware and the target test script file. The invention realizes the development of the customization of the switch diagnosis software.

Description

Method, system, terminal and storage medium for generating switch diagnostic program
Technical Field
The invention relates to the technical field of switches, in particular to a method, a system, a terminal and a storage medium for generating a switch diagnostic program.
Background
A Switch (Switch) means a "Switch" is a network device used for electrical (optical) signal forwarding. It can provide an unshared electrical signal path for any two network nodes of the access switch. The most common switch is an ethernet switch. Other common are voice over phone switches, fiber optic switches, etc. Switching is a collective term for techniques in which information to be transmitted is sent to a corresponding route that meets the requirements, by a method that is manually or automatically accomplished by equipment, according to the need of information transmission at both ends of communication. The switch can be divided into a wide area network switch and a local area network switch according to different working positions. A wide area switch is a device that performs information exchange functions in a communication system and is used at the data link layer. The switch has a plurality of ports, each with bridging functionality, that can connect to a local area network or a high performance server or workstation. Indeed, switches are sometimes referred to as multiport bridges. The network switch is an expanding network device, and can provide more connection ports for the subnetworks to connect more computers. With the development of the communication industry and the advancement of national economy informatization, the market of network switches is steadily rising. The method has the characteristics of high cost performance, high flexibility, relative simplicity, easy realization and the like. Ethernet technology has become one of the most important local area network networking technologies today, and network switches have become the most popular switches. Switch is the english name of the Switch, and this product is updated from the upgrade of the original hub, and is not very different from the hub in appearance. This technology is a switch technology, because both ends of the communication need to transmit information, and the information to be transmitted is sent to the corresponding router meeting the required standard by a device or manually. In a broad sense, the devices implemented in the communication system for the information exchange function are switches.
With the development of informatization, more and more data centers are built, and a switch is one of devices in a computer network system, so that the demand is larger and more, and the demand variety is also larger and more. To meet the needs of the switch manufacturing process, automated factory diagnostic procedures need to be developed. Different data centers need different switch configurations, different hardware of the switches is different, and different factory diagnosis methods are needed for the switches of different hardware, so that customized development is needed for the different switches.
The development of customization needs to throw in a large amount of manpower and materials, can drag slow the switch production progress moreover, can not adapt to the diversified needs of switch configuration now.
Disclosure of Invention
Aiming at the problems that in the prior art, the types of switches are more, and when factory diagnosis is carried out in a large scale, automatic customized programs cannot be carried out for diagnosis, so that the factory diagnosis efficiency is too slow, the invention provides a switch diagnosis program generation method, a system, a terminal and a storage medium, and aims to solve the technical problems.
In a first aspect, the present invention provides a method for generating a diagnostic program of a switch, including:
pre-constructing a test library, storing test related files in the test library, wherein the test related files comprise main program files, various test script files and description files of switch hardware, and summarizing storage paths of all the test related files in the test library into a path list;
receiving a customization request sent by a front end, and analyzing target hardware and target test items from the customization request;
searching a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and respectively calling the description file of the target hardware and the target test script file from the first path and the second path;
and calling the main program file, and generating a diagnostic program by using the main program file, the description file of the target hardware and the target test script file.
Further, a test library is pre-constructed, test related files are stored in the test library, the test related files comprise main program files, various test script files and description files of switch hardware, and storage paths of all the test related files in the test library are summarized into a path list, and the method comprises the following steps:
generating test feature numbers for the test script files respectively, wherein the test feature numbers represent the types of hardware and test items aimed at by the test script files;
generating description feature numbers for description files of the switch hardware respectively, wherein the description feature numbers represent hardware types and test related configuration types of the description files;
the test feature numbers and the storage paths of the test script files are stored in pairs to a path list;
the description feature number and the stored path of the description file are saved in pairs to a path list.
Further, receiving a customization request sent by a front end, and resolving target hardware and target test items from the customization request, wherein the method comprises the following steps:
establishing a one-to-one mapping relation between option numbers of the front-end human-computer interaction interface and test feature numbers or description feature numbers;
and analyzing all option numbers from the customization request, and converting the option numbers into test feature numbers or description feature numbers according to the mapping relation.
Further, the step of retrieving the main program file, and generating a diagnostic program using the main program file, the description file of the target hardware, and the target test script file includes:
storing a main program into a cache in advance, and calling the main program file from the cache;
packaging the main program file, the description file of the target hardware and the target test script file into the same program file package;
and embedding the description file of the target hardware and the calling mode of the target test script file into corresponding positions of the main program file respectively.
In a second aspect, the present invention provides a switch diagnostic program generating system, comprising:
the basic construction unit is used for pre-constructing a test library, storing test related files in the test library, wherein the test related files comprise main program files, various test script files and description files of switch hardware, and summarizing storage paths of all the test related files in the test library into a path list;
the request analysis unit is used for receiving a customization request sent by the front end and analyzing target hardware and target test items from the customization request;
the path searching unit is used for searching a first path of the description file of the target hardware and a second path of the target test script file corresponding to the target test item from the path list, and respectively retrieving the description file of the target hardware and the target test script file from the first path and the second path;
and the program generating unit is used for calling the main program file and generating a diagnosis program by using the main program file, the description file of the target hardware and the target test script file.
Further, the foundation construction unit includes:
the first numbering module is used for respectively generating test feature numbers for the test script files, wherein the test feature numbers represent the hardware types and test items aimed by the test script files;
the second numbering module is used for generating description feature numbers for the description files of the switch hardware respectively, wherein the description feature numbers represent the hardware types and the test related configuration types of the description files;
the first storage module is used for storing the test feature numbers and the storage paths of the test script file in pairs to a path list;
and the second storage module is used for storing the description characteristic numbers of the description files and the storage paths in pairs into a path list.
Further, the request parsing unit includes:
the mapping establishing module is used for establishing a one-to-one mapping relation between the option number of the front-end human-computer interaction interface and the test feature number or the description feature number;
and the request analysis module is used for analyzing all option numbers from the customization request and converting the option numbers into test feature numbers or description feature numbers according to the mapping relation.
Further, the program generating unit includes:
the file caching module is used for storing the main program in a cache in advance and calling the main program file from the cache;
the file packaging module is used for packaging the main program file, the description file of the target hardware and the target test script file into the same program file package;
and the calling embedding module is used for embedding the calling modes of the description file of the target hardware and the target test script file into corresponding positions of the main program file respectively.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal as described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
The invention has the advantages that,
the method, the system, the terminal and the storage medium for generating the switch diagnostic program provided by the invention are characterized in that a test library is pre-constructed, a main program file, a plurality of test script files and description files of switch hardware are stored in the test library to realize the preparation work of basic files, the basic support is provided for the diagnostic program, and the storage paths of all test related files in the test library are summarized into a path list; receiving a customizing request sent by a front end, and analyzing target hardware and target test items from the customizing request; then searching a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and respectively calling the description file of the target hardware and the target test script file from the first path and the second path; based on the main program file, the diagnosis program can be generated by using the main program file, the description file of the target hardware and the target test script file, and the automatic generation of the factory diagnosis program is realized. The invention realizes the development of switch diagnosis software customization, reduces the manpower input, reduces the error rate of programming, increases the production efficiency of factories and advances the implementation progress of switch projects.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
In order to solve the problems that a factory diagnosis program needs to be customized when a large number of switches are subjected to factory diagnosis, a large amount of manpower and material resources are required to be input in the customized development, the production progress of the switch can be dragged, and the requirement of the configuration diversification of the existing switch cannot be met. The invention provides a method for generating a switch diagnostic program, which can flexibly select corresponding options according to different switch configurations and import hardware descriptive files to generate switch production diagnostic software so as to meet the requirement of switch production configuration diversification.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. Wherein the fig. 1 execution body may be a switch diagnostic program generation system.
As shown in fig. 1, the method includes:
step 110, a test library is pre-built, test related files are stored in the test library, the test related files comprise main program files, various test script files and description files of switch hardware, and storage paths of all the test related files in the test library are summarized into a path list;
step 120, receiving a customization request sent by a front end, and analyzing target hardware and target test items from the customization request;
step 130, searching a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and respectively retrieving the description file of the target hardware and the target test script file from the first path and the second path;
and 140, calling the main program file, and generating a diagnostic program by using the main program file, the description file of the target hardware and the target test script file.
In order to facilitate understanding of the present invention, the method for generating a diagnostic program of a switch according to the present invention will be described further below with reference to the process of generating a diagnostic program of a switch according to the embodiment.
Specifically, the switch diagnostic software framework comprises a Diag main program, a diaglist diagnostic item file and a diagconfig file. When the main program for generating the Diag software is executed, the diaglist file and the diagconfig file transmitted from the interface software are automatically called, and modularized running codes are automatically called from a software library according to the files to generate the switch diagnostic software. The switch diagnostic program generating method comprises the following steps:
s1, a test library is built in advance, test related files are stored in the test library, the test related files comprise main program files, various test script files and description files of switch hardware, and storage paths of all the test related files in the test library are summarized into a path list.
Generating test feature numbers for the test script files respectively, wherein the test feature numbers represent the types of hardware and test items aimed at by the test script files; generating description feature numbers for description files of the switch hardware respectively, wherein the description feature numbers represent hardware types and test related configuration types of the description files; the test feature numbers and the storage paths of the test script files are stored in pairs to a path list; the description feature number and the stored path of the description file are saved in pairs to a path list.
For example, the description file of the CPU includes specification parameters and configuration types of the CPU, where the configuration types may include a type of communication protocol used, and the like, and the description feature number is a01B09, a represents the CPU,01 represents a specification type of a feature, such as intel I5, and B09 represents a specific communication protocol used by the B interface. And the test feature number of the test script file is, for example, a01h09, where a01 represents a test on a CPU of a specific specification, and h09 represents a test item such as a stress test.
S2, receiving a customization request sent by the front end, and analyzing target hardware and target test items from the customization request.
Establishing a one-to-one mapping relation between option numbers of the front-end human-computer interaction interface and test feature numbers or description feature numbers; and analyzing all option numbers from the customization request, and converting the option numbers into test feature numbers or description feature numbers according to the mapping relation.
And providing a friendly man-machine interaction interface, comprising a diagnosis item checking interface, a configuration item uploading button and a progress bar display. The interface software generates two files, wherein the diaglist file is generated by user checking, and contains the diagnosis items which the user wants to perform. The diagconfig file is a hardware descriptive file of an important module of the switch hardware device important bus. For example, first, a user selects two options of cpu and bmc, modifies a path between cpu and bmc as ethernet from a pre-template of a software directory, modifies a communication protocol between bmc and cpu, selects a test item, clicks creation, and generates a customization request. And analyzing the customization request to obtain the description feature number of the corresponding description file and the test feature number of the corresponding test script file.
S3, searching a first path of the description file of the target hardware and a second path of the target test script file corresponding to the target test item from the path list, and respectively calling the description file of the target hardware and the target test script file from the first path and the second path.
And (3) searching a corresponding storage path from the path list according to the description feature number and the test feature number analyzed in the step (S2), and calling a description file and a target test script file of corresponding target hardware from the corresponding storage path. Two files are used to generate the diagnostic program.
S4, calling the main program file, and generating a diagnostic program by using the main program file, the description file of the target hardware and the target test script file.
Because any diagnostic program needs to use the main program, in order to improve the reading efficiency of the main program file, the main program is stored in a cache in advance, and the main program file is called from the cache; packaging the main program file, the description file of the target hardware and the target test script file into the same program file package; and embedding the description file of the target hardware and the calling mode of the target test script file into corresponding positions of the main program file respectively. The calling mode can be a storage path and a file name, and the storage path is set as a homologous file.
As shown in fig. 2, the system 200 includes:
a basic construction unit 210, configured to pre-construct a test library, store test related files in the test library, where the test related files include a main program file, a plurality of test script files, and a description file of switch hardware, and aggregate storage paths of all the test related files in the test library into a path list;
a request parsing unit 220, configured to receive a customization request sent by a front end, and parse target hardware and a target test item from the customization request;
a path searching unit 230, configured to search a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and retrieve the description file of the target hardware and the target test script file from the first path and the second path, respectively;
the program generating unit 240 is configured to retrieve the main program file, and generate a diagnostic program using the main program file, the description file of the target hardware, and the target test script file.
Optionally, as an embodiment of the present invention, the basic building unit includes:
the first numbering module is used for respectively generating test feature numbers for the test script files, wherein the test feature numbers represent the hardware types and test items aimed by the test script files;
the second numbering module is used for generating description feature numbers for the description files of the switch hardware respectively, wherein the description feature numbers represent the hardware types and the test related configuration types of the description files;
the first storage module is used for storing the test feature numbers and the storage paths of the test script file in pairs to a path list;
and the second storage module is used for storing the description characteristic numbers of the description files and the storage paths in pairs into a path list.
Optionally, as an embodiment of the present invention, the request parsing unit includes:
the mapping establishing module is used for establishing a one-to-one mapping relation between the option number of the front-end human-computer interaction interface and the test feature number or the description feature number;
and the request analysis module is used for analyzing all option numbers from the customization request and converting the option numbers into test feature numbers or description feature numbers according to the mapping relation.
Alternatively, as an embodiment of the present invention, the program generating unit includes:
the file caching module is used for storing the main program in a cache in advance and calling the main program file from the cache;
the file packaging module is used for packaging the main program file, the description file of the target hardware and the target test script file into the same program file package;
and the calling embedding module is used for embedding the calling modes of the description file of the target hardware and the target test script file into corresponding positions of the main program file respectively.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the switch diagnostic program generating method according to the embodiment of the present invention.
The terminal 300 may include: a processor 310, a memory 320 and a communication unit 330. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the invention, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
The memory 320 may be used to store instructions for execution by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile memory terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The execution of the instructions in memory 320, when executed by processor 310, enables terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by running or executing software programs and/or modules stored in the memory 320, and invoking data stored in the memory. The processor may be comprised of an integrated circuit (Integrated Circuit, simply referred to as an IC), for example, a single packaged IC, or may be comprised of a plurality of packaged ICs connected to the same function or different functions. For example, the processor 310 may include only a central processing unit (Central Processing Unit, simply CPU). In the embodiment of the invention, the CPU can be a single operation core or can comprise multiple operation cores.
And a communication unit 330 for establishing a communication channel so that the storage terminal can communicate with other terminals. Receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium in which a program may be stored, which program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
Therefore, the invention realizes the preparation work of the basic files by pre-constructing the test library, storing the main program files, various test script files and the description files of the switch hardware in the test library, provides basic support for the diagnostic program, and gathers the storage paths of all the test related files in the test library into a path list; receiving a customizing request sent by a front end, and analyzing target hardware and target test items from the customizing request; then searching a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and respectively calling the description file of the target hardware and the target test script file from the first path and the second path; based on the main program file, the diagnosis program can be generated by using the main program file, the description file of the target hardware and the target test script file, and the automatic generation of the factory diagnosis program is realized. The invention realizes the development of switch diagnosis software customization, reduces the manpower input, reduces the error rate of programming, increases the production efficiency of factories, advances the implementation progress of switch projects, and the technical effects achieved by the embodiment can be seen from the description above and are not repeated here.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium such as a U-disc, a mobile hard disc, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, including several instructions for causing a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, system or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method for generating a diagnostic program for a switch, comprising:
pre-constructing a test library, storing test related files in the test library, wherein the test related files comprise main program files, various test script files and description files of switch hardware, and summarizing storage paths of all the test related files in the test library into a path list;
receiving a customization request sent by a front end, and analyzing target hardware and target test items from the customization request;
searching a first path of a description file of the target hardware and a second path of a target test script file corresponding to the target test item from the path list, and respectively calling the description file of the target hardware and the target test script file from the first path and the second path;
calling a main program file, and generating a diagnosis program by using the main program file, a description file of target hardware and a target test script file;
pre-constructing a test library, storing test related files in the test library, wherein the test related files comprise main program files, various test script files and description files of switch hardware, and summarizing storage paths of all the test related files in the test library into a path list, wherein the method comprises the following steps:
generating test feature numbers for the test script files respectively, wherein the test feature numbers represent the types of hardware and test items aimed at by the test script files;
generating description feature numbers for description files of the switch hardware respectively, wherein the description feature numbers represent hardware types and test related configuration types of the description files;
the test feature numbers and the storage paths of the test script files are stored in pairs to a path list;
storing the description characteristic numbers of the description files and the storage paths in pairs to a path list;
receiving a customization request sent by a front end, and analyzing target hardware and target test items from the customization request, wherein the customization request comprises the following steps:
establishing a one-to-one mapping relation between option numbers of the front-end human-computer interaction interface and test feature numbers or description feature numbers;
and analyzing all option numbers from the customization request, and converting the option numbers into test feature numbers or description feature numbers according to the mapping relation.
2. The method of claim 1, wherein retrieving the main program file, generating the diagnostic program using the main program file, the description file of the target hardware, and the target test script file, comprises:
storing a main program into a cache in advance, and calling the main program file from the cache;
packaging the main program file, the description file of the target hardware and the target test script file into the same program file package;
and embedding the description file of the target hardware and the calling mode of the target test script file into corresponding positions of the main program file respectively.
3. A switch diagnostic program generation system, comprising:
a basic construction unit for pre-constructing a test library, storing test related files in the test library
The test related files comprise main program files, various test script files and description files of switch hardware, and the storage paths of all the test related files in the test library are summarized into a path list;
the request analysis unit is used for receiving a customization request sent by the front end and analyzing target hardware and target test items from the customization request;
the path searching unit is used for searching a first path of the description file of the target hardware and a second path of the target test script file corresponding to the target test item from the path list, and respectively retrieving the description file of the target hardware and the target test script file from the first path and the second path;
the program generating unit is used for calling the main program file and generating a diagnosis program by utilizing the main program file, the description file of the target hardware and the target test script file;
the foundation construction unit includes:
the first numbering module is used for respectively generating test feature numbers for the test script files, wherein the test feature numbers represent the hardware types and test items aimed by the test script files;
the second numbering module is used for generating description feature numbers for the description files of the switch hardware respectively, wherein the description feature numbers represent the hardware types and the test related configuration types of the description files;
the first storage module is used for storing the test feature numbers and the storage paths of the test script file in pairs to a path list;
the second storage module is used for storing the description characteristic numbers of the description files and the storage paths in pairs to a path list;
the request parsing unit includes:
the mapping establishing module is used for establishing a one-to-one mapping relation between the option number of the front-end human-computer interaction interface and the test feature number or the description feature number;
and the request analysis module is used for analyzing all option numbers from the customization request and converting the option numbers into test feature numbers or description feature numbers according to the mapping relation.
4. A system according to claim 3, wherein the program generating unit comprises:
the file caching module is used for storing the main program in a cache in advance and calling the main program file from the cache;
the file packaging module is used for packaging the main program file, the description file of the target hardware and the target test script file into the same program file package;
and the calling embedding module is used for embedding the calling modes of the description file of the target hardware and the target test script file into corresponding positions of the main program file respectively.
5. A terminal, comprising:
a processor;
a memory for storing execution instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-2.
6. A computer-readable storage medium storing a computer program, characterized in that the program
The method of any of claims 1-2 when executed by a processor.
CN202110994484.6A 2021-08-27 2021-08-27 Method, system, terminal and storage medium for generating switch diagnostic program Active CN113852516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110994484.6A CN113852516B (en) 2021-08-27 2021-08-27 Method, system, terminal and storage medium for generating switch diagnostic program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110994484.6A CN113852516B (en) 2021-08-27 2021-08-27 Method, system, terminal and storage medium for generating switch diagnostic program

Publications (2)

Publication Number Publication Date
CN113852516A CN113852516A (en) 2021-12-28
CN113852516B true CN113852516B (en) 2023-06-02

Family

ID=78976320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110994484.6A Active CN113852516B (en) 2021-08-27 2021-08-27 Method, system, terminal and storage medium for generating switch diagnostic program

Country Status (1)

Country Link
CN (1) CN113852516B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05250217A (en) * 1992-02-06 1993-09-28 Nec Corp Automatic test procedure generating device for switchboard software
CN107888459A (en) * 2017-12-13 2018-04-06 北京卓越信通电子股份有限公司 A kind of industrial switch automatic test platform and method of testing
CN112286829A (en) * 2020-12-29 2021-01-29 卡斯柯信号(北京)有限公司 Test script generation method and device
CN112422361A (en) * 2020-10-16 2021-02-26 浪潮思科网络科技有限公司 Switch testing method, device and medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100365588C (en) * 2004-03-16 2008-01-30 鸿富锦精密工业(深圳)有限公司 Rapid diagnosis testing system and method for computer hardware
US7681079B2 (en) * 2007-02-26 2010-03-16 Oracle International Corporation Diagnostic test sets
US9489277B2 (en) * 2012-11-07 2016-11-08 Software Development Technologies Application component testing
CN106874191B (en) * 2017-01-03 2020-07-14 深圳前海大数金融服务有限公司 Intelligent database execution method and system
CN111026096B (en) * 2019-12-30 2020-10-30 华人运通(江苏)技术有限公司 Vehicle diagnosis method, apparatus, system, device and computer readable storage medium
CN111258900A (en) * 2020-01-17 2020-06-09 深圳壹账通智能科技有限公司 Interface test script generation method, system, equipment and storage medium
CN111338964B (en) * 2020-02-29 2023-01-10 苏州浪潮智能科技有限公司 Ordered batch test method, system, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05250217A (en) * 1992-02-06 1993-09-28 Nec Corp Automatic test procedure generating device for switchboard software
CN107888459A (en) * 2017-12-13 2018-04-06 北京卓越信通电子股份有限公司 A kind of industrial switch automatic test platform and method of testing
CN112422361A (en) * 2020-10-16 2021-02-26 浪潮思科网络科技有限公司 Switch testing method, device and medium
CN112286829A (en) * 2020-12-29 2021-01-29 卡斯柯信号(北京)有限公司 Test script generation method and device

Also Published As

Publication number Publication date
CN113852516A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
US11102097B2 (en) Communication between independent containers
US7751392B1 (en) Customer link diversity monitoring
CN107592238A (en) Automatic test approach and system, service terminal, the memory of interface
CN113010378B (en) Log processing method and device of microservice module, storage medium and electronic device
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN104991821A (en) Monitor task batch processing method and apparatus
CN112732572A (en) Service testing method, device and system, storage medium and electronic device
CN114363144B (en) Fault information association reporting method and related equipment for distributed system
CN114510452A (en) SOC (System on chip) integration method and device and electronic equipment
CN109344075A (en) Configuration method, test method, configuration server and service node device
CN109857391A (en) Processing method and processing device, storage medium and the electronic device of data
CN114501501A (en) Configuration management method, device, equipment and medium for mobile communication network target range
CN115913937A (en) Container multi-network-card network configuration method, device, equipment and storage medium
CN105245622A (en) Configurable data processing method and system and mobile platform
CN113852516B (en) Method, system, terminal and storage medium for generating switch diagnostic program
CN115705190A (en) Method and device for determining dependence degree
CN108573171A (en) Greenplum data desensitization method, device, equipment and medium
CN110275701A (en) Data processing method, device, medium and calculating equipment
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN110147294A (en) Acquisition methods, device, terminal and the computer readable storage medium of Debugging message
CN109788010A (en) A kind of method and apparatus of data localization access
CN114090074A (en) Method and device for configuring operating environment, storage medium and electronic device
CN112612474A (en) Product transplanting method and device, storage medium and electronic equipment
CN110262846A (en) Interface loading method, system, computer equipment and storage medium based on module
CN112950257B (en) Data use price calculating method, device, computer equipment and storage medium

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