CN114448848A - Test method and device of switch, electronic equipment and storage medium - Google Patents

Test method and device of switch, electronic equipment and storage medium Download PDF

Info

Publication number
CN114448848A
CN114448848A CN202111542788.5A CN202111542788A CN114448848A CN 114448848 A CN114448848 A CN 114448848A CN 202111542788 A CN202111542788 A CN 202111542788A CN 114448848 A CN114448848 A CN 114448848A
Authority
CN
China
Prior art keywords
test
target
switch
testing
target test
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
CN202111542788.5A
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 CN202111542788.5A priority Critical patent/CN114448848A/en
Publication of CN114448848A publication Critical patent/CN114448848A/en
Pending legal-status Critical Current

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/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/065Generation of reports related to network devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q1/00Details of selecting apparatus or arrangements
    • H04Q1/02Constructional details
    • H04Q1/10Exchange station construction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q1/00Details of selecting apparatus or arrangements
    • H04Q1/18Electrical details
    • H04Q1/20Testing circuits or apparatus; Circuits or apparatus for detecting, indicating, or signalling faults or troubles

Abstract

The application discloses a test method and device of a switch, electronic equipment and a storage medium. The method comprises the following steps: receiving a switch test request, wherein the switch test request carries at least one target input parameter; determining target test content corresponding to the target input parameter based on the corresponding relation between the preset parameter and the test content; acquiring target test data corresponding to target test content; and testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested. According to the embodiment of the application, the target test content is directly determined according to the target input content input by the user, then the target test data corresponding to the target test content is obtained, the switch to be tested is tested by using the target test data, the test data is automatically called based on the input parameters to test the switch, the tester is not required to perform secondary development according to test scenes and requirements, and the test efficiency is improved.

Description

