CN115328771A - Fault testing method, device, equipment and medium of testing tool - Google Patents

Fault testing method, device, equipment and medium of testing tool Download PDF

Info

Publication number
CN115328771A
CN115328771A CN202210923827.4A CN202210923827A CN115328771A CN 115328771 A CN115328771 A CN 115328771A CN 202210923827 A CN202210923827 A CN 202210923827A CN 115328771 A CN115328771 A CN 115328771A
Authority
CN
China
Prior art keywords
test
fault
tool
execution
stage
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
CN202210923827.4A
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.)
Traffic Control Technology TCT Co Ltd
Original Assignee
Traffic Control Technology TCT 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 Traffic Control Technology TCT Co Ltd filed Critical Traffic Control Technology TCT Co Ltd
Priority to CN202210923827.4A priority Critical patent/CN115328771A/en
Publication of CN115328771A publication Critical patent/CN115328771A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/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/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a fault testing method, a device, equipment and a medium of a testing tool, which relate to the field of automatic testing and comprise the following steps: acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case; under the condition that all the first code bit states are determined to be the same as the preset code bit states, modifying test parameters of the test case to generate fault data; traversing and reading fault data in each execution stage, and determining that the test tool has no fault under the condition that the output result of the test tool does not pass; the test case includes at least a transaction route. The invention carries out real simulation aiming at huge and complex actual environment in the field of rail transit control, so that each testing tool can have accurate testing capability, meanwhile, the invention can reduce repetitive operation, reduce the testing burden of subsequent development, improve the accuracy of the automatic testing tool and shorten the process from the development of the automatic testing tool to project application.

Description

Fault testing method, device, equipment and medium of testing tool
Technical Field
The invention relates to the technical field of automatic testing, in particular to a fault testing method, a fault testing device, fault testing equipment and a fault testing medium for a testing tool.
Background
Along with the development of the automatic test tool, more and more attention is paid to the verification of the automatic test tool, after the development of the automatic test tool is completed, the manual test result is compared with the test result of the automatic test tool so as to verify the correctness of the automatic test tool, and after the verification of a plurality of projects is completed, the usability of the tool is ensured.
Especially in the field of rail transit control, for the data to be tested, possible data errors have certain limitations, and how to cover effective error data is performed, so that all-around testing can be performed on possible faults to ensure the accuracy of an automatic testing tool.
Disclosure of Invention
The invention provides a fault testing method, a fault testing device, equipment and a fault testing medium for a testing tool, which are used for solving the technical defect that the fault testing of the testing tool cannot be automatically realized in the prior art.
In a first aspect, the present invention provides a method for testing a fault of a test tool, including:
acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool;
under the condition that all the first code bit states are determined to be the same as the preset code bit states, modifying the test parameters of the test case to generate fault data of the test case in each execution stage;
according to the fault data of the test tool in each execution stage, determining that the test tool has no fault when the output result of the test tool is failed;
the test case at least comprises a handling route.
According to the fault testing method of the testing tool provided by the invention, after all the first code bit states of the annunciator under each execution stage are obtained, the fault testing method further comprises the following steps:
generating a first driving instruction under the condition that the code bit state of the annunciator in any execution stage is different from a preset code bit state in all the first code bit states;
the first driving instruction is used for recording a fault problem and stopping testing.
According to the fault testing method of the testing tool provided by the invention, the obtaining of all the first code bit states of the annunciator at each execution stage comprises the following steps:
according to the unexecuted stage of the test case read by the test tool, determining a third code bit state of the annunciator under the unexecuted stage;
according to the execution unsuccessful stage of the test case read by the test tool, determining the fourth code bit state of the annunciator at the execution unsuccessful stage;
according to the post-execution success stage of the test case read by the test tool, determining the fifth code bit state of the annunciator in the post-execution success stage;
the all execution phases include the unexecuted phase, the post-execution unsuccessful phase, and the post-execution successful phase;
the first code bit states may include a third code bit state corresponding to the unexecuted stage, a fourth code bit state corresponding to the post-execution unsuccessful stage, and a fifth code bit state corresponding to the post-execution successful stage.
According to the fault testing method of the testing tool provided by the invention, under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits, the testing parameters of the test case are modified to generate fault data of the test case in each execution stage, and the fault testing method comprises the following steps:
generating a second driving instruction under the condition that all the first code bit states are determined to be the same as the preset code bit states;
responding to the second driving instruction, and calling a first test parameter table of the test case at each execution stage;
modifying the test parameters of the test case in each execution stage in the first test parameter table to generate a second test parameter table;
and replacing the first test parameter table according to the second test parameter table to generate fault data of the test case in each execution stage.
According to the fault testing method of the testing tool provided by the invention, the fault data under each execution stage is read according to the traversal of the testing tool, and the testing tool is determined to have no fault under the condition that the output result of the testing tool is failed, the fault testing method comprises the following steps:
entering a fault test of an unexecuted stage, and entering a fault test of an executed unsuccessful stage under the condition that an output result of the test tool is failed;
entering fault testing in a post-execution success stage under the condition that the output result of the testing tool does not pass;
and determining that the test tool has no fault in the test application related to the test case under the condition that the output result of the test tool does not pass.
According to the fault testing method of the testing tool provided by the invention, after the fault data under each execution stage is read according to the traversal of the testing tool, the fault testing method further comprises the following steps:
in the fault test of the unexecuted stage, determining that the test tool has faults in the test application related to the test case under the condition that the output result of the test tool passes;
or, in the fault test of the unsuccessful stage after execution, determining that the test tool has a fault in the test application related to the test case under the condition that the output result of the test tool passes;
or, in the fault test of the post-execution success stage, determining that the test tool has a fault in the test application related to the test case when the output result of the test tool is passed.
According to the fault testing method of the testing tool provided by the invention, after the testing tool is determined to be fault-free, the fault testing method further comprises the following steps:
and traversing all the test cases until the test tool is determined to have no fault in the test applications related to all the test cases.
According to the fault testing method of the testing tool provided by the invention, after determining that the testing tool has no fault in all testing applications related to the test cases, the fault testing method further comprises the following steps:
and traversing all the test tools until the test of all the test tools is completed.
In a second aspect, there is provided a fault testing apparatus for a testing tool, including:
a determination unit: the device is used for acquiring all first code bit states of the annunciator under each execution stage;
a modification unit: the test case fault detection module is used for modifying the test parameters of the test case under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits so as to generate fault data of the test case in each execution stage;
a test unit: the fault data under each execution stage are read according to traversal of the test tool, and the test tool is determined to be fault-free under the condition that the output result of the test tool does not pass;
the test case at least comprises a handling route.
In a third aspect, there is also provided a test tool comprising: a processing unit; further comprising a memory and a program or instructions stored on the memory and executable on the processing unit, the program or instructions when executed by the processing unit performing the steps of: acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool; modifying the test parameters of the test case to generate fault data of the test case at each execution stage under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits; according to the fault data read by the test tool in each execution stage in a traversing manner, and under the condition that the output result of the test tool does not pass, determining that the test tool has no fault; the test case at least comprises a handling route.
In a fourth aspect, an electronic device is further provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the processor implements the fault testing method of the testing tool.
In a fifth aspect, a non-transitory computer readable storage medium is also provided, on which a computer program is stored, which computer program, when executed by a processor, implements the method of fault testing of the test tool.
The invention provides a fault test method, a device, equipment and a medium of a test tool, which test the code bit states of annunciators at different execution stages in a test case through the test tool to realize forward detection of the test tool, and test the code bit states of the annunciators at different execution stages in the test case with fault data through the test tool by modifying parameters of the test case to realize reverse detection of the test tool, and the test tool passing both the forward detection and the reverse detection is taken as a fault-free test tool.
Drawings
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for testing a fault of a test tool provided by the present invention;
FIG. 2 is a schematic flow chart of obtaining all first code bit states of the semaphore at each execution stage according to the present invention;
FIG. 3 is a schematic flow chart of generating fault data of the test case at each execution stage according to the present invention;
FIG. 4 is a schematic flow chart of the present invention for determining that a test tool is not faulty;
FIG. 5 is a schematic structural diagram of a fault testing apparatus of the testing tool provided by the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Fig. 1 is a schematic flow chart of a fault testing method of a testing tool provided by the present invention, and the present invention discloses a fault testing method of a testing tool, which includes:
acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool;
under the condition that all the first code bit states are determined to be the same as the preset code bit states, modifying the test parameters of the test case to generate fault data of the test case in each execution stage;
according to the fault data of the test tool in each execution stage, determining that the test tool has no fault when the output result of the test tool is failed;
the test case at least comprises a transaction route.
The person skilled in the art understands that the invention is developed according to the test logic of the point-to-point automatic test tool, with the point-to-point test case as a requirement, and the fault injection test case is compiled based on the principle of the point-to-point test case.
In step 101, the test tool is a tested object intended to be tested by the present invention, but not an execution object intended to be tested, the present invention is intended to be applied to the field of rail transit, the test case at least includes a transaction route, the present invention optionally takes the transaction route as an example, at this time, all the execution stages at least include an unexecuted stage of the transaction route, an unsuccessful stage after execution, and a successful stage after execution, and in other embodiments, the stages may be 4 stages, 5 stages, or even more.
In the field of track traffic, the test cases not only include an access handling state, but also include a physical section state, consistency check initialization, a general solution, an area failure solution, time delay and the like, and each test case corresponds to each stage with different quantities, for example, the physical section state may include 5 stages, in step 101, the invention reads all execution stages of any test case to obtain all first code bit states of the annunciator under each execution stage, and a person skilled in the art understands that in the initial state, all devices such as traffic control devices, places and the like are normally connected, no access is handled on a line, and at this time, the annunciator is in a red light state, and a corresponding code bit state is checked on a corresponding protocol analysis tool; and after the route is successfully handled, the signal machine to be detected is in a non-red light state, and the corresponding code bit states are checked on the protocol analysis tool, wherein the sum of the code bit states is all the first code bit states of the signal machine in each execution stage.
In step 102, under the condition that the states of all the first code bits are the same as the states of the preset code bits, that is, the test of the test tool in the forward test is considered to pass, but this only means that the test tool can give a correct feedback result when the test tool can deal with a correct test case, and cannot give a correct feedback result when dealing with various error fault data. Because different testing parameters are corresponding to different stages, the invention can realize all-round testing of the testing result which can be made by the testing tool when corresponding to different fault data by covering all the testing contents.
In step 103, the present invention reads all fault data in each execution stage one by one, and determines that the test tool has no fault in the test application related to the test case when it is determined that all the output results of the test tool have failed, however, once the output result of the test tool is passed in the test of any fault data in the test stages, it is determined that there is a detection fault when the test tool is directed at the fault data. If the test tool only needs to test a single or appointed test case in the practical application, the test application detection only needs to be carried out on the single or appointed test case, and if the test tool needs to deal with all the test cases in the practical application, the test application detection needs to be carried out on all the test cases.
Optionally, after determining all the first code bit states of the semaphore at each execution stage, the method further includes:
generating a first driving instruction under the condition that the code bit state of the annunciator at any execution stage is different from the preset code bit state in all the first code bit states;
the first driving instruction is used for recording a fault problem and stopping testing.
In such an embodiment, the condition that the code bit state of the annunciator is different from the preset code bit state at any execution stage indicates that the test of the test tool in the forward test is not passed, and the test tool cannot give a correct feedback result when dealing with a correct test case, because the tool verification based on fault injection according to the present invention is an automated completion test, a first drive instruction needs to be generated at this time, and the first drive instruction is used for recording a fault problem and stopping the test, that is, it is considered that the current test tool has a fault, and the fault reason is: correspondingly, the forward test error can also give a specific stage at which the code bit state of the annunciator is different from the preset code bit state, for example, at a stage when the route is not handled, the code bit state is displayed as 0, and the preset code bit state is 1, so that the two display results are different, and a fault exists. The skilled person understands that each execution stage corresponds to a code bit state of the semaphore under an actual output result, each execution stage corresponds to a preset code bit state, and whether to generate the first driving instruction is determined by adopting a principle of comparing the code bit states one by one.
Optionally, after reading the fault data at each execution stage according to the traversal of the test tool, the method further includes:
in the fault test of the unexecuted stage, determining that the test tool has faults in the test application related to the test case under the condition that the output result of the test tool passes;
or, in the fault test of the unsuccessful stage after execution, determining that the test tool has a fault in the test application related to the test case under the condition that the output result of the test tool passes;
or, in the fault test of the post-execution success stage, determining that the test tool has a fault in the test application related to the test case when the output result of the test tool is passed.
Optionally, in the fault test at the non-execution stage, when the output result of the test tool passes, it is determined that the test tool has a fault in the test application related to the test case, at this time, the test may be terminated, the result may be recorded immediately, and the next test tool may be selected for detection; the test can also be continuously completed, that is, after the detection of all stages related to the test case is completed, the test result is reported together. The invention stops the test immediately and starts to execute the test of the next test tool as long as the test tool is determined to have a fault in the test application related to the test case, thereby saving the time spent on detecting all the execution stages of the test case and improving the test efficiency.
The skilled person understands that, because there is a certain sequence of detection, the present invention optionally tests an unexecuted stage, an unsuccessful stage after execution, and a successful stage after execution in sequence, that is, there may be a case that the output results of the test tool all pass, or there may be a case that the output results of the test tool partially pass, at this time, all the test results need to be recorded, but once there is a case that the output result of any one of the test tools passes, it is considered that the test tool has a fault in the test application related to the test case.
Optionally, after determining that the test tool is fault-free, the method further includes:
and traversing all the test cases until the test tool is determined to have no fault in the test applications related to all the test cases.
The invention aims to realize the fault test of an automatic test tool, so that the test related to all test cases is required to be completed for any test tool, the test tool can be considered to be fault-free only under the condition that all test cases are traversed and no fault is found in the forward test and the reverse test of the test tool at any execution stage in any test case, and the test tool completing the test can be suitable for all test cases by the forward test and the reverse test of all test cases at any execution stage, thereby increasing the applicability of the test tool, verifying the test capability of the test tool and providing data support and reliable guarantee for the test tool after the subsequent actual use.
Optionally, after determining that the test tool has no fault in all test applications related to the test cases, the method further includes:
and traversing all the test tools until the test of all the test tools is completed.
The invention is not only used for the automatic test of a single test tool, but also applied to the batch detection of batch test tools, can be used as the product automatic quality inspection guarantee of the single test tool, and can provide quality inspection guarantee for the mass production of the test tools, thereby reducing the test cost, shortening the test time and improving the test efficiency.
The invention provides a fault test method, a device, equipment and a medium of a test tool, which test the code bit states of annunciators at different execution stages in a test case through the test tool to realize forward detection of the test tool, and test the code bit states of the annunciators at different execution stages in the test case with fault data through the test tool by modifying parameters of the test case to realize reverse detection of the test tool, and the test tool passing both the forward detection and the reverse detection is taken as a fault-free test tool.
Fig. 2 is a schematic flow chart of determining all the first code bit states of the semaphore at each execution stage according to the present invention, where acquiring all the first code bit states of the semaphore at each execution stage includes:
according to the unexecuted stage of the test case read by the test tool, determining a third code bit state of the annunciator under the unexecuted stage;
according to the execution unsuccessful stage of the test case read by the test tool, determining the fourth code bit state of the annunciator at the execution unsuccessful stage;
according to the post-execution success stage of the test case read by the test tool, determining the fifth code bit state of the annunciator in the post-execution success stage;
the all execution phases include the unexecuted phase, the post-execution unsuccessful phase, and the post-execution successful phase;
the first code bit states may include a third code bit state corresponding to the unexecuted stage, a fourth code bit state corresponding to the post-execution unsuccessful stage, and a fifth code bit state corresponding to the post-execution successful stage.
In step 1011, the unexecuted stage of the test case is read by the test tool, and the third code bit state of the semaphore under the unexecuted stage is determined, taking the transaction route as an example, and the third code bit state of the semaphore is determined to be 1 by the test tool at the unexecuted stage of the transaction route.
In step 1012, according to the unsuccessful after execution stage of reading the test case by the test tool, determining a fourth code bit state of the annunciator in the unsuccessful after execution stage, and in the unsuccessful after execution stage of handling the route, determining the third code bit state of the annunciator as 1 by the test tool, where in the case of handling the route, the third code bit state is the same as the fourth code bit state, and in other test cases, the third code bit state may be different from the fourth code bit state.
In step 1013, the post-execution success stage of the test case read by the test tool determines the fifth code bit state of the semaphore in the post-execution success stage, and in the post-execution success stage of the transaction route, the fifth code bit state of the semaphore is determined to be 0 by the test tool.
For the processing route, all the execution phases include the non-execution phase, the non-successful after execution phase and the successful after execution phase, while for other test cases, such as consistency check initialization of this test case, it may also include 5 phases or even more, and accordingly, each of the phases thereof will correspond to a code bit state.
For example, for a route, the first code bit states may include a third code bit state corresponding to the unexecuted stage, a fourth code bit state corresponding to the post-execution unsuccessful stage, and a fifth code bit state corresponding to the post-execution successful stage.
According to the method and the device, all the execution stages are divided, so that a data basis is provided for judging the subsequent first code bit state according to different first code bit states read by the test tool in different execution stages.
Fig. 3 is a schematic flow diagram of generating fault data of the test case in each execution phase, where in a case that it is determined that states of all the first code bits are the same as states of preset code bits, a test parameter of the test case is modified to generate fault data of the test case in each execution phase, where the method includes:
generating a second driving instruction under the condition that all the first code bit states are determined to be the same as the preset code bit states;
responding to the second driving instruction, and calling a first test parameter table of the test case in each execution stage;
modifying the test parameters of the test case in each execution stage in the first test parameter table to generate a second test parameter table;
and replacing the first test parameter table according to the second test parameter table to generate fault data of the test case in each execution stage.
In step 1021, in the case that all the first code bit states are the same as the preset code bit states, the second driving instruction is generated, that is, it is ensured that the detection result of the test tool at this stage for the forward test is passed, and at this time, the test tool needs to be tested in the reverse direction, that is, the second driving instruction is generated.
In step 1022, in response to the second driving instruction, a first test parameter table of the test case at each execution stage is called, where the first test parameter table is optionally table data in spreadsheet software, and includes an index number, a semaphore name, a type, an attribute, and the like, and the first test parameter table is directly retrievable from a corresponding management control device through the second driving instruction.
In step 1023, modifying the test parameters of the test case in each execution phase in the first test parameter table to generate a second test parameter table, in an optional embodiment, the invention modifies the test parameters in the first test parameter table by an automatic modification tool, and in other embodiments, modifies the test parameters in the first test parameter table by disturbing an index number in the test parameters, adding a preset value form on the basis of an original index number, and the like, and determines the modified first test parameter table as the second test parameter table.
In an optional embodiment, the test case is a handled route, the code bits of the annunciator are 0 at the non-handled stage of the handled route, at this time, the code bits of the annunciator can be determined according to the interface code bit data in the first test parameter table, and data modification is performed on the red light code bits of the annunciator, and at the unsuccessful stage of the route handling, the annunciator table is determined according to the file electronic map data, and then the index number is determined, and the first test parameter table is modified according to the index number; and under the stage of successfully transacting the route, the red light code position of the annunciator is 1, at the moment, the route table is determined according to the file electronic map data, the number of the starting end annunciator is further determined, and the first test parameter table is modified according to the number of the starting end annunciator.
In step 1024, replacing the first test parameter table with the second test parameter table to generate fault data of the test case at each execution stage.
According to the invention, the test parameters of the test case are modified, and then the test tool is used for testing the code bit states of the annunciators at different execution stages in the test case with fault data, so that the reverse detection of the test tool is realized, and the code bit states are used as an important part for determining whether the test tool has a fault.
Fig. 4 is a schematic flow diagram for determining that a test tool does not have a fault in the test application related to the test case, where the fault data in each execution stage is read according to traversal of the test tool, and the test tool does not have a fault when an output result of the test tool is failed, and the method includes:
entering a fault test of an unexecuted stage, and entering a fault test of an executed unsuccessful stage under the condition that an output result of the test tool is failed;
entering fault testing in a post-execution success stage under the condition that the output result of the testing tool does not pass;
and under the condition that the output result of the test tool is failed, determining that the test tool has no fault in the test application related to the test case.
In step 1031, the present invention determines that the test tool has no fault in the test application related to the test case, and needs to go through a continuous test process, that is, only when the tests in all stages have no fault, it can be determined that the test tool has no fault in the test application related to the test case, at this time, the fault test in the unexecuted stage is entered, and when the output result of the test tool is failed,
and entering fault testing at the unsuccessful stage after execution, considering that the testing capability of the testing work is normal under the condition that the output result of the testing tool is failed, smoothly detecting the judgment that the output result is failed when testing fault data, considering that the fault testing of the testing tool at the unsuccessful stage does not have faults at the moment, and further entering the fault testing at the unsuccessful stage after execution.
In step 1032, in the fault test in the unsuccessful stage after execution, if the output result of the test tool is failed, the test capability of the test operation at this time is considered to be normal, and when the fault data is tested, the judgment that the output result is failed can be successfully detected, at this time, it is considered that the fault test in the unsuccessful stage after execution of the test tool does not have a fault, and then the fault test in the successful stage after execution is performed.
In step 1033, in the fault test at the post-execution success stage, if the output result of the test tool does not pass, it is determined that the fault tests of all stages in the test tool are tested normally, and at this time, it is determined that the test tool has no fault in the test application related to the test case, and the test application related to the test case is the fault detection at each stage related to the test case in the actual application process and for the actual control environment.
The fault test of the invention can be determined to be normal in all stages of fault tests only under the condition that the output results of the test tool fail in all fault test detections of all execution stages, and the fault test of the invention does not adopt a blind detection mode, but ensures that all fault test contents can be traversed in the reverse test until the test tool is determined to have no fault in the reverse test, thereby greatly improving the fault detection accuracy of each test tool and providing precision guarantee for the practical use of the subsequent test tools.
Fig. 5 is a schematic structural diagram of a fault testing apparatus of a testing tool provided in the present invention, and the present invention further discloses a fault testing apparatus of a testing tool, including a determining unit 1: for obtaining all the first code bit states of the semaphore at each execution stage, the working principle of the determining unit 1 may refer to the foregoing step 101, which is not described herein again.
The failure testing device of the testing tool further comprises a modification unit 2: and modifying the test parameters of the test case to generate fault data of the test case at each execution stage when it is determined that the states of all the first code bits are the same as the states of the preset code bits, where the working principle of the modifying unit 2 may refer to step 102, which is not described herein again.
The failure testing device of the testing tool further comprises a testing unit 3: for determining that the test tool has no fault when the output result of the test tool is failed according to the fault data read by the test tool in each execution stage in a traversal manner, the foregoing step 103 may be referred to as the working principle of the test unit 3, which is not described herein again.
The test case at least comprises a handling route.
The invention provides a fault test method, a device, equipment and a medium of a test tool, which test the code bit states of annunciators at different execution stages in a test case through the test tool to realize forward detection of the test tool, and test the code bit states of the annunciators at different execution stages in the test case with fault data through the test tool by modifying parameters of the test case to realize reverse detection of the test tool, and the test tool passing both the forward detection and the reverse detection is taken as a fault-free test tool.
In another aspect, the present invention also provides a test tool, comprising: a processing unit; further comprising a memory and a program or instructions stored on the memory and executable on the processing unit, the program or instructions when executed by the processing unit performing a method of fault testing of the test tool, the method comprising: acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool; modifying the test parameters of the test case to generate fault data of the test case at each execution stage under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits; according to the fault data read by the test tool in each execution stage in a traversing manner, and under the condition that the output result of the test tool does not pass, determining that the test tool has no fault; the test case at least comprises a handling route.
Fig. 6 is a schematic structural diagram of an electronic device provided in the present invention. Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor) 610, a communication Interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a method of fault testing of a test tool, the method comprising: acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool; modifying the test parameters of the test case to generate fault data of the test case at each execution stage under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits; according to the fault data of the test tool in each execution stage, determining that the test tool has no fault when the output result of the test tool is failed; the test case at least comprises a handling route.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer-readable storage medium, the computer program, when executed by a processor, being capable of executing a method for testing a fault of a test tool provided by the above methods, the method comprising: acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool; modifying the test parameters of the test case to generate fault data of the test case at each execution stage under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits; according to the fault data of the test tool in each execution stage, determining that the test tool has no fault when the output result of the test tool is failed; the test case at least comprises a handling route.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a fault testing method for providing a testing tool to perform the above methods, the method comprising: acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool; under the condition that all the first code bit states are determined to be the same as the preset code bit states, modifying the test parameters of the test case to generate fault data of the test case in each execution stage; according to the fault data of the test tool in each execution stage, determining that the test tool has no fault when the output result of the test tool is failed; the test case at least comprises a handling route.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of fault testing a test tool, comprising:
acquiring all first code bit states of the annunciator under each execution stage, wherein the execution stages comprise all execution stages for reading any test case by a test tool;
modifying the test parameters of the test case to generate fault data of the test case at each execution stage under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits;
according to the fault data of the test tool in each execution stage, determining that the test tool has no fault when the output result of the test tool is failed;
the test case at least comprises a handling route.
2. The method of claim 1, wherein the obtaining all the first code bit states of the semaphore at each execution stage comprises:
reading the unexecuted stage of the test case according to the test tool, and determining a third code bit state of the annunciator at the unexecuted stage;
according to the execution unsuccessful stage of the test case read by the test tool, determining the fourth code bit state of the annunciator at the execution unsuccessful stage;
according to the post-execution success stage of the test case read by the test tool, determining the fifth code bit state of the annunciator in the post-execution success stage;
the all execution phases include the unexecuted phase, the post-execution unsuccessful phase, and the post-execution successful phase;
the first code bit states include a third code bit state corresponding to the unexecuted stage, a fourth code bit state corresponding to the post-execution unsuccessful stage, and a fifth code bit state corresponding to the post-execution successful stage.
3. The method for testing the faults of the test tool according to claim 1, wherein in a case that it is determined that all the first code bit states are the same as preset code bit states, modifying the test parameters of the test case to generate the fault data of the test case at each execution stage includes:
generating a second driving instruction under the condition that the states of all the first code bits are determined to be the same as the states of the preset code bits;
responding to the second driving instruction, and calling a first test parameter table of the test case in each execution stage;
modifying the test parameters of the test case in each execution stage in the first test parameter table to generate a second test parameter table;
and replacing the first test parameter table according to the second test parameter table to generate fault data of the test case in each execution stage.
4. The method of claim 1, wherein the reading the fault data at each execution stage according to the traversal of the test tool, and determining that the test tool has no fault if the output result of the test tool is failed comprises:
entering a fault test of an unexecuted stage, and entering a fault test of an executed unsuccessful stage under the condition that an output result of the test tool is failed;
entering fault testing in a post-execution success stage under the condition that the output result of the testing tool does not pass;
and under the condition that the output result of the test tool is failed, determining that the test tool has no fault in the test application related to the test case.
5. The method of claim 1, further comprising, after reading the fault data at each execution stage according to the test tool traversal, the steps of:
in the fault test of the unexecuted stage, determining that the test tool has faults in the test application related to the test case under the condition that the output result of the test tool passes;
or, in the fault test of the unsuccessful stage after execution, determining that the test tool has a fault in the test application related to the test case under the condition that the output result of the test tool passes;
or, in the fault test of the post-execution success stage, determining that the test tool has a fault in the test application related to the test case when the output result of the test tool is passed.
6. The method of claim 1, further comprising, after determining that the test tool is fault-free:
and traversing all the test cases until the test tool is determined to have no fault in the test applications related to all the test cases.
7. A failure testing apparatus of a test tool, comprising:
a determination unit: the device is used for acquiring all first code bit states of the annunciator under each execution stage;
a modification unit: the test method comprises the steps of modifying test parameters of a test case under the condition that the states of all first code bits are determined to be the same as the states of preset code bits so as to generate fault data of the test case at each execution stage;
a test unit: the fault data under each execution stage is read according to traversal of the test tool, and the test tool is determined to be fault-free under the condition that the output result of the test tool does not pass;
the test case at least comprises a handling route.
8. A test tool, comprising: a processing unit;
further comprising a memory and a program or instructions stored on the memory and executable on the processing unit, the program or instructions when executed by the processing unit performing a method of fault testing of a test tool according to any of claims 1 to 6.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of fault testing of the test tool of any of claims 1 to 6 when executing the program.
10. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing a method of fault testing of a test tool according to any one of claims 1 to 6.
CN202210923827.4A 2022-08-02 2022-08-02 Fault testing method, device, equipment and medium of testing tool Pending CN115328771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210923827.4A CN115328771A (en) 2022-08-02 2022-08-02 Fault testing method, device, equipment and medium of testing tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210923827.4A CN115328771A (en) 2022-08-02 2022-08-02 Fault testing method, device, equipment and medium of testing tool

