CN115941565A - CAN signal testing method and system, electronic device and storage medium - Google Patents

CAN signal testing method and system, electronic device and storage medium Download PDF

Info

Publication number
CN115941565A
CN115941565A CN202211633869.0A CN202211633869A CN115941565A CN 115941565 A CN115941565 A CN 115941565A CN 202211633869 A CN202211633869 A CN 202211633869A CN 115941565 A CN115941565 A CN 115941565A
Authority
CN
China
Prior art keywords
signal
message
tested
test
analysis
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
CN202211633869.0A
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.)
Zongmu Technology Chongqing Co ltd
Original Assignee
Zongmu Technology Chongqing 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 Zongmu Technology Chongqing Co ltd filed Critical Zongmu Technology Chongqing Co ltd
Priority to CN202211633869.0A priority Critical patent/CN115941565A/en
Publication of CN115941565A publication Critical patent/CN115941565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application provides a test method, a system, electronic equipment and a storage medium of a CAN signal, wherein the method comprises the following steps: sending a CAN signal message to a device end to be tested; the CAN signal message is a message formed by at least one CAN signal; analyzing the CAN signal message to a global structure variable in response to the equipment terminal to be tested, and acquiring a CAN analysis value in the global structure variable; and verifying the CAN analytic value and each CAN signal in the CAN signal message one by one to generate a test result. The CAN signal testing method and the CAN signal testing device CAN improve the testing efficiency of the CAN signal and simplify the complex and error-prone process during testing.

Description

