CN115168179A - DID (differential image detection) automatic testing method and system for diagnosis and storage medium - Google Patents

DID (differential image detection) automatic testing method and system for diagnosis and storage medium Download PDF

Info

Publication number
CN115168179A
CN115168179A CN202210552575.9A CN202210552575A CN115168179A CN 115168179 A CN115168179 A CN 115168179A CN 202210552575 A CN202210552575 A CN 202210552575A CN 115168179 A CN115168179 A CN 115168179A
Authority
CN
China
Prior art keywords
diagnostic
data
module
test
diagnosis
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
CN202210552575.9A
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.)
Huizhou Foryou General Electronics Co Ltd
Original Assignee
Huizhou Foryou General Electronics 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 Huizhou Foryou General Electronics Co Ltd filed Critical Huizhou Foryou General Electronics Co Ltd
Priority to CN202210552575.9A priority Critical patent/CN115168179A/en
Publication of CN115168179A publication Critical patent/CN115168179A/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

Abstract

The invention relates to the technical field of automobile testing, and provides a diagnostic DID automatic testing method, a system and a storage medium.A newly-built CDD file based on a CDDT template file is compiled by CAPL to obtain a diagnostic universal framework compiling diagnostic framework script, a corresponding ECU to be debugged is set after a diagnostic request is received, each DID configuration information in the diagnostic framework script is traversed and written into the ECU to be debugged to perform DID diagnostic testing, so that the automatic reading and testing of the DID testing script are realized, and the testing efficiency can be improved; based on a universal test framework, the method can be transplanted to other projects for continuous use, and the universality is high.

Description

