CN107133168B - Event sequence fault positioning method - Google Patents

Event sequence fault positioning method Download PDF

Info

Publication number
CN107133168B
CN107133168B CN201710278374.3A CN201710278374A CN107133168B CN 107133168 B CN107133168 B CN 107133168B CN 201710278374 A CN201710278374 A CN 201710278374A CN 107133168 B CN107133168 B CN 107133168B
Authority
CN
China
Prior art keywords
test
event sequence
excitation
error
correct
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710278374.3A
Other languages
Chinese (zh)
Other versions
CN107133168A (en
Inventor
裴大茗
王建峰
晏裕生
吴美熹
孙孟阳
汪浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Institute Of Marine Technology & Economy
Original Assignee
China Institute Of Marine Technology & Economy
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 China Institute Of Marine Technology & Economy filed Critical China Institute Of Marine Technology & Economy
Priority to CN201710278374.3A priority Critical patent/CN107133168B/en
Publication of CN107133168A publication Critical patent/CN107133168A/en
Application granted granted Critical
Publication of CN107133168B publication Critical patent/CN107133168B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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

Abstract

The invention discloses an event sequence fault positioning method, which is applied to a test system, and is used for triggering a plurality of test event sequence excitations one by one to obtain a triggering result, obtaining a correct excitation set and an error excitation set according to the triggering result, calculating a safety value set of the system according to the correct excitation set, generating an additional test event sequence according to the safety value set and the error test excitation, and positioning the fault event sequence to obtain an error event sequence. And the safety value set and the error test excitation are adopted to carry out positioning analysis on the fault event sequence, so that the fault event sequence is quickly and accurately positioned.

Description

Event sequence fault positioning method
Technical Field
The invention relates to the field of software testing, in particular to an event sequence fault positioning method.
Background
In software testing, when an event sequence test case causes a software error, a tester needs to find out an error event sequence triggering a system fault.
Disclosure of Invention
It is an object of the present invention to provide a method for fast and accurate localization of sequences of error events in test stimuli.
In order to achieve the purpose, the invention provides the following scheme:
an event sequence fault positioning method is applied to a test system and comprises the following steps:
obtaining a possible error event sequence set according to a test result in the test system;
obtaining an error event sequence with the intensity of t according to the possible error event sequence set; obtaining a plurality of test stimuli according to the error event sequence with the intensity t;
triggering the plurality of test excitations one by one to obtain a triggering result;
judging whether the trigger result is wrong, if so, adding the test excitation corresponding to the trigger result wrong into a wrong excitation set M; otherwise, adding the test excitation with the correct corresponding trigger result into the correct excitation set N;
calculating according to the correct excitation set N to obtain a safety value set of the test system;
and positioning a corresponding error event sequence in each test excitation in the error excitation set M according to the safety value set, storing the error event sequence in an error event sequence set H, and outputting the error event sequence set H.
Optionally, the obtaining the safety value set of the test system according to the calculation of the correct excitation set N specifically includes:
setting the correct stimulus to have k events;
screening out the correct excitation of k > t from the correct excitation set N to obtain a new correct excitation set N';
and storing a sequence of the ith event to the (i + t) th event corresponding to each correct excitation in the new correct excitation set N' into the safety value set to obtain the safety value set, wherein when k > t, the value of i is 0,1, 2.
Optionally, the positioning, according to the safety value set, a corresponding error event sequence in each test stimulus in the error stimulus set M specifically includes:
setting the error stimulus as T;
initializing the error excitation T to obtain a set A, wherein the set A is an integer from 1 to k;
judging whether the intensity of the set A is greater than t, if so, continuing to perform; otherwise, replacing each element in the set A by each element in the safety value set one by one, positioning an error event sequence in the set A, and obtaining the error event sequence;
averagely dividing the set A into t +1 mutually disjoint sets A1,A2,...,At+1
Using said set A1,A2,...,At+1Set A ofjReplacing elements on the position corresponding to the error excitation with the safety value to obtain t +1 additional test excitations;
when m additional test excitations are triggered wrongly in the test process, acquiring a factor set A' corresponding to the intersection of the m additional test excitations;
generating a new test stimulus T 'according to the factor set A';
executing the new test excitation T ', judging whether the trigger result is wrong, and if so, carrying out the operation on the new test excitation T'; otherwise, the operation is performed by selecting one of the m additional test excitations.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects: the invention discloses an event fault sequence positioning method applied to a test system, which obtains correct test excitation and error test excitation according to a test excitation triggering result, obtains a safety value set according to the correct test excitation, and quickly and accurately obtains an error event sequence corresponding to each test excitation according to the error test excitation and safety value positioning analysis.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a method for event sequence fault location in accordance with the present invention;
FIG. 2 is a flow diagram of a method of calculating a set of security values;
fig. 3 is a flow chart of a method of location analysis.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is an object of the present invention to provide a method for fast and accurate localization of sequences of error events in test stimuli.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As shown in fig. 1, a method for locating a fault in an event sequence, where the locating method is applied in a test system, includes:
step 100: obtaining a possible error event sequence set according to a test result in the test system;
step 200: obtaining an error event sequence with the intensity of t according to the possible error event sequence set; obtaining a plurality of test stimuli according to the error event sequence with the intensity t;
step 300: triggering the plurality of test excitations one by one, and inputting the test excitations into a test system to obtain triggering results;
step 400: judging whether the trigger result is wrong, if so, executing the step 500; otherwise, go to step 600;
step 500: adding the test stimulus corresponding to the trigger result error into the error stimulus set M;
step 600: adding the test excitation with the correct corresponding trigger result into the correct excitation set N;
step 700: calculating according to the correct excitation set N to obtain a safety value set of the test system;
step 800: and positioning a corresponding error event sequence in each test excitation in the error excitation set M according to the safety value set, storing the error event sequence in an error event sequence set H, and outputting the error event sequence set H.
Optionally, as shown in fig. 2, the obtaining the set of safety values of the test system according to the calculation of the correct excitation set N specifically includes:
step 701: setting the correct stimulus to have k events, and the test stimulus is composed of k events;
step 702: screening out the correct excitation of k > t from the correct excitation set N to obtain a new correct excitation set N';
step 703: and storing a sequence of the ith event to the (i + t) th event corresponding to each correct excitation in the new correct excitation set N' into the safety value set to obtain the safety value set, wherein when k > t, the value of i is 0,1, 2.
Optionally, as shown in fig. 3, locating, according to the safety value set, a corresponding error event sequence in each test stimulus in the error stimulus set M specifically includes:
step 801: setting the error stimulus as T;
step 802: initializing the error excitation T to obtain a set A, wherein the set A is an integer from 1 to k;
step 803: judging whether the intensity of the set A is greater than t, if so, executing a step 805; otherwise, go to step 804;
step 804: replacing each element in the set A with each element in the safety value set one by one, positioning an error event sequence in the set A, and obtaining the error event sequence;
step 805: averagely dividing the set A into t +1 mutually disjoint sets A1,A2,...,At+1
Step 806: using said set A1,A2,...,At+1Set A ofjReplacing elements on the position corresponding to the error excitation with the safety value to obtain t +1 additional test excitations;
step 807: when m additional test excitations are triggered wrongly in the test process, acquiring a factor set A' corresponding to the intersection of the m additional test excitations;
step 808: generating a new test stimulus T 'according to the factor set A';
step 809: executing the new test excitation T', judging whether the trigger result is wrong, if so, executing step 810; otherwise, go to step 811;
step 810: re-executing step 801 with the new test stimulus T';
step 811: the additional test stimulus is re-executed 801 from any one of the m additional test stimuli.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (1)

1. An event sequence fault positioning method is applied to a test system, and is characterized in that the positioning method comprises the following steps:
step 100: obtaining a possible error event sequence set according to a test result in the test system;
step 200: obtaining an error event sequence with the intensity of t according to the possible error event sequence set; obtaining a plurality of test stimuli according to the error event sequence with the intensity t;
step 300: triggering the plurality of test excitations one by one to obtain a triggering result;
step 400: judging whether the trigger result is wrong, if so, executing the step 500; otherwise, go to step 600;
step 500: adding the test stimulus corresponding to the trigger result error into the error stimulus set M;
step 600: adding the test excitation with the correct corresponding trigger result into the correct excitation set N;
step 700: calculating according to the correct excitation set N to obtain a safety value set of the test system, specifically comprising:
step 701: setting a correct stimulus to have k events, wherein the k events form a test stimulus;
step 702: screening out the correct excitation of k > t from the correct excitation set N to obtain a new correct excitation set N';
step 703: storing a sequence of i-th event to i + t-th event corresponding to each correct excitation in the new correct excitation set N' into the safety value set to obtain the safety value set, wherein when k > t, the value of i is 0,1,2,... k-1;
step 800: locating a corresponding error event sequence in each test stimulus in the error stimulus set M according to the safety value set, storing the error event sequence in an error event sequence set H, and outputting the error event sequence set H, specifically including:
step 801: setting the error excitation as T;
step 802: initializing the error excitation T to obtain a set A, wherein the set A is an integer from 1 to k;
step 803: judging whether the intensity of the set A is greater than t, if so, executing a step 805; otherwise, go to step 804;
step 804: replacing each element in the set A with each element in the safety value set one by one, positioning an error event sequence in the set A, and obtaining the error event sequence;
step 805: equally dividing the set A intoSet A of t +1 mutually disjoint sets1,A2,...,At+1
Step 806: using said set A1,A2,...,At+1Set A ofjReplacing elements on the position corresponding to the error excitation with the safety value to obtain t +1 additional test excitations;
step 807: when m additional test excitations are triggered wrongly in the test process, acquiring a factor set A' corresponding to the intersection of the m additional test excitations;
step 808: generating a new test stimulus T 'according to the factor set A';
step 809: executing the new test excitation T', judging whether the trigger result is wrong, if so, executing step 810; otherwise, go to step 811;
step 810: re-executing step 801 with the new test stimulus T';
step 811: the additional test stimulus is re-executed 801 from any one of the m additional test stimuli.
CN201710278374.3A 2017-04-25 2017-04-25 Event sequence fault positioning method Active CN107133168B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710278374.3A CN107133168B (en) 2017-04-25 2017-04-25 Event sequence fault positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710278374.3A CN107133168B (en) 2017-04-25 2017-04-25 Event sequence fault positioning method

Publications (2)

Publication Number Publication Date
CN107133168A CN107133168A (en) 2017-09-05
CN107133168B true CN107133168B (en) 2020-08-11

Family

ID=59716610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710278374.3A Active CN107133168B (en) 2017-04-25 2017-04-25 Event sequence fault positioning method

Country Status (1)

Country Link
CN (1) CN107133168B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110658798A (en) * 2018-06-29 2020-01-07 株洲中车时代电气股份有限公司 Synchronous test system and method for transmission control unit of rail transit vehicle
CN108959091B (en) * 2018-07-06 2021-06-25 哈尔滨工业大学 Event sequence fault positioning method supporting constraint

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7379846B1 (en) * 2004-06-29 2008-05-27 Sun Microsystems, Inc. System and method for automated problem diagnosis
CN101482596A (en) * 2009-01-06 2009-07-15 南京大学 Fast fault recognition method for multifactor industrial system
CN103455417A (en) * 2013-07-20 2013-12-18 中国科学院软件研究所 Markovian model based software error positioning system and error positioning method
CN106230638A (en) * 2016-08-08 2016-12-14 海南大学 A kind of cloud service test based on event and adjustment method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902454A (en) * 2014-04-08 2014-07-02 安一恒通(北京)科技有限公司 Method and device for locating software faults

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7379846B1 (en) * 2004-06-29 2008-05-27 Sun Microsystems, Inc. System and method for automated problem diagnosis
CN101482596A (en) * 2009-01-06 2009-07-15 南京大学 Fast fault recognition method for multifactor industrial system
CN103455417A (en) * 2013-07-20 2013-12-18 中国科学院软件研究所 Markovian model based software error positioning system and error positioning method
CN106230638A (en) * 2016-08-08 2016-12-14 海南大学 A kind of cloud service test based on event and adjustment method and system

Also Published As

Publication number Publication date
CN107133168A (en) 2017-09-05

Similar Documents

Publication Publication Date Title
US20180196739A1 (en) System and method for safety-critical software automated requirements-based test case generation
FI3045925T3 (en) Method and system for iteratively determining state of charge of a battery cell
CN107133168B (en) Event sequence fault positioning method
Stratigopoulos et al. Fast Monte Carlo-based estimation of analog parametric test metrics
US8689155B1 (en) Method of proving formal test bench fault detection coverage
Hooda et al. A review: study of test case generation techniques
JP6891703B2 (en) Automatic software program repair
CN110990295B (en) Verification method and device for test cases and electronic equipment
CN104317707A (en) Program structure influence sensing based software error positioning method
CN106021113A (en) Precise test implementation method
US20100313187A1 (en) Method and system for detecting infeasible paths
CN108874656A (en) Code test method, device, readable storage medium storing program for executing and computer equipment
US20170242937A1 (en) Sensitivity analysis systems and methods using entropy
US9436587B2 (en) Test context generation
CN111382052A (en) Code quality evaluation method and device and electronic equipment
EP3570172A1 (en) Test case selection device and test case selection program
CN112783705A (en) Test method, device, system, chip and electronic equipment
Lee et al. Test Methodology for Real-Time Operating System
Peng et al. Reliability modeling for products subject to generalized extreme shock
Pomeranz New Targets for Diagnostic Test Generation
JP4479958B2 (en) Coverage acquisition system
CN109032932A (en) A kind of combined test Fault Locating Method for supporting constraint
JP4839638B2 (en) Tester simulation apparatus and test simulation method
CN111061599B (en) Method for generating check point of interface test environment
Kim et al. RT-Selection: A Regression Test Selection Technique using Textual Differencing and Change Impact Analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant