CN116841881A - High-speed cable testing method, system, device, computer equipment and storage medium - Google Patents

High-speed cable testing method, system, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116841881A
CN116841881A CN202310787079.6A CN202310787079A CN116841881A CN 116841881 A CN116841881 A CN 116841881A CN 202310787079 A CN202310787079 A CN 202310787079A CN 116841881 A CN116841881 A CN 116841881A
Authority
CN
China
Prior art keywords
test
code
unit
module
speed cable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310787079.6A
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 CN202310787079.6A priority Critical patent/CN116841881A/en
Publication of CN116841881A publication Critical patent/CN116841881A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis

Abstract

The invention relates to the technical field of computer software, and discloses a high-speed cable testing method, a system, a device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring a target component selected by a target user, an execution sequence of the target component and required parameters, wherein the target component is an encapsulated object for realizing high-speed cable test through interface call; constructing test case information of the high-speed cable according to the target assembly, the execution sequence and the required parameters; generating a test code according to the test case information; executing the test code to obtain a test result, and visually displaying the test result. The invention solves the problems that the display mode of the test result is not visual and the programming technical requirement on the tester is too high.

Description

High-speed cable testing method, system, device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of computer software, in particular to a high-speed cable testing method, a system, a device, computer equipment and a storage medium.
Background
Along with the increase of the transmission rate of the high-speed serial interface, the transmission loss of the printed circuit board medium is increased, and in order to meet the data transmission requirements of high-speed and long distance, a high-speed active cable, namely a high-speed cable, is arranged. In order to ensure that various data of the server meet design indexes, the high-speed cable needs to be tested. Three modes of testing the high-speed cable currently exist, the first mode is based on the fact that the re-timing chip drive of a manufacturer is determined, different testing scenes are constructed by combining the connection mode of the high-speed cable, and testing functions are achieved; the second is to write a simple test script, check test data and realize a test function; and thirdly, writing a special client test program to realize the test of the high-speed cable.
However, the first method is that the re-timing chip driving of each manufacturer is very different, the interface usage modes are different, and how to construct the test scene or adjust the sub-links in the test scene based on the interface usage modes, which puts high demands on the programming technology of the testers. The test script written by the second method has simple function and limited test capability, the generated test result is a common log, and the display mode is not visual. The third method writes a special client program, which has long time consumption, high cost and high programming technical requirement for testers.
Therefore, the prior art has the problems that the display mode of the test result is not visual and the programming technical requirement on the tester is too high.
Disclosure of Invention
In view of the above, the invention provides a high-speed cable testing method, a system, a device, a computer device and a storage medium, which are used for solving the problems of non-visual display mode of a testing result and excessively high programming technical requirements for testers in the prior art.
In a first aspect, the present invention provides a method for testing a high-speed cable, the method comprising:
acquiring a target component selected by a target user, an execution sequence of the target component and required parameters, wherein the target component is an encapsulated object for realizing high-speed cable test through interface call;
Constructing test case information of the high-speed cable according to the target assembly, the execution sequence and the required parameters;
generating a test code according to the test case information;
executing the test code to obtain a test result, and visually displaying the test result.
According to the high-speed cable testing method, the test case of the high-speed cable is constructed by acquiring the target assembly selected by the target user, the execution sequence of the target assembly and the required parameters, the test code is generated according to the test case, the test code is executed, and the visual display is carried out on the test result. The method has the advantages of simple, efficient and flexible test process, short time for generating test codes, high test efficiency, visual data display, low programming technical requirements on personnel and convenient use. The method solves the problems that the display mode of the test result is not visual and the programming technical requirement on the tester is too high.
In an alternative embodiment, generating test code from test case information includes:
analyzing the test case information to obtain corresponding component interface calling information and a parameter list;
constructing executable code fragments according to a preset code template, component interface calling information and a parameter list;
And combining the executable code segments to obtain the test code.
In this embodiment, the test case information is parsed, and a test code is finally generated according to the parsing result and a preset code template. The time for generating the test code is short, the programming technical requirement on the testers is low, and the efficiency of testing the high-speed cable is improved.
In an alternative embodiment, executing the test code to obtain a test result, and visually displaying the test result includes:
creating environment variables corresponding to the test codes, wherein the environment variables are used for determining parameters required by executing the test codes;
based on environment variables, executing test codes to obtain intermediate test results, wherein the intermediate test results cannot be visually displayed and are required to be subjected to format conversion;
converting the intermediate test result into a preset data format to obtain a test result;
generating visual display content according to the test result;
acquiring an adjustment instruction of visual display content;
and adjusting the visual display content according to the adjustment instruction, and visually displaying the adjusted visual display content.
In the embodiment, a test code is executed to obtain a test result; and visually displaying the test result, and adjusting the visual display content according to an adjustment instruction of a user. The method has the effects of visual data display and convenient use.
In an alternative embodiment, before acquiring the target component selected by the target user, the execution sequence of the target component, and the required parameters, the method further includes:
acquiring a plurality of retiming chip drives and a plurality of test scenes corresponding to the high-speed cable;
determining a driver call interface of the retiming chip driver;
performing function classification on the retiming chip driver to obtain a second number of function categories, and generating a first visual graph corresponding to the function categories;
determining input, output and use limitation of the test scene, and generating a second visual graph corresponding to the test scene;
and obtaining the assembly according to the retiming chip driver, the driver call interface, the first visual graph, the second visual graph, the test scene, the input, the output and the use limit.
In this embodiment, a plurality of retimed chip drivers and a plurality of test scenarios used in the high-speed cable test process are packaged as components, and the components may be subsequently graphically displayed or test codes may be generated according to the components. The high-speed cable testing method has the advantages that the high-speed cable testing process is more efficient and convenient, the expandability is strong, and the programming technical requirements for testers are reduced.
In a second aspect, the present invention provides a high-speed cable testing system comprising: the system comprises a user interaction module, a code generation module, a test execution module and a component library management module;
the component library management module is used for packaging a plurality of retiming chip drivers and a plurality of test scenes corresponding to the high-speed cable into a first number of components and providing interfaces for the user interaction module and the code generation module;
the user interaction module is connected with the component library management module and is used for calling an interface provided by the component library management module and visually displaying the component;
the user interaction module is connected with the code generation module and is used for constructing test case information of the high-speed cable according to the target assembly selected by a user, the execution sequence of the target assembly and the required parameters and sending the test case information to the code generation module;
the code generation module is connected with the test execution module and is used for generating test codes according to the test case information and sending the test codes to the test execution module;
the test execution module is connected with the user interaction module and is used for executing the test code to obtain a test result, sending the test result to the user interaction module and visually displaying the test result through the user interaction module.
The high-speed cable test system provided by the embodiment designs a series of functional modules and packages the retimed chip drive and test scene into a plurality of components. Through coordination among the functional modules, when testing the high-speed cable, a test code can be automatically generated only by simple component dragging and setting, the system automatically executes the test code to obtain a test result, and the test result is visually displayed. The method has the advantages of visual data display, short time for generating test scripts or program codes, low cost, strong expansibility, low technical requirements on personnel programming and convenient use. The method solves the problems that the display mode of the test result is not visual and the programming technical requirement on the tester is too high.
In an alternative embodiment, the user interaction module includes a test flow design unit, and the code generation module includes a flow parsing unit;
the test flow design unit is connected with the flow analysis unit and is used for calling an interface provided by the component library management module, visually displaying the components, constructing test case information according to the target components, the execution sequence and the required parameters and sending the test case information to the flow analysis unit.
In this embodiment, the test flow design unit performs visual display on the components, obtains the target component selected by the target user, the execution sequence of the target component, and the required parameters, and constructs the test case of the high-speed cable. The test code is generated according to the test cases so as to achieve the effects of simple, efficient and flexible test process, short test code generation time, low programming technical requirements on personnel and convenient use.
In an alternative embodiment, the code generating module comprises a code template unit, a flow parsing unit and a code generating unit, and the test executing module comprises an executing unit;
the code template unit is connected with the flow analysis unit and is used for transmitting a preset code template to the flow analysis unit;
the flow analysis unit is connected with the code generation unit and is used for analyzing the test case information to obtain corresponding component interface calling information and a parameter list, constructing executable code fragments according to a preset code template, the component interface calling information and the parameter list, and transmitting the executable code fragments to the code generation unit;
the code generation unit is connected with the execution unit and is used for combining the executable code segments to obtain test codes and sending the test codes to the execution unit.
In this embodiment, the flow parsing unit parses the test case information, generates executable code fragments according to the parsing result and a preset code template, and then combines the executable code fragments into a test code by the code generating unit. The time for generating the test code is short, the programming technical requirement on the testers is low, and the efficiency of testing the high-speed cable is improved.
In an alternative embodiment, the test execution module comprises an execution unit and a result analysis unit, and the user interaction module comprises a test result visualization unit;
the execution unit is connected with the result analysis unit and is used for creating an environment variable corresponding to the test code, executing the test code based on the environment variable to obtain an intermediate test result, and transmitting the intermediate test result to the result analysis unit, wherein the environment variable is used for determining parameters required by executing the test code, and the intermediate test result cannot be visually displayed and needs format conversion;
the result analysis unit is connected with the test result visualization unit and is used for converting the intermediate test result into a preset data format to obtain a test result and sending the test result to the test result visualization unit;
The test result visualization unit is used for generating visual display contents according to the test results, acquiring adjustment instructions of the visual display contents, adjusting the visual display contents according to the adjustment instructions, and performing visual display on the adjusted visual display contents.
In this embodiment, the execution unit executes the test code to obtain an intermediate test result, the result analysis unit performs format conversion to obtain a test result, and the test result is visually displayed by the test result visualization unit, and the visual display content is adjusted according to the adjustment instruction of the user. The method has the effects of visual data display and convenient use.
In a third aspect, the present invention provides a high-speed cable testing device, comprising:
the first acquisition module is used for acquiring a target component selected by a target user, an execution sequence of the target component and required parameters, wherein the target component is an encapsulated object for realizing high-speed cable test through interface call;
the construction module is used for constructing test case information of the high-speed cable according to the target assembly, the execution sequence and the required parameters;
the generating module is used for generating test codes according to the test case information;
And the display module is used for executing the test codes, obtaining test results and visually displaying the test results.
In a fourth aspect, the present invention provides a computer device comprising: the high-speed cable testing device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the high-speed cable testing method according to the first aspect or any implementation mode corresponding to the first aspect is executed.
In a fifth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform the high-speed cable test method of the first aspect or any one of its corresponding embodiments.
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 needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a high-speed cable testing method according to an embodiment of the invention;
FIG. 2 is a block diagram of a high-speed cable test system according to an embodiment of the present invention;
FIG. 3 is a block diagram of a high-speed cable testing device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments 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 some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The high-speed active cable (hereinafter referred to as high-speed cable) transmits data, and the high-speed active cable depends on retiming chips produced by different manufacturers to compensate for loss in data transmission. When designing the server, because of different demands, the types and the connection modes of the high-speed cables between the internal boards are various, and in order to ensure that each item of data of the server accords with the design index, the test of the high-speed cables becomes a key link. At present, for testing a high-speed cable, different testing scenes can be constructed by combining a re-timing chip driver of a manufacturer and a connection mode of the high-speed cable, for example: a transmission-reception type MCIO (Mini Cool Edge IO, cable connector) cable, a transmission-transmission line-sequence reverse-sequence cable, a transmission-transmission line-sequence positive-sequence cable, and the like, to realize the test of the high-speed cable. Or by writing simple test scripts, checking the test data of the test scripts. And then or writing a special client test program to realize the test function. The test mode has the problems of non-visual data display mode, poor expansibility of the re-timing chip drive of different manufacturers, long time for writing special client test programs, high cost, poor flexibility, high programming technical requirements on testers and the like.
The problems can be solved by a low-code development platform which can quickly generate application programs without coding or by a small amount of codes, and the purpose of reducing development time is achieved by multiplexing the codes. In addition, through visual development of the application program, developers with different experience levels can create web pages and mobile application programs on a graphical application program user interface by dragging components and setting model-driven logic. The method has the advantages of high program generating efficiency, strong function expansibility, rich user interface, low programming technical requirement on personnel, convenient use and the like.
Based on the problems in the current high-speed cable testing method, the method combines the advantages of the low-code development platform technology. The embodiment of the invention provides a high-speed cable testing method, which designs a series of functional modules based on a low-code development technology, and can automatically generate a testing script or program code by only carrying out simple component dragging and setting when testing a high-speed cable through coordination among the functional modules, the system automatically executes the testing script or program code to obtain a testing result, and the testing result is expressed in a visual graph mode, and when a new manufacturer re-times chip driving to be supported, the testing result is only added into the functional modules according to a set standard. The method has the advantages of visual data display, short time for generating test scripts or program codes, low cost, strong expansibility, low technical requirements on personnel programming and convenient use.
According to an embodiment of the present invention, a high-speed cable testing method is provided, and it should be noted that, the steps shown in the flowchart of the accompanying drawings may be executed in an intelligent terminal with data processing capability, for example: computer, and although a logical order is depicted in the flowchart, in some cases the steps shown or described may be performed in a different order than presented herein.
In this embodiment, a high-speed cable testing method is provided, which may be used in the above-mentioned intelligent terminal such as a computer, and fig. 1 is a flowchart of the high-speed cable testing method according to an embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
step S101, a target component selected by a target user, an execution sequence of the target component and required parameters are obtained, wherein the target component is an encapsulated object for realizing high-speed cable test through interface call.
Specifically, the invention drives the re-timing chips of different manufacturers by defining component specifications, classifies, abstracts and packages sub-links of different test scene execution processes into components, and can call each component through an interface to realize testing of a high-speed cable, and the called components can be graphically displayed on a graphical display interface.
When a tester builds a high-speed cable test case of a specific scene and tests a high-speed cable, a target component is selected by dragging related components on a graphical display interface, required parameters of the target component are set, the execution sequence of the target component is set by setting a connecting line, and the process is similar to drawing a flow chart.
Step S102, test case information of the high-speed cable is constructed according to the target component, the execution sequence and the required parameters.
Step S103, generating test codes according to the test case information.
Specifically, according to the target component, the execution sequence of the target component, and the required parameters in step S101, test case information of the high-speed cable is constructed, and a test code is generated according to the test case information, for example: executable test scripts or program code.
Step S104, executing the test code to obtain a test result, and visually displaying the test result.
Specifically, the test code generated in step S103 is executed to obtain a test result for the high-speed cable, and the test result is visually displayed on the graphical display interface.
According to the high-speed cable testing method, the test case of the high-speed cable is constructed by acquiring the target assembly selected by the target user, the execution sequence of the target assembly and the required parameters, the test code is generated according to the test case, the test code is executed, and the visual display is carried out on the test result. The method has the advantages of simple, efficient and flexible test process, short time for generating test codes, high test efficiency, visual data display, low programming technical requirements on personnel and convenient use. The method solves the problems that the display mode of the test result is not visual and the programming technical requirement on the tester is too high.
In some alternative embodiments, generating test code from test case information includes:
analyzing the test case information to obtain corresponding component interface calling information and a parameter list;
constructing executable code fragments according to a preset code template, component interface calling information and a parameter list;
and combining the executable code segments to obtain the test code.
Specifically, analyzing the test case information, and analyzing each process of the test case into corresponding component interface calling information and parameter list. The invention sets corresponding preset code templates for different programming language grammars. Based on a preset code template, component interface calling information, parameter list and the like are constructed into executable actual code units according to specific programming language grammar, namely executable code fragments. All executable code fragments are ultimately combined into test code, for example: and the script or the execution code can be executed, and execution result processing logic is added for the test code, so that the test case can be executed, and the result can be analyzed and read.
In this embodiment, the test case information is parsed, and a test code is finally generated according to the parsing result and a preset code template. The time for generating the test code is short, the programming technical requirement on the testers is low, and the efficiency of testing the high-speed cable is improved.
In some alternative embodiments, executing the test code to obtain a test result, and visually displaying the test result includes:
creating environment variables corresponding to the test codes, wherein the environment variables are used for determining parameters required by executing the test codes;
based on environment variables, executing test codes to obtain intermediate test results, wherein the intermediate test results cannot be visually displayed and are required to be subjected to format conversion;
converting the intermediate test result into a preset data format to obtain a test result;
generating visual display content according to the test result;
acquiring an adjustment instruction of visual display content;
and adjusting the visual display content according to the adjustment instruction, and visually displaying the adjusted visual display content.
Specifically, after the test code is generated, the necessary environment variables for the test code are created to determine the parameters required to execute the test code. Based on the environment variables, the test code is executed to obtain an intermediate test result, because the test result is required to be visually displayed finally, and because the result obtained by executing the test code cannot be visually displayed, the result is required to be subjected to format conversion, which is called as an intermediate test result herein.
Analyzing the intermediate test result, and converting the intermediate test result into a preset data format to obtain the test result, wherein the preset data format is a data format which can be displayed on a graphical display interface.
And generating visual display contents such as tables, images, forms, tree diagrams and the like according to the test results. The user can adjust the visual display content, at this time, an adjustment instruction for the visual display content is generated, the visual display content is adjusted according to the adjustment instruction, and the adjusted visual display content is visually displayed and a test report is exported.
In the embodiment, a test code is executed to obtain a test result; and visually displaying the test result, and adjusting the visual display content according to an adjustment instruction of a user. The method has the effects of visual data display and convenient use.
In some alternative embodiments, before acquiring the target component selected by the target user, the execution order of the target component, and the required parameters, the method further includes:
acquiring a plurality of retiming chip drives and a plurality of test scenes corresponding to the high-speed cable;
determining a driver call interface of the retiming chip driver;
Performing function classification on the retiming chip driver to obtain a second number of function categories, and generating a first visual graph corresponding to the function categories;
determining input, output and use limitation of the test scene, and generating a second visual graph corresponding to the test scene;
and obtaining the assembly according to the retiming chip driver, the driver call interface, the first visual graph, the second visual graph, the test scene, the input, the output and the use limit.
Specifically, the invention classifies, abstracts and defines the retiming chip drive, test scene and the like of different manufacturers used in the high-speed cable test process, manages in a component library mode, provides an interface externally, can call the components through the interface, and graphically displays the components or generates test codes according to the components.
The method comprises the following specific steps: and acquiring retiming chip driving and testing scenes of a plurality of manufacturers corresponding to the high-speed cable. For the retiming chip drivers of different manufacturers, a unified retiming chip driver call interface is defined in consideration of system expansion. The re-timing chip drivers are subjected to function classification to obtain a second number of function categories, unified graphic display modes are defined for the re-timing chip drivers with the same functions, namely, a first visual graphic corresponding to each function category is generated, so that all connected manufacturer drivers are exposed to the outside through standard interfaces and unified graphics, the consistency of the mode of graphical display is ensured, the consistency of calling modes in the process of generating test codes is ensured, the second number represents a plurality, and specific number limitation is not adopted. For different test scenes or connection modes, definite input, output and use limits are defined, different patterns are exposed to the outside, namely, the input, output and use limits of the test scenes are determined, and a second visual pattern corresponding to the test scenes is generated. And obtaining the assembly according to the retiming chip driver, the driver call interface, the first visual graph, the second visual graph, the test scene, the input, the output and the use limit. The tester drags various components on the graphic display interface, sets parameters, connects wires and the like, and the system correspondingly calls a driver interface of a re-timing chip of a manufacturer in the background, plans a test scene, sets scene operation parameters and execution sequences, and forms a graphic record of the test case.
In addition, when the re-timing chip driving and testing scene of a new manufacturer needs to be supported, the re-timing chip driving and testing scene is only required to be packaged into components according to the process and added into a component library.
In this embodiment, a plurality of retimed chip drivers and a plurality of test scenarios used in the high-speed cable test process are packaged as components, and the components may be subsequently graphically displayed or test codes may be generated according to the components. The high-speed cable testing method has the advantages that the high-speed cable testing process is more efficient and convenient, the expandability is strong, and the programming technical requirements for testers are reduced.
It should be noted that, the technical scheme disclosed by the invention not only can test the high-speed cable, but also can be used for other testing processes of the server, provided that the conditions and sub-processes required in the testing process can be classified and abstracted to be managed in a component mode.
In this embodiment, a high-speed cable testing system is provided, which may be deployed in the above-mentioned intelligent terminal such as a computer, and the system includes: the system comprises a user interaction module, a code generation module, a test execution module and a component library management module;
the component library management module is used for packaging a plurality of retiming chip drivers and a plurality of test scenes corresponding to the high-speed cable into a first number of components and providing interfaces for the user interaction module and the code generation module;
The user interaction module is connected with the component library management module and is used for calling an interface provided by the component library management module and visually displaying the component;
the user interaction module is connected with the code generation module and is used for constructing test case information of the high-speed cable according to the target assembly selected by a user, the execution sequence of the target assembly and the required parameters and sending the test case information to the code generation module;
the code generation module is connected with the test execution module and is used for generating test codes according to the test case information and sending the test codes to the test execution module;
the test execution module is connected with the user interaction module and is used for executing the test code to obtain a test result, sending the test result to the user interaction module and visually displaying the test result through the user interaction module.
Specifically, fig. 2 is a block diagram of a high-speed cable testing system according to an embodiment of the present invention, and as shown in fig. 2, the system includes: the system comprises a user interaction module, a code generation module, a test execution module and a component library management module.
The component library management module drives the re-timing chips of different manufacturers through defining component specifications, classifies, abstracts and packages sub-links of the execution process of different test scenes into a first number of components, and provides interfaces for the user interaction module and the code generation module. As shown in fig. 2, the component library management module provides an interface to the user interaction module and the code generation module.
The user interaction module is connected with the component library management module and used for calling an interface provided by the component library management module and visually displaying the component. The user interaction module is connected with the code generation module, a tester drags related components through the user interaction module, selects target components, sets required parameters of the target components, sets the execution sequence of the target components through setting connection lines, and then efficiently constructs test case information of the high-speed cable according to the target components selected by the user, the execution sequence of the target components and the required parameters and sends the test case information to the code generation module. As shown in fig. 2, the user interaction module provides use case information to the code generation module.
The code generating module is connected with the test executing module and is used for determining a test flow designed by a user according to the test case information and generating test codes on the basis of providing an interface by calling the component library management module, for example: executable test scripts or program code for execution by the test execution module. As shown in FIG. 2, the code generation module provides executable scripts or program code to the test execution module.
The test execution module is connected with the user interaction module and is used for executing the received test codes to obtain test results, sending the test results to the user interaction module and visually displaying the test results through the user interaction module. As shown in fig. 2, the test execution module provides test result data to the user interaction module.
The high-speed cable test system provided by the embodiment designs a series of functional modules and packages the retimed chip drive and test scene into a plurality of components. Through coordination among the functional modules, when testing the high-speed cable, a test code can be automatically generated only by simple component dragging and setting, the system automatically executes the test code to obtain a test result, and the test result is visually displayed. The method has the advantages of visual data display, short time for generating test scripts or program codes, low cost, strong expansibility, low technical requirements on personnel programming and convenient use. The method solves the problems that the display mode of the test result is not visual and the programming technical requirement on the tester is too high.
In some optional embodiments, the user interaction module includes a test flow design unit, and the code generation module includes a flow parsing unit;
The test flow design unit is connected with the flow analysis unit and is used for calling an interface provided by the component library management module, visually displaying the components, constructing test case information according to the target components, the execution sequence and the required parameters and sending the test case information to the flow analysis unit.
Specifically, as shown in fig. 2, the user interaction module includes a test flow design unit, and the code generation module includes a flow analysis unit.
And the test flow design unit visually displays the components in a graphical interface mode by calling an interface provided by the component library management module. When a high-speed cable test case in a specific scene is constructed, a tester drags related components through a user interaction module, selects target components, sets required parameters of the target components, and sets the execution sequence of the target components through setting connection lines. And the test flow design unit is used for efficiently constructing test case information of the high-speed cable according to the target assembly selected by the user, the execution sequence of the target assembly and the required parameters.
The test flow design unit is connected with the flow analysis unit, and sends test case information reflecting the user to construct a test flow to the flow analysis unit, and executable test codes are generated by the test case information. As shown in fig. 2, the test flow design unit provides use case information to the flow resolution unit.
In this embodiment, the test flow design unit performs visual display on the components, obtains the target component selected by the target user, the execution sequence of the target component, and the required parameters, and constructs the test case of the high-speed cable. The test code is generated according to the test cases so as to achieve the effects of simple, efficient and flexible test process, short test code generation time, low programming technical requirements on personnel and convenient use.
In some optional embodiments, the code generation module includes a code template unit, a flow parsing unit, and a code generation unit, and the test execution module includes an execution unit;
the code template unit is connected with the flow analysis unit and is used for transmitting a preset code template to the flow analysis unit;
the flow analysis unit is connected with the code generation unit and is used for analyzing the test case information to obtain corresponding component interface calling information and a parameter list, constructing executable code fragments according to a preset code template, the component interface calling information and the parameter list, and transmitting the executable code fragments to the code generation unit;
the code generation unit is connected with the execution unit and is used for combining the executable code segments to obtain test codes and sending the test codes to the execution unit.
Specifically, as shown in fig. 2, the code generating module includes a code template unit, a flow parsing unit, and a code generating unit, and the test executing module includes an executing unit.
The code template unit is matched with the unified definition of the component interfaces in the component library management module, and corresponding preset code templates are set for different programming language grammars. The code template unit is connected with the flow analysis unit and is used for transmitting the preset code template to the flow analysis unit. As shown in fig. 2, the code template unit provides the code template to the flow parsing unit.
The flow analysis unit is used for receiving the test case information transmitted by the user interaction module, calling an interface provided by the component library management module, analyzing the test case information, analyzing each process of the test case into corresponding component interface calling information and a parameter list, and constructing the component interface calling information, the parameter list and the like into executable actual code units according to specific programming language grammar according to a preset code template, namely executable code fragments. The flow analysis unit is connected with the code generation unit and transmits the executable code fragments to the code generation unit. As shown in fig. 2, the flow parsing unit provides executable code slices to the code generation unit.
The code generating unit finally combines the executable code segments provided by the flow parsing unit into test code, for example: and the script or the execution code can be executed, and execution result processing logic is added for the test code, so that the test code can be executed, and the result can be read in an analyzing way. The code generating unit is connected with the executing unit and sends the test code to the executing unit. As shown in fig. 2, the code generation unit provides executable scripts or executable code to the execution unit.
The content is combined with a low-code development platform technology, components are displayed to a user in a graphical mode, the components are managed in a standard interface in a system background, a code template is used for generating test codes, the code multiplexing degree is high, and the generation speed is high.
In this embodiment, the flow parsing unit parses the test case information, generates executable code fragments according to the parsing result and a preset code template, and then combines the executable code fragments into a test code by the code generating unit. The time for generating the test code is short, the programming technical requirement on the testers is low, and the efficiency of testing the high-speed cable is improved.
In some optional embodiments, the test execution module includes an execution unit and a result parsing unit, and the user interaction module includes a test result visualization unit;
The execution unit is connected with the result analysis unit and is used for creating an environment variable corresponding to the test code, executing the test code based on the environment variable to obtain an intermediate test result, and transmitting the intermediate test result to the result analysis unit, wherein the environment variable is used for determining parameters required by executing the test code, and the intermediate test result cannot be visually displayed and needs format conversion;
the result analysis unit is connected with the test result visualization unit and is used for converting the intermediate test result into a preset data format to obtain a test result and sending the test result to the test result visualization unit;
the test result visualization unit is used for generating visual display contents according to the test results, acquiring adjustment instructions of the visual display contents, adjusting the visual display contents according to the adjustment instructions, and performing visual display on the adjusted visual display contents.
Specifically, as shown in fig. 2, the test execution module includes an execution unit and a result analysis unit, and the user interaction module includes a test result visualization unit.
The execution unit receives the test code output by the code generation module, and creates the necessary environment variables of the test code to determine the parameters required for executing the test code. Based on the environment variable, executing the test code to obtain an intermediate test result, wherein the intermediate test result cannot be visually displayed and needs to be subjected to format conversion. The execution unit is connected with the result analysis unit and transmits the intermediate test result to the result analysis unit.
The result analysis unit analyzes the intermediate test result and converts the intermediate test result into a preset data format to obtain the test result, wherein the preset data format is a data format which can be displayed on a graphical display interface. The result analysis unit is connected with the test result visualization unit and sends the test result to the test result visualization unit. As shown in fig. 2, the result parsing unit provides test result data to the test result visualizing unit.
And the test result visualization unit generates visual display contents such as a table, an image, a form, a tree diagram and the like according to the test result. The user can adjust the visual display content, at this time, an adjustment instruction for the visual display content is generated, the visual display content of the test result is adjusted by the visual unit according to the adjustment instruction, and the adjusted visual display content is visually displayed and a test report is exported.
In this embodiment, the execution unit executes the test code to obtain an intermediate test result, the result analysis unit performs format conversion to obtain a test result, and the test result is visually displayed by the test result visualization unit, and the visual display content is adjusted according to the adjustment instruction of the user. The method has the effects of visual data display and convenient use.
In this embodiment, a high-speed cable testing device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a high-speed cable testing device, as shown in fig. 3, including:
the first obtaining module 301 is configured to obtain a target component selected by a target user, an execution sequence of the target component, and a required parameter, where the target component is an encapsulated object for implementing a high-speed cable test through interface call;
the construction module 302 is configured to construct test case information of the high-speed cable according to the target component, the execution sequence and the required parameters;
a generating module 303, configured to generate a test code according to the test case information;
and the display module 304 is used for executing the test code, obtaining a test result, and visually displaying the test result.
In some alternative embodiments, the generating module 303 includes:
The first obtaining unit is used for analyzing the test case information to obtain corresponding component interface calling information and a parameter list;
the construction unit is used for constructing executable code fragments according to the preset code template, the component interface calling information and the parameter list;
and the combining unit is used for combining the executable code fragments to obtain the test code.
In some alternative embodiments, presentation module 304 includes:
the system comprises a creation unit, a test code generation unit and a test code generation unit, wherein the creation unit is used for creating an environment variable corresponding to the test code, and the environment variable is used for determining parameters required by executing the test code;
the second obtaining unit is used for executing the test code based on the environment variable to obtain an intermediate test result, wherein the intermediate test result cannot be visually displayed and needs format conversion;
the conversion unit is used for converting the intermediate test result into a preset data format to obtain a test result;
the generating unit is used for generating visual display content according to the test result;
the acquisition unit is used for acquiring an adjustment instruction of the visual display content;
the display unit is used for adjusting the visual display content according to the adjustment instruction and visually displaying the adjusted visual display content.
In some alternative embodiments, the apparatus further comprises:
the second acquisition module is used for acquiring a plurality of retiming chip drives and a plurality of test scenes corresponding to the high-speed cable;
the first determining module is used for determining a drive calling interface of the retiming chip drive;
the classifying module is used for functionally classifying the retiming chip driver to obtain a second number of functional categories and generating a first visual graph corresponding to the functional categories;
the second determining module is used for determining input, output and use limitation of the test scene and generating a second visual graph corresponding to the test scene;
the obtaining module is used for obtaining the assembly according to the retiming chip driver, the driver calling interface, the first visual graph, the second visual graph, the test scene, the input and output and the use limit.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The high-speed cable testing device in this embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit ) circuits, processors and memories executing one or more software or firmware programs, and/or other devices that can provide the above-described functionality.
The embodiment of the invention also provides computer equipment, which is provided with the high-speed cable testing device shown in the figure 3.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 4, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 4.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (11)