CAN signal testing method and system, electronic device and storage medium
Technical Field
The present application relates to a signal testing method, and more particularly, to a method and system for testing a CAN signal, an electronic device, and a storage medium.
Background
At present, networking and intellectualization of automobile control functions become a necessary trend of development of modern automobile industry, and because a CAN (Controller Area Network) bus communication protocol eliminates traditional station address coding, the number of nodes in a CAN Network is not limited, the real-time performance is good, and the communication rate is high, so that the CAN bus communication protocol is widely applied to an automobile electronic control system.
However, for the development and test of the CAN signals, the number of the electronic CAN signals of the automobile is large, the analysis modes of the signals are different, data have coefficients and offsets, and the workload of analysis and test is large. The CAN signal is added, deleted and modified, so that the later analysis test is complicated to update, and the management and the maintenance are inconvenient. There is a risk of errors in the manual contrast test. Therefore, in order to adapt to the rapidly developing automobile industry, the efficiency of testing the CAN signal needs to be further improved.
Disclosure of Invention
The application aims to provide a CAN signal testing method, a CAN signal testing system, electronic equipment and a storage medium, and aims to solve the problems of complexity, easiness in error and low efficiency in a CAN signal testing process.
A first aspect of an embodiment of the present application provides a method for testing a CAN signal, where the method includes: sending a CAN signal message to a device end to be tested; the CAN signal message is a message formed by at least one CAN signal; analyzing the CAN signal message to a global structure variable in response to the equipment terminal to be tested, and acquiring a CAN analysis value in the global structure variable; and verifying the CAN analytic value and each CAN signal in the CAN signal message one by one to generate a test result.
In an implementation manner of the first aspect, the global structure variable is determined after the device under test configures a first script to generate a structure file.
In an implementation manner of the first aspect, the device end to be tested generates an h file after configuring the second script, and generates a c file after configuring the third script; and performing bit domain analysis on the CAN signal message when the h file is executed, and performing numerical analysis on the CAN signal message when the c file is executed.
In an implementation manner of the first aspect, the step of analyzing the CAN signal packet to a global structure variable in response to the device end to be tested, and obtaining a CAN analysis value in the global structure variable includes: and responding to the end of the equipment to be tested to perform bit domain analysis and numerical analysis on the CAN signal message, storing a signal basic value generated by the bit domain analysis and a signal physical value generated by the numerical analysis into the global structure variable, and acquiring the signal basic value and the signal physical value in the global structure variable.
In an implementation manner of the first aspect, the step of verifying the CAN analysis value and each CAN signal in the CAN signal message one by one to generate a test result includes: determining a current CAN signal according to the signal basic value and the signal physical value; verifying and comparing the current CAN signal with a corresponding CAN signal in the CAN signal message; and generating the test result according to the result of whether the comparison is consistent.
In an implementation manner of the first aspect, before the step of sending the CAN signal packet to the device under test, the method further includes: configuring a fourth script, selecting the ID of the test node and the ID of the CAN signal message to be tested, and generating a cns file, wherein the cns file follows the syntax of a Vector tool chain; and executing the testing method of the CAN signal by using the fourth script.
In one implementation form of the first aspect, the method includes: executing the fourth script, calling a CAN test tool through the cns file, and sending a CAN signal message to the equipment end to be tested; after a preset time period, responding to the CAN signal message analyzed to the global structure variable by the equipment end to be tested, and calling a CAN analysis tool to obtain a CAN analysis value in the global structure variable; and verifying the CAN analytic value and each CAN signal in the CAN signal message one by one to generate a test result.
In an implementation manner of the first aspect, after the step of generating the test result, the method further includes: presenting a test report according to the test result; the test report comprises an input CAN signal message, a CAN analysis value and a test result.
A second aspect of the embodiments of the present application provides a system for testing a CAN signal, where the system includes: the signal sending module is configured to send the CAN signal message to the equipment end to be tested; the CAN signal message is a message formed by at least one CAN signal; the analysis data acquisition module is configured to respond to the CAN signal message analyzed to the global structure variable by the equipment end to be tested, and acquire a CAN analysis value in the global structure variable; and the test verification module is configured to verify the CAN analysis value and each CAN signal in the CAN signal message one by one to generate a test result.
A third aspect of the embodiments of the present application provides an electronic device, including: a processor and a memory; the memory is used for storing computer programs, and the processor is used for executing the computer programs stored by the memory so as to enable the electronic equipment to execute the method.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method.
As described above, the CAN signal test method, system, electronic device, and storage medium according to the present application include the following
Has the advantages that:
the automatic test method for the CAN signals is large in quantity aiming at the automotive electronics CAN signals, different in analytic mode of the signals, coefficient and offset exist in data, the analytic test workload is large, and the CAN signals are increased, deleted and modified to cause the later analytic test to be complicated in updating, the problems that management and maintenance are inconvenient and manual comparison tests are wrong and the risk is high are caused. The vulnerability of signal analysis can be found, unexpected abnormity caused by receiving error data by a later application layer is prevented, and the code abnormity risk is reduced.
Drawings
Fig. 1 shows an application architecture diagram of a CAN signal testing method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a method for testing a CAN signal according to an embodiment of the present disclosure.
Fig. 3 is a test frame diagram of a test method for a CAN signal according to an embodiment of the present disclosure.
Fig. 4 is a test flowchart of a method for testing a CAN signal according to an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of a CAN signal testing system according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural connection diagram of an electronic device according to an embodiment of the present disclosure.
Description of the element reference numerals
1. Device under test
2. Test equipment
5 CAN signal test system
51. Signal transmitting module
52. Analytic data acquisition module
53. Test verification module
6. Electronic device
61. Processor with a memory having a plurality of memory cells
62. Memory device
63. Communication interface
64. System bus
S21 to S23
S41 to S43 steps
Detailed Description
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The present application is capable of other and different embodiments and its several details are capable of modifications and/or changes in various respects, all without departing from the spirit of the present application. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present application, and the drawings only show the components related to the present application and are not drawn according to the number, shape and size of the components in actual implementation, and the type, number and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The following embodiments of the present application provide a method, a system, an electronic device, and a storage medium for testing a CAN signal, which include but are not limited to being applied to a test scenario of a testing device for a device to be tested, and the test scenario will be described as an example below.
Fig. 1 is a diagram illustrating an application architecture of the method for testing CAN signals according to the embodiment of the present application. As shown in fig. 1, the present embodiment provides a test scenario applied to a test method for a CAN signal, which specifically includes: a device under test 1 and a test device 2. The device under test 1 and the test device 2 are in communication connection. The test equipment 2 sends the CAN signal message to the equipment to be tested 1, the equipment to be tested 1 analyzes the CAN signal message, then the generated CAN analysis value is placed in the global variable, the test equipment 2 obtains the CAN analysis value from the global variable, and then the CAN analysis value is verified and compared with each CAN signal in the sent CAN signal message to generate a test result.
The test scenario may be a test scenario of an automotive electronics CAN bus signal, the device to be tested may be an automotive electronics CPU (Central Processing Unit), and the test device may be a computer device. The computer device includes, but is not limited to, a Personal computer such as a desktop computer, a notebook computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA). In other embodiments, the computer device may also be a server, where the server may be arranged on one or more entity servers according to various factors such as functions, loads, and the like, or may be a cloud server formed by a distributed or centralized server cluster, and this embodiment is not limited in this embodiment.
The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application.
Referring to fig. 2, a schematic flow chart of a method for testing a CAN signal according to an embodiment of the present application is shown. As shown in fig. 2, the present embodiment provides a method for testing a CAN signal, which specifically includes the following steps:
s21, sending a CAN signal message to a device end to be tested; the CAN signal message is a message formed by at least one CAN signal.
And S22, analyzing the CAN signal message to a global structure variable in response to the equipment end to be tested, and acquiring a CAN analysis value in the global structure variable.
In an embodiment, the global structure variable is determined after the device under test configures the first script generating structure file.
Specifically, the first script refers to a DBC2struct script, a target Node of a DBC in the DBC2struct script is configured, an h file corresponding to a TX/RX message signal structure is generated, the generated signals CAN judge variable types according to the length and the coefficient of the CAN signals, the variable types are sorted in a descending order according to the priority of the uint8_ t/uint16_ t/uint32_ t/float, the members of the whole structure are messages, and the members in the messages are all the CAN signals. Global variables are defined from the structure.
Among them, the DBC (Data Base CAN) file used for automotive electronic communication is issued by german Vector, and is used to describe information of each logic node in a single CAN network, and according to the file, monitoring and analyzing the operation states of all logic nodes in the CAN network CAN be developed, and also the node controller of the whole CAN network CAN be cooperatively and synchronously developed without errors.
In an embodiment, the device end to be tested generates an h file after configuring the second script, and generates a c file after configuring the third script; and performing bit domain analysis on the CAN signal message when the h file is executed, and performing numerical analysis on the CAN signal message when the c file is executed.
Specifically, the second script is a DBC2msg script, a target Node of a DBC in the DBC2msg script is configured, an h file is generated, and the h file realizes CAN signal bit field analysis.
Specifically, the third script is a DBC2code script, a target Node of a DBC in the DBC2code script is configured, a c file is generated, the file analyzes a physical value of a CAN signal according to a coefficient and an offset of the CAN signal, and the value is stored in a global variable.
In an embodiment, the step S22 specifically includes:
and responding to the end of the equipment to be tested to perform bit domain analysis and numerical analysis on the CAN signal message, storing a signal basic value generated by the bit domain analysis and a signal physical value generated by the numerical analysis into the global structure variable, and acquiring the signal basic value and the signal physical value in the global structure variable.
And S23, verifying the CAN analytic values and the CAN signals in the CAN signal messages one by one to generate a test result.
In an embodiment, step S23 specifically includes:
(1) And determining the current CAN signal according to the signal basic value and the signal physical value.
Specifically, the CAN signal message includes 10 CAN signals, and after being sorted according to a certain rule, the sequence is as follows: signal 10, signal 9, signal 8, signal 7, signal 6, signal 5, signal 4, signal 3, signal 2, and signal 1. For the signal 8, the signal base value is located at the 3 rd position, and the signal physical value is a specific value contained in the signal 8.
(2) And verifying and comparing the current CAN signal with a corresponding CAN signal in the CAN signal message.
Specifically, if the current CAN signal is signal 8, the value of the analyzed signal 8 is verified and compared with the value of signal 8 in the CAN signal message.
(3) And generating the test result according to the result of whether the comparison is consistent.
From this, this application is many to automotive electronics CAN signal quantity, CAN carry out batch processing to a plurality of signals, CAN improve efficiency of software testing, simplifies the loaded down with trivial details easy wrong process originally.
In an embodiment, before step S21, the method further includes:
configuring a fourth script which is a dbc2ape script, selecting a test node and an ID of a CAN signal message to be tested, and generating a cns file, wherein the cns file follows the syntax of a Vector tool chain; and executing the testing method of the CAN signal by using the fourth script.
Therefore, according to the method and the device, different analysis modes are provided for signals, data have coefficients and offsets, a Vector tool chain is used for selecting the test node and the CAN signal message to be tested, and the analysis modes are preset for analysis through each file configured at the device end to be tested.
In an embodiment, after step S23, the method further includes:
presenting a test report according to the test result; the test report comprises an input CAN signal message, a CAN analysis value and a test result. Therefore, the method and the device can find the loophole of signal analysis, prevent unexpected abnormity caused by the fact that the later application layer receives error data, and reduce the code abnormity risk.
Please refer to fig. 3, which is a testing frame diagram of a testing method of CAN signals according to an embodiment of the present application. As shown in fig. 3, in the CAN signal automatic test process, a cns file is automatically generated through a fourth script, a CANoe tool is called to transmit a CAN signal message, and according to a signal range and a coefficient specified in a DBC, the test coverage of signals CAN be configured, for example, 1 to 100 signals, signal 1, signal 5, signal 10, signal 15 … CAN be tested, and the test coverage CAN be adjusted, and signal 1, signal 10, signal 20, signal 30 … CAN be tested; delaying for a period of time after a preset time period, calling the CANape to obtain a CAN signal analytic value inside a chip of the device end to be tested, further generating a test result, and providing a CAN signal message input value, a CAN signal analytic value and the test result in a test report. The entire process may also be no more than 10 minutes for hundreds of CAN signal tests.
Please refer to fig. 4, which is a flowchart illustrating a testing method of a CAN signal according to an embodiment of the present disclosure. Applied to a test end device, as shown in fig. 4, the method includes:
and S41, executing the fourth script, calling a CAN test tool through the cns file, and sending a CAN signal message to the equipment end to be tested.
Specifically, the CANoe input signal value is set by the fourth script.
And S42, responding to the analysis of the CAN signal message to the global structure variable by the equipment end to be tested after a preset time period, and calling a CAN analysis tool to obtain a CAN analysis value in the global structure variable.
Specifically, after delaying for a period of time, the global structure variable is acquired through the CANape by using the fourth script.
The process that the equipment end to be tested analyzes the CAN signal message to the global structure variable comprises the following steps: and analyzing the DBC file by utilizing the first script to generate an h structure file, generating a signal storage structure according to the signal format of the DBC, and defining a global structure variable. And analyzing the DBC file by using a second script to generate an h file, and acquiring a signal basic value according to the bit definition of the CAN signal. And analyzing the DBC file by using a third script to generate a c file, and storing an actual analysis value of the CAN signal message into a global structure variable.
And S43, verifying the CAN analysis value and each CAN signal in the CAN signal message one by one to generate a test result.
Specifically, the fourth script is used for comparing the input value of the CAN signal message with the value of the global structure variable, and outputting a test result.
Therefore, according to the CAN signal testing method and device, batch automatic testing of the CAN signals is achieved through execution of all scripts, and the risk that errors exist in manual comparison testing is greatly improved.
The protection scope of the method for testing a CAN signal according to the embodiment of the present application is not limited to the execution sequence of the steps listed in the embodiment, and all the solutions implemented by adding, subtracting, and replacing the steps in the prior art according to the principles of the present application are included in the protection scope of the present application.
The embodiment of the present application further provides a system for testing a CAN signal, where the system for testing a CAN signal CAN implement the method for testing a CAN signal described in the present application, but an implementation apparatus of the method for testing a CAN signal described in the present application includes but is not limited to the structure of the system for testing a CAN signal listed in this embodiment, and all structural modifications and substitutions in the prior art made according to the principle of the present application are included in the protection scope of the present application.
Please refer to fig. 5, which is a schematic structural diagram of a system for testing CAN signals according to an embodiment of the present disclosure. As shown in fig. 5, the present embodiment provides a test system 5 for a CAN signal, which specifically includes: a signal sending module 51, an analysis data acquisition module 52 and a test verification module 53.
The signal sending module 51 is configured to send a CAN signal message to a device under test; the CAN signal message is a message formed by at least one CAN signal.
The analysis data obtaining module 52 is configured to respond to the end of the device to be tested analyzing the CAN signal packet to a global structure variable, and obtain a CAN analysis value in the global structure variable.
In an embodiment, the global structure variable is determined after the device under test configures the first script generating structure file.
In an embodiment, the device end to be tested generates an h file after configuring the second script, and generates a c file after configuring the third script; and performing bit domain analysis on the CAN signal message when the h file is executed, and performing numerical analysis on the CAN signal message when the c file is executed.
In an embodiment, the analysis data obtaining module 52 is specifically configured to perform bit-domain analysis and numerical analysis on the CAN signal packet in response to the to-be-tested device, store a signal basic value generated by the bit-domain analysis and a signal physical value generated by the numerical analysis into the global structure variable, and obtain the signal basic value and the signal physical value in the global structure variable.
The test verification module 53 is configured to verify the CAN analysis value and each CAN signal in the CAN signal message one by one, and generate a test result.
In an embodiment, the test verification module 53 is specifically configured to determine the current CAN signal according to the signal basic value and the signal physical value; verifying and comparing the current CAN signal with a corresponding CAN signal in the CAN signal message; and generating the test result according to the result of whether the comparison is consistent.
In an embodiment, the system for testing the CAN signal further includes a script configuration module, configured to configure a fourth script, select a test node and an ID of a CAN signal packet to be tested, and generate a cns file, where the cns file follows syntax of a Vector tool chain; and executing the testing method of the CAN signal by using the fourth script.
In an embodiment, the implementation principle of the CAN signal testing system includes: executing the fourth script, calling a CAN test tool through the cns file, and sending a CAN signal message to the equipment end to be tested; after a preset time period, responding to the CAN signal message analyzed to the global structure variable by the equipment end to be tested, and calling a CAN analysis tool to obtain a CAN analysis value in the global structure variable; and verifying the CAN analytic value and each CAN signal in the CAN signal message one by one to generate a test result.
In an embodiment, the system for testing CAN signals further includes a report output module configured to present a test report according to the test result; the test report comprises an input CAN signal message, a CAN analysis value and a test result.
In the several embodiments provided in the present application, it should be understood that the disclosed system or method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, a module/unit may be divided into only one logical functional division, and an actual implementation may have another division, for example, a plurality of modules or units may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules or units, and may be in an electrical, mechanical or other form.
Modules/units described as separate parts may or may not be physically separate, and parts displayed as modules/units may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules/units can be selected according to actual needs to achieve the purposes of the embodiments of the present application. For example, each functional module/unit in the embodiments of the present application may be integrated into one processing module, or each module/unit may exist alone physically, or two or more modules/units may be integrated into one module/unit.
It will be further appreciated by those of ordinary skill in the art that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Please refer to fig. 6, which is a schematic structural connection diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 6 of the present application includes: a processor 61, a memory 62, a communication interface 63, or/and a system bus 64. The memory 62 and the communication interface 63 are connected to the processor 61 through a system bus 64 and perform communication with each other, the memory 62 is used for storing computer programs, the communication interface 63 is used for communicating with other devices, and the processor 61 is used for running the computer programs to enable the electronic device 6 to execute the steps of the above method.
The Processor 61 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
The Memory 62 may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The system bus 64 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus 64 may be divided into an address bus, a data bus, a control bus, and the like. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library).
The embodiment of the application also provides a computer readable storage medium. It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by a program instructing a processor, and the program may be stored in a computer-readable storage medium, where the storage medium is a non-transitory (non-transitory) medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid state drive, a magnetic tape (magnetic tape), a floppy disk (floppy disk), an optical disk (optical disk) and any combination thereof. The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
The description of the flow or structure corresponding to each of the above drawings has emphasis, and a part not described in detail in a certain flow or structure may refer to the related description of other flows or structures.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.

