CN113612654A - Vehicle-mounted gateway function testing method based on database - Google Patents

Vehicle-mounted gateway function testing method based on database Download PDF

Info

Publication number
CN113612654A
CN113612654A CN202110783511.5A CN202110783511A CN113612654A CN 113612654 A CN113612654 A CN 113612654A CN 202110783511 A CN202110783511 A CN 202110783511A CN 113612654 A CN113612654 A CN 113612654A
Authority
CN
China
Prior art keywords
test
function
gateway
vehicle
routing
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.)
Granted
Application number
CN202110783511.5A
Other languages
Chinese (zh)
Other versions
CN113612654B (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.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor Corp
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 Dongfeng Motor Corp filed Critical Dongfeng Motor Corp
Priority to CN202110783511.5A priority Critical patent/CN113612654B/en
Publication of CN113612654A publication Critical patent/CN113612654A/en
Application granted granted Critical
Publication of CN113612654B publication Critical patent/CN113612654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a vehicle-mounted gateway function testing method based on a database, which comprises the following steps: 1) establishing a testing Lib library for each function point design to be tested of the gateway function; 2) creating a plug-in, wherein the plug-in is used for extracting effective input and output object parameters from a network database file and generating a test case by combining a test Lib library; 3) calling a bus tool API (application programming interface) interface to the configured test case to generate a function test script, and directly running the test script in a bus tool environment to realize automatic testing of the functions of the vehicle-mounted gateway; 4) and recording the mapping relation of each function in the test case and the requirement document, and counting the coverage of the function test. The invention realizes the automatic generation of the test case script and the automatic test of the vehicle-mounted gateway function, automatically generates the mapping relation between the test case and the requirement document, and is convenient for function test tracing and coverage statistics.

Description

Vehicle-mounted gateway function testing method based on database
Technical Field
The invention relates to a network application technology, in particular to a vehicle-mounted gateway function testing method based on a database.
Background
With the continuous development and development of the vehicle bus technology, LIN, CAN bus is used in the vehicle network, wherein the CAN bus is generally designed as a backbone network, and LIN and the fault-tolerant CAN are designed as subnets. In order to meet the demands of higher transmission rate, low delay, high fault tolerance, network security and intelligent traffic, the backbone network of the vehicle-mounted network will rapidly evolve toward the vehicle-mounted Ethernet (Ethernet). The central gateway is applied to ensure the real-time performance and reliability of the vehicle network communication, is used as a core component of the whole vehicle network management and information interaction, plays the roles of protocol conversion, flow control and network management, and has higher requirements on the function design and test of the central gateway.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a vehicle-mounted gateway function testing method based on a database aiming at the defects in the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: a vehicle-mounted gateway function testing method based on a database comprises the following steps:
1) establishing a testing Lib library for each function point design to be tested of the gateway function; the test Lib library comprises: a message routing test Lib library, a signal routing test Lib library and a protocol conversion test Lib library;
2) creating a plug-in, wherein the plug-in is used for extracting effective input and output object parameters from a network database file and generating a test case by combining a test Lib library;
the network database file comprises library files of all bus channels of the gateway, and is used for configuring the corresponding relation between the bus tool channel and the gateway channel and extracting object parameters, and the object comprises: a node object, a message object, and a signal object;
the method comprises the following steps of extracting effective input and output object parameters from a network database file and generating a single test case by combining a test Lib library, wherein the method specifically comprises the following steps:
2.1) extracting a gateway receiving source network segment from a network database file and a message object, a signal object and a node object which are forwarded to a target network segment through a gateway;
2.2) sequentially using the test functions in the message routing test Lib library, the signal routing test Lib library and the protocol conversion test Lib library to perform function test detection according to a set flow;
2.3) generating a test case by each group of input and output object parameters and a test Lib library; until the mapping of all input and output object parameters is completed, generating a complete test case;
2.4) carrying out configuration marking on the test case by combining the gateway routing requirement document and the vehicle configuration file;
the requirement document is used for describing the corresponding functional requirement of the gateway to be tested;
the vehicle configuration file is used for describing vehicle configuration corresponding to the gateway to be tested; if the vehicle type configuration corresponding to the gateway to be tested is a manual transmission or an automatic transmission MT/AT, the specification of the radio and tape player is one of RAD01/RAD02/RAD03, and the generated test case is marked with a large screen or without key configuration information such as large screen MMI/SMMI and the like;
2.5) inputting test parameters, providing the test parameters for a test case as a judgment standard of a performance test result;
3) calling a bus tool API (application programming interface) interface to the configured test case to generate a function test script, and directly running the test script in a bus tool environment to realize automatic testing of the functions of the vehicle-mounted gateway;
4) and recording the mapping relation of each function in the test case and the requirement document, and counting the coverage of the function test.
According to the scheme, the message routing test Lib library is used for storing message routing test related functions, and comprises a message routing detection function MsgChk, a message routing data field length detection function MsgDlcChk and a message routing delay detection function MsgDelayChk; MSGsrc is a gateway receiving source network segment message object, MSGdst is a gateway forwarding MSGsrc to a destination network segment message object, and a message routing test Lib library is used for detecting parameters of message routing, message field length, forwarding delay and the like of MSGdst.
According to the scheme, the signal routing test Lib library is used for storing a signal routing test correlation function, a signal routing detection function SigChk and a signal routing delay detection function.
The invention has the following beneficial effects:
the vehicle-mounted gateway function testing method based on the database has high automation degree, can effectively avoid the defects of low efficiency, easy error, unfavorable regression testing and the like in the manual testing process, avoids the defects of long time for manually compiling the test script, non-uniform format, poor reusability, poor consistency and the like, realizes the automatic generation of the test case script and the automatic testing of the vehicle-mounted gateway function, automatically generates the mapping relation between the test case and the requirement document, and facilitates the functional test tracing and the statistics of the coverage degree.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a schematic diagram of a testing apparatus according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a message routing function test flow according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a signal routing function test flow according to an embodiment of the present invention;
FIG. 4 is a flow chart of automatic generation of test scripts in accordance with an 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 further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A vehicle-mounted gateway function test method based on a database is disclosed, wherein a test device is shown in figure 1 and comprises a bus tool, a vehicle-mounted gateway and a test upper computer, wherein the bus tool is connected with the vehicle-mounted gateway through a vehicle-mounted bus, the upper computer is connected with the bus tool through a data bus, and bus interfaces of the vehicle-mounted gateway are correspondingly connected with bus interfaces of the bus tool one by one;
the method comprises the following steps:
1) and creating a corresponding Lib testing library according to each function point of the gateway in an abstract way, and dividing the Lib testing library into a message routing testing library, a signal routing testing library, a protocol conversion testing library and the like according to the testing function points.
The library of the message routing test Lib includes, but is not limited to, a message routing detection function MsgChk (message MSGsrc, message MSGdst, enum exists), a message routing data field length detection function MsgDlcChk (message MSGsrc, message MSGdst, int dlc8), a message routing delay detection function msgdlaychk (message MSGsrc, message MSGdst, int delay), and the like. The message routing tests have the same mode Mx (MSGsrc, MSGdst, x), where Mx is a detection function name, MSGsrc is a gateway receiving source network segment message object, MSGdst is a gateway forwarding MSGsrc to a destination network segment message object, x is a detection parameter, and if enumeration exists, the message field length, forwarding delay and other parameters are determined, and a specific test flow is shown in fig. 2.
The designed signal routing test Lib library has the same mode of Sy (SIGSRc, SIGDSt, y), Sy is a signal test function name, SIGSRc is a source signal object, SIGDSt is a target signal object, and y is a signal detection attribute parameter. Such as signal routing detection function SigChk (signal SIGsrc, signal SIGdst, flow value, flow step, int delay). The specific test flow is shown in fig. 3.
2) The design plug-in creation is written through Visual Basic or Python and other programming languages, and the plug-in is used for extracting effective input and output object parameters from a network database file and generating a test case by combining a test Lib library. And automatically configuring and marking the test case according to the gateway routing requirement document (such as an xlsx document) and the vehicle configuration document (such as an xml document) so as to judge the difference of the requirement and the configuration of the gateway to be tested in the execution of the test script.
The network database file comprises library files of all bus channels of the gateway, and is used for configuring the corresponding relation between the bus tool channel and the gateway channel and extracting object parameters, and the object comprises: a node object, a message object, and a signal object;
extracting effective input and output object parameters from the network database file and generating a single test case by combining the test Lib library, as shown in fig. 4, specifically as follows:
2.1) extracting a gateway receiving source network segment from a network database file and a message object, a signal object and a node object which are forwarded to a target network segment through a gateway;
2.2) sequentially using the test functions in the message routing test Lib library, the signal routing test Lib library and the protocol conversion test Lib library to perform function test detection according to a set flow;
2.3) generating a test case by each group of input and output object parameters and a test Lib library; until the mapping of all input and output object parameters is completed, generating a complete test case;
2.4) carrying out configuration marking on the test case by combining the gateway routing requirement document and the vehicle configuration file; and carrying out configuration marking on the test case so as to judge the difference of the requirement and the configuration of the gateway to be tested in the execution of the test script.
The requirement document is used for describing the corresponding functional requirement of the gateway to be tested;
the vehicle configuration file is used for describing vehicle configuration corresponding to the gateway to be tested; if the vehicle type configuration corresponding to the gateway to be tested is a manual transmission or an automatic transmission MT/AT, the specification of the radio and tape player is one of RAD01/RAD02/RAD03, and the generated test case is marked with a large screen or without key configuration information such as large screen MMI/SMMI and the like; one test requirement or main point can correspond to one or more test cases, the extracted test requirement can automatically generate the corresponding test case, and a mapping relation between the test case and the test requirement is obtained.
2.5) inputting test parameters, providing the test parameters for a test case as a judgment standard of a performance test result;
3) and generating an xml or can test case script and a test mapping table by calling the API (application programming interface) of the test environment for the test case after the configuration is finished, wherein the format of the generated test script can be directly called and executed in the test environment shown in the figure I, and the test mapping table is an xlsx file and is used for corresponding the test case with a requirement document, so that the statistics and the tracing of the coverage of the functional test are facilitated.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