Diagnostic DID automatic test method, system and storage medium
Technical Field
The invention relates to the technical field of automobile testing, in particular to a diagnostic Digital Identification Device (DID) automatic testing method, a diagnostic DID automatic testing system and a storage medium.
Background
Currently, diagnostic testing of UDS (Unified Diagnostic Services) of vehicle controllers is mainly divided into two aspects: the diagnostic protocol layer test and the diagnostic functionality test are generally performed by using a diagnostic instrument, and the diagnostic protocol layer test is performed by adopting a CAN bus development tool.
The diagnostic command is executed in the following two ways:
1. is performed manually. The most basic execution mode of the diagnosis command is manual execution, and each command needs to be manually operated, so that the operation is complex and the efficiency is low.
2. A CDD (cadpela Diagnostic Descriptions) service is invoked. Related diagnosis services in the CDD are directly called by the cap (CAN Access Programming Language) to realize automatic execution of a diagnosis command, but this method CAN only be used on a single item, and cannot be used universally for all items.
Disclosure of Invention
The invention provides a diagnostic DID automatic test method, a diagnostic DID automatic test system and a storage medium, which solve the technical problems that the existing diagnostic test technology cannot realize the universality of all items and has low test efficiency.
In order to solve the above technical problems, the present invention provides a DID automatic test method, comprising the steps of:
s1, writing a diagnosis framework script by using CAPL (control and instrumentation language) according to a target test project;
s2, sending a diagnosis request and setting an ECU to be debugged;
s3, calling the diagnosis frame script and acquiring all corresponding DID configuration information from the diagnosis frame script;
and S4, traversing each DID configuration information, and controlling the ECU to be debugged to execute DID diagnosis test.
In further embodiments, in step S1, the diagnostic framework script comprises at least diagnostic data, a diagnostic procedure, and a diagnostic algorithm;
wherein the compiling of the diagnostic data comprises:
A. generating a CDD configuration file;
B. reading a CDD configuration file, and acquiring original diagnostic data from the CDD configuration file;
C. extracting diagnostic data from the original diagnostic data, converting the diagnostic data into a byte array, and determining the byte length of the byte array;
D. and setting the size and addressing mode of the diagnosis request according to the byte length.
In further embodiments, said step a comprises the steps of:
a1, creating a CDD file based on a CDDT template file, and determining a target class of the CDD file according to a target test item and CAPL;
a2, editing a corresponding DID name, a service type and a corresponding data analysis relation in a DID library of the CDD file;
and A3, editing the data type of the DID to obtain DID configuration information.
In a further embodiment, the data type of the DID includes integer data Raw Value, enumerated data Text Table, linear data Linear.
In further embodiments, in step A1: the target class comprises a read-write supporting type and a read-only supporting type.
In further embodiments, said step S4 comprises:
s41, traversing each DID configuration information, and judging whether the DID configuration information belongs to a read-write type, if so, entering a step S42, and if not, entering a step S43;
s42, writing the diagnostic data into the ECU to be debugged, executing DID diagnostic test, reading response data output by the ECU to be debugged, comparing the diagnostic data with the response data to obtain a test result and storing the test result;
and S43, reading the diagnostic data in the DID configuration information, comparing the diagnostic data with expected data to obtain a test result, and storing the test result.
According to the basic scheme, a newly-built CDD file based on a CDDT template file is compiled by CAPL, a diagnosis universal frame compiling diagnosis frame script is obtained, a corresponding ECU to be debugged is set after a diagnosis request is received, all DID configuration information in the diagnosis frame script is traversed and written into the ECU to be debugged for DID diagnosis test, so that automatic reading and testing of the DID test script are realized, and the test efficiency can be improved; based on a universal test framework, the method can be transplanted to other projects for continuous use, and the universality is high.
The invention also provides a diagnostic DID automatic test system, which is used for realizing the diagnostic DID automatic test method: the system comprises a test frame module, a frame calling module, a traversal DID module, a test module, a data reading and writing module, a diagnosis request module and an ECU setting module, wherein the diagnosis request module is connected with the frame calling module, and the ECU setting module is connected with the test module;
the test framework module is used for writing a diagnosis framework script by using CAPL according to a target test item;
the diagnosis request module is used for sending a diagnosis request;
the frame calling module is used for calling the diagnosis frame script when receiving the diagnosis request;
the ECU setting module is used for setting the ECU to be debugged when the diagnosis request is received;
the traversal DID module is used for sequentially traversing each DID configuration information from the diagnosis framework script and sending the DID configuration information to the test module;
the test module is used for controlling the ECU to be debugged to execute DID diagnosis test according to the DID configuration information;
and the data reading and writing module is used for writing the diagnostic data into the ECU to be debugged and reading the response data or reading the diagnostic data and the expected data in the DID configuration information.
The present invention also provides a storage medium having a computer program stored thereon, wherein the computer program is used to be loaded by the above-mentioned diagnostic DID automatic test system to implement the above-mentioned diagnostic DID automatic test method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
Drawings
FIG. 1 is a flowchart illustrating a DID automatic test method according to an embodiment of the present invention;
fig. 2 is a system framework diagram of a diagnostic DID automatic test system according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in detail below with reference to the accompanying drawings, which are given solely for the purpose of illustration and are not to be construed as limitations of the present invention, including reference to and illustration of the accompanying drawings, which are not to be construed as limitations of the scope of the invention, since many variations thereof are possible without departing from the spirit and scope of the invention.
Example 1
As shown in fig. 1, the automatic testing method for diagnosing DID provided in the embodiment of the present invention includes steps S1 to S4:
s1, writing a diagnosis framework script by using CAPL according to a target test item;
in this embodiment, the diagnostic framework script includes at least diagnostic data, a diagnostic flow, and a diagnostic algorithm. According to target test items to be executed, writing diagnosis data, diagnosis flow and diagnosis algorithm in a diagnosis frame script by using CAPL. The diagnosis process and the diagnosis algorithm are conventional means written by CAPL, and therefore are not described in detail in this embodiment.
The CAPL is called CAN Access Programming Language, namely CAN bus Access Programming Language, and is a Language based on event modeling, and the supported events comprise: bus events, attribute events, and time events. DID means Data ID, i.e. Data identifier.
In this embodiment, the compiling of the diagnostic data includes steps a to D:
A. generating a CDD configuration file, comprising the following steps A1-A3:
a1, creating a CDD file based on a CDDT template file, and determining a target class of the CDD file according to a target test item and CAPL;
the target class comprises a read-write supporting type and a read-only supporting type. CDD means CANdela Diagnostic Descriptions, i.e., CANdela Diagnostic Descriptions.
A2, editing a corresponding DID name, a service type and a corresponding data analysis relation in a DID library of the CDD file;
and A3, editing the data type of the DID to obtain DID configuration information.
The data types of the DID include integer data Raw Value, enumerated data Text Table, and Linear data Linear.
B. Reading a CDD configuration file, and acquiring original diagnostic data from the CDD configuration file;
specifically, the original diagnostic data is obtained through a diaggetsubmittivedata function of the CAPL.
C. Extracting diagnostic data from the original diagnostic data, converting the diagnostic data into a byte array, and determining the byte length of the byte array;
specifically, the diagnostic string (i.e., the string of diagnostic data) is converted to an array of bytes by the arrays.
D. And setting the size and addressing mode of the diagnosis request according to the byte length.
Specifically, the diagnostic request size is set by the diagResize () function. The addressing mode, e.g. physical addressing, may be selected as desired.
S2, sending a diagnosis request through a diagSendRequest () function, and setting an ECU to be debugged through a diagSetTarget () function;
s3, calling a diagnosis frame script and acquiring all corresponding DID configuration information from the diagnosis frame script;
s4, traversing each DID configuration information, controlling the ECU to be debugged to execute DID diagnosis test, and comprising the following steps of S41-S43:
s41, traversing each DID configuration information, and judging whether the DID configuration information belongs to a read-write type, if so, entering a step S42, and if not, entering a step S43;
s42, writing the diagnosis data into the ECU to be debugged, executing DID diagnosis test, waiting for preset time (the specific time duration is set according to the actual test process), reading response data output by the ECU to be debugged, and comparing the diagnosis data with the response data to obtain a test result and storing the test result;
in this embodiment, when the DID configuration information is identified as the read/write type, two tests are performed, namely prediction and actual measurement. Therefore, for each read-write type of DID configuration information, two different data, namely predicted data and actual measurement data, are written into the ECU to be debugged.
And S43, reading the diagnostic data in the DID configuration information, comparing the diagnostic data with expected data, obtaining a test result and storing the test result.
In the embodiment of the invention, a newly-built CDD file based on a CDDT template file is compiled by CAPL to obtain a diagnosis universal frame compiling diagnosis frame script, a corresponding ECU to be debugged is set after a diagnosis request is received, all DID configuration information in the diagnosis frame script is traversed and written into the ECU to be debugged to carry out DID diagnosis test, so that the automatic reading and testing of the DID test script are realized, and the test efficiency can be improved; based on a universal test framework, the method can be transplanted to other projects for continuous use, and the universality is high.
Example 2
The reference numbers in the drawings of the embodiment include: the system comprises a test framework module 1, a framework calling module 2, a traversal DID module 3, a test module 4, a data reading and writing module 5, a diagnosis request module 6 and an ECU setting module 7.
An embodiment of the present invention further provides a diagnostic DID automatic test system, which is configured to implement the above diagnostic DID automatic test method, and refer to fig. 2: the system comprises a testing frame module 1, a frame calling module 2, a traversing DID module 3, a testing module 4, a data reading and writing module 5, a diagnosis request module 6 connected with the frame calling module 2 and an ECU setting module 7 connected with the testing module 4 which are sequentially connected, wherein the diagnosis request module 6 is connected with the ECU setting module 7;
the test framework module 1 is used for writing a diagnosis framework script by using CAPL according to a target test item;
the diagnosis request module 6 is used for sending a diagnosis request;
the frame calling module 2 is used for calling a diagnosis frame script when receiving a diagnosis request;
the ECU setting module 7 is used for setting the ECU to be debugged when receiving the diagnosis request;
the traversal DID module 3 is used for sequentially traversing each DID configuration information from the diagnosis frame script and sending the DID configuration information to the test module 4;
the test module 4 is used for controlling the ECU to be debugged to execute DID diagnosis test according to the DID configuration information;
and the data reading and writing module 5 is used for writing the diagnostic data into the ECU to be debugged, and reading the response data, or reading the diagnostic data and the expected data in the DID configuration information.
The test system provided by the embodiment adopts each module to realize each step in the test method, provides a hardware basis for the test method, and is convenient for method implementation.
Example 3
An embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program is used to be loaded by the automatic diagnostic DID testing system in embodiment 2, so as to implement the automatic diagnostic DID testing method in embodiment 1. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (8)