Test method and device of switch, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of switch testing technologies, and in particular, to a method and an apparatus for testing a switch, an electronic device, and a storage medium.
Background
In the production and research and development test of the switch, the function test of the whole switch is needed to verify whether all hardware links, firmware and the like are normal. According to the test requirements, a research and development personnel needs to provide a series of test tools and use instruction documents and transmit the test tools and the use instruction documents to the test personnel and the production workers.
At present, when the function of the whole machine of the switch is tested, testers rely on research and development to output test tools and instruction manuals, then the testers perform secondary development according to test scenes and requirements, compile test scripts and call the test tools to complete the test of the whole machine.
At present, under the complete machine function test mode of the switch, an inventor finds that a tester not only needs to understand the use of a test tool, but also needs to write a test script by himself and then tests, so that the labor expense and the communication cost are increased.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the application provides a method and an apparatus for testing a switch, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a method for testing a switch, including:
receiving a switch test request, wherein the switch test request carries at least one target input parameter;
determining target test content corresponding to the target input parameter based on the corresponding relation between preset parameters and test content;
acquiring target test data corresponding to the target test content;
and testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested.
Further, the obtaining of the target test data corresponding to the target test content includes:
under the condition that the target test content comprises test duration and partial functions or all functions, determining the test case corresponding to the partial functions or all functions as a target test case;
and taking the target test case and the test duration as the target test data.
Further, the obtaining of the target test data corresponding to the target test content includes:
under the condition that the target test content comprises test duration and a file identifier, acquiring a target configuration file according to the file identifier;
analyzing the target configuration file to obtain a target test case;
and taking the target test case and the test duration as the target test data.
Further, before the switch to be tested is tested based on the target test data to obtain a test result corresponding to the switch to be tested, the method further includes:
detecting an update operation acting on the target test data;
under the condition that the updating operation is detected, acquiring a newly added test case;
and filling the newly added test case into a target test case in the target test data to obtain an updated target test case.
Further, the obtaining a newly added test case when the update operation is detected includes:
under the condition that the updating operation is detected, obtaining an initial test case template;
detecting an editing operation acting on the initial test case template;
and under the condition that the editing operation is detected, generating the new test case based on the edited initial test case template.
Further, the testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested includes:
extracting test duration from the target test data;
and in the testing duration, testing the switch to be tested by using the updated target testing case to obtain the testing result, wherein the testing result is generated according to the sub-testing result corresponding to each testing case in the updated target testing case.
Further, after the switch to be tested is tested based on the target test data and a test result corresponding to the switch to be tested is obtained, the method further includes:
receiving a report generation request, wherein the report generation request carries at least one test report template;
writing the test result into the test report template to generate a test report;
and outputting the test report.
According to still another aspect of the embodiments of the present application, there is provided a test apparatus for a switch, including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a switch test request, and the switch test request carries at least one target input parameter;
the determining module is used for determining target test content corresponding to the target input parameter based on the corresponding relation between preset parameters and the test content;
the acquisition module is used for acquiring target test data corresponding to the target test content;
and the execution module is used for testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the embodiment of the application, the target test content is directly determined according to the target input content input by the user, then the target test data corresponding to the target test content is obtained, the switch to be tested is tested by using the target test data, the test data is automatically called based on the input parameters to test the switch, the tester is not required to perform secondary development according to test scenes and requirements, and the test efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a testing method for a switch according to an embodiment of the present application;
fig. 2 is a flowchart of a testing method for a switch according to another embodiment of the present application;
fig. 3 is a block diagram of a testing apparatus of a switch according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a method and a device for testing a switch, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any required electronic equipment, for example, the electronic equipment can be electronic equipment such as a server and a terminal, and the method is not particularly limited herein, and is hereinafter simply referred to as electronic equipment for convenience in description.
According to an aspect of embodiments of the present application, a method embodiment of a method for testing a switch is provided. Fig. 1 is a flowchart of a method for testing a switch according to an embodiment of the present application, and as shown in fig. 1, the method includes:
step S11, receiving a switch test request, where the switch test request carries at least one target input parameter.
The testing method provided by the embodiment of the application is applied to the testing equipment, when the requirement for testing the switch exists, a user firstly writes target input parameters into the testing equipment and triggers the switch testing request, and at the moment, the testing equipment can receive the switch testing request.
Step S12, determining target test content corresponding to the target input parameter based on the corresponding relationship between the preset parameter and the test content.
In the embodiment of the application, after the switch test request is received, the corresponding relation between the preset parameters and the test contents is called, and the target test contents corresponding to the target input parameters are inquired based on the corresponding relation.
As an example: and when the target input parameter is S, the corresponding target test content is to test the single function of the switch. And when the target input parameter is T, the corresponding target test content is the test duration. And when the target input parameter is A, testing all functions of the switch according to the corresponding target test content. And when the target input parameter is F, the corresponding target test content is to test the switch according to a preset configuration file.
Step S13, target test data corresponding to the target test content is acquired.
In this embodiment of the application, the step S13 of obtaining target test data corresponding to target test content includes the following steps a1-a 2:
step A1, under the condition that the target test content includes the test duration and partial or all functions, determining the test case corresponding to the partial or all functions as the target test case.
In an embodiment of the present application, determining target test content according to the target input parameter includes: under the conditions of testing duration and partial functions or all functions, the testing equipment directly acquires target test cases corresponding to the partial functions or all functions from the test case set at the moment.
In this embodiment of the present application, the test cases included in the test case set may be: the test system comprises a switching chip flow test case, a CPU pressure test case, a power supply module test case, a fan test case, an optical module test case, an FRU test case and the like.
Step A2, using the target test case and the test duration as the target test data.
In the embodiment of the application, after a target test case for executing the switch test is determined, the target test case and the test duration are used as target test data, and the target test data is used for testing the switch to be tested.
In this embodiment of the application, the step S13 of obtaining target test data corresponding to target test content includes the following steps B1-B3:
and step B1, under the condition that the target test content comprises the test duration and the file identifier, acquiring the target configuration file according to the file identifier.
In an embodiment of the present application, determining target test content according to the target input parameter includes: under the conditions of testing duration and file identification, the testing equipment directly acquires a target configuration file according to the file identification, wherein the target configuration file can be uploaded to the testing equipment by developers in advance, and the target configuration file comprises a plurality of test cases.
And step B2, analyzing the target configuration file to obtain a target test case.
In the embodiment of the application, after the test file determines the target configuration file, the target configuration file is analyzed to obtain the test case carried in the target configuration file, and the test case is determined as the target test case.
And step B3, taking the target test case and the test duration as target test data.
In the embodiment of the application, after the target test case for executing the switch test is determined, the target test case and the test duration are used as target test data, and the target test data is used for testing the switch to be tested.
And step S14, testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested.
In this embodiment of the application, before the switch to be tested is tested based on the target test data and the test result corresponding to the switch to be tested is obtained, the method further includes the following steps C1-C3:
step C1, an update operation is detected that acts on the target test data.
In the embodiment of the present application, after determining the target test data, the test device displays the target test data, and at this time, the test device detects whether there is an update operation applied to the target test data. It should be noted that the update operation may be initiated by a user to the test device, and when the user needs to update the target test case in the target test data, the update operation is initiated to the test device. Specifically, the embodiment of the present application provides a method for detecting an update operation: the method comprises the steps of firstly detecting click operation acting on target test data, detecting time length corresponding to the click operation, displaying an operation list if the time length is longer than or equal to preset time length, detecting selection operation acting on the operation list at the moment, determining a selected operation item as an updating operation item according to the selection operation, receiving an operation password associated with the updating operation item, and determining that the current updating operation acting on the target test data exists if the operation password is matched with the preset operation password.
It should be noted that the operation password may be a character string corresponding to each operation item preset by the staff, and the probability that the test case in the target test data is randomly tampered can be reduced by setting the operation password, and the effectiveness of the subsequent switch test is effectively guaranteed.
In order to guarantee the effectiveness of a preset test case, a flow for detecting an updating operation is set, firstly, whether a user needs to update target test data is determined through a time length, if the time length is larger than the preset time length, an operation list is displayed to the user, an operation item selected by the user is determined through detecting the operation of the user acting on the operation list, if the selected operation item is the updating operation item, an operation password input by the user is obtained, the operation instruction is matched with the preset operation instruction, and finally, whether the target test data is updated is determined.
And step C2, acquiring the newly added test case under the condition that the updating operation is detected.
In this embodiment of the present application, in step C2, when an update operation is detected, acquiring a new test case includes the following steps C201 to C203:
step C201, in the case that the update operation is detected, acquiring an initial test case template.
In the embodiment of the application, the test device calls the initial test case template under the condition that the test device determines that the updating operation exists, wherein the initial test case template is a general test case template stored in the test device.
Step C202, detecting the editing operation acted on the initial test case template.
In the embodiment of the application, after the test equipment calls the initial test case template, the initial test case template is displayed, and then whether the editing operation acting on the initial test case template exists or not is detected.
In the embodiment of the application, the editing operation process for detecting the initial test case template is as follows: and detecting whether the selected operation acting on the initial test case template exists, if so, detecting the selected position of the selected operation in the initial test case template, and if the selected position is matched with the preset position, determining that the editing operation acting on the initial test case template exists. And if the selected position is not matched with the preset position, determining that the editing operation of the initial test case template does not exist.
Step C203, under the condition that the editing operation is detected, generating a new test case based on the edited initial test case template.
In the embodiment of the application, under the condition that the editing operation is detected, the editing progress corresponding to the initial test case template is detected, and under the condition that the editing is determined to be completed according to the editing progress, a new test case is generated based on the edited initial test case template.
And step C3, filling the newly added test cases into the target test cases in the target test data to obtain the updated target test cases.
In the embodiment of the application, after the new test case is obtained, the new test case is filled into the target test case in the target test data, and the updated target test case is obtained.
As an example, a target test case in the target test data includes: exchange chip flow test case, CPU pressure test case, power supply module test case, fan test case, newly-increased test case includes: optical module test case edit and FRU test case. The updated target test case comprises the following steps: the test system comprises an exchange chip flow test case, a CPU pressure test case, a power supply module test case, a fan test case, an optical module test case and an FRU test case.
In this embodiment of the application, the step S14 of testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested includes the following steps D1-D2:
and D1, extracting the test duration from the target test data.
In the embodiment of the application, the target test data comprises the test duration and the target test case, so the test duration can be directly extracted from the target test data.
And D2, testing the switch to be tested by using the updated target test case within the testing time to obtain a testing result, wherein the testing result is generated according to the sub-testing result corresponding to each test case in the updated target test case.
In the embodiment of the application, the updated target test case is used for testing the switch to be tested within the testing time, because the updated target test case comprises a plurality of independent test cases, each test case is used for testing the switch, a sub-test result can be obtained, and then all the sub-test results are summarized to obtain the final test result.
According to the embodiment of the application, the target test content is directly determined according to the target input content input by the user, then the target test data corresponding to the target test content is obtained, the switch to be tested is tested by using the target test data, the test data is automatically called based on the input parameters to test the switch, the tester is not required to perform secondary development according to test scenes and requirements, and the test efficiency is improved.
In this embodiment of the present application, fig. 2 is a flowchart of a method for testing an exchange provided in this embodiment of the present application, and as shown in fig. 2, after testing the exchange to be tested based on target test data to obtain a test result corresponding to the exchange to be tested, the method further includes:
step S21, receiving a report generation request, where the report generation request carries at least one test report template.
In the embodiment of the application, after the test device calls the target test data to test the exchange to be tested, the test device may receive a report generation request triggered by a user. Specifically, whether a user clicks a report output button is detected, if yes, an initial report generation request is determined to be generated, a plurality of candidate test report templates are displayed, whether a selection operation acting on the candidate test report templates exists is detected, and the selected test report template is determined according to the selection operation. A final report generation request is then generated based on the test report template.
And step S22, writing the test result into the test report template to generate a test report.
And step S23, outputting a test report.
In the embodiment of the application, the test equipment writes the obtained test result into the test report template according to the report generation request, generates a final test report, and outputs the generated test report, wherein outputting the test report may be displaying the test report, or sending the test report to a specified client according to a preset file format, and the like.
The method provided by the embodiment of the application can modify the test case according to the test requirement, and appoint the test content in the form of input parameters, thereby meeting the multi-scenario test requirement; the cost of secondary development is reduced, the testing efficiency is improved, and in addition, a testing report template can be selected to support the derivation of multi-type reports.
Fig. 3 is a block diagram of a testing apparatus for a switch, which may be implemented as part or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 3, the apparatus includes:
the receiving module 31 is configured to receive a switch test request, where the switch test request carries at least one target input parameter.
The determining module 32 is configured to determine target test content corresponding to the target input parameter based on a corresponding relationship between the preset parameter and the test content.
The obtaining module 33 is configured to obtain target test data corresponding to the target test content.
And the execution module 34 is configured to test the switch to be tested based on the target test data, so as to obtain a test result corresponding to the switch to be tested.
In the embodiment of the application, the obtaining module is configured to determine, as the target test case, the test case corresponding to part of the functions or all of the functions under the condition that the target test content includes the test duration and part of the functions or all of the functions; and taking the target test case and the test duration as target test data.
In the embodiment of the application, the obtaining module is used for obtaining a target configuration file according to a file identifier under the condition that the target test content comprises a test duration and the file identifier; analyzing the target configuration file to obtain a target test case; and taking the target test case and the test duration as target test data.
In this embodiment, the testing apparatus of the switch further includes a detection module, and the detection module includes:
an execution unit configured to detect an update operation acting on target test data;
the acquisition unit is used for acquiring a newly added test case under the condition that the updating operation is detected;
and the processing unit is used for filling the newly added test cases into the target test cases in the target test data to obtain the updated target test cases.
In the embodiment of the application, the obtaining unit is configured to obtain an initial test case template when an update operation is detected; detecting an editing operation acting on an initial test case template; and under the condition that the editing operation is detected, generating a new test case based on the edited initial test case template.
In the embodiment of the application, the execution module is used for extracting the test duration from the target test data; and within the testing time span, testing the switch to be tested by using the updated target test case to obtain a test result, wherein the test result is generated according to the sub-test result corresponding to each test case in the updated target test case.
In this embodiment of the present application, the testing apparatus of the switch further includes a report generation module, configured to receive a report generation request, where the report generation request carries at least one test report template; writing the test result into a test report template to generate a test report; and outputting a test report.
The method provided by the embodiment of the application can modify the test case according to the test requirement, and appoint the test content in the form of input parameters, thereby meeting the multi-scenario test requirement; the cost of secondary development is reduced, the testing efficiency is improved, and in addition, a testing report template can be selected to support the derivation of multi-type reports.
An embodiment of the present application further provides an electronic device, as shown in fig. 4, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present application, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the method for testing a switch as described in any of the above embodiments.
In a further embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of testing a switch as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The previous description is only an example of the present application, and is provided to enable any person skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for testing a switch, comprising:
receiving a switch test request, wherein the switch test request carries at least one target input parameter;
determining target test content corresponding to the target input parameter based on the corresponding relation between preset parameters and test content;
acquiring target test data corresponding to the target test content;
and testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested.
2. The method according to claim 1, wherein the obtaining target test data corresponding to the target test content comprises:
under the condition that the target test content comprises test duration and partial functions or all functions, determining the test case corresponding to the partial functions or all functions as a target test case;
and taking the target test case and the test duration as the target test data.
3. The method according to claim 1, wherein the obtaining target test data corresponding to the target test content comprises:
under the condition that the target test content comprises test duration and a file identifier, acquiring a target configuration file according to the file identifier;
analyzing the target configuration file to obtain a target test case;
and taking the target test case and the test duration as the target test data.
4. The method according to claim 1, wherein before the switch under test is tested based on the target test data to obtain a test result corresponding to the switch under test, the method further comprises:
detecting an update operation acting on the target test data;
under the condition that the updating operation is detected, acquiring a newly added test case;
and filling the newly added test case into a target test case in the target test data to obtain an updated target test case.
5. The method according to claim 4, wherein obtaining a newly added test case in a case that the update operation is detected comprises:
under the condition that the updating operation is detected, obtaining an initial test case template;
detecting an editing operation acting on the initial test case template;
and under the condition that the editing operation is detected, generating the new test case based on the edited initial test case template.
6. The method of claim 4, wherein the testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested comprises:
extracting test duration from the target test data;
and in the testing duration, testing the switch to be tested by using the updated target testing case to obtain the testing result, wherein the testing result is generated according to the sub-testing result corresponding to each testing case in the updated target testing case.
7. The method of claim 1, wherein after the switch under test is tested based on the target test data to obtain a test result corresponding to the switch under test, the method further comprises:
receiving a report generation request, wherein the report generation request carries at least one test report template;
writing the test result into the test report template to generate a test report;
and outputting the test report.
8. A test apparatus for a switch, comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a switch test request, and the switch test request carries at least one target input parameter;
the determining module is used for determining target test content corresponding to the target input parameter based on the corresponding relation between preset parameters and the test content;
the acquisition module is used for acquiring target test data corresponding to the target test content;
and the execution module is used for testing the switch to be tested based on the target test data to obtain a test result corresponding to the switch to be tested.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1-7 by executing a program stored on a memory.
CN202111542788.5A 2021-12-16 2021-12-16 Test method and device of switch, electronic equipment and storage medium Pending CN114448848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111542788.5A CN114448848A (en) 2021-12-16 2021-12-16 Test method and device of switch, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111542788.5A CN114448848A (en) 2021-12-16 2021-12-16 Test method and device of switch, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114448848A true CN114448848A (en) 2022-05-06