Claims (5)

1. A vehicle-mounted gateway function testing method based on a database is characterized by comprising the following steps:
1) establishing a testing Lib library for each function point design to be tested of the gateway function; the test Lib library comprises: a message routing test Lib library, a signal routing test Lib library and a protocol conversion test Lib library;
2) creating a plug-in, wherein the plug-in is used for extracting effective input and output object parameters from a network database file to generate test items, marking the test items by combining a requirement document and a vehicle configuration file, and finally calling a corresponding test Lib library to generate a test case according to the attributes of the test items;
the network database file comprises library files of all bus channels of the gateway, and is used for configuring the corresponding relation between the bus tool channel and the gateway channel and extracting object parameters, and the object comprises: a node object, a message object, and a signal object;
3) calling a bus tool API (application programming interface) interface to the configured test case to generate a function test script, and directly running the test script in a bus tool environment to realize automatic testing of the functions of the vehicle-mounted gateway;
4) and recording the mapping relation of each function in the test case and the requirement document, and counting the coverage of the function test.
2. The method for testing the functions of the database-based vehicle gateway according to claim 1, wherein in step 2), the parameters of the valid input and output objects are extracted from the network database file and combined with a Lib test library to generate a single test case, specifically as follows:
2.1) extracting a gateway receiving source network segment from a network database file and a message object, a signal object and a node object which are forwarded to a target network segment through a gateway;
2.2) sequentially using the test functions in the message routing test Lib library, the signal routing test Lib library and the protocol conversion test Lib library to perform function test detection according to a set flow;
2.3) generating a test case by each group of input and output object parameters and a test Lib library; until the mapping of all input and output object parameters is completed, generating a complete test case;
2.4) carrying out configuration marking on the test case by combining the gateway routing requirement document and the vehicle configuration file; the requirement document is used for describing the corresponding functional requirement of the gateway to be tested;
the vehicle configuration file is used for describing vehicle configuration corresponding to the gateway to be tested;
2.5) inputting test parameters, providing the test parameters for a test case, and using the test case as a judgment standard of a performance test result.
3. The method for testing the functionality of the database-based vehicular gateway according to claim 1, wherein in step 1), the Lib library is used for storing message routing test correlation functions, including a message routing detection function, a message routing data field length detection function, and a message routing delay detection function.
4. The vehicle-mounted gateway function testing method based on the database according to claim 1, wherein in the step 1), the signal routing test Lib library is used for storing a signal routing test correlation function, a signal routing detection function SigChk and a signal routing delay detection function.
5. The method for testing the functions of the database-based vehicular gateway according to claim 1, wherein the setting process in the step 2.2) is as follows:
the message routing function test sequentially performs message routing sending detection, message routing data field length detection and message routing delay detection;
the signal routing function test sequentially carries out signal packing and recombination message identifier detection, signal routing numerical value corresponding detection and signal routing delay detection;
and the protocol conversion function test sequentially performs protocol conversion format detection and protocol data stream detection.
CN202110783511.5A 2021-07-12 2021-07-12 Vehicle-mounted gateway function test method based on database Active CN113612654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110783511.5A CN113612654B (en) 2021-07-12 2021-07-12 Vehicle-mounted gateway function test method based on database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110783511.5A CN113612654B (en) 2021-07-12 2021-07-12 Vehicle-mounted gateway function test method based on database

Publications (2)

Publication Number Publication Date
CN113612654A true CN113612654A (en) 2021-11-05
CN113612654B CN113612654B (en) 2023-05-26

Family

ID=78337450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110783511.5A Active CN113612654B (en) 2021-07-12 2021-07-12 Vehicle-mounted gateway function test method based on database

Country Status (1)