1. A method of testing a high-speed cable, the method comprising:
acquiring a target component selected by a target user, an execution sequence of the target component and required parameters, wherein the target component is a packaged object for realizing high-speed cable test through interface call;
constructing test case information of the high-speed cable according to the target assembly, the execution sequence and the required parameters;
generating a test code according to the test case information;
executing the test code to obtain a test result, and visually displaying the test result.
2. The method of claim 1, wherein the generating test code from the test case information comprises:
analyzing the test case information to obtain corresponding component interface calling information and a parameter list;
constructing executable code fragments according to a preset code template, the component interface calling information and the parameter list;
And combining the executable code segments to obtain the test code.
3. The method of claim 1, wherein executing the test code to obtain a test result and visually displaying the test result comprises:
creating an environment variable corresponding to the test code, wherein the environment variable is used for determining parameters required by executing the test code;
based on the environment variable, executing the test code to obtain an intermediate test result, wherein the intermediate test result cannot be visually displayed and needs format conversion;
converting the intermediate test result into a preset data format to obtain the test result;
generating visual display content according to the test result;
acquiring an adjustment instruction of the visual display content;
and adjusting the visual display content according to the adjustment instruction, and visually displaying the adjusted visual display content.
4. The method of claim 1, wherein prior to the obtaining the target component selected by the target user, the order of execution of the target components, and the desired parameters, the method further comprises:
Acquiring a plurality of retiming chip drives and a plurality of test scenes corresponding to the high-speed cable;
determining a driver call interface of the retiming chip driver;
performing function classification on the retiming chip driver to obtain a second number of function categories, and generating a first visual graph corresponding to the function categories;
determining input, output and use limit of the test scene, and generating a second visual graph corresponding to the test scene;
and obtaining the component according to the retiming chip driver, the driver call interface, the first visual graph, the second visual graph, the test scene, the input, the output and the use limit.
5. A high-speed cable testing system, the system comprising: the system comprises a user interaction module, a code generation module, a test execution module and a component library management module;
the component library management module is used for packaging a plurality of retiming chip drivers and a plurality of test scenes corresponding to the high-speed cable into a first number of components and providing interfaces for the user interaction module and the code generation module;
the user interaction module is connected with the component library management module and is used for calling an interface provided by the component library management module and visually displaying the component;
The user interaction module is connected with the code generation module and is used for constructing test case information of the high-speed cable according to a target component selected by a user, the execution sequence of the target component and required parameters and sending the test case information to the code generation module;
the code generation module is connected with the test execution module and is used for generating test codes according to the test case information and sending the test codes to the test execution module;
the test execution module is connected with the user interaction module and is used for executing the test codes to obtain test results, sending the test results to the user interaction module and visually displaying the test results through the user interaction module.
6. The system of claim 5, wherein the user interaction module comprises a test flow design unit and the code generation module comprises a flow resolution unit;
the test flow design unit is connected with the flow analysis unit and is used for calling an interface provided by the component library management module, visually displaying the components, constructing test case information according to the target components, the execution sequence and the required parameters and sending the test case information to the flow analysis unit.
7. The system of claim 5, wherein the code generation module comprises a code template unit, a flow parsing unit, and a code generation unit, and the test execution module comprises an execution unit;
the code template unit is connected with the flow analysis unit and is used for transmitting a preset code template to the flow analysis unit;
the flow analysis unit is connected with the code generation unit and is used for analyzing the test case information to obtain corresponding component interface calling information and a parameter list, constructing executable code fragments according to the preset code template, the component interface calling information and the parameter list, and transmitting the executable code fragments to the code generation unit;
the code generation unit is connected with the execution unit and is used for combining the executable code segments to obtain the test code and sending the test code to the execution unit.
8. The system of claim 5, wherein the test execution module comprises an execution unit and a result parsing unit, and the user interaction module comprises a test result visualization unit;
The execution unit is connected with the result analysis unit and is used for creating an environment variable corresponding to the test code, executing the test code based on the environment variable to obtain an intermediate test result, and transmitting the intermediate test result to the result analysis unit, wherein the environment variable is used for determining parameters required for executing the test code, and the intermediate test result cannot be visually displayed and needs format conversion;
the result analysis unit is connected with the test result visualization unit and is used for converting the intermediate test result into a preset data format to obtain the test result and sending the test result to the test result visualization unit;
the test result visualization unit is used for generating visual display contents according to the test results, acquiring adjustment instructions of the visual display contents, adjusting the visual display contents according to the adjustment instructions, and performing visual display on the adjusted visual display contents.
9. A high-speed cable testing device, the device comprising:
the first acquisition module is used for acquiring a target component selected by a target user, an execution sequence of the target component and required parameters, wherein the target component is an encapsulated object used for realizing high-speed cable test through interface call;
The construction module is used for constructing test case information of the high-speed cable according to the target assembly, the execution sequence and the required parameters;
the generating module is used for generating test codes according to the test case information;
and the display module is used for executing the test codes to obtain test results and visually displaying the test results.
10. A computer device, comprising:
a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the high speed cable test method of any of claims 1 to 4.
11. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the high-speed cable testing method of any one of claims 1 to 4.
CN202310787079.6A 2023-06-29 2023-06-29 High-speed cable testing method, system, device, computer equipment and storage medium Pending CN116841881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310787079.6A CN116841881A (en) 2023-06-29 2023-06-29 High-speed cable testing method, system, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310787079.6A CN116841881A (en) 2023-06-29 2023-06-29 High-speed cable testing method, system, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116841881A true CN116841881A (en) 2023-10-03

