CN115981901A - Fault positioning method, equipment and medium for automatic test of switch - Google Patents

Fault positioning method, equipment and medium for automatic test of switch Download PDF

Info

Publication number
CN115981901A
CN115981901A CN202211633564.XA CN202211633564A CN115981901A CN 115981901 A CN115981901 A CN 115981901A CN 202211633564 A CN202211633564 A CN 202211633564A CN 115981901 A CN115981901 A CN 115981901A
Authority
CN
China
Prior art keywords
test
log
keyword
result
testing
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
CN202211633564.XA
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.)
Inspur Cisco Networking Technology Co Ltd
Original Assignee
Inspur Cisco Networking 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 Inspur Cisco Networking Technology Co Ltd filed Critical Inspur Cisco Networking Technology Co Ltd
Priority to CN202211633564.XA priority Critical patent/CN115981901A/en
Publication of CN115981901A publication Critical patent/CN115981901A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
    • Y04S10/52Outage or fault management, e.g. fault detection or location

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses a fault positioning method, equipment and a medium for switch automation test, wherein the method comprises the following steps: determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps; executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons and a configuration log of a case corresponding to the test log of the second test step; the keywords are used for representing the category of the reason of the test failure; and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword. The specific failure reason of the failed case can be quickly matched in a keyword retrieval mode.

Description

Fault positioning method, equipment and medium for automatic test of switch
Technical Field
The present application relates to the field of switch technologies, and in particular, to a method, a device, and a medium for locating a fault in an automated test of a switch.
Background
In automated testing of switches, a test log (log) generally contains step information of a use case, an expected result of the use case, and a test result of the use case. The test analyst may locate the fault based on the test log of the test.
Currently, the adopted method is to mark the failed test steps in the test log, but the reason of the test failure is not embodied. When failure reasons are analyzed, the failure reasons still need to go deep into log, the failure reasons of the test can not be located quickly after the test is finished, manual checking is needed, and especially when many test steps are performed on each case, the failure reasons of all case scripts need to be collected at one time, a great deal of effort is often needed, so that the failure location efficiency of the automatic test of the switch is low.
Disclosure of Invention
The embodiment of the application provides a fault positioning method, equipment and a medium for automatic testing of a switch, and aims to solve the problem of low fault positioning efficiency of the automatic testing of the switch.
The embodiment of the application adopts the following technical scheme:
in one aspect, an embodiment of the present application provides a method for locating a fault in an automated test of a switch, where the method includes: determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps; executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure; and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
In one example, the executing the test task and generating a test log corresponding to each use case specifically includes: executing the test task, and acquiring a first test step of the test task and an expected result of the test step; carrying out automatic test on the test step to obtain a test result of the test step; matching the expected result with the test result; according to the matching result, determining that the testing step is a first testing step or a second testing step, generating test log information to be written into a corresponding test log in the testing step, and writing the test log information into the corresponding test log; and generating a test log corresponding to each case respectively until a plurality of test steps of each case complete automatic testing.
In one example, according to the matching result, determining that the testing step is the second testing step specifically includes: if the expected result is inconsistent with the test result, determining that the test step is a second test step; the generating of the test log information to be written into the corresponding test log in the testing step specifically includes: determining a test failure reason of the test step; searching a keyword database constructed in advance for keywords corresponding to the test failure reasons of the test steps; determining a configuration log of a case corresponding to the testing step; and generating test log information to be written into the corresponding test log in the testing step according to the testing step, the expected result, the testing result, the key words, the test failure reason and the configuration log of the use case.
In one example, the writing the test log information into the corresponding test log specifically includes: writing the test step into the corresponding test log; in the corresponding test log, writing the expected result behind the test step, writing the test result behind the expected result, writing the keyword behind the test result, writing the test failure reason behind the keyword, and writing the configuration log of the use case behind the test failure reason.
In one example, before the searching, in the pre-constructed keyword database, the keyword corresponding to the test failure reason of the testing step, the method further includes: classifying the reasons of failure of the sample testing step to obtain sample keywords; the sample keywords comprise at least one of switch configuration error report, flow forwarding abnormity, switch table entry error, coredump occurrence of the switch and abnormal restart of the switch; and constructing the keyword database according to the sample keywords.
In one example, after the obtaining of the specified second test step that matches the search key, the method further comprises: generating a fault positioning table of the switch according to the expected result, the test result, the keywords, the test failure reason of the appointed second test step and the configuration log of the corresponding case; and receiving a calling request of the fault positioning form, and displaying the fault positioning form to a user interface.
In one example, according to the matching result, determining that the testing step is the first testing step specifically includes: if the expected result is consistent with the test result, determining that the test step is a first test step; the generating of the test log information to be written into the corresponding test log in the testing step specifically includes: and generating test log information to be written into a corresponding test log in the testing step according to the testing step, the expected result and the test result.
In one example, the method further comprises: and marking the second testing step in the testing log according to a preset rule so as to determine the second testing step as an abnormal testing step.
In another aspect, an embodiment of the present application provides a fault location device for an automatic test of a switch, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to: determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps; executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure; and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
In another aspect, an embodiment of the present application provides a fault location nonvolatile computer storage medium for switch automation test, where the fault location nonvolatile computer storage medium stores computer-executable instructions configured to: determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps; executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure; and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
in the automatic testing process of the switch, aiming at the abnormal testing step in each testing log, keywords of the type of the testing failure reason, the testing failure reason and the configuration log of the corresponding case of the testing log are used as the testing log information of the abnormal testing step, the testing failure reason of the abnormal testing step and the configuration log of the corresponding case of the testing log can be quickly positioned in a keyword retrieval mode, the specific failure reason of the failed case is quickly matched, the quick positioning of the switch fault is realized, and the fault positioning efficiency of the automatic testing of the switch is improved.
Drawings
In order to more clearly explain the technical solutions of the present application, some embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
fig. 1 is a schematic flowchart of a fault location method for an automatic test of a switch according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a fault location device for switch automation test according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following embodiments and accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a fault location method for switch automation test according to an embodiment of the present disclosure. Certain input parameters or intermediate results in the procedure allow for manual intervention adjustments to help improve accuracy.
The analysis method according to the embodiment of the present application may be implemented as a switch or a server, and the present application is not limited to this specifically. For convenience of understanding and description, the following embodiments are described in detail with the switch as an example.
The process in fig. 1 comprises the following steps:
s101: determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps.
S102: executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure.
It will be understood by those skilled in the art that the first test step refers to a normal test step and the second test step refers to an abnormal test step, i.e., a test step that fails the test. Each use case generates a test step. The reason for the test failure comprises specific matching information of the expected result and the measured result.
In some embodiments of the present application, the cause of failure of the sample testing procedure is first classified to obtain a sample keyword. The sample keywords comprise at least one of switch configuration error report, flow forwarding exception, switch table entry error, coredump occurrence of the switch and abnormal restart of the switch. Thereby building the key database from the sample keys.
Based on this, executing the test task, and generating a test log corresponding to each case, specifically including:
the test task is executed, so that a first test step of the test task and an expected result of the test step are obtained. And carrying out automatic test on the test step to obtain a test result of the test step. The expected results are matched with the test results. And according to the matching result, determining that the testing step is the first testing step or the second testing step, generating test log information to be written into the corresponding test log in the testing step, and writing the test log information into the corresponding test log.
And generating a test log corresponding to each case respectively until the plurality of test steps of each case complete the automatic test.
It should be noted that, in each test log, each test step start has a separator for the start of the step. For example, the delimiter of step1 is- -test _ sw _ arp _1 _1- -step 1start- -with arp _1 _1step 1.
In addition, each test step has a corresponding matching option, for example, the test step only matches the switch configuration of the expected result with the switch configuration of the test result.
Wherein, when determining that the testing step is the first testing step or the second testing step according to the matching result, the method specifically comprises the following steps:
and if the expected result is consistent with the test result, determining that the test step is the first test step, namely, indicating that the test step is normal, and then generating test log information to be written into the corresponding test log in the test step according to the test step, the expected result and the test result. That is, the test steps, expected results, and test results are written into the corresponding test logs. The test step is written into the corresponding test log, the expected result is written behind the test step in the corresponding test log, and the test result is written behind the expected result.
And if the expected result is inconsistent with the test result, determining that the test step is a second test step, namely, the test step is an abnormal test step.
Then, determining the test failure reason of the test step, searching a keyword corresponding to the test failure reason of the test step in a pre-constructed keyword database, and then determining a configuration log of a case corresponding to the test step. That is, for the test step with failed test, the configuration log of the current use case of the switch is collected at the same time.
And generating test log information to be written into the corresponding test log in the testing step according to the testing step, the expected result, the testing result, the keywords, the reason of the test failure and the configuration log of the use case. Namely, the test step, the expected result, the test result, the keyword, the reason of the test failure and the configuration log of the use case are generated and written into the corresponding test log. The test step is written into the corresponding test log, the expected result is written behind the test step in the corresponding test log, the test result is written behind the expected result, the keyword is written behind the test result, the test failure reason is written behind the keyword, and the configuration log of the case is written behind the test failure reason.
The method classifies the switch test failure reasons into different categories by a keyword classification method, different matching processes correspond to different classification reasons for the fact that the switch actual measurement result is not consistent with the expected result, a test log is written, the failure reasons are written behind the keywords, and the corresponding test failure reasons can be found by matching the keywords. And writing the configuration log of the use case into the back of the failure reason, and enabling a user not to trace the test log from bottom to top to check the configuration information.
For example, if the expected result is not consistent with the switch configuration of the test result, it indicates that the switch configuration has failed, and writes the key whose content is the switch configuration failure into the corresponding test log.
And if the expected result is inconsistent with the flow matching of the test result, indicating that the flow forwarding is abnormal, and writing the keyword with the content of the abnormal flow forwarding into the corresponding test log.
And if the expected result is not consistent with the matching of the switch table entry of the test result, indicating that the switch table entry is wrong, and writing the keyword with the wrong switch table entry into the corresponding test log.
And if the Coreductp is detected to appear on the switch by the test result, writing the key word with the content of the Coreductp appearing on the switch into the corresponding test log.
And if the abnormal restart of the exchanger is detected by the test result, writing the keywords with the contents of the abnormal restart of the exchanger into the corresponding test log.
That is, if a test step fails, the corresponding failure reason keyword is matched, and each test step corresponds to a keyword or a plurality of keywords.
S103: and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
And receiving a retrieval keyword input by a user, then retrieving a plurality of testing steps in the testing log, and retrieving a second testing step comprising the matching of the retrieval keyword.
It should be noted that the user may select the search scope, for example, all the test logs of the test task or part of the test logs of the test task.
In some embodiments of the present application, a test table is generated in order to conveniently check the reason why each test step fails and the failure condition of the switch test task as a whole.
Based on the method, a fault location table of the switch is generated according to the expected result of the specified second test step, the test result, the keywords, the test failure reason and the configuration log of the corresponding case, so that the fault location table is displayed to a user interface after the call request of the fault location table is received.
In some embodiments of the present application, in order to more intuitively display the test failure condition of the test task, the second test step is marked according to a preset rule in the test log, so as to determine the second test step as an abnormal test step. For example, the preset rule is to color mark the second testing step to distinguish the first testing step from the second testing step.
It can be understood by those skilled in the art that when the number of test steps of the test log is small, and a user knows the test failure condition of the test log, the user can also mark the abnormal test step, so as to quickly locate the abnormal test step, that is, quickly locate the switch failure.
It should be noted that, although the embodiment of the present application describes steps S101 to S103 in sequence with reference to fig. 1, this does not mean that steps S101 to S103 must be executed in strict sequence. The embodiment of the present application is described by sequentially describing step S103 to step S103 according to the sequence shown in fig. 1, so as to facilitate a person skilled in the art to understand the technical solutions of the embodiments of the present application. In other words, in the embodiment of the present application, the sequence between step S101 and step S103 may be appropriately adjusted according to actual needs.
By the method of fig. 1, in the automatic testing process of the switch, aiming at the abnormal testing step in each testing log, the keywords of the type of the test failure reason, the test failure reason and the configuration log of the case corresponding to the testing log are used as the testing log information of the abnormal testing step, and the abnormal testing step, the test failure reason of the abnormal testing step and the configuration log of the case corresponding to the testing log can be quickly positioned in a keyword retrieval mode, so that the quick positioning of the switch fault is realized.
Based on the same idea, some embodiments of the present application further provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 2 is a schematic structural diagram of a fault location device for switch automation test according to an embodiment of the present application, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps;
executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure;
and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
Some embodiments of the present application provide a fault location non-volatile computer storage medium for switch automation testing, storing computer-executable instructions configured to:
determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps;
executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, a keyword, a test failure reason and a configuration log of a case corresponding to the test log of the second test step; the keyword is used for representing the category of the reason of the test failure;
and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, and reference may be made to some description of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one to one, so the device and the medium also have the similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so the beneficial technical effects of the device and the medium are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 phrases "comprising a," "...," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the technical principle of the present application shall fall within the protection scope of the present application.