Claims (11)

1. A method for testing CAN signals, the method comprising:
sending a CAN signal message to a device end to be tested; the CAN signal message is a message formed by at least one CAN signal;
analyzing the CAN signal message to a global structure variable in response to the equipment terminal to be tested, and acquiring a CAN analysis value in the global structure variable;
and verifying the CAN analytic value and each CAN signal in the CAN signal message one by one to generate a test result.
2. The method of claim 1, wherein:
and the global structure variable is determined after the equipment terminal to be tested is configured with a first script to generate a structure file.
3. The method of claim 1, wherein:
the device end to be tested generates an h file after configuring a second script and generates a c file after configuring a third script; and performing bit domain analysis on the CAN signal message when the h file is executed, and performing numerical analysis on the CAN signal message when the c file is executed.
4. The method according to claim 3, wherein the step of obtaining the CAN analysis value in the global structure variable by analyzing the CAN signal message to the global structure variable in response to the device terminal to be tested comprises:
and performing bit domain analysis and numerical analysis on the CAN signal message in response to the equipment terminal to be tested, storing a signal basic value generated by the bit domain analysis and a signal physical value generated by the numerical analysis into the global structure variable, and acquiring the signal basic value and the signal physical value in the global structure variable.
5. The method of claim 4 wherein the step of validating the CAN resolution values and the CAN signals in the CAN signal messages one by one to generate test results comprises:
determining a current CAN signal according to the signal basic value and the signal physical value;
verifying and comparing the current CAN signal with a corresponding CAN signal in the CAN signal message;
and generating the test result according to the result of whether the comparison is consistent.
6. The method according to claim 1, wherein before the step of sending the CAN signal message to the device under test, the method further comprises:
configuring a fourth script, selecting a test node and an ID of a CAN signal message to be tested, and generating a cns file, wherein the cns file follows the syntax of a Vector tool chain; and executing the testing method of the CAN signal by using the fourth script.
7. The method of claim 6, wherein the method comprises:
executing the fourth script, calling a CAN test tool through the cns file, and sending a CAN signal message to the equipment end to be tested;
after a preset time period, responding to the CAN signal message analyzed to the global structure variable by the equipment end to be tested, and calling a CAN analysis tool to obtain a CAN analysis value in the global structure variable;
and verifying the CAN analytic value and each CAN signal in the CAN signal message one by one to generate a test result.
8. The method of claim 1, wherein after the step of generating test results, the method further comprises:
presenting a test report according to the test result; the test report comprises an input CAN signal message, a CAN analysis value and a test result.
9. A system for testing CAN signals, the system comprising:
the signal sending module is configured to send the CAN signal message to the equipment end to be tested; the CAN signal message is a message formed by at least one CAN signal;
the analysis data acquisition module is configured to respond to the CAN signal message analyzed to the global structure variable by the equipment end to be tested, and acquire a CAN analysis value in the global structure variable;
and the test verification module is configured to verify the CAN analysis value and each CAN signal in the CAN signal message one by one to generate a test result.
10. An electronic device, comprising: a processor and a memory;
the memory is for storing a computer program, and the processor is for executing the computer program stored by the memory to cause the electronic device to perform the method of any of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 8.
CN202211633869.0A 2022-12-19 2022-12-19 CAN signal testing method and system, electronic device and storage medium Pending CN115941565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211633869.0A CN115941565A (en) 2022-12-19 2022-12-19 CAN signal testing method and system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211633869.0A CN115941565A (en) 2022-12-19 2022-12-19 CAN signal testing method and system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115941565A true CN115941565A (en) 2023-04-07