Country Link
CN (1) CN113612654B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826992A (en) * 2022-04-08 2022-07-29 南京芯驰半导体科技有限公司 Vehicle-mounted gateway Ethernet self-testing system and method
CN114915484A (en) * 2022-05-30 2022-08-16 重庆长安汽车股份有限公司 Safety detection system and detection method for vehicle-mounted gateway
CN115865776A (en) * 2022-11-30 2023-03-28 重庆长安汽车股份有限公司 Method and device for generating routing detection script and storage medium
CN117234946A (en) * 2023-11-10 2023-12-15 深圳市金政软件技术有限公司 Automatic test method and related equipment for project library system
CN117651012A (en) * 2024-01-25 2024-03-05 江铃汽车股份有限公司 Vehicle central gateway testing method and system
CN117651012B (en) * 2024-01-25 2024-05-31 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN107992409A (en) * 2017-11-21 2018-05-04 平安养老保险股份有限公司 Method for generating test case, device, computer equipment and storage medium
CN110048910A (en) * 2019-04-24 2019-07-23 重庆长安汽车股份有限公司 A kind of vehicle-mounted ethernet gateway test macro and method
CN110855532A (en) * 2019-11-28 2020-02-28 安徽江淮汽车集团股份有限公司 Vehicle-mounted gateway testing method, device, equipment and storage medium
CN111708661A (en) * 2020-05-14 2020-09-25 东风汽车集团有限公司 Pressure testing system and method suitable for central gateway

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN107992409A (en) * 2017-11-21 2018-05-04 平安养老保险股份有限公司 Method for generating test case, device, computer equipment and storage medium
CN110048910A (en) * 2019-04-24 2019-07-23 重庆长安汽车股份有限公司 A kind of vehicle-mounted ethernet gateway test macro and method
CN110855532A (en) * 2019-11-28 2020-02-28 安徽江淮汽车集团股份有限公司 Vehicle-mounted gateway testing method, device, equipment and storage medium
CN111708661A (en) * 2020-05-14 2020-09-25 东风汽车集团有限公司 Pressure testing system and method suitable for central gateway

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826992A (en) * 2022-04-08 2022-07-29 南京芯驰半导体科技有限公司 Vehicle-mounted gateway Ethernet self-testing system and method
CN114826992B (en) * 2022-04-08 2023-10-31 南京芯驰半导体科技有限公司 Ethernet self-test system and method for vehicle-mounted gateway
CN114915484A (en) * 2022-05-30 2022-08-16 重庆长安汽车股份有限公司 Safety detection system and detection method for vehicle-mounted gateway
CN115865776A (en) * 2022-11-30 2023-03-28 重庆长安汽车股份有限公司 Method and device for generating routing detection script and storage medium
CN117234946A (en) * 2023-11-10 2023-12-15 深圳市金政软件技术有限公司 Automatic test method and related equipment for project library system
CN117234946B (en) * 2023-11-10 2024-02-02 深圳市金政软件技术有限公司 Automatic test method and related equipment for project library system
CN117651012A (en) * 2024-01-25 2024-03-05 江铃汽车股份有限公司 Vehicle central gateway testing method and system
CN117651012B (en) * 2024-01-25 2024-05-31 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Also Published As

Publication number Publication date
CN113612654B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN113612654B (en) Vehicle-mounted gateway function test method based on database
CN100512163C (en) Device and method for forming topological map and detecting topological structure
CN103198009B (en) A kind of universal testing method, system and related device
CN112783794B (en) Aviation communication radio station software testing system
CN102622234B (en) Development system and method for automatic test case
CN106330618A (en) Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN102222043B (en) Testing method and testing device
CN106100935A (en) Charging equipment of electric automobile communication protocol consistency test device and method
CN106411637A (en) Internet-of-things device scenario testing method
CN114460925B (en) Automatic test method for CAN interface HIL of electric automobile controller
CN102750143B (en) Based on the DSP development approach that MATLAB com component calls
CN116107893A (en) Heterogeneous platform embedded software test verification system and method
CN114003451A (en) Interface test method, device, system and medium
CN110737660B (en) Data processing method and device and computer readable storage medium
CN112486839B (en) Airborne product test modeling method based on state machine
CN205864449U (en) Charging equipment of electric automobile communication protocol consistency test device
CN111294225A (en) Automatic test system and method for exchange equipment in rail transit system
CN116521602A (en) Bus data transmission method and device and storage medium
CN111176995A (en) Test method and test system based on big data test case
CN110890981B (en) System for configuring network equipment and method for realizing network equipment configuration
CN114443488A (en) ARINC664 network configuration testing framework construction method
CN101217332A (en) Alarming test method and test control platform of synchronous digital system device
CN116056120A (en) Operation and maintenance operation method, system and network equipment
CN109814871B (en) Node management method and system based on DDS bus
CN103135986B (en) A kind of operation acquisition method and 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
GR01 Patent grant
GR01 Patent grant