Family

ID=81364712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111542788.5A Pending CN114448848A (en) 2021-12-16 2021-12-16 Test method and device of switch, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114448848A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365830A1 (en) * 2013-06-11 2014-12-11 Wipro Limited System and method for test data generation and optimization for data driven testing
CN107066391A (en) * 2017-05-09 2017-08-18 武汉联影医疗科技有限公司 The processing method and system of test case
CN107832226A (en) * 2017-11-23 2018-03-23 中国平安人寿保险股份有限公司 Report-generating method, device, equipment and computer media based on performance test
CN107908543A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Applied program testing method, device, computer equipment and storage medium
CN108268348A (en) * 2017-12-08 2018-07-10 广州视源电子科技股份有限公司 Interface test method, device, mobile terminal and storage medium
CN110134583A (en) * 2019-04-11 2019-08-16 口碑(上海)信息技术有限公司 Software test and data processing method and device
CN110851308A (en) * 2019-10-21 2020-02-28 香港乐蜜有限公司 Test method, test device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140365830A1 (en) * 2013-06-11 2014-12-11 Wipro Limited System and method for test data generation and optimization for data driven testing
CN107066391A (en) * 2017-05-09 2017-08-18 武汉联影医疗科技有限公司 The processing method and system of test case
CN107908543A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Applied program testing method, device, computer equipment and storage medium
CN107832226A (en) * 2017-11-23 2018-03-23 中国平安人寿保险股份有限公司 Report-generating method, device, equipment and computer media based on performance test
CN108268348A (en) * 2017-12-08 2018-07-10 广州视源电子科技股份有限公司 Interface test method, device, mobile terminal and storage medium
CN110134583A (en) * 2019-04-11 2019-08-16 口碑(上海)信息技术有限公司 Software test and data processing method and device
CN110851308A (en) * 2019-10-21 2020-02-28 香港乐蜜有限公司 Test method, test device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
CN107193750B (en) Script recording method and device
CN108959068B (en) Software interface testing method, device and storage medium
CN110688300A (en) Compatibility testing method, device, equipment and storage medium
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN112269744A (en) System abnormity testing method and device, computer equipment and storage medium
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN112540924A (en) Interface automation test method, device, equipment and storage medium
WO2017206476A1 (en) Method, device and apparatus for detecting cpu occupation
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN113448862A (en) Software version testing method and device and computer equipment
CN112506757A (en) Automatic test method, system, computer device and medium thereof
US20200293592A1 (en) Methods and systems for browser extension used to generate relative xpath, absolute xpath and/or css selectors
CN113312260B (en) Interface test method, device, equipment and storage medium
CN107357721B (en) Method and device for testing system
CN111008058A (en) Page display method and device
CN111506305A (en) Tool kit generation method and device, computer equipment and readable storage medium
CN111078529A (en) Client write-in module testing method and device and electronic equipment
CN114448848A (en) Test method and device of switch, electronic equipment and storage medium
CN108563578B (en) SDK compatibility detection method, device, equipment and readable storage medium
CN112667502A (en) Page testing method, device and medium
CN114860549B (en) Buried data verification method, buried data verification device, buried data verification equipment and storage medium
CN113934644B (en) Version difference comparison method and device, intelligent terminal and readable storage medium
CN111104318B (en) Unit test result export method and device and electronic equipment
CN112468358B (en) Protocol detection method, system, equipment and computer readable 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