Instrument function automatic testing device and method
Through automated testing devices and methods, the problems of low manual testing efficiency and lack of consistency are solved, and efficient and accurate testing of vehicle-mounted instrument clusters is achieved, reducing costs and improving safety.
Patent Information
- Application Number
- CN202411024235.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-10-01
AI Technical Summary
Existing testing methods for vehicle-mounted instrument clusters mainly rely on manual operation, which suffers from human errors, time-consuming and labor-intensive testing, insufficient test consistency, difficulty in reproducibility, and high costs, which affects test efficiency and accuracy and leads to safety hazards.
Design an automatic test device and method for instrument functions. Through the interaction between the test terminal and the instrument under test, the function table is obtained and generated, the automatic test script is generated and sent to the instrument under test, the test instruction signal is executed and the feedback results are obtained. Implement automated testing.
Improves the testing efficiency and accuracy of vehicle instrument clusters, reduces the impact of human factors, ensures the accuracy and reliability of test results, reduces time and labor costs, achieves consistency and comparability of the test process, and supports continuous integration and regression testing.
Smart Images

Figure CN118730187A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of vehicle-mounted instrument testing, and in particular to an instrument function automatic testing device and method. Background Art
[0002] As an important part of the automotive electronic system, the vehicle combination instrument can not only provide users with visual feedback of key vehicle information such as vehicle speed, engine speed, fuel level, temperature, lighting conditions, etc., but also integrate auxiliary functions such as head-up display and navigation to enhance the user's driving experience. In order to ensure that the vehicle combination instrument can work accurately, stably and reliably, testing the vehicle combination instrument is the top priority of automotive electronic testing.
[0003] In the existing testing methods, testers mostly use manual methods to test the vehicle combination instrument, that is, by summarizing various test items, writing test cases according to the adaptability of the test items, and then executing the test and recording the test results.
[0004] At present, manual testing has problems such as being prone to human errors (manual testing is easily affected by the tester's subjective factors and lack of attention, resulting in inaccurate test results), time-consuming and labor-intensive (manual testing requires a lot of manpower and time investment, and is inefficient), insufficient test consistency (different testers may perform tests in different ways, resulting in insufficient consistency in test results), difficulty in reproducing problems (due to the uncertainty in the manual testing process, some problems may be difficult to accurately reproduce and locate), and high testing costs (due to the large amount of manpower and time investment, the cost of manual testing is high, and will increase with the increase in the scale of testing). These problems affect the test efficiency and accuracy of vehicle combination instruments, and thus lead to safety hazards in vehicles leaving the factory. Summary of the invention
[0005] The embodiment of the present invention provides an instrument function automatic testing device and method to improve the testing efficiency and accuracy of a vehicle combination instrument.
[0006] In a first aspect, an embodiment of the present invention provides an automatic instrument function test device, including a test terminal interconnected with an instrument to be tested;
[0007] During the test of a single instrument function of the instrument under test:
[0008] The test end is at least used to obtain and generate a first function table and a second function table according to the instrument single test requirement information and the signal matrix table; and, generate an instrument service code and an automatic test script according to the first function table and the second function table, and send the instrument service code to the instrument to be tested; and, run the automatic test script to generate at least one test indication signal, and send the test indication signal to the instrument to be tested; and, after the test indication signal is sent for a first preset time, generate a first feedback result signal, and send the first feedback result signal to the instrument to be tested; and, generate a test result according to the first test feedback signal and the automatic test script;
[0009] The instrument under test is at least used to execute functional logic according to the instrument business code to generate the first test feedback signal after receiving the test indication signal; and upload the first test feedback signal to the test end after receiving the first feedback result signal.
[0010] Optionally, the signal matrix table includes at least a CAN matrix table and a SomeIP Ethernet matrix table; the test end establishes a connection with the instrument to be tested at least through a CAN module, an Ethernet module and an http module respectively;
[0011] The first function table is at least used to characterize the signal association relationship in the instrument single test project; the first function table at least includes one of the instrument single test project type, the instrument internal signal identifier corresponding to each project type, the signal definition in the signal matrix table corresponding to each project type, the data type of the instrument internal signal corresponding to each project type, the value range of the instrument internal signal corresponding to each project type, and the abnormal state identifier of the instrument internal signal corresponding to each project type;
[0012] The second function table is at least used to characterize the business function logic in the instrument single test project; the second function table at least includes the test function represented by each value of each item type within the value range of the internal signal of the instrument, the function logic identifier corresponding to each value of each item type within the value range of the internal signal of the instrument, the test feedback item corresponding to each value of each item type within the value range of the internal signal of the instrument, and one of the feedback states that should correspond to the test feedback item corresponding to each value of each item type within the value range of the internal signal of the instrument.
[0013] Optionally, after the test of the single instrument function is completed, during the test of multiple instrument functions of the instrument to be tested:
[0014] The test end is at least further used to obtain and generate a third function table according to the multi-measurement requirement information of the instrument and the signal matrix table; and generate a manual test script according to the third function table; and run the manual test script to generate a composite test signal, and send the composite test signal to the instrument to be tested; and generate a second feedback result signal after the composite test signal is sent for a second preset time, and send the second feedback result signal to the instrument to be tested; and parse the test result according to the second test feedback signal and the manual test script;
[0015] The instrument under test is at least further used to execute functional logic according to the instrument business code to generate the second test feedback signal after receiving the composite test signal; and upload the second test feedback signal to the test end after receiving the second feedback result signal.
[0016] Optionally, after the test of the single instrument function is completed, during the test of multiple instrument functions of the instrument to be tested:
[0017] The test end is at least further used to generate a composite test signal and a test expectation in response to a user operation, generate and derive a third function table according to the composite test signal, the test expectation and the signal matrix table, and send the composite test signal to the instrument under test; and, after the composite test signal is sent for a second preset time, generate a second feedback result signal, and send the second feedback result signal to the instrument under test; and, according to the second test feedback signal and the test expectation, parse out the test result;
[0018] The instrument under test is at least further used to execute functional logic according to the instrument business code to generate the second test feedback signal after receiving the composite test signal; and upload the second test feedback signal to the test end after receiving the second feedback result signal.
[0019] Optionally, the third function table is at least used to characterize the business function logic in the instrument multi-measurement project; the third function table at least includes the project type of the instrument multi-measurement, the function description identifier corresponding to each project type, the test case identifier corresponding to each project type, the test feedback item corresponding to each project type, and one of the feedback states that the test feedback item corresponding to each project type should correspond to.
[0020] Optionally, after the tests of the multiple instrument functions are completed, during the pressure test of the instrument to be tested:
[0021] The test end is at least further used to generate a pressure test script according to the value range of the internal signal of the meter corresponding to each item type in the first function table; and run the pressure test script to generate at least one pressure test signal, and send the pressure test signal to the meter to be tested;
[0022] The instrument under test is at least further configured to, after receiving the stress test signal, execute functional logic according to the instrument business code to generate a stress test feedback signal for characterizing the degree of system resource occupancy of the instrument under test.
[0023] In a second aspect, an embodiment of the present invention further provides an automatic instrument function testing method, which includes at least a testing process of a single instrument function;
[0024] The testing process of the single instrument function includes:
[0025] The test end obtains and generates a first function table and a second function table according to the instrument single test requirement information and the signal matrix table;
[0026] The test end generates an instrument service code and an automatic test script according to the first function table and the second function table, and sends the instrument service code to the instrument to be tested;
[0027] The test end runs the automatic test script to generate at least one test indication signal, and sends the test indication signal to the instrument to be tested;
[0028] After receiving the test indication signal, the instrument to be tested executes functional logic according to the instrument service code to generate the first test feedback signal;
[0029] The test end generates a first feedback result signal after the test indication signal is sent for a first preset time, and sends the first feedback result signal to the instrument to be tested;
[0030] After receiving the first feedback result signal, the instrument under test uploads the first test feedback signal to the test end;
[0031] The test end generates a test result according to the first test feedback signal and the automatic test script.
[0032] Optionally, it also includes the testing process of multiple instrument functions;
[0033] After the test of the single instrument function is completed, during the test of the multiple instrument functions:
[0034] The test end obtains and generates a third function table according to the instrument multi-measurement requirement information and the signal matrix table;
[0035] The test end generates a manual test script according to the third function table;
[0036] The test end runs the manual test script to generate a composite test signal, and sends the composite test signal to the instrument to be tested;
[0037] After receiving the composite test signal, the instrument under test executes functional logic according to the instrument service code to generate the second test feedback signal;
[0038] The test end generates a second feedback result signal after the composite test signal is sent for a second preset time, and sends the second feedback result signal to the instrument to be tested;
[0039] After receiving the second feedback result signal, the instrument under test uploads the second test feedback signal to the test end;
[0040] The test end parses the test result according to the second test feedback signal and the manual test script.
[0041] Optionally, it also includes the testing process of multiple instrument functions;
[0042] After the test of the single instrument function is completed, during the test of the multiple instrument functions:
[0043] The test end generates a composite test signal and a test expectation in response to a user operation, generates and derives a third function table according to the composite test signal, the test expectation and the signal matrix table, and sends the composite test signal to the instrument under test;
[0044] After receiving the composite test signal, the instrument under test executes functional logic according to the instrument service code to generate the second test feedback signal;
[0045] The test end generates a second feedback result signal after the composite test signal is sent for a second preset time, and sends the second feedback result signal to the instrument to be tested;
[0046] After receiving the second feedback result signal, the instrument under test uploads the second test feedback signal to the test end;
[0047] The test end parses the test result according to the second test feedback signal and the test expectation.
[0048] Optionally, a stress testing process is also included;
[0049] After the tests of the multiple instrument functions are completed, during the pressure test:
[0050] The test end generates a pressure test script according to the value range of the internal signal of the instrument corresponding to each item type in the first function table;
[0051] The test end runs the pressure test script to generate at least one pressure test signal, and sends the pressure test signal to the instrument to be tested;
[0052] After receiving the stress test signal, the instrument under test executes functional logic according to the instrument business code to generate a stress test feedback signal for characterizing the degree of system resource occupancy of the instrument under test.
[0053] The technical solution provided by the embodiment of the present invention is as follows: first, the test end obtains and generates a first function table and a second function table according to the instrument single test requirement information and the signal matrix table; secondly, the test end generates an instrument business code and an automatic test script according to the first function table and the second function table, and sends the instrument business code to the instrument to be tested; then, the test end runs the automatic test script to generate at least one test indication signal, and sends the test indication signal to the instrument to be tested; subsequently, after receiving the test indication signal, the instrument to be tested executes the functional logic according to the instrument business code to generate a first test feedback signal; thirdly, after a first preset time after the test indication signal is sent, the test end generates a first feedback result signal, and sends the first feedback result signal to the instrument to be tested; in addition, after receiving the first feedback result signal, the instrument to be tested uploads the first test feedback signal to the test end; finally, the test end generates a test result according to the first test feedback signal and the automatic test script.
[0054] In view of this, the embodiment of the present invention can realize the test process of the single instrument function corresponding to the instrument to be tested through the test interaction between the above-mentioned test terminal and the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual testing solution, the embodiment of the present invention can reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process to help developers locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 It is a structural schematic diagram of an instrument function automatic testing device provided by an embodiment of the present invention;
[0057] Figure 2 is a structural schematic diagram of another instrument function automatic testing device provided by an embodiment of the present invention;
[0058] Figure 3 is a flow chart of an automatic instrument function testing method provided by an embodiment of the present invention;
[0059] Figure 4 is a flow chart of another automatic instrument function testing method provided by an embodiment of the present invention;
[0060] Figure 5 is a flow chart of another automatic instrument function testing method provided by an embodiment of the present invention;
[0061] Figure 6 is a flow chart of another automatic instrument function testing method provided by an embodiment of the present invention;
[0062] Figure 7 It is a test logic diagram of a high beam lighting function provided by an embodiment of the present invention;
[0063] Figure 8 It is a logical correspondence diagram between a signal matrix table and a function generation table provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0065] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0066] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0067] It should be understood that although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0068] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0069] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0070] It should be particularly noted that any symbols and / or numbers in the specification that are not marked in the accompanying drawings are not drawing marks.
[0071] The embodiment of the present invention provides an automatic instrument function test device, Figure 1 Schematic diagram of the structure of an instrument function automatic test device provided by an embodiment of the present invention. Figure 1 As shown, the instrument function automatic test device includes a test terminal 101 interconnected with an instrument 102 to be tested.
[0072] During the test of a single instrument function of the instrument to be tested 102:
[0073] The test terminal 101 is at least used to obtain and generate a first function table and a second function table according to the instrument single test requirement information and the signal matrix table; and, generate an instrument business code and an automatic test script according to the first function table and the second function table, and send the instrument business code to the instrument 102 to be tested; and, run the automatic test script to generate at least one test indication signal, and send the test indication signal to the instrument 102 to be tested; and, after the test indication signal is sent for a first preset time, generate a first feedback result signal, and send the first feedback result signal to the instrument 102 to be tested; and, generate a test result according to the first test feedback signal and the automatic test script; the instrument 102 to be tested is at least used to execute functional logic according to the instrument business code to generate a first test feedback signal after receiving the test indication signal; and, after receiving the first feedback result signal, upload the first test feedback signal to the test terminal 101.
[0074] The test end 101 may be a personal computer (PC) of a tester or developer, and the instrument to be tested 102 is a vehicle combination instrument to be tested.
[0075] In addition, the testing process of a single instrument function of the instrument to be tested 102 refers to a testing process performed to verify whether a certain instrument function of the instrument to be tested 102 is normal; illustratively, a single instrument function of the instrument to be tested 102 may refer to whether the instrument to be tested 102 can execute the function of lighting up the high beam, whether the instrument to be tested 102 can execute the function of turning off the high beam, whether the instrument to be tested 102 can execute the function of flashing the low beam, whether the instrument to be tested 102 can execute the function of turning off the low beam, etc.
[0076] The instrument single test requirement information may refer to the name, purpose, effect and other information of the instrument function of the instrument 102 to be tested that the tester or developer needs to verify, that is, which instrument function of the instrument 102 to be tested the tester or developer needs to verify is normal. It can be understood that the instrument business code may refer to the program code that the instrument 102 to be tested needs to run in the process of realizing a certain instrument function or multiple instrument functions that need to be executed separately; the automatic test script may include a series of instructions for the test indication input (i.e., the aforementioned test indication signal, whose signal type may be, for example, a CAN signal, an Ethernet signal, etc.) generated by the test terminal 101 (in order to enable the instrument 102 to be tested to realize a certain instrument function or multiple instrument functions that need to be executed separately), and the expected output and other information.
[0077] In a specific implementation, the test end 101 sends the instrument service code to the instrument under test 102 by compiling the instrument service code into an executable program for the instrument under test 102 based on a cross-compilation tool chain, and sends it to the instrument under test 102 by burning or ADB.
[0078] It is known that the first preset time can be adaptively adjusted according to the expected test duration of the instrument 102 under test (i.e., the expected duration for the instrument 102 under test to implement the relevant instrument function according to the instrument business code), which is not limited in this embodiment; illustratively, the first preset time can be 90ms, 100ms, 110ms, etc. In addition, the first feedback result signal can be, for example, a signal requesting the instrument 102 under test to execute a screenshot and feed the screenshot back to the test end 101, and the signal type of the first feedback signal can be an Ethernet signal.
[0079] After the instrument 102 to be tested has obtained the instrument service code and received the test indication signal, the instrument 102 to be tested can execute the functional logic related to the function of the instrument 102 to be tested according to the instrument service code, and then generate a first test feedback signal corresponding to the function of the instrument 102 to be tested (i.e., the result output by the instrument 102 to be tested after executing the instrument service code); until the instrument 102 to be tested receives the first feedback result signal issued by the test end 101, the instrument 102 to be tested uploads the first test feedback signal to the test end 101, so that the test end 101 generates a test result based on the result output by the instrument 102 to be tested after executing the instrument service code and the comparison of the expected output information contained in the automatic test script. It can be understood that if the instrument 102 to be tested fails to upload the first test feedback signal to the test end 101 within the set time (the set time can be set according to the actual test requirements of the instrument function, for example, 1s, 5s, etc.) after receiving the first feedback result signal, the test end 101 can determine that the test has timed out and directly output the test result of the test failure.
[0080] For example, the specific working process of the instrument function automatic testing device provided in this embodiment can be as follows:
[0081] First, the test terminal 101 obtains and generates a first function table and a second function table according to the instrument single test requirement information and the signal matrix table; secondly, the test terminal 101 generates an instrument business code and an automatic test script according to the first function table and the second function table, and sends the instrument business code to the instrument 102 to be tested; then, the test terminal 101 runs the automatic test script to generate at least one test indication signal, and sends the test indication signal to the instrument 102 to be tested; then, after receiving the test indication signal, the instrument 102 to be tested executes the functional logic according to the instrument business code to generate a first test feedback signal; thirdly, after the test indication signal is sent for a first preset time, the test terminal 101 generates a first feedback result signal, and sends the first feedback result signal to the instrument 102 to be tested; in addition, after receiving the first feedback result signal, the instrument 102 to be tested uploads the first test feedback signal to the test terminal 101; finally, the test terminal 101 generates a test result according to the first test feedback signal and the automatic test script.
[0082] In view of this, this embodiment can implement the test process of the single instrument function corresponding to the instrument to be tested through the test interaction between the above-mentioned test terminal and the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual testing solution, this embodiment can reduce the impact of human factors on the test results, and improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor cost required for testing, and improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of testers, and the comparability and credibility of the test results are guaranteed; at the same time, it can also accurately reproduce the test process to help developers locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools (for example, after the tester or developer submits the code, it can cooperate with Jenkins to compile the instrument business code and deploy it to the instrument to be tested, and then directly execute the instrument function test), realize the automation and continuous integration of the test process, and help improve the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions (that is, when the tester or developer writes a new instrument function or fixes a bug, it needs to re-execute the single instrument function test, which will not affect the old function of the instrument to be tested).
[0083] It should be noted that, in a specific implementation, Figure 2 is a schematic diagram of the structure of another instrument function automatic testing device provided by an embodiment of the present invention, Figure 8 1 is a logical correspondence diagram between a signal matrix table and a function generation table provided by an embodiment of the present invention. Figure 2 and Figure 8As shown, optionally, the signal matrix table includes at least a CAN matrix table and a SomeIP Ethernet matrix table; the test end 101 establishes a connection with the instrument to be tested 102 at least through a CAN module, an Ethernet module and an http module respectively.
[0084] The first function table is at least used to characterize the signal association relationship in the instrument single measurement project; the first function table at least includes the project type of the instrument single measurement, the instrument internal signal identification corresponding to each project type, the signal definition in the signal matrix table corresponding to each project type, the data type of the instrument internal signal corresponding to each project type, the value range of the instrument internal signal corresponding to each project type, and one of the abnormal state identifications of the instrument internal signal corresponding to each project type.
[0085] The second function table is at least used to characterize the business function logic in the instrument single test project; the second function table at least includes the test function represented by each value of each project type within the value range of the instrument internal signal, the function logic identifier corresponding to each value of each project type within the value range of the instrument internal signal, the test feedback item corresponding to each value of each project type within the value range of the instrument internal signal, and one of the feedback states that should correspond to the test feedback item corresponding to each value of each project type within the value range of the instrument internal signal.
[0086] Among them, the CAN matrix table can be composed of elements such as the sending node, the receiving node, the signal name, the signal description, the message name, the message ID, the message type, the signal type, the period, the message length, the most significant bit, the least significant bit, the signal length, the signal arrangement type, the default initial value, the scale factor, the offset, the minimum value, the maximum value, the signal meaning, etc. Adaptively, the SomeIP Ethernet matrix table can include elements such as the service name, the service description, the service interface element name, the service interface element type, and the event group including the event group name and the event group identifier.
[0087] In addition, the CAN module can use a CAN box, and both the Ethernet module and the http module can use a network cable with an RJ-45 connector. Accordingly, according to the different types of test indication signals, there can be multiple ways for the test terminal 101 to send the test indication signal to the instrument under test 102. For example, when the test indication signal is a CAN signal, the test terminal 101 can send the test indication signal to the instrument under test 102 through the CAN box; when the test indication signal is an Ethernet signal, the test terminal 101 can use a network cable with an RJ-45 connector to send the test indication signal to the instrument under test 102; if the test indication signal includes both a CAN signal and an Ethernet signal ( Figure 8The example shows that the Ethernet signal is specifically SomeIP Ethernet signal), then the test end 101 can send the CAN signal and the Ethernet signal to the instrument under test 102 through the CAN box and the network cable with an RJ-45 connector. It can be understood that Figure 2 The example shows some connection relationships or signal transmission relationships among the test terminal 101, the CAN module, the Ethernet module, the http module, and the instrument under test 102, which does not constitute a limitation on the embodiments of the present invention.
[0088] Exemplarily, the first function table may be as shown in Table 1.
[0089] Table 1
[0090] Refer to Table 1. The item type of the aforementioned single measurement of the instrument corresponds to the "Function Item" column in Table 1. The internal signal identification of the instrument corresponding to each of the aforementioned item types corresponds to the "Internal Signal of the Instrument" column in Table 1. The signal definition in the signal matrix table corresponding to each of the aforementioned item types corresponds to the "CAN Signal" column and the "SomeIP Ethernet Signal" column in Table 1. The data type of the internal signal of the instrument corresponding to each of the aforementioned item types corresponds to the "Type" column in Table 1. The value range of the internal signal of the instrument corresponding to each of the aforementioned item types corresponds to the "Value Range" column in Table 1. The abnormal state identification of the internal signal of the instrument corresponding to each of the aforementioned item types corresponds to the "Exception Handling" column in Table 1.
[0091] Exemplarily, the second function table may be as shown in Table 2.
[0092] Table 2
[0093] Refer to Table 2. The test function represented by each value of each item type within the value range of the internal signal of the instrument corresponds to the "Function" column in Table 2. The functional logic identifier corresponding to each value of each item type within the value range of the internal signal of the instrument corresponds to the "Function Logic" column in Table 2. The test feedback item corresponding to each value of each item type within the value range of the internal signal of the instrument corresponds to the "Classical Chinese" column and the "Indicator Light" column in Table 2. The feedback status that should correspond to the test feedback item corresponding to each value of each item type within the value range of the internal signal of the instrument corresponds to the "Classical Chinese Status" column and the "Indicator Light Status" column in Table 2.
[0094] Continuing to refer to Table 1 and Table 2, for example, the test terminal 101 can generate the test input of the automatic test script according to the value range of the signal in the first function table, and generate the instrument service code and the expected output of the automatic test script according to the second function table. Specifically, the program code for turning on the high beam can be as follows:
[0095] Void test_BeamHigh1_Generated(void*signal_shoot){
[0096] If(signal_shoot[beamhigh]==1){
[0097] / / Output classical Chinese pop-up logic
[0098] / / Output the logic of lighting the indicator light
[0099] }
[0100] }
[0101] Continue to see Figure 2 The test end 101 can be connected to the internal data conversion module of the instrument under test 102 through the CAN module and the Ethernet module respectively. At the same time, the test end 101 can be connected to the processing test request module of the instrument under test 102 through the http module; inside the instrument under test 102, the processing test request module is connected to the internal data conversion module of the instrument, and the internal data conversion module of the instrument is connected to the internal business processing module of the instrument.
[0102] Specifically, the test of the low beam flashing function is used as an example for explanation. First, the test end 101 can generate a first function table and a second function table based on the CAN matrix table, the SomeIP Ethernet matrix table, and the instrument single test requirement information input by the user (through the keyboard, mouse, touch screen, etc.). Further, the test end 101 generates the instrument service code and the automatic test script according to the first function table and the second function table, and then compiles the instrument service code into an executable program for the instrument to be tested 102 based on the cross-compilation tool chain, and sends it to the instrument to be tested 102 by burning. Furthermore, the test terminal 101 runs an automatic test script to generate a CAN signal of "BeamLowSt[2]", and adaptively sends the CAN signal as a test indication signal to the internal data conversion module of the instrument under test 102 through the CAN module. The internal data conversion module converts the CAN signal of "BeamLowSt[2]" into data inside the instrument. While realizing data isolation, the converted internal data of the instrument is uploaded to the internal business processing module of the instrument, so that the instrument under test 102 can execute the functional logic "BeamLow[2]" according to the instrument business code and generate a first test feedback signal (i.e., a pop-up window of "low beam flashing" is output, and the TT_BeamLow indicator light flashes with a duty cycle of 50%). Furthermore, 100ms after the CAN signal of "BeamLowSt[2]" is sent down, the test end 101 generates a first feedback result signal (for example, it can be a screenshot request), and uploads the first feedback result signal to the processing test request module of the instrument to be tested 102 through the http module. The processing test request module sends the first feedback result signal to the internal data conversion module of the instrument to perform signal conversion, and uploads the first feedback result signal that performs signal conversion to the internal business processing module of the instrument through the internal data conversion module of the instrument, so that the internal business processing module of the instrument performs a screenshot operation on the instrument user interface (User Interface, UI) showing a pop-up window of "low beam flashing" and the TT_BeamLow indicator light flashing with a duty cycle of 50%, and then feeds back the screenshot to the test end 101 through the internal data conversion module of the instrument, the processing test request module and the http module. Finally, the test end 101 compares the expected output information contained in the instrument UI screenshot and the automatic test script; if the two are consistent, the low beam flashing function test of the instrument 102 to be tested is normal; if the two are inconsistent, the low beam flashing function test of the instrument 102 to be tested fails.
[0103] in addition, Figure 7 This is a test logic diagram of a high beam lighting function provided by an embodiment of the present invention. Figure 7First, the test end 101 can generate a first function table and a second function table based on the CAN matrix table, the SomeIP Ethernet matrix table, and the instrument single test requirement information input by the user. Further, the test end 101 generates the instrument service code and the automatic test script according to the first function table and the second function table, and then compiles the instrument service code into an executable program for the instrument 102 to be tested based on the cross-compilation tool chain, and sends it to the instrument 102 to be tested by burning. Further, the test end 101 runs the automatic test script to generate a CAN signal of "BeamHighSt[1]", and sends the CAN signal as a test indication signal to the instrument internal data conversion module of the instrument 102 to be tested through the CAN module. The instrument internal data conversion module converts the CAN signal of "BeamHighSt[1]" into the data inside the instrument. While realizing data isolation, the converted instrument internal data is uploaded to the instrument internal business processing module, so that the instrument 102 to be tested can execute the functional logic "BeamHigh[1]" according to the instrument service code and generate the first test feedback signal (that is, the TT_BeamHigh indicator light is always on). Furthermore, 100ms after the CAN signal of "BeamHighSt[1]" is sent down, the test end 101 generates a first feedback result signal (for example, a screenshot request), and uploads the first feedback result signal to the processing test request module of the instrument under test 102 through the http module. The processing test request module sends the first feedback result signal to the internal data conversion module of the instrument to perform signal conversion, and uploads the first feedback result signal that performs signal conversion to the internal business processing module of the instrument through the internal data conversion module of the instrument, so that the instrument UI with the TT_BeamHigh indicator light always on performs the screenshot operation, and then the screenshot is fed back to the test end 101 through the internal data conversion module of the instrument, the processing test request module and the http module. Finally, the test end 101 compares the expected output information contained in the instrument UI screenshot and the automatic test script; if the two are consistent, the high beam lighting function test of the instrument under test 102 is normal; if the two are inconsistent, the high beam lighting function test of the instrument under test 102 fails.
[0104] It can be seen that this embodiment can realize the test process of the single instrument function corresponding to the instrument to be tested through the test interaction between the above-mentioned test end and the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual testing solution, this embodiment can reduce the impact of human factors on the test results and improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process to help developers locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0105] Based on the above embodiments or implementation methods, the following describes a test principle of multiple instrument functions of the instrument to be tested. It should be noted in advance that the test process of multiple instrument functions provided in this embodiment is generally performed after all single instrument function tests have passed. Therefore, the instrument to be tested that has passed the single instrument function test already has the instrument service code corresponding to each single instrument function stored on it, and these instrument service codes can be directly called by the instrument to be tested during the test process of multiple instrument functions.
[0106] In view of this, continue to see Figure 2 Optionally, after the test of a single instrument function is completed, during the test of multiple instrument functions of the instrument to be tested 102:
[0107] The test terminal 101 is at least further used to obtain and generate a third function table based on the instrument multi-measurement requirement information and the signal matrix table; and, generate a manual test script based on the third function table; and, run the manual test script to generate a composite test signal, and send the composite test signal to the instrument to be tested 102; and, after the composite test signal is sent for a second preset time, generate a second feedback result signal, and send the second feedback result signal to the instrument to be tested 102; and, according to the second test feedback signal and the manual test script, parse the test result.
[0108] The instrument under test 102 is at least further configured to execute functional logic according to the instrument service code to generate a second test feedback signal after receiving the composite test signal; and upload the second test feedback signal to the test terminal 101 after receiving the second feedback result signal.
[0109] Among them, the testing process of multiple instrument functions of the instrument to be tested 102 refers to the testing process performed to verify whether at least two instrument functions of the instrument to be tested 102 are normal in a certain scenario; illustratively, the multiple instrument functions of the instrument to be tested 102 may refer to the function of the instrument to be tested 102 having a high beam fault, a position light fault and expecting to display a high beam fault message within 3 seconds, the function of the instrument to be tested 102 having a high beam fault, a position light fault and expecting to display a position light fault message within 6 seconds, etc.
[0110] The instrument multi-test requirement information may refer to the name, purpose, effect and other information of the multiple instrument functions of the instrument under test 102 that the tester or developer needs to verify, that is, which instrument functions of the instrument under test 102 the tester or developer needs to verify are normal. It is understandable that the manual test script may include a series of instructions (in order to enable the instrument under test 102 to realize multiple instrument functions) generated by the test terminal 101 (that is, the aforementioned composite test signal, whose signal type may be, for example, a CAN signal, an Ethernet signal, etc.), expected output and other information.
[0111] In a specific implementation, optionally, the third function table is at least used to characterize the business function logic in the instrument multi-measurement project; the third function table at least includes the project type of the instrument multi-measurement, the function description identifier corresponding to each project type, the test case identifier corresponding to each project type, the test feedback item corresponding to each project type, and one of the feedback states that the test feedback item corresponding to each project type should correspond to.
[0112] Exemplarily, the third function table may be as shown in Table 3.
[0113] Table 3
[0114] See Table 3. The item types of the aforementioned multi-measurement instruments correspond to the "Function" column in Table 3. The functional description identifier corresponding to each of the aforementioned item types corresponds to the "Function Description" column in Table 3. The test case identifier corresponding to each of the aforementioned item types corresponds to the "Test Case" column in Table 3. The test feedback items corresponding to each of the aforementioned item types correspond to the "Classical Chinese" column and the "Indicator Light" column in Table 3. The feedback status that the test feedback items corresponding to each of the aforementioned item types should correspond to corresponds to the "Classical Chinese Status" column and the "Indicator Light Status" column in Table 3. It can be understood that the "×" in the aforementioned Tables 1, 2, and 3 indicates that there is no content or does not exist. For example, the arbitration test 1 in Table 3 does not have a corresponding indicator light and indicator light status.
[0115] Similarly, according to different types of composite test signals, there may be multiple ways for the test end 101 to send the composite test signal to the instrument under test 102. For example, when the composite test signal is a CAN signal, the test end 101 may send the composite test signal to the instrument under test 102 through a CAN box; when the composite test signal is an Ethernet signal, the test end 101 may send the composite test signal to the instrument under test 102 using a network cable with an RJ-45 connector; if the composite test signal includes both a CAN signal and an Ethernet signal, the test end 101 may send the CAN signal and the Ethernet signal to the instrument under test 102 through a CAN box and a network cable with an RJ-45 connector, respectively.
[0116] The second preset time can be adaptively adjusted according to the estimated test duration of the instrument 102 to be tested (i.e., the estimated duration for the instrument 102 to be tested to implement multiple instrument functions according to the instrument service code), and this embodiment does not limit this; illustratively, the second preset time can be 190ms, 200ms, 210ms, etc. In addition, the second feedback result signal can be, for example, a signal requesting the instrument 102 to be tested to execute a screenshot and feed the screenshot back to the test end 101, and the signal type of the second feedback signal can be an Ethernet signal.
[0117] After the instrument 102 under test has stored the instrument business code corresponding to each single instrument function and has received the composite test signal, the instrument 102 under test can execute the functional logic related to multiple functions of the instrument 102 under test according to the multiple instrument business codes, and then generate a second test feedback signal corresponding to the multiple functions of the instrument 102 under test (that is, the result output by the instrument 102 under test after executing the multiple instrument business codes); until the instrument 102 under test receives the second feedback result signal sent by the test end 101, the instrument 102 under test uploads the second test feedback signal to the test end 101, so that the test end 101 generates a test result based on the result output by the instrument 102 under test after executing the multiple instrument business codes and the expected output information contained in the manual test script. It can be understood that if the instrument 102 under test fails to upload the second test feedback signal to the test end 101 within a fixed time (the fixed time can be set according to the actual test requirements of the instrument function, for example, it can be 10s, 15s, etc.) after receiving the second feedback result signal, the test end 101 can determine that the test has timed out and failed, and directly output the test result of test failure.
[0118] Take the instrument function test process involved in arbitration test 1 in Table 3 as an example for explanation. First, the test terminal 101 can generate a third function table based on the CAN matrix table, the SomeIP Ethernet matrix table, and the instrument multi-measurement requirement information input by the user (through a keyboard, mouse, touch screen, etc.). Further, the test terminal 101 generates a manual test script according to the third function table. Since the instrument business codes corresponding to the individual instrument functions are already stored on the instrument 102 under test after the single instrument function test, and these instrument business codes can be directly called by the instrument 102 under test during the test of multiple instrument functions, further, the test end 101 runs a manual test script to generate an Ethernet signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep 100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 3s", and adaptively sends the Ethernet signal as a composite test signal to the internal data conversion module of the instrument 102 under test through the Ethernet module. The internal data conversion module of the instrument converts "BeamHighFltSt[0]PosLitFltSt[0]sleep100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 3s" is converted into the data inside the meter. While realizing data isolation, the converted data inside the meter is uploaded to the internal business processing module of the meter, so that the meter under test 102 can execute the functional logic "BeamHighFlt[0]PosLitFlt[0]sleep100ms BeamHighFlt[1]PosLitFlt[1]sleep 3s" according to the meter business code and generate a second test feedback signal (i.e., output the classical Chinese pop-up window of "BeamHighFltPop"). Furthermore, 200ms after the Ethernet signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 3s" is sent down, the test end 101 generates a second feedback result signal (for example, it can be a screenshot request), and uploads the second feedback result signal to the processing test request module of the instrument under test 102 through the http module. The processing test request module sends the second feedback result signal to the instrument internal data conversion module to perform signal conversion, and uploads the second feedback result signal after the signal conversion to the instrument internal business processing module through the instrument internal data conversion module, so that the instrument internal business processing module performs a screenshot operation on the instrument UI displaying the classical Chinese pop-up window of "BeamHighFltPop", and then feeds back the screenshot to the test end 101 through the instrument internal data conversion module, the processing test request module and the http module.Finally, the test end 101 compares the expected output information contained in the instrument UI screenshot and the manual test script; if the two are consistent, the functional test of the instrument under test 102 related to the arbitration test 1 is normal; if the two are inconsistent, the functional test of the instrument under test 102 related to the arbitration test 1 fails.
[0119] It can be seen that, through the test interaction between the above-mentioned test terminal and the instrument to be tested, this embodiment can realize the test process of single instrument function and multiple instrument functions corresponding to the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual test solution, this embodiment can more comprehensively cover the usage and boundary conditions corresponding to the single function and multiple functions of the instrument, which is conducive to ensuring that the instrument operates normally and steadily in most cases, and improves the test coverage; at the same time, it can also reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process, helping developers to locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0120] Based on the above embodiments or implementation methods related to the test process of a single instrument function of the instrument to be tested, another test principle of multiple instrument functions of the instrument to be tested is described below. It should be noted in advance that the test process of multiple instrument functions provided in this embodiment is generally executed after all single instrument function tests have passed. Therefore, the instrument to be tested that has passed the single instrument function test already has the instrument service code corresponding to each single instrument function stored on it, and these instrument service codes can be directly called by the instrument to be tested during the test process of multiple instrument functions.
[0121] Based on this, continue to see Figure 2 Optionally, after the test of a single instrument function is completed, during the test of multiple instrument functions of the instrument to be tested 102:
[0122] The test terminal 101 is at least further used to generate a composite test signal and a test expectation in response to a user operation, generate and export a third function table according to the composite test signal, the test expectation and the signal matrix table, and send the composite test signal to the instrument under test 102; and, after a second preset time has passed since the composite test signal was sent, generate a second feedback result signal, and send the second feedback result signal to the instrument under test 102; and, according to the second test feedback signal and the test expectation, parse the test result.
[0123] The instrument under test 102 is at least further configured to execute functional logic according to the instrument service code to generate a second test feedback signal after receiving the composite test signal; and upload the second test feedback signal to the test terminal 101 after receiving the second feedback result signal.
[0124] Among them, the specific implementation method of the test end 101 generating a composite test signal and a test expectation in response to a user operation may be that the test end 101 responds to the test personnel or developer's operation of writing a test case directly on the instrument under test 102 at the test end 101 to generate a composite test signal and a test expectation according to the test case. For example, a tester or developer can directly write the test case "BeamHighFlt[0]PosLitFlt[0]sleep 100ms BeamHighFlt[1]PosLitFlt[1]sleep 6s" corresponding to the arbitration test 2 in Table 3 on the test terminal 101. Then, based on the test case, the test terminal 101 can identify the composite test signal (the composite test signal can be a CAN signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep 100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 6s") and the test expectation (the test expectation can be a pop-up window of "PosLitFltPop" output by the test instrument 102) that needs to be sent to the test instrument 102. Thus, the test terminal 101 can generate and derive the third function table based on the composite test signal, test expectation and signal matrix table.
[0125] It can be understood that the difference between the test process of multiple instrument functions of the instrument 102 to be tested provided in this embodiment and the test process of multiple instrument functions of the instrument 102 to be tested provided in the previous embodiment mainly lies in the generation process of the composite test signal and the third function table, and the description and explanation of other test steps and technical features such as the third function table are basically the same, so they will not be repeated here.
[0126] For example, the instrument function test process involved in arbitration test 2 in Table 3 is used as an example for explanation. First, the tester or developer directly writes the test case "BeamHighFlt[0]PosLitFlt[0]sleep 100ms BeamHighFlt[1]PosLitFlt[1]sleep 6s" corresponding to arbitration test 2 in Table 3 on the test end 101. Then, based on the test case, the test end 101 can identify that the composite test signal to be sent to the instrument under test 102 can be a CAN signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep100ms BeamHighFltSt[1]PosLitFltSt[1]sleep6s", and the test expectation can be that the instrument under test 102 outputs a pop-up window of "PosLitFltPop". Furthermore, the test end 101 can generate and export a third function table based on the above-mentioned composite test signal, test expectation and signal matrix table, and adaptively send the CAN signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep 100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 6s" as a composite test signal to the internal data conversion module of the instrument under test 102 through the CAN module. The internal data conversion module of the instrument converts the CAN signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep 100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 6s" into the data inside the instrument, and upload the converted internal data of the instrument to the internal business processing module of the instrument while realizing data isolation. Since the instrument business codes corresponding to the individual instrument functions are already stored on the instrument 102 under test that has undergone the single instrument function test, and these instrument business codes can be directly called by the instrument 102 under test during the test of multiple instrument functions, the instrument 102 under test can execute the functional logic "BeamHighFlt[0]PosLitFlt[0]sleep 100ms BeamHighFlt[1]PosLitFlt[1]sleep 6s" according to the instrument business code and generate a second test feedback signal (i.e., output a pop-up window of "PosLitFltPop").Furthermore, 150ms after the CAN signal of "BeamHighFltSt[0]PosLitFltSt[0]sleep 100ms BeamHighFltSt[1]PosLitFltSt[1]sleep 6s" is sent, the test end 101 generates a second feedback result signal (for example, it can be a screenshot request), and uploads the second feedback result signal to the processing test request module of the instrument under test 102 through the http module. The processing test request module sends the second feedback result signal to the instrument internal data conversion module to perform signal conversion, and uploads the second feedback result signal after the signal conversion to the instrument internal business processing module through the instrument internal data conversion module, so that the instrument internal business processing module performs a screenshot operation on the instrument UI displaying the classical Chinese pop-up window of "PosLitFltPop", and then feeds back the screenshot to the test end 101 through the instrument internal data conversion module, the processing test request module and the http module. Finally, the test end 101 compares the instrument UI screenshot and the test expectation; if the two are consistent, the functional test of the instrument under test 102 related to the arbitration test 2 is normal; if the two are inconsistent, the functional test of the instrument under test 102 related to the arbitration test 2 fails.
[0127] It can be seen that, through the test interaction between the above-mentioned test terminal and the instrument to be tested, this embodiment can realize the test process of single instrument function and multiple instrument functions corresponding to the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual test solution, this embodiment can more comprehensively cover the usage and boundary conditions corresponding to the single function and multiple functions of the instrument, which is conducive to ensuring that the instrument operates normally and steadily in most cases, and improves the test coverage; at the same time, it can also reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process, helping developers to locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0128] Based on the above embodiments or implementation methods related to the test process of multiple instrument functions of the instrument to be tested, the following describes a principle of a pressure test for the instrument to be tested. It should be noted in advance that pressure tests are mostly conducted on the system resource occupancy and system load capacity of the instrument to be tested, and are generally conducted after the instrument to be tested has completed single function tests and multiple function tests. This is because if the instrument to be tested fails to pass the function test, even if the pressure test performance of the instrument to be tested is excellent, the instrument to be tested cannot meet the user's most basic driving needs and is not practical.
[0129] Therefore, continue to see Figure 2 Optionally, after the tests of multiple instrument functions are completed, during the pressure test of the instrument to be tested 102:
[0130] The test terminal 101 is at least further used to generate a stress test script according to the value range of the internal signal of the instrument corresponding to each item type in the first function table; and to run the stress test script to generate at least one stress test signal, and send the stress test signal to the instrument 102 to be tested.
[0131] The instrument under test 102 is at least further configured to, after receiving the stress test signal, execute functional logic according to the instrument business code to generate a stress test feedback signal for characterizing the degree of system resource occupancy of the instrument under test 102 .
[0132] Among them, the stress test script can introduce a random number mechanism. For example, the test end 101 can generate the value range of the internal signal of the instrument corresponding to each item type in the first function generation table, and randomly determine the generation order of multiple specific internal signals of the instrument under each item type within the value range based on the random number, and generate the corresponding stress test script accordingly. It can be understood that in a specific implementation, the test end 101 can also generate a stress test script based on at least the first function table, the second function table and / or the third function table, which will not be repeated.
[0133] Adaptively, according to different types of pressure test signals, there may be multiple ways for the test end 101 to send the pressure test signal to the instrument to be tested 102. For example, when the pressure test signal is a CAN signal, the test end 101 may send the pressure test signal to the instrument to be tested 102 through a CAN box; when the pressure test signal is an Ethernet signal, the test end 101 may use a network cable with an RJ-45 connector to send the pressure test signal to the instrument to be tested 102; if the pressure test signal includes both a CAN signal and an Ethernet signal, the test end 101 may send the CAN signal and the Ethernet signal to the instrument to be tested 102 through a CAN box and a network cable with an RJ-45 connector, respectively.
[0134] Since the instrument business codes corresponding to each instrument function are stored on the instrument 102 to be tested after the single instrument function test and the multiple instrument function test, and these instrument business codes can be directly called by the instrument 102 to be tested during the instrument pressure test, after receiving the pressure test signal, the instrument 102 to be tested can directly execute the corresponding functional logic according to the corresponding instrument business code to generate a pressure test feedback signal for characterizing the degree of system resource occupancy of the instrument 102 to be tested. Specifically, the pressure test feedback signal for characterizing the degree of system resource occupancy of the instrument 102 to be tested can be, for example, the CPU occupancy rate of the instrument 102 to be tested, the memory occupancy rate of the instrument 102 to be tested, whether the program of the instrument 102 to be tested crashes, etc.
[0135] In summary, this embodiment can realize the test process of single instrument function, multiple instrument functions and instrument pressure test corresponding to the instrument to be tested through the test interaction between the above-mentioned test end and the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual test solution, this embodiment can more comprehensively cover the usage and boundary conditions corresponding to the single function, multiple functions and load bearing capacity of the instrument, which is conducive to ensuring that the instrument operates normally and steadily in most cases, and improves the test coverage; at the same time, it can also reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process to help developers locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0136] The embodiment of the present invention also provides an automatic instrument function testing method. Figure 3 This is a flow chart of an instrument function automatic test method provided by an embodiment of the present invention. This embodiment can be applied to single instrument function test scenarios of vehicle combination instruments in various types of vehicles, such as fuel vehicles, pure electric vehicles, oil-electric hybrid vehicles, plug-in hybrid vehicles, extended-range electric vehicles, driverless vehicles, etc. The instrument function automatic test method can be, but is not limited to, executed by the instrument function automatic test device in the embodiment of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. Figure 3 As shown, the automatic instrument function test method includes at least a test process of a single instrument function, specifically including the following steps:
[0137] S1. The test end obtains and generates a first function table and a second function table according to the instrument single test requirement information and the signal matrix table.
[0138] S2. The test end generates an instrument service code and an automatic test script according to the first function table and the second function table, and sends the instrument service code to the instrument to be tested.
[0139] S3. The test end runs an automatic test script to generate at least one test indication signal, and sends the test indication signal to the instrument to be tested.
[0140] S4. After receiving the test indication signal, the instrument to be tested executes functional logic according to the instrument business code to generate a first test feedback signal.
[0141] S5. After the test indication signal is sent for a first preset time, the test end generates a first feedback result signal and sends the first feedback result signal to the instrument to be tested;
[0142] S6. After receiving the first feedback result signal, the instrument under test uploads the first test feedback signal to the test end.
[0143] S7. The test end generates a test result according to the first test feedback signal and the automatic test script.
[0144] In view of this, this embodiment can realize the test process of the single instrument function corresponding to the instrument to be tested through the test interaction between the above-mentioned test end and the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual testing solution, this embodiment can reduce the impact of human factors on the test results and improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process to help developers locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0145] Based on the above embodiment, the present invention also provides an automatic instrument function testing method. Figure 4This is a flow chart of another automatic instrument function test method provided by an embodiment of the present invention. This embodiment is applicable to multiple instrument function test scenarios of vehicle combination instruments in various types of vehicles. The automatic instrument function test method can be executed by, but is not limited to, the automatic instrument function test device in the embodiment of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. Figure 4 As shown, the automatic instrument function testing method is at least applied to the testing process of multiple instrument functions after the test of a single instrument function is completed, and specifically includes the following steps:
[0146] S8. The test end obtains and generates a third function table according to the instrument multi-measurement requirement information and the signal matrix table.
[0147] S9. The test end generates a manual test script according to the third function table.
[0148] S10. The test end runs a manual test script to generate a composite test signal, and sends the composite test signal to the instrument to be tested.
[0149] S11 . After receiving the composite test signal, the instrument to be tested executes functional logic according to the instrument service code to generate a second test feedback signal.
[0150] S12: After the composite test signal is sent for a second preset time, the test end generates a second feedback result signal and sends the second feedback result signal to the instrument to be tested.
[0151] S13. After receiving the second feedback result signal, the instrument under test uploads the second test feedback signal to the test end.
[0152] S14. The test end parses the test result according to the second test feedback signal and the manual test script.
[0153] It can be seen that, through the test interaction between the above-mentioned test end and the instrument to be tested, this embodiment can realize the test process of single instrument function and multiple instrument functions corresponding to the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual test solution, this embodiment can more comprehensively cover the usage and boundary conditions corresponding to the single function and multiple functions of the instrument, which is conducive to ensuring that the instrument operates normally and steadily in most cases, and improves the test coverage; at the same time, it can also reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process, helping developers to locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0154] Based on the above-mentioned embodiment of the single instrument function test method, the embodiment of the present invention further provides an instrument function automatic test method. Figure 5 This is a flow chart of another automatic instrument function test method provided by an embodiment of the present invention. This embodiment is applicable to multiple instrument function test scenarios of vehicle-mounted combination instruments in various types of vehicles. The automatic instrument function test method can be, but is not limited to, executed by the automatic instrument function test device in the embodiment of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. Figure 5 As shown, the automatic instrument function testing method is at least applied to the testing process of multiple instrument functions after the test of a single instrument function is completed, and specifically includes the following steps:
[0155] S15. The test end generates a composite test signal and a test expectation in response to the user operation, generates and derives a third function table according to the composite test signal, the test expectation and the signal matrix table, and sends the composite test signal to the instrument under test.
[0156] S16. After receiving the composite test signal, the instrument to be tested executes functional logic according to the instrument service code to generate a second test feedback signal.
[0157] S17: After the composite test signal is sent for a second preset time, the test end generates a second feedback result signal and sends the second feedback result signal to the instrument to be tested.
[0158] S18. After receiving the second feedback result signal, the instrument under test uploads the second test feedback signal to the test end.
[0159] S19. The test end parses the test result according to the second test feedback signal and the test expectation.
[0160] It can be seen that, through the test interaction between the above-mentioned test terminal and the instrument to be tested, this embodiment can realize the test process of single instrument function and multiple instrument functions corresponding to the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual test solution, this embodiment can more comprehensively cover the usage and boundary conditions corresponding to the single function and multiple functions of the instrument, which is conducive to ensuring that the instrument operates normally and steadily in most cases, and improves the test coverage; at the same time, it can also reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process, helping developers to locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0161] Based on the above embodiments of the method for testing multiple instrument functions, the embodiment of the present invention further provides an automatic instrument function testing method. Figure 6 This is a flow chart of another automatic instrument function test method provided by an embodiment of the present invention. This embodiment can be applied to the pressure function test scenario of the vehicle combination instrument in various vehicles. The automatic instrument function test method can be executed by, but not limited to, the automatic instrument function test device in the embodiment of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. Figure 6 As shown, the automatic instrument function testing method is at least applied to the instrument pressure function testing process after the tests of multiple instrument functions are completed, and specifically includes the following steps:
[0162] S20. The test end generates a pressure test script according to the value range of the internal signal of the instrument corresponding to each item type in the first function table.
[0163] S21. The test end runs a pressure test script to generate at least one pressure test signal, and sends the pressure test signal to the instrument to be tested.
[0164] S22. After receiving the stress test signal, the instrument under test executes functional logic according to the instrument business code to generate a stress test feedback signal for characterizing the degree of system resource occupancy of the instrument under test.
[0165] In summary, this embodiment can realize the test process of single instrument function, multiple instrument functions and instrument pressure test corresponding to the instrument to be tested through the test interaction between the above-mentioned test end and the instrument to be tested, thereby improving the test efficiency and accuracy of the vehicle combination instrument. Compared with the existing manual test solution, this embodiment can more comprehensively cover the usage and boundary conditions corresponding to the single function, multiple functions and load bearing capacity of the instrument, which is conducive to ensuring that the instrument operates normally and steadily in most cases, and improves the test coverage; at the same time, it can also reduce the impact of human factors on the test results, improve the accuracy and reliability of the test results; at the same time, it can also reduce the time and labor costs required for testing, improve the test efficiency and resource utilization; at the same time, it can also ensure the consistency of the test process, so that the test process is not affected by the individual differences of the testers, and ensure the comparability and credibility of the test results; at the same time, it can also accurately reproduce the test process to help developers locate and fix problems more quickly; at the same time, it can also be integrated with continuous integration tools to realize the automation and continuous integration of the test process, which is conducive to improving the speed and quality of software delivery; at the same time, it can also quickly perform regression testing to ensure that new changes will not affect the old business logic and functions.
[0166] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An automatic instrument function test device, characterized in that: including a test terminal interconnected with the instrument to be tested; During the test of a single instrument function of the instrument under test: The test end is at least used to obtain and generate a first function table and a second function table according to the instrument single test requirement information and the signal matrix table; And, generating an instrument service code and an automatic test script according to the first function table and the second function table, and sending the instrument service code to the instrument to be tested; and, running the automatic test script to generate at least one test indication signal, and sending the test indication signal to the instrument under test; and, after a first preset time has passed since the test indication signal was sent, generating a first feedback result signal, and sending the first feedback result signal to the instrument under test; And, generating a test result according to the first test feedback signal and the automatic test script; The instrument to be tested is at least used to execute functional logic according to the instrument business code to generate the first test feedback signal after receiving the test indication signal; And, after receiving the first feedback result signal, uploading the first test feedback signal to the test end.
2. The automatic instrument function test device according to claim 1, characterized in that: The signal matrix table at least includes a CAN matrix table and a SomeIP Ethernet matrix table; the test end at least establishes a connection with the instrument to be tested through a CAN module, an Ethernet module and an http module respectively; The first function table is at least used to characterize the signal association relationship in the instrument single test project; the first function table at least includes one of the instrument single test project type, the instrument internal signal identifier corresponding to each project type, the signal definition in the signal matrix table corresponding to each project type, the data type of the instrument internal signal corresponding to each project type, the value range of the instrument internal signal corresponding to each project type, and the abnormal state identifier of the instrument internal signal corresponding to each project type; The second function table is at least used to characterize the business function logic in the instrument single test project; the second function table at least includes the test function represented by each value of each item type within the value range of the internal signal of the instrument, the function logic identifier corresponding to each value of each item type within the value range of the internal signal of the instrument, the test feedback item corresponding to each value of each item type within the value range of the internal signal of the instrument, and one of the feedback states that should correspond to the test feedback item corresponding to each value of each item type within the value range of the internal signal of the instrument.
3. The automatic instrument function test device according to claim 1, characterized in that: After the test of the single instrument function is completed, during the test of multiple instrument functions of the instrument to be tested: The test end is at least further used to obtain and generate a third function table according to the instrument multi-measurement requirement information and the signal matrix table; and generate a manual test script according to the third function table; and, running the manual test script to generate a composite test signal, and sending the composite test signal to the instrument under test; and, after the composite test signal is sent for a second preset time, generating a second feedback result signal, and sending the second feedback result signal to the instrument under test; and, parsing the test result according to the second test feedback signal and the manual test script; The instrument to be tested is at least further configured to execute functional logic according to the instrument service code to generate the second test feedback signal after receiving the composite test signal; And, after receiving the second feedback result signal, uploading the second test feedback signal to the test end.
4. The automatic instrument function test device according to claim 1, characterized in that: After the test of the single instrument function is completed, during the test of multiple instrument functions of the instrument to be tested: The test end is at least further used to generate a composite test signal and a test expectation in response to a user operation, generate and derive a third function table according to the composite test signal, the test expectation and the signal matrix table, and send the composite test signal to the instrument under test; and generate a second feedback result signal after the composite test signal is sent for a second preset time, and send the second feedback result signal to the instrument under test; and, analyzing the test result according to the second test feedback signal and the test expectation; The instrument to be tested is at least further configured to execute functional logic according to the instrument service code to generate the second test feedback signal after receiving the composite test signal; And, after receiving the second feedback result signal, uploading the second test feedback signal to the test end.
5. The automatic instrument function test device according to claim 3 or 4, characterized in that: The third function table is at least used to characterize the business function logic in the instrument multi-measurement project; the third function table at least includes the project type of the instrument multi-measurement, the function description identifier corresponding to each project type, the test case identifier corresponding to each project type, the test feedback project corresponding to each project type, and one of the feedback states that the test feedback project corresponding to each project type should correspond to.
6. The automatic instrument function test device according to claim 3 or 4, characterized in that: After the tests of the multiple instrument functions are completed, during the pressure test of the instrument to be tested: The test end is at least further used to generate a pressure test script according to the value range of the internal signal of the meter corresponding to each item type in the first function table; and run the pressure test script to generate at least one pressure test signal, and send the pressure test signal to the meter to be tested; The instrument under test is at least further configured to, after receiving the stress test signal, execute functional logic according to the instrument business code to generate a stress test feedback signal for characterizing the degree of system resource occupancy of the instrument under test.
7. An automatic instrument function testing method, characterized in that: At least include the testing process of a single instrument function; The testing process of the single instrument function includes: The test end obtains and generates a first function table and a second function table according to the instrument single test requirement information and the signal matrix table; The test end generates an instrument service code and an automatic test script according to the first function table and the second function table, and sends the instrument service code to the instrument to be tested; The test end runs the automatic test script to generate at least one test indication signal, and sends the test indication signal to the instrument to be tested; After receiving the test indication signal, the instrument to be tested executes functional logic according to the instrument service code to generate the first test feedback signal; The test end generates a first feedback result signal after the test indication signal is sent for a first preset time, and sends the first feedback result signal to the instrument to be tested; After receiving the first feedback result signal, the instrument under test uploads the first test feedback signal to the test end; The test end generates a test result according to the first test feedback signal and the automatic test script.
8. The automatic instrument function testing method according to claim 7, characterized in that: It also includes the testing process of multiple instrument functions; After the test of the single instrument function is completed, during the test of the multiple instrument functions: The test end obtains and generates a third function table according to the instrument multi-measurement requirement information and the signal matrix table; The test end generates a manual test script according to the third function table; The test end runs the manual test script to generate a composite test signal, and sends the composite test signal to the instrument to be tested; After receiving the composite test signal, the instrument under test executes functional logic according to the instrument service code to generate the second test feedback signal; The test end generates a second feedback result signal after the composite test signal is sent for a second preset time, and sends the second feedback result signal to the instrument to be tested; After receiving the second feedback result signal, the instrument under test uploads the second test feedback signal to the test end; The test end parses the test result according to the second test feedback signal and the manual test script.
9. The automatic instrument function testing method according to claim 7, characterized in that: It also includes the testing process of multiple instrument functions; After the test of the single instrument function is completed, during the test of the multiple instrument functions: The test end generates a composite test signal and a test expectation in response to a user operation, generates and derives a third function table according to the composite test signal, the test expectation and the signal matrix table, and sends the composite test signal to the instrument under test; After receiving the composite test signal, the instrument under test executes functional logic according to the instrument service code to generate the second test feedback signal; The test end generates a second feedback result signal after the composite test signal is sent for a second preset time, and sends the second feedback result signal to the instrument to be tested; After receiving the second feedback result signal, the instrument under test uploads the second test feedback signal to the test end; The test end parses the test result according to the second test feedback signal and the test expectation.
10. The automatic instrument function testing method according to claim 8 or 9, characterized in that: It also includes the stress testing process; After the tests of the multiple instrument functions are completed, during the pressure test: The test end generates a pressure test script according to the value range of the internal signal of the instrument corresponding to each item type in the first function table; The test end runs the pressure test script to generate at least one pressure test signal, and sends the pressure test signal to the instrument to be tested; After receiving the stress test signal, the instrument under test executes functional logic according to the instrument business code to generate a stress test feedback signal for characterizing the degree of system resource occupancy of the instrument under test.
Citation Information
Cited By
Intelligent cockpit instrument self-checking method and device and electronic equipment
CN119533548A