Family

ID=86697587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211633869.0A Pending CN115941565A (en) 2022-12-19 2022-12-19 CAN signal testing method and system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115941565A (en)

Similar Documents

Publication Publication Date Title
US11102081B1 (en) Quantitative network testing framework for 5G and subsequent generation networks
CN112100954A (en) Method and device for verifying chip and computer storage medium
CN111897724B (en) Automatic testing method and device suitable for cloud platform
US11893331B2 (en) Device verification method, UVM verification platform, electronic apparatus and storage medium
CN110678850B (en) Automated device test classification system and technique
CN111881022A (en) Method, device and equipment for generating test case based on test scene
CN110879781B (en) Program debugging method, device, electronic equipment and computer readable storage medium
CN113806037A (en) Service calling method and device, storage medium and electronic equipment
CN114422618A (en) IOT platform protocol adaptation method, device, equipment and medium based on cloud protogenesis
CN115118582A (en) Log analysis method and device
CN114328250A (en) Automatic self-checking method, medium and device for software system
US7475164B2 (en) Apparatus, system, and method for automated device configuration and testing
CN111506501B (en) Method and device for generating test instruction set and electronic equipment
CN113742221A (en) Method for generating test case, electronic device and storage medium
CN110020166B (en) Data analysis method and related equipment
CN115941565A (en) CAN signal testing method and system, electronic device and storage medium
CN113419952B (en) Cloud service management scene testing device and method
CN115034164A (en) Verification method, electronic device, and storage medium
CN113886221A (en) Test script generation method and device, storage medium and electronic equipment
CN112559346A (en) Service testing method and device
CN112306723A (en) Operation information acquisition method and device applied to small program
CN117130945B (en) Test method and device
CN116306409B (en) Chip verification method, device, equipment and storage medium
US11868766B2 (en) Method and system for identifying duplicate cascading style sheets (CSS) selector declarations
CN116610559A (en) Test method, test device, electronic equipment and computer readable storage medium

Legal Events

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