1. An automated diagnostic DID test method, comprising the steps of:
s1, writing a diagnosis framework script by using CAPL (control and instrumentation language) according to a target test project;
s2, sending a diagnosis request and setting an ECU to be debugged;
s3, calling the diagnosis frame script and acquiring all corresponding DID configuration information from the diagnosis frame script;
and S4, traversing each DID configuration information, and controlling the ECU to be debugged to execute DID diagnosis test.
2. The method of claim 1, wherein the DID automatic test method comprises: in the step S1, the diagnostic framework script at least includes diagnostic data, a diagnostic procedure and a diagnostic algorithm;
wherein the compiling of the diagnostic data comprises:
A. generating a CDD configuration file;
B. reading a CDD configuration file, and acquiring original diagnostic data from the CDD configuration file;
C. extracting diagnostic data from the original diagnostic data, converting the diagnostic data into a byte array, and determining the byte length of the byte array;
D. and setting the size of the diagnosis request and the addressing mode according to the byte length.
3. The automatic test method for diagnosing DID according to claim 2, wherein the step a comprises the steps of:
a1, creating a CDD file based on a CDDT template file, and determining a target class of the CDD file according to a target test item and CAPL;
a2, editing a corresponding DID name, a service type and a corresponding data analysis relation in a DID library of the CDD file;
and A3, editing the data type of the DID to obtain DID configuration information.
4. The method of claim 3, wherein the DID automatic test method comprises: the DID data types comprise integer data Raw Value, enumerated data Text Table and Linear data Linear.
5. A diagnostic DID automatic test method according to claim 3, wherein in said step A1: the target class comprises a read-write supporting type and a read-only supporting type.
6. The automatic diagnostic DID testing method of claim 5, wherein the step S4 comprises:
s41, traversing each DID configuration information, and judging whether the DID configuration information belongs to a read-write type, if so, entering a step S42, and if not, entering a step S43;
s42, writing the diagnostic data into the ECU to be debugged, executing DID diagnostic test, reading response data output by the ECU to be debugged, comparing the diagnostic data with the response data to obtain a test result and storing the test result;
and S43, reading the diagnostic data in the DID configuration information, comparing the diagnostic data with expected data to obtain a test result, and storing the test result.
7. A diagnostic DID automatic test system for implementing a diagnostic DID automatic test method according to any one of claims 1 to 6, wherein: the system comprises a test frame module, a frame calling module, a traversal DID module, a test module, a data reading and writing module, a diagnosis request module and an ECU setting module, wherein the diagnosis request module is connected with the frame calling module, and the ECU setting module is connected with the test module;
the test framework module is used for writing a diagnosis framework script by using CAPL according to a target test item;
the diagnosis request module is used for sending a diagnosis request;
the frame calling module is used for calling the diagnosis frame script when receiving the diagnosis request;
the ECU setting module is used for setting the ECU to be debugged when the diagnosis request is received;
the traversal DID module is used for sequentially traversing each DID configuration information from the diagnosis framework script and sending the DID configuration information to the test module;
the test module is used for controlling the ECU to be debugged to execute DID diagnosis test according to the DID configuration information;
and the data reading and writing module is used for writing the diagnostic data into the ECU to be debugged and reading the response data or reading the diagnostic data and the expected data in the DID configuration information.
8. A storage medium having a computer program stored thereon, characterized in that: the computer program is used to be loaded by a diagnostic DID automatic test system according to claim 7 to implement a diagnostic DID automatic test method according to any one of claims 1 to 6.
CN202210552575.9A 2022-05-20 2022-05-20 DID (differential image detection) automatic testing method and system for diagnosis and storage medium Pending CN115168179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210552575.9A CN115168179A (en) 2022-05-20 2022-05-20 DID (differential image detection) automatic testing method and system for diagnosis and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210552575.9A CN115168179A (en) 2022-05-20 2022-05-20 DID (differential image detection) automatic testing method and system for diagnosis and storage medium