Family

ID=88162835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310787079.6A Pending CN116841881A (en) 2023-06-29 2023-06-29 High-speed cable testing method, system, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116841881A (en)

Similar Documents

Publication Publication Date Title
US11561887B2 (en) Test script debugging using an automated testing framework and UI rendering tree
US7127641B1 (en) System and method for software testing with extensible markup language and extensible stylesheet language
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN107171661B (en) Pin multiplexing method and device, optical module and communication equipment
CN112463467B (en) Automated integrated test system and method thereof
CN113778898B (en) User interface automatic test method and device, electronic equipment and storage medium
CN113010827A (en) Page rendering method and device, electronic equipment and storage medium
CN113127361B (en) Application development method and device, electronic equipment and storage medium
CN112631937A (en) Automatic CAN operation testing method and device for T-Box
CN114077430A (en) Interface generation method and device, electronic equipment and storage medium
CN111767209A (en) Code testing method, device, storage medium and terminal
CN104081347A (en) Graphical representation of an order of operations
CN111078529B (en) Client writing module testing method and device and electronic equipment
KR20180076020A (en) Apparatus and method for application test automation
CN116841881A (en) High-speed cable testing method, system, device, computer equipment and storage medium
CN110312990A (en) Configuration method and system
CN113641594B (en) Cross-terminal automatic testing method and related device
CN115470152A (en) Test code generation method, test code generation device, and storage medium
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN111736924B (en) Method, device, equipment and medium for accessing data acquisition instrument based on Lua script
CN114791885A (en) Interface test method, device, equipment and medium
CN1567201A (en) Restructurable virtual device for software bus and chip structure
CN113672509A (en) Automatic testing method, device, testing platform and storage medium
CN112286785B (en) Abnormality detection method and device for user interface
CN116594960B (en) Descriptive file format conversion method, descriptive file format conversion 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