[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109669436B - Test case generation method and device based on functional requirements of electric automobile - Google Patents

Test case generation method and device based on functional requirements of electric automobile Download PDF

Info

Publication number
CN109669436B
CN109669436B CN201811490039.0A CN201811490039A CN109669436B CN 109669436 B CN109669436 B CN 109669436B CN 201811490039 A CN201811490039 A CN 201811490039A CN 109669436 B CN109669436 B CN 109669436B
Authority
CN
China
Prior art keywords
test
test case
functional requirements
items related
functional
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
CN201811490039.0A
Other languages
Chinese (zh)
Other versions
CN109669436A (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.)
Guangzhou Xiaopeng Motors Technology Co Ltd
Original Assignee
Guangzhou Xiaopeng Motors 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 Guangzhou Xiaopeng Motors Technology Co Ltd filed Critical Guangzhou Xiaopeng Motors Technology Co Ltd
Priority to CN201811490039.0A priority Critical patent/CN109669436B/en
Publication of CN109669436A publication Critical patent/CN109669436A/en
Application granted granted Critical
Publication of CN109669436B publication Critical patent/CN109669436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0259Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
    • G05B23/0262Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Testing Electric Properties And Detecting Electric Faults (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention relates to a test case generation method and a test case generation device based on functional requirements of an electric vehicle. The method comprises the steps of obtaining a test item related to the functional requirement of the electric automobile; aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logic relationship among the test conditions to form a functional test set; constructing a truth table of a test case according to the functional test set; a test case set construction step: according to the truth table of the constructed test cases, the test case set is constructed, so that the generation process of the test cases is normalized, and the correctness, the efficiency and the coverage sufficiency of the test cases are improved.

Description

Test case generation method and device based on functional requirements of electric automobile
Technical Field
The invention belongs to the technical field of electric vehicle software testing, and particularly relates to a test case generation method and device based on functional requirements of an electric vehicle.
Background
A Test Case (Test Case) is a set of Test inputs, execution conditions, and expected results tailored for a particular target to Test a certain program path or verify whether a certain specific requirement is met. The test case is used for scientifically organizing and summarizing the behavior activity of the software test, and aims to convert the behavior of the software test into a manageable mode; meanwhile, the test case is also one of methods for specifically quantifying the test, and the test cases are different for different types of software. Therefore, the correctness, efficiency and coverage sufficiency of the test cases directly reflect the quality of the test cases.
In the prior art, a test case compiling method includes an equivalence class division method, a boundary value method, a causal graph method, a decision table method and the like, wherein the equivalence class division method is a method for systematically determining test conditions to be input, all possible input data (effective and ineffective) of a program are divided into a plurality of equivalence classes, representative data are selected from each class and used as test cases to be reasonably classified, and the test cases are composed of representatives of the effective equivalence classes and the ineffective equivalence classes, so that the completeness and the representativeness of the test cases are guaranteed. The internal structure of the program can be not considered by designing the test cases by using the equivalence class division method, the test cases are designed mainly through understanding of software function requirements of professional technicians, and different test cases are respectively designed to be applied to the electric automobile model-in-loop test and the hardware-in-loop test.
However, at present, the equivalent class partitioning method lacks a normalized test case generation link, and the high dependence on the professional performance of a tester may cause the test case to lack reliability and integrity, and cannot fully cover the proposed software function requirement. Therefore, a normalized test case generation method needs to be formulated. Meanwhile, at present, a complete vehicle test for the electric vehicle does not have a perfect test case generation method, and test cases are mostly designed according to vehicle performance without considering the problems of software.
Disclosure of Invention
In order to solve the technical problem of irregular test case generation, the invention provides a test case generation method and device based on the functional requirements of an electric vehicle. The test case generation method based on the functional requirements of the electric automobile comprises the following steps:
an acquisition step: acquiring a test item related to the functional requirement of the electric automobile;
the functional test set comprises the following steps: aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logic relationship among the test conditions to form a functional test set;
a truth table construction step: constructing a truth table of a test case according to the functional test set;
a test case set construction step: and constructing a test case set according to the truth table of the constructed test cases.
Further, the test items related to the functional requirements of the electric vehicle may include normative test items related to the functional requirements of the electric vehicle, test items related to problems of software, and other test items related to the functional requirements of the electric vehicle.
Further, in the step of forming the functional test set, the test condition is split into multiple levels of splitting conditions, and a logical relationship between the splitting conditions is determined in each level of splitting conditions.
Further, in the step of constructing the truth table, a test case number is generated according to the test condition and the logical relationship between the test conditions and the logical relationship between the multi-stage splitting condition and the multi-stage splitting condition, and the truth table of the test case is constructed.
Further, in the test case set construction step, aiming at the normative test items related to the functional requirements of the electric automobile, constructing a test case set of the normative test items related to the functional requirements of the electric automobile; aiming at the test items related to the problems of the software, constructing a test case set of the test items related to the problems of the software; aiming at other test items related to the functional requirements of the electric automobile, constructing a test case set of the other test items related to the functional requirements of the electric automobile; the three test cases form a whole vehicle function test case library of the electric vehicle.
Further, the test case generation method also comprises an inspection step, wherein defects in the test case generation process are inspected and fed back.
The test case generation device based on the functional requirements of the electric automobile is characterized by comprising the following components:
an acquisition section: acquiring a test item related to the functional requirement of the electric automobile;
functional test set component: aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logic relationship among the test conditions to form a functional test set;
truth table building element: constructing a truth table of a test case according to the functional test set;
the test case set constructs the part: and constructing a test case set according to the truth table of the constructed test cases.
Further, the test items related to the functional requirements of the electric vehicle may include normative test items related to the functional requirements of the electric vehicle, test items related to problems of software, and other test items related to the functional requirements of the electric vehicle.
Further, the test case generation device further comprises an inspection component for inspecting defects occurring in the test case generation process and feeding back the defects.
Further, the functional test set composing means splits the test condition into a plurality of levels of splitting conditions, and determines a logical relationship between the splitting conditions in each level of splitting conditions.
The invention has the beneficial effects that: according to the test case generation method and device based on the functional requirements of the electric automobile, the test items related to the functional requirements of the electric automobile are obtained, the test conditions of the test items related to the functional requirements of the electric automobile and the logic relation among the test conditions are determined, a functional test set is formed, the truth table of the test cases is constructed, the test cases are generated, the generation process of the test cases is normalized, and the correctness, the efficiency and the coverage sufficiency of the test cases are improved. Meanwhile, a test case is independently generated aiming at the test items related to the vehicle and the software problem and is used for the whole vehicle test of the electric vehicle, so that the normalization and the accuracy of the whole vehicle test are improved.
Drawings
Fig. 1 is a flowchart of a test case generation method based on functional requirements of an electric vehicle according to a first embodiment of the present invention;
fig. 2 is a block diagram of a test case generation apparatus based on functional requirements of an electric vehicle according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings. Those skilled in the art will appreciate that the present invention is not limited to the drawings and the following examples.
A first embodiment of the present invention provides a test case generation method based on functional requirements of an electric vehicle, as shown in fig. 1, including the following steps:
an acquisition step: test items related to the functional requirements of the electric automobile are acquired.
The test items related to the functional requirements of the electric vehicle may include normative test items related to the functional requirements of the electric vehicle, test items related to problems of software, and other test items related to the functional requirements of the electric vehicle.
The normative test items related to the functional requirements of the electric automobile are functional test items compiled by taking the requirements of users on the electric automobile as a starting point, and are important bases for generating test cases, and the coverage of the test cases depends on the extraction capability of test conditions in the normative test items related to the functional requirements of the electric automobile. For example, in the test of the electric vehicle, the normative test items related to the functional requirements of the electric vehicle include that the electric vehicle enters an enabling state, the electric vehicle enters an auto-cruising state, or the electric vehicle enters a stopped state, and the like.
The test items related to the software problems are compiled according to the problems related to the software in the actual test, and the problem points are incorporated into the test cases of the whole vehicle. For example, in the test of an electric vehicle, a test item of the electric vehicle related to a problem of software is a complete vehicle test item compiled from a problem related to software that occurs in a bench test or a complete vehicle test.
The other test items related to the functional requirements of the electric vehicle are other test items related to the functional requirements of the electric vehicle which cannot be covered by the above two items. For example, in the testing of electric vehicles, other test items related to the functional requirements of electric vehicles include entire vehicle test items organized according to the problem of failure of electric vehicles occurring under special operations.
The functional test set comprises the following steps: and aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logic relationship among the test conditions to form a functional test set.
Each test item related to the functional requirements of the electric vehicle has a unique functional test set number, and the test conditions and the logical relationship between the test conditions are associated with the functional test set numbers of the test items.
The functional test set is an important part for generating test cases according to test items related to the functional requirements of the electric automobile. The functional test set has a subdivision function of test conditions, and can further split the test conditions into multiple levels of splitting conditions, such as a first level splitting condition and a second level splitting condition … …, and determine a logical relationship between the splitting conditions in each level of splitting conditions. The subdivided multi-level splitting condition and the logical relationship between the splitting conditions are associated with the functional test set number.
A truth table construction step: and constructing a truth table of the test case according to the functional test set.
And generating test case numbers according to the contents of the functional test set, the test conditions and the logical relationship between the multi-stage splitting conditions and the multi-stage splitting conditions, and constructing a truth table of the test cases.
In the truth table of the test cases, each row can correspond to one test case, the test case number is unique, each column can correspond to the test condition or the multi-level splitting condition of the test case, and the test conditions or the multi-level splitting conditions of each column have certain logical relations, and the logical relations come from a functional test set, so that the comprehensive coverage and the uniqueness of the test cases can be ensured.
A test case set construction step: and constructing a test case set according to the truth table of the constructed test cases.
The method comprises the steps of establishing a test case set of the normative test items related to the functional requirements of the electric automobile aiming at the normative test items related to the functional requirements of the electric automobile, wherein the generated test case set is used for the electric automobile model in-loop test and the hardware in-loop test (a real-time processor runs a simulation model to simulate the running state of a controlled object and is connected with an ECU to be tested through an I/O interface to carry out comprehensive and systematic test on the ECU to be tested). The testing steps of the corresponding test case comprise an experiment preparation step, an experiment setting step and an inspection step, and the detailed action description is carried out on the testing process.
And aiming at the test items related to the problems of the software, constructing a test case set of the test items related to the problems of the software. Each problem found in the software test corresponds to a test item, and the test item comprises a functional test set number, a test case number, problem point description, reason analysis and the like. The testing steps of the corresponding test case comprise an experiment preparation step, an experiment setting step, a checking step and remarks, and the contents of the remarks are the testing modes suitable for the test case.
Aiming at other test items related to the functional requirements of the electric automobile, a test case set of the other test items related to the functional requirements of the electric automobile is constructed, and the generated test case set is used for the electric automobile model in-loop test and the hardware in-loop test (a real-time processor runs a simulation model to simulate the running state of a controlled object and is connected with the tested ECU through an I/O interface to carry out comprehensive and systematic test on the tested ECU). The testing steps of the corresponding test case comprise an experiment preparation step, an experiment setting step and an inspection step, and the detailed action description is carried out on the testing process.
The multiple test case sets of the normative test items related to the functional requirements of the electric automobile, the multiple test case sets of the test items related to the software problems and the multiple test case sets of other test items related to the functional requirements of the electric automobile form a whole automobile functional test case library of the electric automobile, and therefore correctness and efficiency of the test cases are effectively improved.
The test case generation method based on the function requirement of the electric vehicle comprises an inspection step, wherein the inspection step is used for inspecting the test items related to the function requirement of the electric vehicle, for example, defects in the function requirement content provided in the test items are inspected, when the test cases cannot be generated due to the inspected defects, the problem points are recorded in time and fed back, so that the test items related to the function requirement of the electric vehicle are properly modified, and the generation of the test cases is ensured.
Hereinafter, taking the application layer software test of the entire electric vehicle controller as an example, a test case generation process of the electric vehicle entering a workable (Ready) state is described in detail.
First, a test item that the electric vehicle enters a workable (Ready) state is obtained.
Subsequently, according to the functional requirement of the electric automobile entering the operable (Ready) state, the testing condition is determined. The test conditions comprise high-voltage electricity completion on the high-voltage system, key signal validity, no UDS forbidding to enter Ready request and no gear fault, and the logical relation among the test conditions is logical AND, namely, when the conditions that the high-voltage electricity completion and key signal validity and no UDS forbidding to enter Ready request and no gear fault exist on the high-voltage system are simultaneously met, the vehicle can enter a functional (Ready) state, and a functional test set is formed, wherein the conditions are shown in a table I.
Figure BDA0001895465970000051
Watch 1
The test conditions in table one were further split, resulting in a first level of splitting conditions, as shown in table two. Splitting a test condition of ' high voltage on a high voltage system is completed ' into a first-stage splitting condition ' under a power-off state, starting an SSB one key ' and ' high voltage power-on is completed ' (KL15 power-on) '; splitting a test condition of receiving a KL50 signal into a first-stage splitting condition of receiving a Start hard wire signal and receiving a Start signal on a CAN bus, wherein a logic relation between the received Start hard wire signal and the received Start signal on the CAN bus is logic or '|'; the test condition ' gear no fault ' is divided into a first-level division condition ' no-gear OpenCircuit fault ', ' no-gear PosShortGNDA fault ', ' no-gear ShotBat fault ' and ' no-gear ShotGNDA fault ', ' no-gear OpenCircuit fault ', ' no-gear PosShortGNDA fault ', ' no-gear ShortBat fault ' and ' no-gear ShotGNDA fault ', and the logic relation between the test condition ' gear no fault ' and the first-level division condition ' is ' logical sum '.
Figure BDA0001895465970000061
Watch two
The logic expression of the test item can be automatically generated according to the functional test set in the second table
(C11| (C12& (C21| C22))) & C31& C41& C42& C43& C44, and generating a plurality of test cases TSP _ HPS _ ED02_001 to TSP _ HPS _ ED02_014 giving truth tables about the first-stage splitting conditions, generating a test case set as shown in table three.
Figure BDA0001895465970000062
Watch III
One row formed by the true and false relations of different first-level splitting conditions in the table III corresponds to one test case, so that the coverage sufficiency and uniqueness of the generated test case can be ensured.
Through the truth table, test steps corresponding to the test cases can be formed. The steps of each test case include an experiment preparation step, an experiment setting step and an inspection step, and the detailed action description is performed on the test process, as shown in table four.
Figure BDA0001895465970000071
Watch four
In the experiment preparation step, the state before the vehicle test can be set according to conditions, for example, the vehicle system is set to be in a high-voltage power-on state or a high-voltage power-off state in the embodiment; in the experiment setting step, the condition relation in the truth table is described in a text mode, when the set condition is true, corresponding action is executed, when the set condition is false, action opposite to the condition is executed, if the condition C31 is that no UDS forbids entering into Ready request, and if the condition is false, input UDS forbids entering into Ready request action is executed; and a checking step, namely an expected result of the test, if the output result of the test case is consistent with the expected result, the test condition is passed, for example, the expected result in the present example is to check whether the vehicle enters a drivable (Ready) state. Based on the test case library established by the invention, the test case set related to the function of the vehicle entering the drivable state can be effectively generated.
A second embodiment of the present invention provides a test case generating device based on functional requirements of an electric vehicle, as shown in fig. 2, including:
an acquisition section: test items related to the functional requirements of the electric automobile are acquired.
The test items related to the functional requirements of the electric vehicle may include normative test items related to the functional requirements of the electric vehicle, test items related to problems of software, and other test items related to the functional requirements of the electric vehicle.
The normative test items related to the functional requirements of the electric automobile are functional test items compiled by taking the requirements of users on the electric automobile as a starting point, and are important bases for generating test cases, and the coverage of the test cases depends on the extraction capability of test conditions in the normative test items related to the functional requirements of the electric automobile. For example, in the test of the electric vehicle, the normative test items related to the functional requirements of the electric vehicle include that the electric vehicle enters an enabling state, the electric vehicle enters an auto-cruising state, or the electric vehicle enters a stopped state, and the like.
The test items related to the software problems are compiled according to the problems related to the software in the actual test, and the problem points are incorporated into the test cases of the whole vehicle. For example, in the test of an electric vehicle, a test item of the electric vehicle related to a problem of software is a complete vehicle test item compiled from a problem related to software that occurs in a bench test or a complete vehicle test.
The other test items related to the functional requirements of the electric vehicle are other test items related to the functional requirements of the electric vehicle which cannot be covered by the above two items. For example, in the testing of electric vehicles, other test items related to the functional requirements of electric vehicles include entire vehicle test items organized according to the problem of failure of electric vehicles occurring under special operations.
Functional test set component: and aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logic relationship among the test conditions to form a functional test set.
Each test item related to the functional requirements of the electric vehicle has a unique functional test set number, and the test conditions and the logical relationship between the test conditions are associated with the functional test set numbers of the test items.
The functional test set is an important part for generating test cases according to test items related to the functional requirements of the electric automobile. The functional test set has a subdivision function of test conditions, and can further split the test conditions into multiple levels of splitting conditions, such as a first level splitting condition and a second level splitting condition … …, and determine a logical relationship between the splitting conditions in each level of splitting conditions. The subdivided multi-level splitting condition and the logical relationship between the splitting conditions are associated with the functional test set number.
Truth table building element: and constructing a truth table of the test case according to the functional test set.
And generating test case numbers according to the contents of the functional test set, the test conditions and the logical relationship between the multi-stage splitting conditions and the multi-stage splitting conditions, and constructing a truth table of the test cases.
In the truth table of the test cases, each row can correspond to one test case, the test case number is unique, each column can correspond to the test condition or the multi-level splitting condition of the test case, and the test conditions or the multi-level splitting conditions of each column have certain logical relations, and the logical relations come from a functional test set, so that the comprehensive coverage and the uniqueness of the test cases can be ensured.
The test case set constructs the part: and constructing a test case set according to the truth table of the constructed test cases.
The method comprises the steps of establishing a test case set of the normative test items related to the functional requirements of the electric automobile aiming at the normative test items related to the functional requirements of the electric automobile, wherein the generated test case set is used for the electric automobile model in-loop test and the hardware in-loop test (a real-time processor runs a simulation model to simulate the running state of a controlled object and is connected with an ECU to be tested through an I/O interface to carry out comprehensive and systematic test on the ECU to be tested). The testing steps of the corresponding test case comprise an experiment preparation step, an experiment setting step and an inspection step, and the detailed action description is carried out on the testing process.
And aiming at the test items related to the problems of the software, constructing a test case set of the test items related to the problems of the software. Each problem found in the software test corresponds to a test item, and the test item comprises a functional test set number, a test case number, problem point description, reason analysis and the like. The testing steps of the corresponding test case comprise an experiment preparation step, an experiment setting step, a checking step and remarks, and the contents of the remarks are the testing modes suitable for the test case.
Aiming at other test items related to the functional requirements of the electric automobile, a test case set of the other test items related to the functional requirements of the electric automobile is constructed, and the generated test case set is used for the electric automobile model in-loop test and the hardware in-loop test (a real-time processor runs a simulation model to simulate the running state of a controlled object and is connected with the tested ECU through an I/O interface to carry out comprehensive and systematic test on the tested ECU). The testing steps of the corresponding test case comprise an experiment preparation step, an experiment setting step and an inspection step, and the detailed action description is carried out on the testing process.
The multiple test case sets of the normative test items related to the functional requirements of the electric automobile, the multiple test case sets of the test items related to the software problems and the multiple test case sets of other test items related to the functional requirements of the electric automobile form a whole automobile functional test case library of the electric automobile, and therefore correctness and efficiency of the test cases are effectively improved.
The test case generation method based on the function requirement of the electric vehicle comprises an inspection step, wherein the inspection step is used for inspecting the test items related to the function requirement of the electric vehicle, for example, defects in the function requirement content provided in the test items are inspected, when the test cases cannot be generated due to the inspected defects, the problem points are recorded in time and fed back, so that the test items related to the function requirement of the electric vehicle are properly modified, and the generation of the test cases is ensured.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above method.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method when executing the program.
Those of skill in the art will understand that the logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiment. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A test case generation method based on the functional requirements of an electric automobile is characterized by comprising the following steps:
an acquisition step: acquiring a test item related to the functional requirement of the electric automobile;
the functional test set comprises the following steps: aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logical relationship among the test conditions, splitting the test conditions into multi-stage splitting conditions, and determining the logical relationship among the splitting conditions in each stage of splitting conditions to form a functional test set;
a truth table construction step: constructing a truth table of the test case according to the test conditions and the logical relationship between the multi-stage splitting conditions and the multi-stage splitting conditions;
a test case set construction step: and constructing a test case set according to the truth table of the constructed test cases.
2. The test case generation method according to claim 1, wherein the test items related to the functional requirements of the electric vehicle may include a normative test item related to the functional requirements of the electric vehicle, a test item related to a problem of software, and other test items related to the functional requirements of the electric vehicle.
3. The test case generation method according to claim 1, wherein in the truth table construction step, a test case number is generated for each test case.
4. The test case generation method according to claim 2, wherein in the test case set construction step, a test case set of normative test items related to functional requirements of the electric vehicle is constructed for normative test items related to the functional requirements of the electric vehicle; aiming at the test items related to the problems of the software, constructing a test case set of the test items related to the problems of the software; aiming at other test items related to the functional requirements of the electric automobile, constructing a test case set of the other test items related to the functional requirements of the electric automobile; the three test cases form a whole vehicle function test case library of the electric vehicle.
5. The test case generation method according to claim 1, wherein the test case generation method further comprises an inspection step of inspecting defects occurring in the test case generation process and performing feedback.
6. A test case generation device based on functional requirements of an electric vehicle is characterized by comprising the following components:
an acquisition section: acquiring a test item related to the functional requirement of the electric automobile;
functional test set component: aiming at the obtained test items related to the functional requirements of the electric automobile, determining the test conditions of the test items related to the functional requirements of the electric automobile and the logical relationship among the test conditions, splitting the test conditions into multi-stage splitting conditions, and determining the logical relationship among the splitting conditions in each stage of splitting conditions to form a functional test set;
truth table building element: constructing a truth table of the test case according to the test conditions and the logical relationship between the multi-stage splitting conditions and the multi-stage splitting conditions;
the test case set constructs the part: and constructing a test case set according to the truth table of the constructed test cases.
7. The test case generation apparatus according to claim 6, wherein the test items related to the functional requirements of the electric vehicle may include a normative test item related to the functional requirements of the electric vehicle, a test item related to a problem of software, and other test items related to the functional requirements of the electric vehicle.
8. The test case generation apparatus according to claim 6, wherein the truth table constructing means generates a test case number for each test case.
9. The test case generation apparatus according to claim 7, wherein the test case set constructing means constructs, for a normative test item related to a functional requirement of the electric vehicle, a test case set of the normative test item related to the functional requirement of the electric vehicle; aiming at the test items related to the problems of the software, constructing a test case set of the test items related to the problems of the software; aiming at other test items related to the functional requirements of the electric automobile, constructing a test case set of the other test items related to the functional requirements of the electric automobile; the three test cases form a whole vehicle function test case library of the electric vehicle.
10. The test case generation apparatus according to claim 6, wherein the test case generation apparatus further includes an inspection means for inspecting defects occurring in the test case generation process and performing feedback.
CN201811490039.0A 2018-12-06 2018-12-06 Test case generation method and device based on functional requirements of electric automobile Active CN109669436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811490039.0A CN109669436B (en) 2018-12-06 2018-12-06 Test case generation method and device based on functional requirements of electric automobile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811490039.0A CN109669436B (en) 2018-12-06 2018-12-06 Test case generation method and device based on functional requirements of electric automobile

Publications (2)

Publication Number Publication Date
CN109669436A CN109669436A (en) 2019-04-23
CN109669436B true CN109669436B (en) 2021-04-13

Family

ID=66143673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811490039.0A Active CN109669436B (en) 2018-12-06 2018-12-06 Test case generation method and device based on functional requirements of electric automobile

Country Status (1)

Country Link
CN (1) CN109669436B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162022A (en) * 2019-05-22 2019-08-23 重庆长安汽车股份有限公司 A kind of emulation test method and device of entire vehicle electrical system
CN110442522A (en) * 2019-08-05 2019-11-12 广州小鹏汽车科技有限公司 The method for generating test case and test method of functional requirement based on electric car
CN113360132B (en) * 2020-03-05 2023-12-19 北京车和家信息技术有限公司 Real vehicle test data analysis method and device
CN116048048A (en) * 2023-01-03 2023-05-02 重庆长安汽车股份有限公司 Method, device, equipment and storage medium for testing running state of whole vehicle

Citations (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1657634A2 (en) * 2004-11-12 2006-05-17 Empirix Inc. Test agent architecture
CN1908892A (en) * 2005-08-01 2007-02-07 王彤 System and method for test examples design
CN101436128A (en) * 2007-11-16 2009-05-20 北京邮电大学 Software test case automatic generating method and system
CN101710305A (en) * 2009-12-14 2010-05-19 中国科学院计算技术研究所 Method and system for realizing white box testing of computer software
CN102323906A (en) * 2011-09-08 2012-01-18 哈尔滨工程大学 MC/DC test data automatic generation method based on genetic algorithm
CN102565563A (en) * 2010-12-29 2012-07-11 上海汽车集团股份有限公司 Automated integration test system and method for automotive electronic and electric appliance system
CN102854877A (en) * 2012-10-12 2013-01-02 山东省科学院自动化研究所 Function test system and test method of automobile body control module
CN104063312A (en) * 2013-03-22 2014-09-24 株式会社日立制作所 Test Case Generation Method And Test Case Generation Device
US8856751B2 (en) * 2012-09-20 2014-10-07 Fujitsu Limited Abstract symbolic execution for scaling symbolic execution generation and automatic test generation
CN104317708A (en) * 2014-10-21 2015-01-28 北京邮电大学 Software testing case automatic generating method and system based on iterative interval arithmetic
CN105373476A (en) * 2015-11-17 2016-03-02 北京新能源汽车股份有限公司 Method and system for generating automatic test case in automobile controller
CN105426312A (en) * 2015-12-31 2016-03-23 北京经纬恒润科技有限公司 Test suite generation method and device for smoke tests
CN105677563A (en) * 2016-01-05 2016-06-15 南昌航空大学 Integrated test sequence generating method based on SysML module diagrams
CN106506254A (en) * 2016-09-20 2017-03-15 北京理工大学 A kind of bottleneck node detection method of extensive stream data processing system
CN106526506A (en) * 2016-11-03 2017-03-22 武汉通畅汽车电子照明有限公司 LED automobile headlamp test case automatic generation method
US9665350B1 (en) * 2009-05-29 2017-05-30 The Mathworks, Inc. Automatic test generation for model-based code coverage
CN106814730A (en) * 2016-12-14 2017-06-09 中国铁路总公司 Train operation control system security critical software method for generating test case
CN107291620A (en) * 2017-06-30 2017-10-24 郑州云海信息技术有限公司 A kind of method for generating test case and device
CN107678973A (en) * 2017-10-31 2018-02-09 北京润科通用技术有限公司 The automatic generation method and system of a kind of test script
CN107748721A (en) * 2017-11-27 2018-03-02 中国航空无线电电子研究所 A kind of test use cases automatic generation method
CN107797928A (en) * 2017-10-26 2018-03-13 北京广利核系统工程有限公司 I&C system platform logic algorithmic block test device and method
CN107807878A (en) * 2016-09-09 2018-03-16 北京航空航天大学 Automatic test engine based on keyword
CN107844424A (en) * 2017-11-15 2018-03-27 杭州杉石科技有限公司 Model-based testing system and method
CN108038060A (en) * 2017-12-28 2018-05-15 上海璞恒新能源科技有限公司 A kind of test method, device, terminal and computer-readable medium
CN108415830A (en) * 2018-02-05 2018-08-17 广东睿江云计算股份有限公司 A kind of generation method and device of software test case
CN108664384A (en) * 2017-03-29 2018-10-16 富士通株式会社 Data processing equipment and data processing method
CN108701074A (en) * 2016-02-24 2018-10-23 三菱电机株式会社 Test cases technology device and test case generator

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102594A1 (en) * 2003-09-26 2005-05-12 The Regents Of The University Of California Method for test application and test content generation for AC faults in integrated circuits
JP5149225B2 (en) * 2009-03-16 2013-02-20 株式会社東芝 Test case generation apparatus and test case generation method
US20110083121A1 (en) * 2009-10-02 2011-04-07 Gm Global Technology Operations, Inc. Method and System for Automatic Test-Case Generation for Distributed Embedded Systems
US10140204B2 (en) * 2015-06-08 2018-11-27 International Business Machines Corporation Automated dynamic test case generation
US10120785B2 (en) * 2016-10-21 2018-11-06 Rosemount Aerospace Inc. Automatic generation of data coupling and control coupling test conditions

Patent Citations (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1657634A2 (en) * 2004-11-12 2006-05-17 Empirix Inc. Test agent architecture
CN1908892A (en) * 2005-08-01 2007-02-07 王彤 System and method for test examples design
CN101436128A (en) * 2007-11-16 2009-05-20 北京邮电大学 Software test case automatic generating method and system
US9665350B1 (en) * 2009-05-29 2017-05-30 The Mathworks, Inc. Automatic test generation for model-based code coverage
CN101710305A (en) * 2009-12-14 2010-05-19 中国科学院计算技术研究所 Method and system for realizing white box testing of computer software
CN102565563A (en) * 2010-12-29 2012-07-11 上海汽车集团股份有限公司 Automated integration test system and method for automotive electronic and electric appliance system
CN102323906A (en) * 2011-09-08 2012-01-18 哈尔滨工程大学 MC/DC test data automatic generation method based on genetic algorithm
US8856751B2 (en) * 2012-09-20 2014-10-07 Fujitsu Limited Abstract symbolic execution for scaling symbolic execution generation and automatic test generation
CN102854877A (en) * 2012-10-12 2013-01-02 山东省科学院自动化研究所 Function test system and test method of automobile body control module
JP2014186407A (en) * 2013-03-22 2014-10-02 Hitachi Ltd Test case generation method, test case generation device and program
CN104063312A (en) * 2013-03-22 2014-09-24 株式会社日立制作所 Test Case Generation Method And Test Case Generation Device
CN104317708A (en) * 2014-10-21 2015-01-28 北京邮电大学 Software testing case automatic generating method and system based on iterative interval arithmetic
CN105373476A (en) * 2015-11-17 2016-03-02 北京新能源汽车股份有限公司 Method and system for generating automatic test case in automobile controller
WO2017084462A1 (en) * 2015-11-17 2017-05-26 北京新能源汽车股份有限公司 Method and system for generating automatic test case in automobile controller
CN105426312A (en) * 2015-12-31 2016-03-23 北京经纬恒润科技有限公司 Test suite generation method and device for smoke tests
CN105677563A (en) * 2016-01-05 2016-06-15 南昌航空大学 Integrated test sequence generating method based on SysML module diagrams
CN108701074A (en) * 2016-02-24 2018-10-23 三菱电机株式会社 Test cases technology device and test case generator
CN107807878A (en) * 2016-09-09 2018-03-16 北京航空航天大学 Automatic test engine based on keyword
CN106506254A (en) * 2016-09-20 2017-03-15 北京理工大学 A kind of bottleneck node detection method of extensive stream data processing system
CN106526506A (en) * 2016-11-03 2017-03-22 武汉通畅汽车电子照明有限公司 LED automobile headlamp test case automatic generation method
CN106814730A (en) * 2016-12-14 2017-06-09 中国铁路总公司 Train operation control system security critical software method for generating test case
CN108664384A (en) * 2017-03-29 2018-10-16 富士通株式会社 Data processing equipment and data processing method
CN107291620A (en) * 2017-06-30 2017-10-24 郑州云海信息技术有限公司 A kind of method for generating test case and device
CN107797928A (en) * 2017-10-26 2018-03-13 北京广利核系统工程有限公司 I&C system platform logic algorithmic block test device and method
CN107678973A (en) * 2017-10-31 2018-02-09 北京润科通用技术有限公司 The automatic generation method and system of a kind of test script
CN107844424A (en) * 2017-11-15 2018-03-27 杭州杉石科技有限公司 Model-based testing system and method
CN107748721A (en) * 2017-11-27 2018-03-02 中国航空无线电电子研究所 A kind of test use cases automatic generation method
CN108038060A (en) * 2017-12-28 2018-05-15 上海璞恒新能源科技有限公司 A kind of test method, device, terminal and computer-readable medium
CN108415830A (en) * 2018-02-05 2018-08-17 广东睿江云计算股份有限公司 A kind of generation method and device of software test case

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
"Research on Automatic Test Case Generation Framework for Java";Ming Gang Xu;《Applied Mechanics and Materials》;20141231;第21-52页 *
"The Application of Meta-Heuristic Algorithms in Automatic Software Test Case Generation";Maryam Mirzapour Moshizi;《IJMSC-International Journal of Mathematical Sciences and Computing(IJMSC)》;20151231;第1755-4977页 *
"基于功能对象的测试用例生成模型研究与实现";吕格峰;《中国优秀硕士学位论文全文数据库-信息科技辑》;20050715;第I138-323页 *
"基于规格说明的若干逻辑覆盖测试准则";钱忠胜;《软件学报》;20100731;第1536-1549页 *
"汽车电控单元测试用例生成与集成测试技术";赵林辉;《哈尔滨工业大学学报》;20160430;第48-53页 *

Also Published As

Publication number Publication date
CN109669436A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN109669436B (en) Test case generation method and device based on functional requirements of electric automobile
CN110908888B (en) Server testing method and device
CN107633155B (en) Method and apparatus for computer-based generation of component fault trees
US8397104B2 (en) Creation of test plans
CN109522228B (en) Interface automation test data construction method, device, platform and storage medium
CN109885499B (en) Robot automatic test system and test method
CN107080945B (en) Method and device for testing artificial intelligence behaviors in game and electronic equipment
US20080189686A1 (en) System and Method for Detecting Software Defects
CN110990295B (en) Verification method and device for test cases and electronic equipment
US6707313B1 (en) Systems and methods for testing integrated circuits
KR101334806B1 (en) Method of proudcing input sets of test case in test case generating system
CN110908903B (en) Test method based on editable YAML file
KR101291817B1 (en) Test case generating system and method based on requirements model
JPWO2019142266A1 (en) Test case generation device, test case generation method, and test case generation program
CN113030753A (en) Test method, device and test system for battery management system BMS
CN115248783B (en) Software testing method, system, readable storage medium and computer equipment
CN111581101A (en) Software model testing method, device, equipment and medium
CN109144806B (en) Function verification method and device for register transmission stage circuit
CN113127324B (en) Automatic test report generation method and device, computer equipment and storage medium
CN108345541A (en) A kind of program detecting method and system
CN109002980B (en) Scenarioized knowledge inspection method and device
CN113849404A (en) Management method, device and storage medium for interface test related information
CN112905438A (en) Automatic testing method and device
CN113238964A (en) Test case set generation method and device and electronic equipment
CN115327953B (en) Simulation test method and device for intelligent driving algorithm, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant