CN115687149A - Automatic testing method, device, terminal equipment and system for automobile central control - Google Patents

Automatic testing method, device, terminal equipment and system for automobile central control Download PDF

Info

Publication number
CN115687149A
CN115687149A CN202211431146.2A CN202211431146A CN115687149A CN 115687149 A CN115687149 A CN 115687149A CN 202211431146 A CN202211431146 A CN 202211431146A CN 115687149 A CN115687149 A CN 115687149A
Authority
CN
China
Prior art keywords
matching
test
message
uplink
signal value
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
CN202211431146.2A
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.)
Xinghe Zhilian Automobile Technology Co Ltd
Original Assignee
Xinghe Zhilian Automobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xinghe Zhilian Automobile Technology Co Ltd filed Critical Xinghe Zhilian Automobile Technology Co Ltd
Priority to CN202211431146.2A priority Critical patent/CN115687149A/en
Publication of CN115687149A publication Critical patent/CN115687149A/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]

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses an automatic test method, a device, terminal equipment and a system for automobile central control, wherein the method comprises the following steps: when an uplink channel test is required, obtaining uplink CAN Message information from key information of a test case to be tested, which is obtained from a test case table, wherein the information comprises a Message ID, a Signal _ name and a Received Signal Value, and the Received Signal Value comprises M Signal values; m uplink CAN messages corresponding to the M signal values are sent to an automobile central control MCU according to the uplink CAN message information, and the uplink CAN messages are sent to a QNX system and an Android system through the MCU, so that logs are generated when the QNX system and the Android system successfully receive the uplink CAN messages; matching the signal value of the uplink CAN message according to the log generated by the QNX system, and matching the signal value of the uplink CAN message according to the log generated by the Android system; and obtaining a test result of the test case to be tested according to the matching result. The invention can realize automatic acceptance check of automobile central control, saves labor and time cost, and can quickly and accurately position the problem.

Description

Automatic testing method, device, terminal equipment and system for automobile central control
Technical Field
The invention relates to the technical field of automatic testing, in particular to an automatic testing method, device, terminal equipment and system for automobile central control.
Background
When the era of software-defined automobiles comes, the separation of software and hardware of automobiles is becoming a new consensus for the development of the automobile industry. From the bottom layer to the ecology and to the cloud, the whole process needs a large amount of software and hardware cooperation and investment, and is difficult to realize only by a single enterprise. At present, most automobile manufacturers focus on customizing and developing software functions and application parts in order to focus more on the development and continuous iteration of automobile software functions and applications, while hardware parts, operating systems and underlying software are developed by Tier1 manufacturers, and the automobile manufacturers and the Tier1 manufacturers play different roles in the whole process.
However, due to the high complexity of the automobile network, the labor distribution mode of Tier1 and the whole automobile factory brings a large amount of verification and test work with frequent steps in the actual delivery process of both parties, the work consumes a large amount of labor and time cost of the whole automobile factory, and most of the current test work is performed based on the whole system, so that it is difficult to locate the layer where the bug appears when a problem occurs, which brings certain influence on the development progress and problem location of subsequent software.
Disclosure of Invention
The embodiment of the invention aims to provide an automatic testing method, device, terminal equipment and system for automobile central control, which can realize automatic acceptance check of automobile central control, save labor and time cost and realize quick and accurate problem positioning.
In order to achieve the above object, an embodiment of the present invention provides an automated testing method for a central control of an automobile, where the method is executed by a testing apparatus, and the method includes:
acquiring key information of each test case from a preset test case table;
when an uplink access test is required, acquiring uplink CAN message information from key information of a test case to be tested; the uplink CAN Message information comprises a Message ID, a Signal _ name and a Received Signal Value, wherein the Received Signal Value comprises M Signal values, and M is more than or equal to 1;
sequentially sending M uplink CAN messages corresponding to the M signal values one by one to an automobile central control MCU according to the uplink CAN message information, and sending each uplink CAN message to a QNX system and an Android system through the automobile central control MCU, so that the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received;
matching the signal value carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results;
matching the signal value carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results;
and obtaining the test result of the test case to be tested according to the obtained 2 x M matching results.
Further, the matching the signal value carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results specifically includes:
acquiring final _ property ID from key information of a test case to be tested;
acquiring a signal value carried by each uplink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID;
matching the signal value carried by each uplink CAN message when being sent with the signal value carried when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the automobile central control MCU sends the ith uplink CAN message to the QNX system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
Further, the matching of the signal value carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results specifically includes:
acquiring final _ property ID from key information of a test case to be tested;
acquiring a signal value carried by each uplink CAN message received by the Android system from a log generated by the Android system according to the final _ property ID;
matching the signal value carried by each uplink CAN message when being sent with the signal value carried by each uplink CAN message when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the QNX system sends the ith uplink CAN message to the Android system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
Further, the obtaining of the test result of the test case to be tested according to the obtained 2 × m matching results specifically includes:
when the obtained 2 × M matching results are successfully matched, obtaining the test result of the test case to be tested as test pass;
when matching failure exists in the obtained 2 x M matching results, obtaining the test result of the test case to be tested as test failure, and marking the matching result of the matching failure; wherein the mark comprises a matching position and a matching type;
and writing the obtained test result of the test case to be tested into a result table.
Further, the method further comprises:
when a downlink channel test is required, calling a Car Service interface in the Android system to compile a test APK, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the test device according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the test device receives the jth downlink CAN message; if the two are consistent, obtaining the jth matching result as successful matching, otherwise, obtaining the jth matching result as failed matching; j =1,2, \8230, N;
searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and obtaining the test result of the test case to be tested according to the obtained N matching results.
Further, the method further comprises:
when a downlink access test is required, calling a Car Service interface in the Android system to write a test APK, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the QNX system according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
calling a native interface in the QNX system to compile a monitoring APK, and calling an interface in the monitoring APK to monitor whether a downlink CAN message sent by the testing APK is successfully received by the QNX system, so that the QNX system generates a corresponding log when successfully receiving each downlink CAN message;
acquiring a signal value carried by each downlink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID;
matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the QNX system receives the jth downlink CAN message; if the two are consistent, the jth matching result is obtained as successful matching, otherwise, the jth matching result is obtained as failed matching; j =1,2, \ 8230;, N;
searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and obtaining the test result of the test case to be tested according to the N obtained matching results.
Further, the obtaining of the test result of the test case to be tested according to the obtained N matching results specifically includes:
when the obtained N matching results are all matched successfully, obtaining the test result of the test case to be tested as test pass;
when matching failure exists in the N obtained matching results, obtaining the test result of the test case to be tested as the test failure, and marking the matching result of the matching failure; wherein the marker comprises a matching location;
and writing the obtained test result of the test case to be tested into a result table.
In order to achieve the above object, an embodiment of the present invention further provides an automatic testing apparatus for an automobile central controller, which is used to implement the automatic testing method for the automobile central controller described in any one of the above embodiments, where the testing apparatus includes:
the test case information acquisition module is used for acquiring the key information of each test case from a preset test case table;
the uplink data acquisition module is used for acquiring uplink CAN message information from key information of a test case to be tested when an uplink access test is required; the uplink CAN message information comprises a MessageID, a Signal _ name and a Received Signal Value, wherein the Received Signal Value comprises M Signal values, and M is more than or equal to 1;
the uplink message sending module is used for sequentially sending M uplink CAN messages corresponding to the M signal values one by one to an automobile central control MCU according to the uplink CAN message information so as to send each uplink CAN message to a QNX system and an Android system through the automobile central control MCU, and the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received;
the first uplink data matching module is used for matching the signal value carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results;
the second uplink data matching module is used for matching the signal value carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results;
and the uplink test result acquisition module is used for acquiring the test result of the test case to be tested according to the obtained 2 × m matching results.
The embodiment of the invention also provides terminal equipment, which comprises a processor, a memory and a computer program which is stored in the memory and configured to be executed by the processor, wherein the processor realizes the automatic test method for central control of the automobile when executing the computer program.
The embodiment of the invention also provides an automatic test system for the central control of the automobile, which comprises a test device, an MCU (micro control unit) for the central control of the automobile, a QNX system and an Android system, wherein the test device is used for realizing the automatic test method for the central control of the automobile.
Compared with the prior art, the embodiment of the invention provides an automatic test method, device, terminal equipment and system for automobile central control, wherein the method is executed by a test device, and the method comprises the following steps: acquiring key information of each test case from a preset test case table; when an uplink access test is required, acquiring uplink CAN Message information from key information of a test case to be tested, wherein the uplink CAN Message information comprises a Message ID, a Signal _ name and a Received Signal Value, the Received Signal Value comprises M Signal values, and M is more than or equal to 1; sequentially sending M uplink CAN messages corresponding to the M signal values one by one to an automobile central control MCU according to the uplink CAN message information, and sending each uplink CAN message to a QNX system and an Android system through the automobile central control MCU, so that the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received; matching the signal value carried by each uplink CAN message according to the log generated by the QNX system, and matching the signal value carried by each uplink CAN message according to the log generated by the Android system to obtain 2 × M matching results; obtaining the test result of the test case to be tested according to the obtained 2 x M matching results; by adopting the embodiment of the invention, automatic acceptance check of automobile central control can be realized, labor and time cost are saved, and quick and accurate problem positioning can be realized.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of an automated testing method for a vehicle central control provided by the present invention;
FIG. 2 is a block diagram of an automated testing apparatus for a central control of a vehicle according to a preferred embodiment of the present invention;
fig. 3 is a block diagram of a preferred embodiment of a terminal device provided in the present invention;
fig. 4 is a block diagram of an automated testing system for a central control of an automobile according to a preferred embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without any inventive step, are within the scope of the present invention.
An embodiment of the present invention provides an automatic test method for a central control of an automobile, which is a flowchart of a preferred embodiment of the automatic test method for the central control of the automobile provided by the present invention, as shown in fig. 1, where the method is executed by a test apparatus, and the method includes steps S11 to S16:
s11, obtaining key information of each test case from a preset test case table;
s12, when an uplink access test is required, acquiring uplink CAN message information from key information of a test case to be tested; the uplink CAN Message information comprises a Message ID, a Signal _ name and a Received Signal Value, wherein the Received Signal Value comprises M Signal values, and M is more than or equal to 1;
step S13, sequentially sending M uplink CAN messages corresponding to the M signal values one by one to an automobile central control MCU according to the uplink CAN message information, so that each uplink CAN message is sent to a QNX system and an Android system through the automobile central control MCU, and the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received;
s14, matching signal values carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results;
s15, matching signal values carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results;
and S16, obtaining the test result of the test case to be tested according to the obtained 2 x M matching results.
It should be noted that a VHAL test case table corresponding to the hardware abstraction layer VHAL of the vehicle-mounted device is preset in the test apparatus, the test case table includes a plurality of test cases, and a correspondence between each function point, each CAN signal in the communication matrix, and each uplink signal value and each downlink signal value of a test point to be tested is specifically recorded, and the test apparatus CAN obtain key information of each test case in the test case table by reading the test case table.
The key information of the test case mainly comprises:
MCU UP, signal name of CAN message to be sent;
the Received Signal Value represents a specific Signal Value of the CAN message to be sent (for the car machine object, the CAN message to be sent by the test device is the CAN message to be Received by the car machine object, so the "Received Signal Value" represents the specific Signal Value of the CAN message to be sent by the test device);
the Send Signal Value represents the specific Signal Value of the CAN message required to be sent during the downlink channel test;
property ID, representing an eight-bit 16-system data customized by the garage;
area ID, which represents the Area attribute (which can be defined by the car manufacturer according to the actual situation) of the signal, such as WINDOW, SEAT, DOOR, etc., each Area attribute corresponds to 16-bit data;
the Data Type represents Data types transmitted or received in the communication process, such as INT32, FLOAT and the like, each Data Type corresponds to 16-bit Data, and the Data Type can be defined by a vehicle manufacturer according to actual conditions;
the system-in-vehicle ID is used for judging which signal is transmitted or received by the system-in-vehicle through the final _ property ID, and the complete property ID is formed by three values of the property ID, the Area ID and the Data Type, namely, the property ID + the Area ID + the Data Type = final _ property ID, and the final _ property ID is 16-bit Data;
a Message ID indicating a Message ID of a CAN Message to be transmitted;
case ID, representing the unique identifier of the test Case;
test (Y/N) indicates whether the Test requires skipping.
Specifically, when the automobile central control is actually tested automatically, the testing device obtains key information corresponding to each test case from a preset test case table; judging whether the uplink channel test or the downlink channel test is needed currently; when the uplink access test is judged to be needed, the test device acquires uplink CAN Message information from key information corresponding to a test case to be tested, wherein the uplink CAN Message information mainly comprises a Message ID, a Signal _ name and a Received Signal Value, the Received Signal Value comprises M Signal values, and M is more than or equal to 1; the testing device sends M uplink CAN messages corresponding to M signal values one by one to an automobile central control Unit (MCU) by using a python-CAN simulation according to the obtained uplink CAN message information, each received uplink CAN message is forwarded to a QNX (Quick UNIX) system of the automobile by the automobile central control MCU, and is transmitted to an Android system of the automobile after being processed by the QNX system, wherein the value of the received corresponding request sent by the CAN is printed in a log when each uplink CAN message is successfully received by the QNX system, and a corresponding log is generated; then, the testing device CAN respectively match the signal value carried by each uplink CAN message according to the log generated by the QNX system to correspondingly obtain M matching results, respectively match the signal value carried by each uplink CAN message according to the log generated by the Android system to correspondingly obtain M matching results, and obtain the testing result of the test case to be tested according to the obtained 2 × M matching results.
The testing device respectively matches signal values carried by each uplink CAN message according to a log generated by the QNX system, namely the log generated by the check QNX system (the log generated by the QNX system which is the latest check generally) is used for testing whether the signal values received by the QNX system are correct or not; the testing device respectively matches the signal value carried by each uplink CAN message according to the log generated by the Android system, namely the log generated by the check Android system (generally the log generated by the latest check Android system) is used for testing whether the signal value transmitted by the QNX system is correct or not so as to ensure that the transmitted CAN request CAN be correctly transmitted to the Android system after being processed by the QNX system.
Preferably, before the testing device respectively matches the signal value carried by each uplink CAN message according to the log generated by the QNX system, it CAN further determine whether the QNX system receives a corresponding CAN request, if the log generated by the QNX system has final _ property ID and receives the printing of the corresponding signal value, it indicates that the QNX system receives the request, and at this time, the log generated by the check QNX system CAN be continued; if the log generated by the QNX system does not have the predefined log related to final _ property ID, the QNX system does not receive the request.
It should be noted that there may be more than one Signal Value corresponding to the Received Signal Value, and when there are multiple Signal values, the testing apparatus needs to perform a cyclic transmission test for each Signal Value in the Received Signal Value, and perform corresponding Signal Value matching processing on one Signal Value in each cycle, where the number of Signal values in the Received Signal Value is the same as the number of uplink CAN messages that need to be transmitted, and one Signal Value corresponds to one uplink CAN Message (both Message ID and Signal _ name are the same), that is, each uplink CAN Message that is transmitted by the testing apparatus corresponds to one Signal Value.
The automatic test method for the automobile central control, provided by the embodiment of the invention, has the following beneficial effects:
(1) In the whole project delivery process, the number of the Tire1 release versions is large (dozens), corresponding test work is carried out on each version, hundreds of signals in a communication matrix need to be tested and verified, and the test scheme provided by the prior art is adopted, so that the test data volume is large, the workload is large, the repeated work is more, the steps are complex, excessive manpower, material resources and time cost of a whole vehicle factory are consumed, meanwhile, the problems of low test speed, high error rate and the like exist in manual test;
(2) The test scheme provided by the prior art is generally the verification of the whole system level, and is difficult to position the bug appearing in the Tire1 or the finished automobile manufacturer when a problem occurs, so that the bug is not accurately distributed, the repair progress is influenced, and the development progress of subsequent software of the finished automobile manufacturer is further influenced;
(3) According to the test scheme provided by the prior art, the test process depends on the development progress of the vehicle machine system, and the test work can be carried out only after the development function is basically completed.
As an improvement of the above scheme, the matching, according to the log generated by the QNX system, the signal value carried by each uplink CAN message to obtain M matching results specifically includes:
acquiring final _ property ID from key information of a test case to be tested;
acquiring a signal value carried by each uplink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID;
matching the signal value carried by each uplink CAN message when being sent with the signal value carried when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the automobile central control MCU sends the ith uplink CAN message to the QNX system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
Specifically, with reference to the above embodiment, when the test apparatus respectively matches the signal value carried by each uplink CAN message according to the log generated by the QNX system, the test apparatus may first obtain final _ property ID from the key information corresponding to the test case to be tested; and then, matching and acquiring a signal value carried by each uplink CAN message received by the QNX system from a log generated by the QNX system according to the obtained final _ property ID, and matching the signal value carried by each uplink CAN message when being transmitted with the signal value carried by the same uplink CAN message when being received to correspondingly acquire M matching results.
The matching processing method for each uplink CAN message is the same, and here, taking the ith (i =1,2, \8230;, M) uplink CAN message in the M uplink CAN messages as an example, the signal value carried by the ith uplink CAN message when the ith uplink CAN message is sent to the QNX system by the control MCU in the automobile is matched with the signal value carried by the ith uplink CAN message when the ith uplink CAN message is received by the QNX system, if the signal value when the ith uplink CAN message is sent is consistent with the signal value when the ith uplink CAN message is received, the matching result obtained correspondingly for the ith uplink CAN message is successful, otherwise, the matching result obtained correspondingly for the ith uplink CAN message is failed.
It CAN be understood that, for each uplink CAN message, one matching result CAN be correspondingly obtained through log check of the QNX system, then M uplink CAN messages CAN correspondingly obtain M matching results, and a matching result of an ith uplink CAN message in the M uplink CAN messages is an ith matching result in the M matching results.
As an improvement of the above scheme, the matching, according to the log generated by the Android system, the signal value carried by each uplink CAN packet to obtain M matching results, specifically including:
acquiring final _ property ID from key information of a test case to be tested;
acquiring a signal value carried by each uplink CAN message received by the Android system from a log generated by the Android system according to the final _ property ID;
matching the signal value carried by each uplink CAN message when being sent with the signal value carried by each uplink CAN message when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the QNX system sends the ith uplink CAN message to the Android system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
Specifically, with the above embodiment, when the test apparatus respectively matches the signal value carried by each uplink CAN message according to the log generated by the Android system, the test apparatus may first obtain final _ property ID from the key information corresponding to the test case to be tested; and then, matching and obtaining a signal value carried by each uplink CAN message received by the Android system from a log generated by the Android system according to the obtained final _ property ID, matching the signal value carried by each uplink CAN message when being sent with the signal value carried by the same uplink CAN message when being received, and correspondingly obtaining M matching results.
The matching processing method for each uplink CAN message is the same, and here, taking the ith (i =1,2, \8230;, M) uplink CAN message in the M uplink CAN messages as an example, the signal value carried by the ith uplink CAN message when the ith uplink CAN message is sent to the Android system by the QNX system is matched with the signal value carried by the ith uplink CAN message when the ith uplink CAN message is received by the Android system, if the signal value when the ith uplink CAN message is sent is consistent with the signal value when the ith uplink CAN message is received, the matching result obtained correspondingly for the ith uplink CAN message is successful, otherwise, the matching result obtained correspondingly for the ith uplink CAN message is failed.
It CAN be understood that, for each uplink CAN message, one matching result CAN be correspondingly obtained through log check of the Android system, then M uplink CAN messages CAN correspondingly obtain M matching results, and the matching result of the ith uplink CAN message in the M uplink CAN messages is the ith matching result in the M matching results.
As an improvement of the above scheme, the obtaining of the test result of the test case to be tested according to the obtained 2 × m matching results specifically includes:
when the obtained 2 × M matching results are successfully matched, obtaining the test result of the test case to be tested as test pass;
when matching failure exists in the obtained 2 x M matching results, obtaining the test result of the test case to be tested as test failure, and marking the matching result of the matching failure; wherein the mark comprises a matching position and a matching type;
and writing the obtained test result of the test case to be tested into a result table.
Specifically, with reference to the foregoing embodiment, when obtaining the test result of the test case to be tested according to the obtained 2 × m matching results, the testing apparatus may determine whether there is a matching result with a matching failure in the obtained 2 × m matching results, and when determining that all of the obtained 2 × m matching results are successful in matching, it indicates that each check in the log check of the QNX system and the log check of the Android system passes, and accordingly obtains the test result of the test case to be tested as a PASS test (which may be indicated by "PASS"); when the matching result with the matching failure exists in the obtained 2 × m matching results, it is indicated that a test item which the check does not pass exists, the test result corresponding to the test case to be tested is correspondingly obtained as the test failure (which can be indicated by 'FAIL'), and the matching result with the matching failure is marked; and finally, writing the obtained test result corresponding to the test case to be tested into a result table.
The matching result of the matching failure is marked, and the matching result mainly comprises a matching position mark and a matching type mark, wherein the matching position mark is used for indicating that the matching is failed in the next test cycle, and the matching type mark is used for indicating which type of log check (the log check of a QNX system or the log check of an Android system) causes the matching failure; through the marking, the problem can be conveniently and quickly and accurately positioned.
It should be noted that, for the case of the FAIL, the corresponding log may be saved, and the log name may be changed to be the test case ID, so that the test case with a problem may be determined conveniently; for the case of PASS, the corresponding log may be directly deleted, thereby enabling saving of memory space.
In yet another preferred embodiment, the method further comprises:
when a downlink channel test is required, calling a Car Service interface in the Android system to compile a test APK, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the test device according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the test device receives the jth downlink CAN message; if the two are consistent, obtaining the jth matching result as successful matching, otherwise, obtaining the jth matching result as failed matching; j =1,2, \8230, N;
searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and obtaining the test result of the test case to be tested according to the obtained N matching results.
Specifically, with reference to the above embodiment, when it is determined that a downlink access test is required (i.e., a downlink access one is Car Service [ APK ] → CAN), the testing apparatus may call a native Car Service interface in the Android system to write a test APK (Android Package, i.e., an installation Package file of the Android system), and call an interface in the test APK to set final _ property ID and Send Signal Value, so as to call an interface in the test APK to simulate and Send N downlink CAN messages to the testing apparatus according to the set final _ property ID and Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to N downlink CAN messages one by one, and N is more than or equal to 1; the testing device acquires downlink CAN messages received by corresponding IDs according to the Message IDs of the test cases, respectively matches the signal value of each downlink CAN Message when being set with the signal value carried by the same downlink CAN Message when being received after each downlink CAN Message is received, and correspondingly acquires N matching results; the testing device also searches and determines the test case to be tested according to the set final _ property ID and the key information corresponding to each test case, and finally obtains the test result of the test case to be tested according to the obtained N matching results.
The method for matching each downlink CAN message is the same, wherein the method takes the jth (j =1,2, \8230;, N) downlink CAN message in N downlink CAN messages as an example, and the signal value of the jth downlink CAN message during setting is matched with the signal value carried by the jth downlink CAN message when the jth downlink CAN message is received by the test device; if the set signal value is consistent with the received signal value, the matching result of the jth downlink CAN message is obtained correspondingly, and the matching is successful, otherwise, the matching result of the jth downlink CAN message is obtained correspondingly, and the matching is failed.
It CAN be understood that, for each downlink CAN message, a matching result CAN be correspondingly obtained through check, so that N downlink CAN messages CAN correspondingly obtain N matching results, and a matching result of a jth downlink CAN message in the N downlink CAN messages is a jth matching result in the N matching results.
It should be noted that there may be more than one Signal Value corresponding to the Send Signal Value, and when there are multiple Signal values, an interface in the test APK needs to be called to perform a cyclic transmission test for each Signal Value in the Send Signal Value, and a corresponding Signal Value matching process is performed on one Signal Value in each cycle, where the number of Signal values in the Send Signal Value is the same as the number of downlink CAN messages that need to be sent in a simulated manner, and one Signal Value corresponds to one downlink CAN message, that is, a Signal Value is correspondingly tested every time the testing apparatus receives one downlink CAN message.
According to the automatic test method for the central control of the automobile, provided by the embodiment of the invention, when a product delivered by the Tire1 is tested, the test device calls the native interface in the Car Service at the Android end, and the development progress of software of an automobile manufacturer is not depended on, so that the purpose of software and hardware separation test of the test device is realized.
In yet another preferred embodiment, the method further comprises:
when a downlink access test is required, calling a Car Service interface in the Android system to write a test APK, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the QNX system according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
calling a native interface in the QNX system to compile a monitoring APK, and calling an interface in the monitoring APK to monitor whether a downlink CAN message sent by the test APK is successfully received by the QNX system, so that the QNX system generates a corresponding log when each downlink CAN message is successfully received;
acquiring a signal value carried by each downlink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID;
matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the QNX system receives the jth downlink CAN message; if the two are consistent, the jth matching result is obtained as successful matching, otherwise, the jth matching result is obtained as failed matching; j =1,2, \8230, N;
searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and obtaining the test result of the test case to be tested according to the N obtained matching results.
Specifically, in combination with the above embodiment, when it is determined that a downlink channel test is required (i.e., a downlink channel two: car Service [ APK ] → QNX [ APK ]), the test apparatus may call a native Car Service interface in the Android system to write a test APK (the same as the "test APK" in the above embodiment), and call an interface in the test APK to set final _ property ID and Send Signal Value, so as to call an interface in the test APK to simulate and Send N downlink CAN messages to the QNX system according to the set final _ property ID and Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to N downlink CAN messages one by one, and N is more than or equal to 1; the testing device also calls a native interface in the QNX system to compile a monitoring APK, calls an interface in the monitoring APK to monitor whether downlink CAN messages sent by the testing APK are successfully received by the QNX system, and when the QNX system successfully receives each downlink CAN message, the QNX system prints values corresponding to the received downlink CAN messages in a log, namely, a corresponding log is generated; the testing device analyzes and obtains a signal value carried by each downlink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID, and respectively matches the signal value of each downlink CAN message when being set with the signal value carried by the same downlink CAN message when being received, so as to correspondingly obtain N matching results; the testing device also searches and determines the test case to be tested according to the set final _ property ID and the key information corresponding to each test case, and finally obtains the test result of the test case to be tested according to the N obtained matching results.
The method for matching each downlink CAN message is the same, wherein, taking the jth (j =1,2, \8230;, N) downlink CAN message in N downlink CAN messages as an example, the signal value of the jth downlink CAN message during setting is matched with the signal value carried by the jth downlink CAN message when the jth downlink CAN message is received by the QNX system; if the set signal value is consistent with the received signal value, the matching result of the jth downlink CAN message is obtained correspondingly, and the matching is successful, otherwise, the matching result of the jth downlink CAN message is obtained correspondingly, and the matching is failed.
It CAN be understood that, for each downlink CAN message, one matching result CAN be correspondingly obtained through log check of the QNX system, so that N downlink CAN messages CAN correspondingly obtain N matching results, and a matching result of a jth downlink CAN message in the N downlink CAN messages is a jth matching result in the N matching results.
It should be noted that the monitoring APK that is completed by calling the native interface in the QNX system has a function of monitoring callback, and can monitor the state change of the corresponding final _ property ID in real time, and once the change is monitored, print out the received value.
It should be noted that there may be more than one Signal Value corresponding to the Send Signal Value, and when there are multiple Signal values, an interface in the test APK needs to be called to perform a cyclic transmission test for each Signal Value in the Send Signal Value, and a corresponding Signal Value matching process is performed on one Signal Value in each cycle, where the number of Signal values in the Send Signal Value is the same as the number of downlink CAN messages that need to be sent in a simulated manner, and one Signal Value corresponds to one downlink CAN message, that is, each time a downlink CAN message is received by the QNX system, the test device correspondingly tests one Signal Value.
As an improvement of the above scheme, the obtaining of the test result of the test case to be tested according to the obtained N matching results specifically includes:
when the obtained N matching results are all matched successfully, obtaining the test result of the test case to be tested as a test pass;
when matching failure exists in the N obtained matching results, obtaining the test result of the test case to be tested as the test failure, and marking the matching result of the matching failure; wherein the marker comprises a matching location;
and writing the obtained test result of the test case to be tested into a result table.
Specifically, with reference to the above embodiment, when obtaining the test result of the test case to be tested according to the obtained N matching results, the test apparatus may determine whether there is a matching result with a matching failure in the obtained N matching results, and when it is determined that all of the obtained N matching results are successful in matching, it indicates that each check passes, and the test result of the test case to be tested correspondingly obtained is a PASS test (which may be indicated by PASS); when the matching result with the matching failure exists in the N obtained matching results, the fact that a test item which does not pass check exists is indicated, the corresponding test result of the test case to be tested is correspondingly obtained as the test failure (which can be indicated by FAIL), and the matching result with the matching failure is marked; and finally writing the test result corresponding to the obtained test case to be tested into a result table.
The matching result of the matching failure is marked, wherein the matching result of the matching failure mainly comprises a matching position mark, the matching position mark is used for indicating that the matching fails in the first test cycle, and the matching type mark is not needed, because only one type of check exists in the tests of the first downlink and the second downlink; through the marking, the problem can be conveniently and quickly and accurately positioned.
It should be noted that, for the case of the FAIL, the corresponding log may be saved, and the log name may be changed to the test case ID, so that the test case with a problem may be determined conveniently; for the case of PASS, the corresponding log may be directly deleted, thereby enabling saving of memory space.
Illustratively, the key information acquired by the test apparatus in the VHAL test case table includes:
case correlation: case ID, test (Y/N), project;
CAN-related: message ID (0X 34E), MCU UP, received Signal Value;
log and descending correlations: the complete final _ property ID, the Send Signal Value, the MCU UP and the IVI DOWN are jointly obtained by combining the Area ID, the Data Type and the property ID;
storing the key information in a dictionary;
with reference to all the embodiments described above, the specific implementation steps of the test apparatus are as follows:
the first step is as follows: checking Project value, judging whether the test item is in the test case (the Project of each row in the VHAL test case table contains different items, the test device will check whether the Project column in the table has the Project name to be tested or not), if not, directly skipping, if yes, continuing to execute the next step;
the second step is that: check Test (Y/N), if N, directly skipping the Test case, if Y, continuing to execute the next step;
the third step: judging whether an uplink channel and a downlink channel need to be tested according to whether MCU UP and IVI DOWN (when IVI DOWN represents downlink channel test, a Signal name in a communication matrix corresponding to Send Signal Value to be sent by a test APK of an Android system) are empty or not, and dividing into the following conditions:
(1) Both MCU UP and IVI DOWN are not empty, both an uplink path and a downlink path need to be tested, and test _ falg = all;
(2) MCU UP is not empty, IVI DOWN is empty, only the uplink channel is tested, test _ falg = UP;
(3) The MCU UP is null, the IVI DOWN is not null, only a first downlink channel is tested, and test _ falg = DOWN1;
(4) Both the MCU UP and the IVI DOWN are empty, only the second downlink channel is tested, and test _ falg = DOWN2;
the fourth step: and executing a corresponding testing step according to the judgment result of the third step, wherein the specific testing step for the uplink access test is as follows:
1.1, according to the obtained dictionary, sending a corresponding Message ID (0X 34E), MCU UP and a processed Received Signal Value request by using python-can;
1.2, according to the final _ property ID, matching a log generated by the QNX system, judging whether a received signal value is consistent with a request signal value, and matching the log generated by the Android system, and judging whether a check QNX system sends a correct signal value to the Android system;
1.3, recording the test result of each strip;
for a downlink channel one test (Android → CAN), the specific test steps are as follows:
2.1, writing a test APK by using an interface in the native Car Service of the Android system, calling an interface set (final _ property ID, send Signal Value) in the test APK, and simulating downlink data transmission;
2.2, firstly checking a log generated by a QNX system in the dual system, namely judging whether a request of the Android system is issued to the QNX system;
2.3, the python-can receives the Message of the corresponding Message ID, processes and checks whether the signal value of the Message ID received by the check is consistent with the signal value sent in the step 2.1;
2.4, recording the test result of each strip;
for the downlink channel two test (Android → QNX), the specific test steps are as follows:
3.1, calling an interface set (final _ property ID, send Signal Value) in the test APK as in the step 2.1, and simulating downlink data transmission;
3.2, calling a related interface in the QNX system to write a monitoring APK to monitor the related interface, judging whether the check receives the data sent in the step 3.1, and judging whether the signal value received by the check is consistent with the signal value sent by the check;
3.3, recording the test result of each strip;
the fifth step: after each test is finished, the test device will count the test results and write the test results into the corresponding table.
It should be noted that, after completing the testing of all the function points in the VHAL test case table, the testing apparatus may generate a function state table according to the test results in the uplink and downlink channels, where the test result (PASS | FAIL | SKIP) of each function state is indicated in the table, and the vehicle enterprise may determine whether the tested version is qualified according to the function state table.
An embodiment of the present invention further provides an automatic testing apparatus for a central control of an automobile, which is used to implement the automatic testing method for the central control of the automobile described in any of the above embodiments, and is shown in fig. 2, which is a block diagram of a preferred embodiment of the automatic testing apparatus for the central control of the automobile provided by the present invention, where the testing apparatus includes:
the test case information acquisition module 11 is configured to acquire key information of each test case from a preset test case table;
the uplink data acquisition module 12 is configured to acquire uplink CAN message information from key information of a test case to be tested when an uplink access test needs to be performed; the uplink CAN Message information comprises a Message ID, a Signal _ name and a Received Signal Value, wherein the Received Signal Value comprises M Signal values, and M is more than or equal to 1;
the uplink message sending module 13 is configured to sequentially send M uplink CAN messages corresponding to the M signal values one by one to an automobile central control unit (MCU) according to the uplink CAN message information, so that each uplink CAN message is sent to a QNX system and an Android system through the automobile central control unit (MCU), and the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received;
the first uplink data matching module 14 is configured to match a signal value carried by each uplink CAN message according to the log generated by the QNX system, so as to obtain M matching results;
the second uplink data matching module 15 is configured to match a signal value carried by each uplink CAN message according to the log generated by the Android system, and obtain M matching results;
and the uplink test result obtaining module 16 is configured to obtain a test result of the test case to be tested according to the obtained 2 × m matching results.
Preferably, the first uplink data matching module 14 specifically includes:
the first attribute ID acquisition unit is used for acquiring final _ property ID from the key information of the test case to be tested;
a first received signal value obtaining unit, configured to obtain, according to the final _ property ID, a signal value carried in each uplink CAN packet received by the QNX system from a log generated by the QNX system;
the first uplink data matching unit is used for matching a signal value carried by each uplink CAN message when being sent with a signal value carried by each uplink CAN message when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the automobile central control MCU sends the ith uplink CAN message to the QNX system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
Preferably, the second uplink data matching module 15 specifically includes:
the second attribute ID acquisition unit is used for acquiring final _ property ID from the key information of the test case to be tested;
a second received signal value obtaining unit, configured to obtain, according to the final _ property ID, a signal value carried by each uplink CAN message received by the Android system from a log generated by the Android system;
the second uplink data matching unit is used for matching the signal value carried by each uplink CAN message when being sent with the signal value carried when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the QNX system sends the ith uplink CAN message to the Android system with a signal value carried by the ith uplink CAN message when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
Preferably, the uplink test result obtaining module 16 specifically includes:
the first uplink test result obtaining unit is used for obtaining the test result of the test case to be tested as the test pass when the obtained 2 x M matching results are all matched successfully;
a second uplink test result obtaining unit, configured to obtain a test result of the test case to be tested as a test failure when there is a matching failure in the obtained 2 × m matching results, and mark the matching result of the matching failure; wherein the mark comprises a matching position and a matching type;
and the uplink test result writing unit is used for writing the obtained test result of the test case to be tested into the result table.
Preferably, the test apparatus further comprises:
the first downlink message sending module is used for calling a Car Service interface in the Android system to compile a test APK when a downlink channel test is required, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the test device according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
the first downlink data matching module is used for matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the test device receives the jth downlink CAN message; if the two are consistent, obtaining the jth matching result as successful matching, otherwise, obtaining the jth matching result as failed matching; j =1,2, \ 8230;, N;
the first test case determining module is used for searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and the first downlink test result acquisition module is used for acquiring the test result of the test case to be tested according to the obtained N matching results.
Preferably, the test apparatus further comprises:
the second downlink message sending module is used for calling a Car Service interface in the Android system to write a test APK and calling an interface in the test APK to set final _ property ID and Send Signal Value when a downlink channel test is required, so as to Send N downlink CAN messages to the QNX system in a simulated manner according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
a downlink message monitoring module, configured to call a native interface in the QNX system to compile a monitoring APK, and call an interface in the monitoring APK to monitor whether a downlink CAN message sent by the testing APK is successfully received by the QNX system, so that the QNX system generates a corresponding log when each downlink CAN message is successfully received;
a received signal value obtaining module, configured to obtain, according to the final _ property ID, a signal value carried in each downlink CAN packet received by the QNX system from a log generated by the QNX system;
the second downlink data matching module is used for matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the QNX system receives the jth downlink CAN message; if the two are consistent, obtaining the jth matching result as successful matching, otherwise, obtaining the jth matching result as failed matching; j =1,2, \8230, N;
the second test case determining module is used for searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and the second downlink test result acquisition module is used for acquiring the test result of the test case to be tested according to the obtained N matching results.
Preferably, the first downlink test result obtaining module or the second downlink test result obtaining module specifically includes:
the first downlink test result acquisition unit is used for acquiring the test result of the test case to be tested as the test pass when the obtained N matching results are all matched successfully;
the second downlink test result acquisition unit is used for acquiring the test result of the test case to be tested as the test failure when the matching failure exists in the N acquired matching results, and marking the matching result of the matching failure; wherein the marker comprises a matching location;
and the downlink test result writing unit is used for writing the obtained test result of the test case to be tested into the result table.
It should be noted that the automatic testing device for vehicle central control according to the embodiment of the present invention can implement all the processes of the automatic testing method for vehicle central control according to any one of the embodiments, and the functions and implemented technical effects of each module and unit in the device are respectively the same as those of the automatic testing method for vehicle central control according to the embodiment, and are not described herein again.
An embodiment of the present invention further provides a terminal device, as shown in fig. 3, which is a block diagram of a preferred embodiment of the terminal device provided in the present invention, the terminal device includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, and when the computer program is executed, the processor 10 implements the automated testing method for central control of an automobile according to any one of the embodiments.
Preferably, the computer program may be divided into one or more modules/units (e.g., computer program 1, computer program 2, 8230; etc.) which are stored in the memory 20 and executed by the processor 10 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the terminal device.
The Processor 10 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, etc., the general purpose Processor may be a microprocessor, or the Processor 10 may be any conventional Processor, the Processor 10 is a control center of the terminal device, and various interfaces and lines are used to connect various parts of the terminal device.
The memory 20 mainly includes a program storage area that may store an operating system, an application program required for at least one function, and the like, and a data storage area that may store related data and the like. In addition, the memory 20 may be a high speed random access memory, may also be a non-volatile memory, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), and the like, or the memory 20 may also be other volatile solid state memory devices.
It should be noted that the terminal device may include, but is not limited to, a processor and a memory, and those skilled in the art will understand that the structural block diagram in fig. 3 is only an example of the terminal device, and does not constitute a limitation of the terminal device, and may include more or less components than those shown in the figure, or may combine some components, or may include different components.
An embodiment of the present invention further provides an automatic test system for a central control unit of an automobile, which is shown in fig. 4 and is a structural block diagram of an preferred embodiment of the automatic test system for the central control unit of an automobile provided by the present invention, and the automatic test system includes a test device, an MCU for the central control unit of an automobile, a QNX system, and an Android system, where the test device is configured to implement the automatic test method for the central control unit of an automobile according to any one of the embodiments.
The testing device CAN communicate with the automobile central control MCU through the CAN, the QNX system CAN communicate with the Android system in a cross-system manner, and the testing device is matched with the automobile central control MCU, the QNX system and the Android system, so that the automatic testing method for the automobile central control CAN be realized according to any embodiment.
It should be noted that, an embodiment of the present invention further provides an automatic test system for a central control of an automobile, which is capable of implementing all processes of the automatic test method for a central control of an automobile described in any one of the embodiments, and effects and achieved technical effects of a test device, an MCU for a central control of an automobile, a QNX system for a central control of an automobile, and an Android system in the system are respectively the same as those of the test device, the MCU for a central control of an automobile, the QNX system for a central control of an automobile, and the Android system, and are not described herein again.
To sum up, the automatic testing method, device, terminal device and system for automobile central control provided by the embodiment of the invention have the following beneficial effects:
(1) In the whole project delivery process, the number of the Tire1 release versions is large (dozens), corresponding test work is carried out on each version, hundreds of signals in a communication matrix need to be tested and verified, and the test scheme provided by the prior art is adopted, so that the test data volume is large, the workload is large, the repeated work is more, the steps are complex, excessive manpower, material resources and time cost of a whole vehicle factory are consumed, meanwhile, the problems of low test speed, high error rate and the like exist in manual test;
(2) The test scheme provided by the prior art is generally the verification of the whole system level, and is difficult to position the bug appearing in the Tire1 or the finished automobile manufacturer when a problem occurs, so that the bug is not accurately distributed, the repair progress is influenced, and the development progress of subsequent software of the finished automobile manufacturer is further influenced;
(3) According to the test scheme provided by the prior art, the test process depends on the development progress of the car machine system, and the test work can be carried out only after the development function is basically completed, but by adopting the embodiment of the invention, the test work of the Tire1 product can be carried out at the initial development stage of the car manufacturer software, so that the time can be saved for the integrity test at the later stage;
(4) By adopting the embodiment of the invention, when the product delivered by the Tire1 is tested, the testing device calls the native interface in the Carservice at the Android end, and does not depend on the development progress of the software of an automobile manufacturer, so that the purpose of software and hardware separation testing of the testing device is realized.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (10)

1. An automated testing method for a central control of an automobile, the method being performed by a testing device, the method comprising:
acquiring key information of each test case from a preset test case table;
when an uplink access test is required, acquiring uplink CAN message information from key information of a test case to be tested; the uplink CAN Message information comprises a Message ID, a Signal _ name and a Received Signal Value, wherein the Received Signal Value comprises M Signal values, and M is more than or equal to 1;
sequentially sending M uplink CAN messages corresponding to the M signal values one by one to an automobile central control MCU according to the uplink CAN message information, and sending each uplink CAN message to a QNX system and an Android system through the automobile central control MCU, so that the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received;
matching the signal value carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results;
matching signal values carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results;
and obtaining the test result of the test case to be tested according to the obtained 2 x M matching results.
2. The automated testing method for vehicle central control according to claim 1, wherein the matching of the signal value carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results specifically comprises:
acquiring final _ property ID from key information of a test case to be tested;
acquiring a signal value carried by each uplink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID;
matching the signal value carried by each uplink CAN message when being sent with the signal value carried when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the automobile central control MCU sends the ith uplink CAN message to the QNX system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
3. The automatic test method for automobile central control according to claim 1, wherein the matching is performed on the signal value carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results, specifically comprising:
acquiring final _ property ID from key information of a test case to be tested;
acquiring a signal value carried by each uplink CAN message received by the Android system from a log generated by the Android system according to the final _ property ID;
matching the signal value carried by each uplink CAN message when being sent with the signal value carried by each uplink CAN message when being received to obtain M matching results; aiming at the ith uplink CAN message, matching a signal value carried by the ith uplink CAN message when the QNX system sends the ith uplink CAN message to the Android system with a signal value carried when the QNX system receives the ith uplink CAN message; if the two are consistent, obtaining the ith matching result as successful matching, otherwise, obtaining the ith matching result as failed matching; i =1,2, \8230;, M.
4. The automated testing method for central control of an automobile according to any one of claims 1 to 3, wherein the obtaining of the test result of the test case to be tested according to the obtained 2 × m matching results specifically comprises:
when the obtained 2 × M matching results are successfully matched, obtaining the test result of the test case to be tested as test pass;
when matching failure exists in the obtained 2 x M matching results, obtaining the test result of the test case to be tested as test failure, and marking the matching result of the matching failure; wherein the mark comprises a matching position and a matching type;
and writing the obtained test result of the test case to be tested into a result table.
5. The automated test method of a central control of an automobile according to claim 1, characterized in that the method further comprises:
when a downlink channel test is required, calling a Car Service interface in the Android system to compile a test APK, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the test device according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the test device receives the jth downlink CAN message; if the two are consistent, the jth matching result is obtained as successful matching, otherwise, the jth matching result is obtained as failed matching; j =1,2, \ 8230;, N;
searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and obtaining the test result of the test case to be tested according to the obtained N matching results.
6. The automated testing method of an automobile central control unit according to claim 1, characterized in that the method further comprises:
when a downlink access test is required, calling a Car Service interface in the Android system to write a test APK, calling an interface in the test APK to set final _ property ID and Send Signal Value, and simulating and sending N downlink CAN messages to the QNX system according to the final _ property ID and the Send Signal Value; the Send Signal Value comprises N Signal values, the N Signal values correspond to the N downlink CAN messages one by one, and N is more than or equal to 1;
calling a native interface in the QNX system to compile a monitoring APK, and calling an interface in the monitoring APK to monitor whether a downlink CAN message sent by the test APK is successfully received by the QNX system, so that the QNX system generates a corresponding log when each downlink CAN message is successfully received;
acquiring a signal value carried by each downlink CAN message received by the QNX system from a log generated by the QNX system according to the final _ property ID;
matching the signal value of each downlink CAN message during setting with the signal value carried during receiving to obtain N matching results; aiming at the jth downlink CAN message, matching a signal value of the jth downlink CAN message during setting with a signal value carried when the QNX system receives the jth downlink CAN message; if the two are consistent, the jth matching result is obtained as successful matching, otherwise, the jth matching result is obtained as failed matching; j =1,2, \8230, N;
searching and determining a test case to be tested according to the final _ property ID and the key information of each test case;
and obtaining the test result of the test case to be tested according to the N obtained matching results.
7. The automatic test method for the central control of the automobile according to claim 5 or 6, wherein the obtaining of the test result of the test case to be tested according to the obtained N matching results specifically comprises:
when the obtained N matching results are all matched successfully, obtaining the test result of the test case to be tested as test pass;
when matching failure exists in the N obtained matching results, obtaining the test result of the test case to be tested as the test failure, and marking the matching result of the matching failure; wherein the marker comprises a matching location;
and writing the obtained test result of the test case to be tested into a result table.
8. An automatic test device of a central control of an automobile, which is used for realizing the automatic test method of the central control of the automobile according to any one of claims 1 to 7, and the test device comprises:
the test case information acquisition module is used for acquiring the key information of each test case from a preset test case table;
the uplink data acquisition module is used for acquiring uplink CAN message information from key information of a test case to be tested when an uplink access test is required; the uplink CAN message information comprises a MessageID, a Signal _ name and a Received Signal Value, wherein the Received Signal Value comprises M Signal values, and M is more than or equal to 1;
the uplink message sending module is used for sequentially sending M uplink CAN messages corresponding to the M signal values one by one to an automobile central control MCU according to the uplink CAN message information so as to send each uplink CAN message to a QNX system and an Android system through the automobile central control MCU, and the QNX system and the Android system generate corresponding logs when each uplink CAN message is successfully received;
the first uplink data matching module is used for matching the signal value carried by each uplink CAN message according to the log generated by the QNX system to obtain M matching results;
the second uplink data matching module is used for matching the signal value carried by each uplink CAN message according to the log generated by the Android system to obtain M matching results;
and the uplink test result acquisition module is used for acquiring the test result of the test case to be tested according to the obtained 2 × m matching results.
9. Terminal device, characterized in that it comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the automated test method of a central control of a vehicle according to any one of claims 1 to 7 when executing the computer program.
10. An automatic test system of an automobile central control system is characterized by comprising a test device, an automobile central control MCU, a QNX system and an Android system, wherein the test device is used for realizing the automatic test method of the automobile central control system according to any one of claims 1 to 7.
CN202211431146.2A 2022-11-15 2022-11-15 Automatic testing method, device, terminal equipment and system for automobile central control Pending CN115687149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211431146.2A CN115687149A (en) 2022-11-15 2022-11-15 Automatic testing method, device, terminal equipment and system for automobile central control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211431146.2A CN115687149A (en) 2022-11-15 2022-11-15 Automatic testing method, device, terminal equipment and system for automobile central control

Publications (1)

Publication Number Publication Date
CN115687149A true CN115687149A (en) 2023-02-03

Family

ID=85052604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211431146.2A Pending CN115687149A (en) 2022-11-15 2022-11-15 Automatic testing method, device, terminal equipment and system for automobile central control

Country Status (1)

Country Link
CN (1) CN115687149A (en)

Similar Documents

Publication Publication Date Title
CN110888414B (en) Test method for upgrading vehicle controller
WO2021203604A1 (en) Update test method and apparatus for vehicle component, and computer device and storage medium
CN110928556A (en) Automatic program burning method and device for railway vehicle, and testing method and system
KR20200007133A (en) Method and apparatus for dinamically injecting fault for vehicle ecu software test
CN108132876A (en) A kind of embedded software object code unit test method based on injection mode
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN110119348B (en) Software upgrading test method and terminal
CN114489766A (en) Method, device, medium and equipment for checking version information of vehicle-mounted controller
CN113133041B (en) Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle
CN115686608A (en) Software version management method and device for vehicle, server and storage medium
CN110198222B (en) Plug-and-play test method and test master station for power distribution automation terminal
CN101267645B (en) Automatic test method and system for service flow software development of W base station
CN112783769A (en) Self-defined automatic software testing method
CN115687149A (en) Automatic testing method, device, terminal equipment and system for automobile central control
CN115982043A (en) Vehicle interface testing method, device, equipment and storage medium
CN115348200A (en) CAN communication function test method and test system
CN114116459A (en) Software compatibility verification method and computer-readable storage medium
JPH10133914A (en) Computer system and device input/output simulator
CN113434405A (en) Method and device for determining test file, storage medium and electronic device
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
CN111813665A (en) Big data platform interface data testing method and system based on python
CN110674573A (en) Method, device and storage medium for simulating hardware work in MES system
CN114448851B (en) Automatic data testing method and system
CN116048871A (en) Automatic verification method and device for SSD equipment, computer equipment and storage medium
CN118041841A (en) Cabin CAN signal automatic test method, system and 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