Claims (10)

1. A method for fault location for automated testing of a switch, the method comprising:
determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps;
executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure;
and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
2. The method according to claim 1, wherein the executing the test task and generating a test log corresponding to each use case specifically comprises:
executing the test task, and acquiring a first test step of the test task and an expected result of the test step;
carrying out automatic test on the test step to obtain a test result of the test step;
matching the expected result with the test result;
according to the matching result, determining that the testing step is a first testing step or a second testing step, generating test log information to be written into a corresponding test log in the testing step, and writing the test log information into the corresponding test log;
and generating a test log corresponding to each use case respectively until the plurality of test steps of each use case finish the automatic test.
3. The method according to claim 2, wherein determining, according to the matching result, that the testing step is a second testing step specifically comprises:
if the expected result is inconsistent with the test result, determining that the test step is a second test step;
the generating of the test log information to be written into the corresponding test log in the testing step specifically includes:
determining a test failure reason of the test step;
searching a keyword corresponding to the reason of the test failure in the test step in a keyword database constructed in advance;
determining a configuration log of a case corresponding to the testing step;
and generating test log information to be written into a corresponding test log in the testing step according to the testing step, the expected result, the testing result, the key words, the test failure reason and the configuration log of the use case.
4. The method of claim 3, wherein writing the test log information into the corresponding test log specifically comprises:
writing the test step into the corresponding test log;
in the corresponding test log, writing the expected result behind the test step, writing the test result behind the expected result, writing the keyword behind the test result, writing the test failure reason behind the keyword, and writing the configuration log of the use case behind the test failure reason.
5. The method of claim 3, wherein before retrieving the keyword corresponding to the reason of the test failure in the testing step from the pre-constructed keyword database, the method further comprises:
classifying the failure reasons of the sample testing step to obtain sample keywords; the sample keywords comprise at least one of switch configuration error report, flow forwarding abnormity, switch table entry error, coredump occurrence of the switch and abnormal restart of the switch;
and constructing the keyword database according to the sample keywords.
6. The method of claim 1, wherein after the step of obtaining the specified second test match with the search key, the method further comprises:
generating a fault positioning table of the switch according to the expected result, the test result, the keywords, the test failure reason of the appointed second test step and the configuration log of the corresponding case;
and receiving a calling request of the fault positioning form, and displaying the fault positioning form to a user interface.
7. The method according to claim 2, wherein determining, according to the matching result, that the testing step is a first testing step specifically comprises:
if the expected result is consistent with the test result, determining that the test step is a first test step;
the generating of the test log information to be written into the corresponding test log in the testing step specifically includes:
and generating test log information to be written into a corresponding test log in the testing step according to the testing step, the expected result and the test result.
8. The method of claim 1, further comprising:
and marking the second testing step in the testing log according to a preset rule so as to determine the second testing step as an abnormal testing step.
9. A fault location device for automated testing of a switch, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps;
executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, keywords, test failure reasons of the second test step and a configuration log of a case corresponding to the test log; the keyword is used for representing the category of the reason of the test failure;
and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
10. A fault-locating, non-volatile computer storage medium for automated testing of switches, storing computer-executable instructions, the computer-executable instructions configured to:
determining an automatic script test task of the switch; the test task comprises a plurality of use cases, and each use case comprises a plurality of test steps;
executing the test task and generating a test log corresponding to each case; the test log information comprises an expected result and a test result of the first test step, and/or an expected result, a test result, a keyword, a test failure reason and a configuration log of a case corresponding to the test log of the second test step; the keyword is used for representing the category of the reason of the test failure;
and after the test task is finished, receiving a keyword retrieval request, retrieving a plurality of test steps in the test log through the retrieval keyword in the keyword retrieval request, and obtaining a specified second test step matched with the retrieval keyword.
CN202211633564.XA 2022-12-19 2022-12-19 Fault positioning method, equipment and medium for automatic test of switch Pending CN115981901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211633564.XA CN115981901A (en) 2022-12-19 2022-12-19 Fault positioning method, equipment and medium for automatic test of switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211633564.XA CN115981901A (en) 2022-12-19 2022-12-19 Fault positioning method, equipment and medium for automatic test of switch

Publications (1)

Publication Number Publication Date
CN115981901A true CN115981901A (en) 2023-04-18

Family

ID=85973243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211633564.XA Pending CN115981901A (en) 2022-12-19 2022-12-19 Fault positioning method, equipment and medium for automatic test of switch

Country Status (1)

Country Link
CN (1) CN115981901A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117931635A (en) * 2023-12-19 2024-04-26 深圳计算科学研究院 Analysis method, device, equipment and medium for database test case execution result

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117931635A (en) * 2023-12-19 2024-04-26 深圳计算科学研究院 Analysis method, device, equipment and medium for database test case execution result

Similar Documents

Publication Publication Date Title
CN107665171B (en) Automatic regression testing method and device
CN107943694B (en) Test data generation method and device
CN110460460B (en) Service link fault positioning method, device and equipment
CN111209206B (en) Automatic test method and system for software products
CN106897342B (en) Data verification method and equipment
CN110909363A (en) Software third-party component vulnerability emergency response system and method based on big data
CN110532056B (en) Control identification method and device applied to user interface
CN112905441A (en) Test case generation method, test method, device and equipment
US20150355888A1 (en) Acquiring identification of an application lifecycle management entity associated with similar code
CN112905451B (en) Automatic testing method and device for application program
CN109376285B (en) Data sorting verification method based on json format, electronic device and medium
CN111382069A (en) Data flow testing method and system
CN114070737B (en) Method and device for checking configuration data of equipment, storage medium and electronic equipment
CN115981901A (en) Fault positioning method, equipment and medium for automatic test of switch
CN115563008A (en) Code coverage rate detection system, method, device and storage medium
CN114490413A (en) Test data preparation method and device, storage medium and electronic equipment
CN114818887A (en) Method and device for detecting weld quality, storage medium and processor
CN112035308A (en) Method and device for generating system interface test table
CN107196789B (en) Method and device for checking base station parameters
CN111078574A (en) Method and device for generating influence analysis report
CN118277205A (en) Log checking method and device, storage medium and electronic equipment
CN110717131A (en) Page revising monitoring method and related system
CN116643980A (en) Automatic testing method, system and storage medium based on priority execution
CN114969186A (en) Automatic testing method and device and computer storage medium
CN113986764A (en) Data checking test method and device, electronic 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