Publications (1)

Publication Number Publication Date
CN115168179A true CN115168179A (en) 2022-10-11

Family

ID=83482751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210552575.9A Pending CN115168179A (en) 2022-05-20 2022-05-20 DID (differential image detection) automatic testing method and system for diagnosis and storage medium

Country Status (1)

Country Link
CN (1) CN115168179A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555322A (en) * 2024-01-11 2024-02-13 中汽数据有限公司 EDR data extraction method, EDR data extraction device, EDR data extraction equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555322A (en) * 2024-01-11 2024-02-13 中汽数据有限公司 EDR data extraction method, EDR data extraction device, EDR data extraction equipment and storage medium
CN117555322B (en) * 2024-01-11 2024-04-09 中汽数据有限公司 EDR data extraction method, EDR data extraction device, EDR data extraction equipment and storage medium

Similar Documents

Publication Publication Date Title
US5758062A (en) Method and apparatus for regression testing of application logic
CN111756575B (en) Performance analysis method and device of storage server and electronic equipment
US6347335B1 (en) System using a common and local event logs for logging event information generated by plurality of devices for determining problem in storage access operations
CN112181854B (en) Method, device, equipment and storage medium for generating process automation script
CN102568522A (en) Hardware performance test method and device
CN111679868A (en) Automobile software model integration method, device, equipment and storage medium
CN115080398A (en) Automatic interface test system and method
CN115168179A (en) DID (differential image detection) automatic testing method and system for diagnosis and storage medium
KR20010023999A (en) System for storing and searching named device parameter data in a test system for testing an integrated circuit
CN110659197A (en) Application test case generation method and device and software test system
US6240529B1 (en) Debugging method and debugging apparatus for microcomputer system and recording medium on which debug program is recorded
JPH10307982A (en) Method and device for integrated storage of test environmental information
CN101067562A (en) Method, code, and apparatus for logging test results
US20040024954A1 (en) Time stamp management system for disk arrays
CN112783683A (en) Data processing method, device, equipment and storage medium
CN111061244A (en) Automatic testing method for power distribution master station monitoring system
CN111813673A (en) Hard disk filling test method and system
CN214309501U (en) Automobile combined instrument fault recurrence system
CN113031574B (en) Equipment operation process reproduction method and system
CN116128448B (en) Design data processing method and device for FPGA engineering project and electronic equipment
CN116820946B (en) Method and device for automatically testing compatibility of target software
JPH036630A (en) Check system for interactive processing program
CN112948266B (en) Database grammar testing system, method, device, equipment and storage medium
CN111240928B (en) Automatic detection method, device, equipment and storage medium for equipment drive
CN108038033B (en) Test method and system based on Linux system

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