Test method and device, electronic equipment, storage medium and program product
By generating test scripts with pre-defined correspondences, the problem of inflexible adaptation of test scripts between different testing platforms is solved, realizing unified development and efficient adaptation of test scripts, reducing repetitive workload, and improving development efficiency.
Patent Information
- Application Number
- CN202410635915.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, test scripts for different test platforms in hardware-in-the-loop testing solutions in the automotive industry cannot be flexibly adapted and switched, resulting in a large amount of repetitive development work and low efficiency.
By acquiring the test task and test platform identifier of the target controller, a unified test script is generated using a preset correspondence. The correspondence between signal identifiers and hardware path identifiers is determined based on the platform identifier, thereby achieving unified testing across different test platforms.
It reduces the workload of test script development, improves the efficiency of test script development, and enables a single test script to be flexibly adapted to multiple testing platforms.
Smart Images

Figure CN120992211A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to vehicle testing, and in particular, to a testing method, device, electronic device, storage medium and program product. BACKGROUND
[0002] At present, there are various hardware-in-the-loop testing schemes and testing platforms in the automobile industry. In order to cope with different technical requirements and prevent the risk of single testing platform, multiple testing platforms are usually adopted. The testing script developed for one testing platform cannot run on other testing platforms, and the testing script needs to be developed separately for each testing platform, that is, the testing script for the same function cannot be flexibly adapted and switched between multiple testing platforms, resulting in a large amount of unnecessary repeated development work. SUMMARY
[0003] To overcome the problems in the related art, the present disclosure provides a testing method, device, electronic device, storage medium and program product.
[0004] According to a first aspect of an embodiment of the present disclosure, a testing method is provided, the method comprising:
[0005] obtaining a target testing task of a target controller of a vehicle and a platform identifier of a target testing platform;
[0006] determining a target correspondence relationship from a plurality of preset correspondence relationships according to the platform identifier, the target correspondence relationship comprising a correspondence relationship between a signal identifier of at least one hardware testing signal corresponding to the target testing task and a hardware path identifier of the at least one hardware testing signal, different preset correspondence relationships corresponding to different preset testing platforms, the plurality of preset correspondence relationships corresponding to one preset testing script;
[0007] performing testing on the target controller by the target testing platform according to the preset testing script and the target correspondence relationship.
[0008] Optionally, the performing testing on the target controller by the target testing platform according to the preset testing script and the target correspondence relationship comprises:
[0009] calling the target correspondence relationship through the preset testing script to determine the hardware path identifier corresponding to the signal identifier;
[0010] obtaining the target hardware signal indicated by the signal identifier according to the target hardware path indicated by the hardware path identifier to perform hardware testing on the target controller.
[0011] Optionally, the method further comprises:
[0012] switching the communication module to be connected with a communication interface of the target test platform, and switching the control module to be connected with a control interface of the target test platform;
[0013] the target hardware signal indicated by the signal identifier is acquired according to the target hardware path indicated by the hardware path identifier.
[0014] the target hardware signal indicated by the signal identifier is acquired according to the target hardware path indicated by the hardware path identifier through the communication interface and the control interface.
[0015] Optionally, the method further comprises:
[0016] the preset test script and the plurality of preset corresponding relationships are determined according to the target test task.
[0017] Optionally, each of the preset corresponding relationships is generated by:
[0018] a signal list of the preset test platform is acquired, the signal list comprising preset identifiers of at least one hardware test signal and hardware path identifiers of the at least one hardware test signal;
[0019] the preset corresponding relationship is generated according to the preset identifier, the hardware path identifier and a preset naming rule.
[0020] Optionally, the preset corresponding relationship is generated according to the preset identifier, the hardware path identifier and a preset naming rule, comprising:
[0021] for each of the preset identifiers, the signal identifier is generated according to a preset naming rule;
[0022] the preset corresponding relationship is generated according to each of the signal identifiers and the hardware path identifier corresponding to the signal identifier.
[0023] According to a second aspect of the embodiments of the present disclosure, a testing device is provided, which comprises:
[0024] an acquisition module configured to acquire a target test task of a target controller of a vehicle and a platform identifier of a target test platform;
[0025] a first determination module configured to determine a target corresponding relationship from a plurality of preset corresponding relationships according to the platform identifier, the target corresponding relationship comprising a corresponding relationship between a signal identifier of at least one hardware test signal corresponding to the target test task and a hardware path identifier of the at least one hardware test signal, different preset corresponding relationships corresponding to different preset test platforms, and the plurality of preset corresponding relationships corresponding to one preset test script;
[0026] a test module configured to test the target controller by the target test platform according to the preset test script and the target correspondence.
[0027] Optionally, the test module is configured to:
[0028] invoke the target correspondence by the preset test script to determine a hardware path identifier corresponding to the signal identifier;
[0029] obtain a target hardware signal indicated by the signal identifier according to a target hardware path indicated by the hardware path identifier to perform hardware testing on the target controller.
[0030] Optionally, the apparatus further comprises:
[0031] a hardware switching module configured to switch the communication module to be connected to a communication interface of the target test platform and switch the control module to be connected to a control interface of the target test platform;
[0032] the test module is configured to:
[0033] obtain the target hardware signal indicated by the signal identifier through the communication interface and the control interface according to the target hardware path indicated by the hardware path identifier.
[0034] Optionally, the apparatus further comprises:
[0035] a second determination module configured to determine the preset test script and the plurality of preset correspondences according to the target test task.
[0036] Optionally, each of the preset correspondences is generated by:
[0037] obtaining a signal list of the preset test platform, the signal list comprising preset identifiers of at least one hardware test signal and hardware path identifiers of the at least one hardware test signal;
[0038] generating the preset correspondence according to the preset identifiers, the hardware path identifiers and a preset naming rule.
[0039] Optionally, the generating the preset correspondence according to the preset identifiers, the hardware path identifiers and a preset naming rule comprises:
[0040] generating the signal identifier according to the preset naming rule for each of the preset identifiers;
[0041] generating the preset correspondence according to each of the signal identifiers and the hardware path identifier corresponding to the signal identifier.
[0042] According to a third aspect of embodiments of the present disclosure, an electronic device is provided, comprising:
[0043] a processor;
[0044] a memory for storing processor-executable instructions;
[0045] wherein the processor is configured to:
[0046] obtain a target test task of a target controller of a vehicle and a platform identifier of a target test platform;
[0047] determine a target correspondence relationship from a plurality of preset correspondence relationships according to the platform identifier, the target correspondence relationship comprising a correspondence relationship between a signal identifier of at least one hardware test signal corresponding to the target test task and a hardware path identifier of the at least one hardware test signal, different preset test platforms corresponding to different preset correspondence relationships, the plurality of preset correspondence relationships corresponding to one preset test script;
[0048] perform a test on the target controller through the target test platform according to the preset test script and the target correspondence relationship.
[0049] According to a fourth aspect of embodiments of the present disclosure, a computer-readable storage medium is provided, having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the method according to the first aspect of embodiments of the present disclosure.
[0050] According to a fifth aspect of embodiments of the present disclosure, a computer program product is provided, comprising a computer program, the computer program being executed by a processor to implement the steps of the method according to the first aspect of embodiments of the present disclosure.
[0051] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:
[0052] The disclosure first acquires a target test task of a target controller of a vehicle and a platform identifier of a target test platform, and determines a target correspondence relationship from a plurality of preset correspondence relationships according to the platform identifier. The target correspondence relationship includes a correspondence relationship between a signal identifier of at least one hardware test signal corresponding to the target test task and a hardware path identifier of the at least one hardware test signal. Different preset correspondence relationships correspond to different preset test platforms, and a plurality of preset correspondence relationships correspond to one preset test script. Then, the target controller is tested by the target test platform according to the preset test script and the target correspondence relationship. The disclosure does not need to develop different test scripts for different test platforms for the same test task. Different test platforms only need to develop one preset test script, and the target controller is tested according to the preset test script and the target correspondence relationship of the target test platform. Therefore, one test script can be flexibly adapted to multiple test platforms, which reduces the workload of test script development and improves the development efficiency of test scripts.
[0053] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0054] The accompanying drawings, which are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the disclosure and, together with the specification, serve to explain the principles of the disclosure.
[0055] Figure 1 is a flowchart of a test method according to an exemplary embodiment.
[0056] Figure 2 is a flowchart of another test method according to an exemplary embodiment.
[0057] Figure 3 is a flowchart of another test method according to an exemplary embodiment.
[0058] Figure 4 is a flowchart of another test method according to an exemplary embodiment.
[0059] Figure 5 is a flowchart of another test method according to an exemplary embodiment.
[0060] Figure 6 is a schematic diagram of a test script development according to an exemplary embodiment.
[0061] Figure 7 is a block diagram of a test device according to an exemplary embodiment.
[0062] Figure 8is a block diagram of another testing apparatus according to an example embodiment.
[0063] Figure 9 is a block diagram of another testing apparatus according to an example embodiment.
[0064] Figure 10 is a block diagram of an electronic device according to an example embodiment. DETAILED DESCRIPTION
[0065] The example embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals refer to like elements in the several figures. The following description of example embodiments is not representative of all embodiments consistent with the present disclosure. Rather, it is merely an example of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0066] Before introducing a testing method, apparatus, electronic device, storage medium and program product according to an example embodiment of the present disclosure, the application scenario of the example embodiment of the present disclosure is introduced first.
[0067] The example embodiment of the present disclosure can be applied to HIL (Hardware-in-the-Loop) testing of a vehicle, including chassis function HIL testing, three-electric function HIL testing, cabin function HIL testing, intelligent driving function HIL testing, and whole vehicle function HIL testing. The target controller to be tested in the present disclosure can be any one of VCU (Vehicle Control Unit), ECU (Electronic Control Unit), BMS (Battery Management System), and other controllers on a vehicle.
[0068] Figure 1 is a flowchart of a testing method according to an example embodiment, as shown in Figure 1 The method can include the following steps.
[0069] In step S101, a target testing task of a target controller of a vehicle and a platform identifier of a target testing platform are acquired.
[0070] In step S102, the target correspondence relationship is determined from the plurality of preset correspondence relationships according to the platform identifier, the target correspondence relationship including a correspondence relationship between a signal identifier of at least one hardware test signal corresponding to a target test task and a hardware path identifier of the at least one hardware test signal, different preset correspondence relationships corresponding to different preset test platforms, and the plurality of preset correspondence relationships corresponding to one preset test script.
[0071] For example, the hardware-in-the-loop test of the vehicle usually uses a plurality of test platforms, each test platform corresponding to a plurality of test tasks, each test task corresponding to a signal list, wherein the test task may, for example, include a window function test, a door function test, a rearview mirror function test, a chassis function test, a seat function test, etc., each signal list including at least one preset identifier of a hardware test signal and a hardware path identifier of at least one hardware test signal, the hardware test signal may, for example, include an AI, DI, PWM IN input signal, and a DO, AO, PWM OUT output signal, and the preset identifier may be used to identify the hardware test information, such as the name of the hardware test signal or the identifier corresponding to the hardware test signal, etc. In the test script development stage, a corresponding preset correspondence relationship can be generated according to each signal list, and a preset test script can be developed for each same test task corresponding to a plurality of test platforms. For the same test task, different test scripts do not need to be developed for different test platforms, and a preset test script only needs to be developed for different test platforms, and the target controller is tested according to the preset test script and the target correspondence relationship of the target test platform, so that one test script can be flexibly adapted to a plurality of test platforms, reducing the workload of test script development and improving the development efficiency of the test script.
[0072] In testing the target controller, the target test task of the target controller of the vehicle and the platform identifier of the target test platform can be obtained first, then the preset test script corresponding to the target test task is determined from all test scripts corresponding to a plurality of test platforms, and a plurality of preset correspondence relationships corresponding to the target test task are determined from all preset correspondence relationships corresponding to a plurality of test platforms.
[0073] In step S103, the target controller is tested by the target test platform according to the preset test script and the target correspondence relationship.
[0074] For example, the target correspondence relationship can be called by the preset test script, so as to obtain the hardware path identifier corresponding to each signal identifier in the target correspondence relationship, wherein the signal identifier may be used to identify the hardware test information, such as the name of the hardware test signal or the identifier corresponding to the hardware test signal, etc. Then, the target hardware signal indicated by the signal identifier is obtained according to the target hardware path indicated by the hardware path identifier, so as to realize the hardware-in-the-loop test of the target controller.
[0075] For example, the signal identifier in the target correspondence relationship includes x, y, and z, the hardware path identifier corresponding to x is X, the hardware path identifier corresponding to y is Y, and the hardware path identifier corresponding to z is Z. When the target controller is tested by running the preset test script, the target hardware signal corresponding to x can be acquired through the target hardware path indicated by X, the target hardware signal corresponding to y can be acquired through the target hardware path indicated by Y, and the target hardware signal corresponding to z can be acquired through the target hardware path indicated by Z.
[0076] To sum up, the disclosure first acquires the target test task of the target controller of the vehicle and the platform identifier of the target test platform, and determines the target correspondence relationship from the plurality of preset correspondence relationships according to the platform identifier. The target correspondence relationship includes the correspondence relationship between the signal identifier of at least one hardware test signal corresponding to the target test task and the hardware path identifier of the at least one hardware test signal. Different preset correspondence relationships correspond to different preset test platforms, and a plurality of preset correspondence relationships correspond to one preset test script. Then, the target controller is tested by the target test platform according to the preset test script and the target correspondence relationship. For the same test task, the disclosure does not need to develop different test scripts for different test platforms. Different test platforms only need to develop one preset test script, and the target controller is tested according to the preset test script and the target correspondence relationship of the target test platform. This makes one test script be able to flexibly adapt to multiple test platforms, reduces the workload of test script development, and improves the development efficiency of the test script.
[0077] Figure 2 is a flowchart of another test method according to an example embodiment, as shown in Figure 2 The step S103 can be implemented by the following steps, as shown in
[0078] In step S1031, the target correspondence relationship is called by the preset test script to determine the hardware path identifier corresponding to the signal identifier.
[0079] In step S1032, the target hardware signal indicated by the signal identifier is acquired according to the target hardware path indicated by the hardware path identifier, so as to perform hardware test on the target controller.
[0080] For example, after the preset test script and the target correspondence relationship corresponding to the target test task and the target test platform are obtained, the target correspondence relationship can be called by the preset test script, so as to obtain the hardware path identifier corresponding to each signal identifier in the target correspondence relationship. Then, the target hardware signal indicated by the signal identifier can be acquired according to the target hardware path indicated by the hardware path identifier, so as to implement the hardware test on the target controller.
[0081] In some embodiments, the target correspondence relationship can be stored in a target mapping file, and the signal identifier in the preset test script can be written as a container type. By calling the target mapping file, the hardware path identifier corresponding to each signal identifier in the target correspondence relationship can be obtained.
[0082] Figure 3 is a flowchart of another method of testing according to an exemplary embodiment, as shown in Figure 3 The method can further include:
[0083] In step S104, the communication module is switched to be connected to the communication interface of the target test platform, and the control module is switched to be connected to the control interface of the target test platform.
[0084] Correspondingly, one implementation of step S1032 can be:
[0085] According to the target hardware path indicated by the hardware path identifier, the target hardware signal indicated by the signal identifier is obtained through the communication interface and the control interface.
[0086] For example, after obtaining the platform identifier of the target test platform, the hardware module can also be automatically switched to be connected to the target test platform. In some embodiments, the communication module can be switched to be connected to the communication interface of the target test platform, and the control module can be switched to be connected to the control interface of the target test platform, so as to obtain the target hardware signal indicated by the signal identifier through the communication interface and the control interface, and to realize the hardware-in-the-loop test of the target controller. In this way, the automation degree of the controller test can be improved, and the full-process automation from the test script to the device switching can be realized.
[0087] Figure 4 is a flowchart of another method of generating a preset correspondence relationship according to an exemplary embodiment, as shown in Figure 4 Each preset correspondence relationship is generated by the following method:
[0088] In step S201, a signal list of a preset test platform is obtained, and the signal list includes at least one preset identifier of a hardware test signal and at least one hardware path identifier of a hardware test signal.
[0089] In step S202, a preset correspondence relationship is generated according to the preset identifier, the hardware path identifier, and a preset naming rule.
[0090] For example, in the test script development stage, at least one signal list of each test platform can be acquired, and for each test platform, each test task of the test platform corresponds to a signal list. The signal list can include at least one preset identifier of a hardware test signal and at least one hardware path identifier of the hardware test signal.
[0091] In some embodiments, for each test task of each test platform, a signal list corresponding to the test task can be acquired, and for each preset identifier in the signal list, a signal identifier can be generated according to a preset naming rule. For example, taking a test task of a window function as an example, the preset identifier of the hardware test signal in the signal list of the test task of the window function of the test platform A includes "car window signal", and the preset identifier of the hardware test signal in the signal list of the test task of the window function of the test platform B includes "SUV window signal". The signal identifier generated after processing the "car window signal" corresponding to the test platform A according to the preset naming rule can be "window signal", and the signal identifier generated after processing the "SUV window signal" corresponding to the test platform B according to the preset naming rule can be "window signal". In this way, the preset identifiers in the signal lists of different platforms are processed according to the preset naming rule, so that the signal identifiers of the same type in different test platforms can be kept uniform, and the calling of the preset test script is facilitated.
[0092] Then, a preset correspondence relationship can be generated according to each signal identifier and the hardware path identifier corresponding to the signal identifier, and the preset correspondence relationship can be saved in a target file. The target file can be a mapping file, and the preset test script reads the preset correspondence relationship by calling the target file, so as to realize the hardware-in-the-loop test. In this way, for the same test task, different test scripts do not need to be developed for different test platforms, and only one preset test script needs to be developed for different test platforms. The target controller is tested according to the preset test script and the target correspondence relationship of the target test platform, so that one test script can be flexibly adapted to multiple test platforms, the workload of test script development is reduced, the development efficiency of the test script is improved, the development time of the test script is shortened, and the test resources are fully released.
[0093] Figure 5 is a flowchart of another test method according to an example embodiment, as shown in Figure 5 The method can further include:
[0094] In step S105, the preset test script and the plurality of preset correspondence relationships are determined according to the target test task.
[0095] In an example, each test platform corresponds to multiple test tasks, each test task corresponds to a signal list, each signal list corresponds to a preset correspondence relationship, and each same test task corresponding to multiple test platforms corresponds to a preset test script. Therefore, after obtaining a target test task, a preset test script corresponding to the target test task can be determined from all test scripts corresponding to multiple test platforms, and multiple preset correspondence relationships corresponding to the target test task can be determined from all preset correspondence relationships corresponding to multiple test platforms.
[0096] For example, the test platforms include test platform A and test platform B, the test tasks include chassis function test task and seat function test task, the target test task is the chassis function test task, the preset test script corresponding to the chassis function test task is test script 1, the preset test script corresponding to the seat function test task is test script 2, the preset correspondence relationship of the chassis function test task of the test platform A includes correspondence relationship 1, the preset correspondence relationship of the seat function test task of the test platform A includes correspondence relationship 2, the preset correspondence relationship of the chassis function test task of the test platform B includes correspondence relationship 3, and the preset correspondence relationship of the seat function test task of the test platform B includes correspondence relationship 4. The preset test script corresponding to the target test task can be determined as test script 1 from test script 1 and test script 2, and the multiple preset correspondence relationships corresponding to the target test task can be determined as correspondence relationship 1 and correspondence relationship 3 from correspondence relationship 1, correspondence relationship 2, correspondence relationship 3, and correspondence relationship 4.
[0097] Figure 6is a schematic diagram of developing a test script according to an exemplary embodiment. The test platform can include tool chain platform A, tool chain platform B and tool chain platform C. The signal list corresponding to tool chain platform A is function name signal list A. The hardware ID (i.e. hardware path identifier) in the signal list can include xx. The signal list corresponding to tool chain platform B is function name signal list B. The hardware ID in the signal list can include yy. The signal list corresponding to tool chain platform C is function name signal list B. The hardware ID in the signal list can include zz. The function name signal list can be understood as a signal list of the test platform. The automatic mapping file generation software can read function name signal list A, function name signal list B and function name signal list C, and generate mapping files corresponding to tool chain platform A, tool chain platform B and tool chain platform C respectively. The mapping files include preset corresponding relationships. The automatic test script development software can call the mapping files corresponding to tool chain platform A, tool chain platform B and tool chain platform C. The function signal name xx in the preset test script can be written as a container type. By replacing different mapping files, the hardware ID xx / yy / zz of different test platforms can be indexed. The platform device automatic switching module can control the hardware module of the controller under test (i.e. target controller) to switch between different test platforms. The function name signal list can be understood as a signal list of the test platform, and the function signal name can be understood as a signal identifier.
[0098] In summary, the present disclosure first acquires a target test task of a target controller of a vehicle and a platform identifier of a target test platform, and determines a target corresponding relationship from a plurality of preset corresponding relationships according to the platform identifier. The target corresponding relationship includes a corresponding relationship between a signal identifier of at least one hardware test signal corresponding to the target test task and a hardware path identifier of the at least one hardware test signal. Different preset corresponding relationships correspond to different preset test platforms, and a plurality of preset corresponding relationships correspond to one preset test script. Then, the target controller is tested by the target test platform according to the preset test script and the target corresponding relationship. For the same test task, different test scripts do not need to be developed for different test platforms. Different test platforms only need to develop one preset test script to test the target controller according to the preset test script and the target corresponding relationship of the target test platform. This makes one test script be able to flexibly adapt to multiple test platforms, reduces the workload of test script development, and improves the development efficiency of the test script.
[0099] Figure 7 is a block diagram of a test device according to an exemplary embodiment, as shown in Figure 7 The device 300 can include:
[0100] The acquisition module 301 is configured to acquire a target test task of a target controller of a vehicle and a platform identifier of a target test platform.
[0101] The first determination module 302 is configured to determine a target correspondence relationship from a plurality of preset correspondence relationships according to the platform identifier, the target correspondence relationship including a correspondence relationship between a signal identifier of at least one hardware test signal corresponding to the target test task and a hardware path identifier of the at least one hardware test signal, different preset correspondence relationships corresponding to different preset test platforms, and the plurality of preset correspondence relationships corresponding to one preset test script.
[0102] The test module 303 is configured to test the target controller by the target test platform according to the preset test script and the target correspondence relationship.
[0103] In some embodiments, the test module 303 is configured to:
[0104] invoke the target correspondence relationship by the preset test script to determine the hardware path identifier corresponding to the signal identifier.
[0105] acquire the target hardware signal indicated by the signal identifier according to the target hardware path indicated by the hardware path identifier to perform hardware testing on the target controller.
[0106] Figure 8 is a block diagram of another testing device according to an example embodiment, as shown in Figure 8 The device 300 can further include:
[0107] The hardware switching module 304 is configured to switch the communication module to be connected to a communication interface of the target test platform and switch the control module to be connected to a control interface of the target test platform.
[0108] Correspondingly, the test module 303 is configured to:
[0109] acquire the target hardware signal indicated by the signal identifier according to the target hardware path indicated by the hardware path identifier through the communication interface and the control interface.
[0110] Figure 9 is a block diagram of another testing device according to an example embodiment, as shown in Figure 9 The device 300 can further include:
[0111] The second determination module 305 is configured to determine the preset test script and the plurality of preset correspondence relationships according to the target test task.
[0112] In other embodiments, each preset correspondence relationship is generated by the following way:
[0113] The signal list of the preset test platform is acquired, and the signal list includes preset identifiers of at least one hardware test signal and hardware path identifiers of the at least one hardware test signal.
[0114] The preset corresponding relationship is generated according to the preset identifiers, the hardware path identifiers and a preset naming rule.
[0115] In some embodiments, generating the preset corresponding relationship according to the preset identifiers, the hardware path identifiers and the preset naming rule includes:
[0116] For each preset identifier, a signal identifier is generated according to the preset naming rule.
[0117] The preset corresponding relationship is generated according to each signal identifier and a hardware path identifier corresponding to the signal identifier.
[0118] As to the apparatus in the above embodiments, the specific manners in which the various modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.
[0119] In summary, the disclosure first acquires a target test task of a target controller of a vehicle and a platform identifier of a target test platform, and determines a target corresponding relationship from a plurality of preset corresponding relationships according to the platform identifier. The target corresponding relationship includes a corresponding relationship between signal identifiers of at least one hardware test signal corresponding to the target test task and hardware path identifiers of the at least one hardware test signal. Different preset corresponding relationships correspond to different preset test platforms, and a plurality of preset corresponding relationships correspond to one preset test script. Then, the target controller is tested by the target test platform according to the preset test script and the target corresponding relationship. For the same test task, the disclosure does not need to develop different test scripts for different test platforms, and only needs to develop one preset test script for different test platforms. The target controller is tested according to the preset test script and the target corresponding relationship of the target test platform, so that one test script can be flexibly adapted to multiple test platforms, reducing the workload of test script development and improving the development efficiency of test scripts.
[0120] The disclosure also provides a computer readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the method for testing provided by the disclosure.
[0121] Figure 10 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 400 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0122] Referring to Figure 10The electronic device 400 can include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.
[0123] The processing component 402 typically controls overall operations of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 can include one or more processors 420 to execute instructions to complete the steps of the test methods described above, in whole or in part. In addition, the processing component 402 can include one or more modules to facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0124] The memory 404 is configured to store various types of data to support operations of the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phonebook data, messages, pictures, videos, and so on. The memory 404 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic or optical disk.
[0125] The power supply component 406 supplies electrical power for the various components of the electronic device 400. The power supply component 406 can include a power supply management system, one or more power supplies, and other components associated with generating, managing, and distributing electrical power for the electronic device 400.
[0126] The multimedia component 408 includes a screen to provide an output interface between the electronic device 400 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, or a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and intensity of the touching or sliding action. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a camera mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zooming capability.
[0127] The audio component 410 is configured to output and / or input an audio signal. For example, the audio component 410 includes a microphone (MIC) to receive an external audio signal when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker to output an audio signal.
[0128] The input / output interface 412 provides an interface between the processing component 402 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0129] The sensor component 414 includes one or more sensors to provide various state assessments for the electronic device 400. For example, the sensor component 414 can detect an open / closed state of the electronic device 400, relative positioning of components, such as a display and a keypad of the electronic device 400, a change in position of the electronic device 400 or a component of the electronic device 400, presence or absence of user contact with the electronic device 400, orientation or acceleration / deceleration of the electronic device 400, and a temperature change of the electronic device 400. The sensor component 414 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 414 can also include a light sensor such as a CMOS or CCD image sensor for use in an imaging application. In some embodiments, the sensor component 414 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0130] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G, or 4G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technology.
[0131] In an exemplary embodiment, the electronic device 400 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements for performing the above-described method of testing.
[0132] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 404 including instructions, is also provided, which can be executed by the processor 420 of the electronic device 400 to complete the above-described method of testing. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.
[0133] In another exemplary embodiment, a computer program product is also provided, which contains a computer program capable of being executed by a programmable device, and the computer program has code portions for executing the above-described method of testing when executed by the programmable device.
[0134] Those skilled in the art can understand that the various illustrative logical blocks and steps listed in the embodiments of the present application can be implemented by electronic hardware, computer software, or a combination of both. Whether the functions are implemented by hardware or software depends on the specific application and design requirements of the whole system. Those skilled in the art can implement the functions in various ways for each specific application, but such implementation should not be construed as beyond the scope of the embodiments of the present application.
[0135] Furthermore, the word "exemplary" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "exemplary" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word exemplary is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise, or clear from context, "X employs A or B" is intended to mean any of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied under any of the foregoing instances. In addition, the articles "a" and "an" as used in this application and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form. Thus, use of the articles in this application and the following claims is not limiting.
[0136] Also, although the disclosure has been described and illustrated with respect to one or more implementations, the features of the disclosure are broadly applicable to other implementations. Any measure of the disclosure that isn't specifically and explicitly excluded will be assumed to be within the scope of the disclosure. Likewise, any variations of the disclosure that aren't specifically and explicitly included will be assumed to be within the scope of the disclosure. Unless otherwise stated, all measurements, values, ratings, positions, magnitudes, sizes, and other specifications that are not otherwise qualified will be deemed to be approximate such that some variation greater or lesser than or from a stated measurement, value, rating, position, magnitude, size, or the like will be within an acceptable range. Moreover, unless otherwise expressly specified, measures of a single component will be assumed to also allow for plural instances of the same component, and measures of an entire device or system will be assumed to allow for multiple devices or systems, as appropriate. Also, the singular forms "a", "an", and "the" include plural referents unless otherwise stated.
[0137] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features of the disclosure disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
[0138] It is to be understood that the disclosure is not limited to the precise construction described and as shown in the accompanying drawings, which can be varied as desired. The scope of the disclosure is only limited by the claims appended hereto.
[0139] In the detailed description above, reference is made to the accompanying drawings, which form a part hereof, and in which are shown by way of illustration specific aspects in which the disclosure can be practiced. In this regard, directional terminology, such as “central,” “longitudinal,” “lateral,” “length,” “width,” “thickness,” “upper,” “lower,” “front,” “back,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” “outer,” “clockwise,” “counterclockwise,” “axial,” “radial,” “circumferential,” and other commonly used terms, can be used for the purpose of illustration only and do not limit the present disclosure unless specifically so identified. As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items. Similarly, the terms “at least one of’ and “one or more of’ include any and all combinations of one or more of the associated listed items. It will be understood that the terms “first,” “second,” “third,” etc. are used herein to describe various elements, but do not connote any order, quantity, or importance, but rather are used to distinguish one element from another. The terms “a” and “an” and “the” include both singular and plural referents unless the context clearly dictates otherwise. The term “plurality” means two or more. Stated differently, the term “plurality” means two or more of the same item or multiple items. The terms “comprising,” “having,” “including,” and the like, can be used synonymously herein. It is possible, however, that over the course of the specification, these terms can on occasion be employed to
[0140] It should be understood that the features of the various aspects of the present disclosure described herein can be combined with each other, unless specifically noted otherwise. As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items; similarly, “at least one of’ includes any and all combinations of one or more of the associated listed items.
[0141] It should be understood that, unless otherwise specifically noted, the terms “joined,” “attached,” “mounted,” “connected,” “linked,” “fixed,” and the like, as used in the herein-described embodiments of the present disclosure, are to be construed broadly, e.g., as encompassing fixed connections, detachable connections, or integral connections; mechanical connections, electrical connections, or communicative connections with each other; direct connections, or indirect connections via intervening intermediaries; or communicative relationships between two elements, unless specifically and explicitly limited otherwise. The specific meaning of the aforementioned terms in the present context can be understood by one of ordinary skill in the art, depending on the specific circumstances.
[0142] Further, the word “over” used in the context of a component, element, or material layer “over” a surface is used herein to mean that the component, element, or material layer is positioned (e.g., placed, formed, deposited, etc.) “indirectly” on the surface such that one or more additional components, elements, or layers are arranged between the surface and the component, element, or material layer. However, the word “over” used in the context of a component, element, or material layer “over” a surface can also optionally have the specific meaning that the component, element, or material layer is positioned (e.g., placed, formed, deposited, etc.) “directly” on the surface, e.g., in direct contact with the surface.
[0143] Although terms such as "first" and "second" and "third" can be used herein to describe various components, parts, regions, layers or sections, these components, parts, regions, layers or sections are not limited by these terms. Instead, these terms are only used to distinguish one component, part, region, layer or section from another component, part, region, layer or section. Thus, the first component, part, region, layer or section mentioned in the examples described herein can also be referred to as the second component, part, region, layer or section without departing from the teachings of the examples. In addition, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or a specific number of the technical features indicated. Thus, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description herein, the meaning of "a plurality of" is at least two, for example two, three, etc., unless otherwise explicitly specifically limited.
[0144] It will be understood that the spatially relative terms, such as "upper" and "lower", "right" and "left", "vertical", "horizontal", "above", "below", "top", "bottom", "lateral", "longitudinal", and the like, can be used herein for the purpose of describing the illustrated embodiment. Such spatially relative terms can be interpreted, unless otherwise specified, in connection to the orientation as shown in the attached drawings. It should be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation, for example, if the device were installed upside down. For example, if the device in the attached figures were turned over, then a component described as "above" or "up" of another component would then be oriented "below" or "down" relative to the other component. Accordingly, the term "above" encompasses both above and below orientations. The device can be otherwise oriented (for example, rotated 90 degrees or at other orientations) and the spatially relative terms used herein interpreted accordingly.
Claims
1. A testing method, characterized in that, The method includes: Obtain the target test task for the vehicle's target controller and the platform identifier of the target test platform; The target correspondence is determined from multiple preset correspondences based on the platform identifier. The target correspondence includes the correspondence between the signal identifier of at least one hardware test signal corresponding to the target test task and the hardware path identifier of the at least one hardware test signal. Different preset correspondences correspond to different preset test platforms, and the multiple preset correspondences correspond to a preset test script. The target controller is tested through the target testing platform according to the preset test script and the target correspondence.
2. The method according to claim 1, characterized in that, The step of testing the target controller through the target testing platform according to the preset test script and the target correspondence includes: The target correspondence is invoked through the preset test script to determine the hardware path identifier corresponding to the signal identifier; Based on the target hardware path indicated by the hardware path identifier, the target hardware signal indicated by the signal identifier is obtained to perform hardware testing on the target controller.
3. The method according to claim 2, characterized in that, The method further includes: Switch the communication module to connect to the communication interface of the target test platform, and switch the control module to connect to the control interface of the target test platform; The step of obtaining the target hardware signal indicated by the signal identifier based on the target hardware path indicated by the hardware path identifier includes: Based on the target hardware path indicated by the hardware path identifier, the target hardware signal indicated by the signal identifier is obtained through the communication interface and the control interface.
4. The method according to claim 1, characterized in that, The method further includes: The preset test script and the multiple preset correspondences are determined based on the target test task.
5. The method according to any one of claims 1-4, characterized in that, Each of the aforementioned preset correspondences is generated in the following manner: Obtain the signal list of the preset test platform, wherein the signal list includes a preset identifier of at least one hardware test signal and a hardware path identifier of the at least one hardware test signal; The preset correspondence is generated based on the preset identifier, the hardware path identifier, and the preset naming rules.
6. The method according to claim 5, characterized in that, The step of generating the preset correspondence based on the preset identifier, the hardware path identifier, and the preset naming rules includes: For each of the preset identifiers, a signal identifier is generated according to a preset naming rule; The preset correspondence is generated based on each signal identifier and the corresponding hardware path identifier.
7. A testing apparatus, characterized in that, The device includes: The acquisition module is configured to acquire the target test task of the vehicle's target controller and the platform identifier of the target test platform; The first determining module is configured to determine a target correspondence from multiple preset correspondences based on the platform identifier. The target correspondence includes the correspondence between the signal identifier of at least one hardware test signal corresponding to the target test task and the hardware path identifier of the at least one hardware test signal. Different preset correspondences correspond to different preset test platforms, and the multiple preset correspondences correspond to a preset test script. The testing module is configured to test the target controller through the target testing platform according to the preset test script and the target correspondence.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured as follows: Obtain the target test task for the vehicle's target controller and the platform identifier of the target test platform; The target correspondence is determined from multiple preset correspondences based on the platform identifier. The target correspondence includes the correspondence between the signal identifier of at least one hardware test signal corresponding to the target test task and the hardware path identifier of the at least one hardware test signal. Different preset correspondences correspond to different preset test platforms, and the multiple preset correspondences correspond to a preset test script. The target controller is tested through the target testing platform according to the preset test script and the target correspondence.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-6.