Publications (1)

Publication Number Publication Date
CN115328771A true CN115328771A (en) 2022-11-11

Family

ID=83920199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210923827.4A Pending CN115328771A (en) 2022-08-02 2022-08-02 Fault testing method, device, equipment and medium of testing tool

Country Status (1)

Country Link
CN (1) CN115328771A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130945A (en) * 2023-10-26 2023-11-28 中国证券登记结算有限责任公司 Test method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130945A (en) * 2023-10-26 2023-11-28 中国证券登记结算有限责任公司 Test method and device
CN117130945B (en) * 2023-10-26 2024-02-09 中国证券登记结算有限责任公司 Test method and device

Similar Documents

Publication Publication Date Title
JP2017033562A (en) System and method for model based technology and process for safety-critical software development
CN111198811A (en) Page automatic test method and device, electronic equipment and storage medium
CN112380255A (en) Service processing method, device, equipment and storage medium
US20140208297A1 (en) Validation of revised computer programs
CN112925524A (en) Method and device for detecting unsafe direct memory access in driver
CN111506509A (en) Automatic testing method, device, equipment and storage medium for automobile software unit
CN115328771A (en) Fault testing method, device, equipment and medium of testing tool
CN103678116A (en) Method and system for facilitating automated program testing
CN109815124B (en) MBSE-based interlocking function defect analysis method and device and interlocking system
CN117421217A (en) Automatic software function test method, system, terminal and medium
KR20220073151A (en) FMEA failure mode recommend system
KR20120111618A (en) Apparatus and method for testing plc command
JP4957521B2 (en) Software partial test system, method and program used therefor
JP2023000907A (en) Source code correction support device and source code correction support method
CN110633204B (en) Program defect detection method and device
CN113468058A (en) Regression testing method and device for software-as-a-service platform and electronic equipment
CN115176233A (en) Performing tests in deterministic order
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
CN109800155B (en) Method and device for testing QTE interlocking application software based on Probe
RU2817186C1 (en) System for confirming tests and testing embedded software of electronic devices
CN117785695A (en) Error reporting detection method, device, equipment and storage medium based on software integration
EP4287027A1 (en) Method and system for generating test cases for an engineering program
CN117609030A (en) Kanzi-based HMI (human machine interface) automatic test method, kanzi-based HMI automatic test system and storage medium
JPH036630A (en) Check system for interactive processing program
CN117950972A (en) Simulation verification method and device for chip, 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