A test method and test apparatus
Patent Information
- Application Number
- CN202611011301.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本申请提供一种测试方法及测试装置,用于解决现有技术中测试效率低下的问题
本申请提供的测试方法可以通过响应于测试开启指令,加载并执行预设的埋点脚本,以得到埋点脚本执行过程中的测试数据,实现了基于埋点脚本的自动化测试,改善了人工测试时的由于不同操作人员操作习惯不同所造成的埋点数据一致性差的问题,增加了测试数据的可信度。一方面,由于埋点脚本包括通用文件和配置文件;通用文件包括埋点通用触发参数;配置文件包括与车载终端相匹配的埋点触发策略,也就是说,可以通过更新配置文件使得埋点脚本匹配不同的车型和版本,满足了不同车型的快速迭代需求。另一方面,在车载终端得到测试数据之后,将测试数据发送至云服务端,以基于云服务端得到测试结果,实现了埋点测试数据的统一收集与管理,无需手动进行数据比对和数据整理,提升了测试的效率。
Smart Images

Figure CN122925218A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and in particular to a testing method and testing apparatus. Background Technology
[0002] In the digital age, data has become a crucial basis for enterprise decision-making. To obtain accurate and effective user behavior data, event tracking testing has become an indispensable part. Event tracking testing, also known as data tracking, refers to pre-setting data collection points in applications or products to collect and analyze user behavior data during use.
[0003] In related technologies, data tracking testing mainly relies on manual operation, which results in low testing efficiency. Summary of the Invention
[0004] This application provides a testing method and testing apparatus to solve the problem of low testing efficiency in the prior art.
[0005] According to one aspect of this application, a testing method is provided for use in an in-vehicle terminal, the method comprising: Determine the event tracking script to be executed; the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. In response to the test start command, the event tracking script is loaded and executed to obtain test data; The test data is sent to the cloud server so that the cloud server can determine the test results based on the test data.
[0006] In one possible implementation, the above-mentioned determination of the event tracking script to be executed includes: Receive real-time event tracking triggering strategies; Update the configuration file based on the real-time tracking trigger strategy; The execution script is generated based on the updated configuration file and the general trigger parameters for the event tracking.
[0007] In one possible implementation, the above-mentioned event triggering strategy includes an event list and an event triggering order; The above execution of the tracking script includes: Multiple tracking points to be tested were identified based on the tracking point list; Multiple test points are triggered sequentially based on the trigger order of the event points.
[0008] In another possible implementation, the above-mentioned multiple tracking points to be tested are triggered sequentially based on the tracking point triggering order, including: For each tracking point to be tested, the tracking point is triggered according to the triggering order, and the triggering status of the tracking point is determined; the triggering status includes success status and failure status. If the trigger status is successful, then determine the tracking code, trigger time, and tracking data of the tracking point to be tested. If the trigger status is a failure status, at least one re-trigger operation will be performed until the preset stop condition is met.
[0009] In yet another possible implementation, the above-mentioned re-triggering operation includes: Re-trigger the event tracking point under test and determine the retry trigger status of the event tracking point under test; If the retry trigger status is a failure status, then determine the number of retries for the event point to be tested; otherwise, determine the event point code, trigger time, and event point data for the event point to be tested.
[0010] In another possible implementation, the above stopping condition includes any of the following: The number of retries exceeds the preset target number; The retry trigger status is a success status.
[0011] In another possible implementation, the above response to the test start command, before loading and executing the instrumentation script, includes: Obtain the preset test environment; Load configuration files based on the test environment; The test data obtained above includes: Test data is collected during the execution of the event tracking script based on the test environment.
[0012] In another possible implementation, the above test activation command is determined based on any of the following: Based on the test operation received from the vehicle terminal, a test start command is generated; Generate test start instructions based on the test start time in the configuration file; Based on the received operation, the cloud server sends a test start command to the vehicle terminal; Receive the test environment switching command sent by the cloud server, and generate the test start command based on the test environment switching command.
[0013] In another possible implementation, the above-mentioned test start command generated based on the test environment switching command includes: Generate test start command based on test environment switching command; Determine the target test environment corresponding to the test environment switching command; The test data collected during the execution of the above-mentioned data collection script includes: Test data is collected during the execution of the event tracking script based on the target test environment.
[0014] According to another aspect of the embodiments of this application, a testing method is provided, applied to a cloud server, the method comprising: Receive test data sent by the vehicle terminal; wherein, the test data is obtained by the vehicle terminal in response to the test start command, loading and executing the tracking script; the tracking script includes a general file and a configuration file; the general file includes general tracking trigger parameters; the configuration file includes tracking trigger strategies that match the vehicle model parameters, hardware parameters and software parameters of the vehicle terminal. The test results are determined based on the test data.
[0015] In another possible implementation, the above-mentioned generation of test results based on test data includes: Determine the test environment corresponding to the test data; Based on at least one of the test environment, vehicle parameters, hardware parameters, and software parameters, the test data is classified to obtain the classification results. Fault analysis is performed based on the classification results to obtain test results.
[0016] In another possible implementation, the aforementioned cloud server includes multiple storage spaces; The above methods also include: Based on the test time corresponding to the test data, the target storage space is selected from multiple storage spaces; Store the test data in the target storage space.
[0017] According to another aspect of the embodiments of this application, a testing apparatus is provided for use in an in-vehicle terminal, the apparatus comprising: The determination module is used to determine the event tracking script to be executed. The event tracking script includes a general file and a configuration file. The general file includes general event tracking trigger parameters. The configuration file includes event tracking trigger strategies that match the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. The testing module is used to load and execute the data tracking script in response to the test start command, and obtain test data; The sending module is used to send test data to the cloud server so that the cloud server can determine the test results based on the test data.
[0018] According to another aspect of the embodiments of this application, a testing apparatus is provided, applied to a cloud server, the apparatus comprising: The receiving module is used to receive test data sent by the vehicle terminal. The test data is obtained by the vehicle terminal in response to the test start command, loading and executing the data tracking script. The data tracking script includes a general file and a configuration file. The general file includes general trigger parameters for data tracking. The configuration file includes a data tracking trigger strategy that matches the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. The generation module is used to generate test results based on test data.
[0019] According to another aspect of this application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the methods shown in the first and second aspects of this application.
[0020] According to another aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the methods shown in the first and second aspects of this application.
[0021] The beneficial effects of the technical solution provided in this application are: The testing method provided in this application can load and execute a preset event tracking script in response to a test start command to obtain test data during the script's execution. This achieves automated testing based on event tracking scripts, improving the inconsistency of event tracking data caused by different operators' habits during manual testing and increasing the reliability of test data. On one hand, the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle terminal. This means that the event tracking script can be updated to match different vehicle models and versions, meeting the rapid iteration needs of different vehicle models. On the other hand, after the vehicle terminal obtains the test data, it sends the test data to a cloud server to obtain test results, achieving unified collection and management of event tracking test data. This eliminates the need for manual data comparison and processing, improving testing efficiency. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A flowchart illustrating a testing method provided in an embodiment of this application; Figure 2 A flowchart illustrating the process of determining the embedding script in a testing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the embedded point triggering process in a testing method provided in an embodiment of this application; Figure 4 A flowchart illustrating another testing method provided in an embodiment of this application; Figure 5 A schematic diagram illustrating the process of generating test results in a testing method provided in an embodiment of this application; Figure 6 This is a schematic diagram illustrating the data storage process in a testing method provided in an embodiment of this application. Figure 7 A timing diagram of an example test method provided for an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a testing device provided in an embodiment of this application; Figure 9 This is a schematic diagram of another testing device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] Embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0025] The accompanying drawings illustrate various structural schematics according to embodiments of the present disclosure. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0026] In the context of this disclosure, when a layer / element is referred to as being "above" another layer / element, the layer / element may be directly above the other layer / element, or there may be an intermediate layer / element between them. Additionally, if a layer / element is "above" another layer / element in one orientation, then when the orientation is reversed, the layer / element may be "below" the other layer / element.
[0027] Intelligent cockpits have become a core competitive advantage for vehicle manufacturers, with in-vehicle systems integrating a vast array of functions such as navigation, audio-visual entertainment, vehicle control, cockpit interaction, vehicle networking, and autonomous driving assistance. Automakers need to collect user behavior data, including operation data, usage frequency, anomaly triggers, and path preference data, for product iteration, fault location, compliance statistics, and operational optimization. Data collection and tracking has become a standard testing item for in-vehicle system software.
[0028] The inventors discovered that existing solutions for testing data collection points in new energy vehicle in-vehicle systems suffer from problems such as low operational efficiency, poor adaptability, environmental confusion, and chaotic data management, as detailed below: Manual triggering of data collection points is inefficient and lacks standardization: The data collection points for vehicle systems cover dozens to hundreds of functional modules such as navigation, multimedia, and air conditioning. Current testing requires manual operation to trigger each function (such as manually clicking the navigation button or switching the air conditioning mode), and testing a single vehicle model takes more than 4 hours. Moreover, different testers have different operating habits (such as different trigger intervals and operation sequences), resulting in poor consistency of data collection point data and a test result reliability of less than 60%.
[0029] Lack of multi-dimensional adaptability: There are significant differences in new energy vehicle models (such as pure electric / hybrid), configurations (low-end / high-end vehicle systems), and development versions. The tracking logic (such as seat heating tracking unique to high-end vehicle systems) and triggering conditions (such as the timing of navigation start tracking triggering in different versions) are different. Existing solutions require the development of separate scripts for each combination, with an adaptation cycle of more than one week, which cannot meet the needs of rapid vehicle model iteration.
[0030] Insufficient environment differentiation and data isolation: The testing objectives of vehicle-mounted data points in the testing environment (R&D debugging), pre-production environment (small batch trial installation), and production environment (user vehicle use) are different (e.g., the testing environment needs full verification, and the production environment needs compliance monitoring). However, the existing solution does not achieve accurate environment differentiation, resulting in debugging data and user data being mixed together, and the probability of testers misjudging production problems exceeds 30%.
[0031] The data collection and analysis loop is broken: After the vehicle-mounted data is reported through the software development kit (SDK), there is a lack of a unified real-time collection and management mechanism. The data transmission delay exceeds 10 minutes, and the storage format is not uniform. Subsequent comparative analysis requires manual sorting, which is inefficient and makes it impossible to quickly locate the differences in data collection points across versions and vehicle models.
[0032] To address the aforementioned technical issues, some embodiments of this application load and execute a preset event tracking script in response to a test start command, thereby obtaining test data during the script's execution. This achieves automated testing based on the event tracking script, improving the inconsistency of event tracking data caused by different operators' varying habits during manual testing and increasing the reliability of the test data. On one hand, since the event tracking script includes general event tracking trigger parameters and a configuration file, and the configuration file includes event tracking parameters that match the vehicle model parameters, terminal hardware parameters, and terminal software parameters of the in-vehicle terminal, the event tracking script can be updated to match different vehicle models and versions, meeting the rapid iteration needs of different vehicle models. On the other hand, after the in-vehicle terminal obtains the test data, it sends the test data to a cloud server to obtain test results, achieving unified collection and management of event tracking test data. This eliminates the need for manual data comparison and processing, improving testing efficiency.
[0033] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0034] This application provides a testing method, such as... Figure 1 As shown, this method, which can be applied to vehicle-mounted terminals, includes: S101, determine the event tracking script to be executed.
[0035] The event tracking script includes a general file and a configuration file. The general file includes general event tracking trigger parameters, while the configuration file includes event tracking trigger strategies that match the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. These event tracking trigger strategies can be customized event tracking logic for preset vehicle models, vehicle configurations, and system versions. Customized event tracking logic can include event tracking identification numbers (IDs), event tracking trigger paths, and event tracking verification rules.
[0036] Optionally, the above vehicle parameters may include hybrid or pure electric, the above hardware parameters may include low-end or high-end vehicle infotainment hardware, and the above software parameters may include system version number, etc. The above general trigger parameters for embedded points may include click touch logic, input touch logic, or function status monitoring logic, etc.
[0037] Specifically, the script architecture described above can adopt a "core engine" + "configuration file" architecture. The core engine encapsulates the general trigger parameters for event tracking. The configuration file is a lightweight data exchange format (JSON, JavaScript Object Notation) used to store personalized event tracking logic for specific vehicle models, vehicle infotainment system configurations, or system versions.
[0038] Furthermore, the vehicle terminal can receive real-time event tracking triggering strategies from the cloud server, update the original event tracking script based on the real-time event tracking triggering strategies, and obtain the event tracking script to be executed.
[0039] In this embodiment, the vehicle-mounted terminal can be a terminal device installed on the vehicle's dashboard, supporting multiple functions such as 3G wireless communication technology, online navigation, traffic information, travel guide, shopping, and entertainment. The aforementioned cloud server can be a cloud server or server cluster providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The vehicle-mounted terminal and the cloud server can connect to the network via wireless communication, which can include Bluetooth, Wi-Fi (Wireless Fidelity), and other networks that enable wireless communication.
[0040] S102, in response to the test start command, loads and executes the data tracking script to obtain test data.
[0041] The triggering method of the above test start command varies in different test scenarios.
[0042] In some implementations, testers can input a preset test start command through the vehicle terminal's debugging interface; in other implementations, an encrypted command can be sent to the vehicle terminal through a cloud server testing platform, and the vehicle terminal can obtain the aforementioned test start command after decrypting the received encrypted command, thereby achieving remote triggering; in still other implementations, the test start command can be automatically triggered based on a preset trigger time in the embedded script, thereby completing timed triggering.
[0043] Optionally, the above test data may include basic information about the tracking points (such as tracking point ID, time, and value), vehicle system logs (such as CPU / memory usage data), and script execution logs (such as trigger path, time consumption parameters, and trigger success rate).
[0044] S103 sends the test data to the cloud server so that the cloud server can determine the test results based on the test data.
[0045] The test results may include comparison results of test data based on different dimensions, reasons for test failure, or test success prompts.
[0046] Specifically, the cloud server can compare test data based on different dimensions, such as test time, vehicle model, vehicle infotainment system configuration, system version, and test environment. For example, test results can include cross-version comparisons of the success rate of event triggering for the same vehicle model but different system versions.
[0047] This application embodiment loads and executes a preset event tracking script in response to a test start command to obtain test data during the script's execution. This achieves automated testing based on the event tracking script, improving the inconsistency of event tracking data caused by different operators' habits during manual testing and increasing the reliability of the test data. On one hand, the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle terminal. This means that the event tracking script can be updated to match different vehicle models and versions, meeting the rapid iteration needs of different vehicle models. On the other hand, after the vehicle terminal obtains the test data, it sends the test data to a cloud server to obtain test results. This achieves unified collection and management of event tracking test data, eliminating the need for manual data comparison and processing, thus improving testing efficiency.
[0048] This application provides one possible implementation method, such as... Figure 2 As shown, the above-mentioned scripts for determining the tracking points to be executed include: S201: Receive the real-time event tracking trigger strategy and update the configuration file based on the real-time event tracking trigger strategy.
[0049] Among them, the above-mentioned real-time event tracking triggering strategy can be an event tracking triggering strategy issued in real time by the cloud server.
[0050] Specifically, the real-time event tracking trigger strategy can include basic information such as the event tracking strategy name, the applicable scope of the event tracking strategy (such as vehicle model, vehicle system configuration and system version), and can also include a list of event tracking points to be triggered, as well as trigger parameters such as event tracking order, number of retries, and timeout time.
[0051] S202 generates an execution script based on the updated configuration file and general trigger parameters for the event tracking.
[0052] Specifically, the cloud server can send the configured real-time event tracking strategy to the vehicle terminal through encryption, and the vehicle terminal will update its local configuration file after receiving it.
[0053] Meanwhile, the vehicle terminal can locally store multiple historical configuration files, allowing for rollback to any historical version based on local historical records. This enables developers to perform data backtracking at different development stages using different historical configuration files, accelerating the development process. Furthermore, the aforementioned data tracking strategy also supports strategy inheritance, saving time spent configuring new parameters.
[0054] In this embodiment, the local configuration file is updated by the event triggering strategy received by the vehicle system, which avoids the need to redevelop and install event scripts for different configuration information as in the prior art. This can adapt to the rapid iteration and update needs of different vehicle models and effectively improve testing efficiency.
[0055] This application provides a possible implementation method, in which the above-mentioned event tracking strategy includes an event tracking list and an event tracking order.
[0056] The above execution of the tracking script includes: Multiple tracking points to be tested are determined based on the tracking point list; the multiple tracking points to be tested are triggered sequentially based on the tracking point triggering order.
[0057] Optionally, the event triggering strategy can also include the number of retries and the timeout period.
[0058] For example, if a certain event tracking fails to trigger, it can be retried based on the retry count and timeout settings. For instance, for regular business functions, the timeout can be set to 3 seconds, meaning that if a successful trigger notification is not received within 3 seconds, the trigger is considered a failure. At the same time, the maximum number of retries can be 3 or 5 to increase the success rate of retried event tracking.
[0059] This application's embodiments identify multiple tracking points to be tested through a tracking point list, and trigger these multiple tracking points sequentially based on their triggering order, thereby achieving automatic execution of tracking point testing. This differs from existing technologies that require manual operation to trigger each point (such as manually clicking navigation buttons or switching air conditioning modes), saving testing time. Furthermore, in existing technologies, different testers have different operating habits, resulting in inconsistent triggering intervals and operation sequences. The automated tracking point testing in this application can effectively improve the consistency and reliability of tracking point data.
[0060] This application provides one possible implementation method, such as... Figure 3 As shown, the above-mentioned multiple tracking points to be tested are triggered sequentially based on the tracking point triggering order, including: S301, for each tracking point to be tested, trigger the tracking point to be tested based on the tracking point triggering order, and determine the triggering status of the tracking point to be tested.
[0061] The trigger status includes a success status and a failure status. The trigger status can be determined based on the status code returned by the CAN bus interface.
[0062] Specifically, after triggering a test point, the vehicle terminal will receive a status code returned by the CAN bus interface, such as HTTP 4xx / 5xx (Message Queuing Telemetry Transport), MQTT (Message Queuing Telemetry Transport) exception receipt, and private protocol failure flag. The triggering status of the test point can be determined based on the status code.
[0063] S302, if the triggering status is successful, determine the tracking code, triggering time, and tracking data of the tracking point to be tested; if the triggering status is failed, perform at least one re-triggering operation until the preset stopping condition is met.
[0064] In some implementations, if the trigger status is successful, the tracking code, trigger time, and tracking data of the tracking point to be tested are determined, and the tracking code, trigger time, and tracking data are recorded in the execution report.
[0065] In other implementations, if the triggering state is a failure state, at least one re-triggering operation is performed until a preset stopping condition is met.
[0066] This application provides a possible implementation method, wherein the above-mentioned stopping condition includes any one of the following: The number of retries exceeds the preset target number; The retry trigger status is a success status.
[0067] Specifically, for example, for regular business functions, the timeout period can be set to 3 seconds, and the maximum number of retries can be 3. That is to say, if the success status is not determined within 3 seconds after the trigger point, the trigger is determined to have failed. At the same time, 3 trigger retries can be performed after a preset interval.
[0068] In this embodiment, the execution progress can also be recorded in real time during script runtime, such as recording that 50 / 120 event points have been triggered, i.e., the total number of event points is 120, of which 50 event points have been triggered. If an exception is encountered (such as a certain event point failing to trigger), the corresponding event point is marked as abnormal and the subsequent event points continue to be executed to avoid interruption of the overall process. After the test is completed, a vehicle-side execution report is generated.
[0069] This application provides a possible implementation method, wherein the above-mentioned re-triggering operation includes: Re-trigger the event tracking point under test and determine the retry trigger status of the event tracking point under test; If the retry trigger status is a failure status, then determine the number of retries for the event point to be tested; otherwise, determine the event point code, trigger time, and event point data for the event point to be tested.
[0070] This application embodiment achieves efficient operation of the tracking point test and increases the success rate of tracking point triggering by triggering the tracking point according to the tracking point triggering sequence for each tracking point to be tested, determining the triggering status of the tracking point, and then determining whether to retry triggering the tracking point or determine the tracking point data based on the triggering status.
[0071] This application provides a possible implementation method in which, before loading and executing the data tracking script in response to the test start command, the following steps are included: Obtain the preset test environment; load the configuration file based on the test environment.
[0072] The testing environment can include a testing environment, a pre-production environment, and a production environment.
[0073] The test data obtained above includes: Test data is collected during the execution of the event tracking script based on the test environment.
[0074] Optionally, the data collection testing in the test environment is mainly used for R&D debugging and requires full verification; the pre-production environment is mainly for small-batch trial assembly of the product, and the production environment is mainly for user vehicle use scenarios, and the test data needs to be monitored for compliance.
[0075] Specifically, the test data collected in the test environment can include basic information of the tracking points (such as tracking point ID, time, and value), vehicle system logs (such as CPU / memory usage), script execution logs (such as trigger path and time consumption), and other full data, which are used for functional integrity verification.
[0076] The data collected in the pre-production environment mainly includes key event tracking data, such as multimedia and navigation event tracking points used frequently by users, and stability indicators such as trigger success rate and reporting latency. It does not include system logs to reduce resource consumption.
[0077] The data collected in the production environment mainly includes compliant data tracking, such as fault alarms and over-the-air (OTA) upgrade data. The data is automatically anonymized to hide user location and account information, ensuring that the test data meets data security regulations.
[0078] This application embodiment can determine the test data to be collected during the execution of the tracking script by setting different test environments. This can achieve accurate differentiation of environments in the tracking test scheme, avoid mixing debugging data with user data, and reduce the probability of testers misjudging production problems.
[0079] This application provides a possible implementation method, wherein the above test activation instruction is determined based on any one of the following: (1) Generate a test start command based on the test operation received from the vehicle terminal.
[0080] Specifically, testers can trigger a test start command on the vehicle terminal to complete the on-site test.
[0081] (2) Generate test start command based on the test start time in the configuration file.
[0082] Specifically, test start times can be preset in the configuration file to automatically trigger test start commands based on these times, thus automating test execution. For example, when nighttime testing is required and test personnel are unavailable, tests can still be scheduled based on the set test start time.
[0083] (3) Based on the received operation, the cloud server sends a test start command to the vehicle terminal.
[0084] Specifically, testers can remotely trigger the test start command on the cloud server to conduct remote testing.
[0085] (4) Receive the test environment switching instruction sent by the cloud server and generate a test start instruction based on the test environment switching instruction.
[0086] Specifically, testers can remotely modify the environment type through the cloud server's testing platform. After switching, the vehicle's infotainment system will automatically restart the event tracking script to achieve the goal of automatically testing the event tracking script based on the environment type.
[0087] This application provides a possible implementation method in which the above-mentioned test start command is generated based on the test environment switching command, including: Generate a test start command based on the test environment switching command; determine the target test environment corresponding to the test environment switching command; The test data collected during the execution of the above-mentioned data collection script includes: Test data is collected during the execution of the event tracking script based on the target test environment.
[0088] In this embodiment of the application, test environment switching instructions can be used to collect test data during the execution of the tracking script based on the target test environment. Different test data can be collected based on different test environments, enabling real-time switching of the test environment and further improving test efficiency.
[0089] This application provides a testing method, such as... Figure 4 As shown, this method, which can be applied to cloud servers, includes: S401 receives test data sent by the vehicle-mounted terminal.
[0090] The test data is obtained by the vehicle terminal in response to the test start command, loading and executing the data tracking script; the data tracking script includes a general file and a configuration file; the general file includes general data tracking trigger parameters; the configuration file includes data tracking trigger strategies that match the vehicle model parameters, hardware parameters and software parameters of the vehicle terminal.
[0091] Optionally, the above-mentioned event tracking triggering strategy can be personalized event tracking logic for preset vehicle models, vehicle configurations, and system versions. Personalized event tracking logic can include event tracking ID, event tracking triggering path, event tracking verification rules, etc.
[0092] Optionally, the above vehicle parameters may include hybrid or pure electric, the above hardware parameters may include low-end or high-end vehicle infotainment hardware, and the above software parameters may include system version number, etc. The above general trigger parameters for embedded points may include click touch logic, input touch logic, or function status monitoring logic, etc.
[0093] Specifically, the script architecture described above can adopt a "core engine" + "configuration file" architecture. The core engine encapsulates the general trigger parameters for event tracking. The configuration file is a lightweight JSON format used to store personalized event tracking logic for specific vehicle models, vehicle infotainment system configurations, or system versions.
[0094] Optionally, the above test data may include basic information about the tracking points (such as tracking point ID, time, and value), vehicle system logs (such as CPU / memory usage data), and script execution logs (such as trigger path, time consumption parameters, and trigger success rate).
[0095] S402, determine the test results based on the test data.
[0096] The test results may include comparison results of test data based on different dimensions, reasons for test failure, or test success prompts.
[0097] Specifically, the cloud server can compare test data based on different dimensions, such as test time, vehicle model, vehicle infotainment system configuration, system version, and test environment. For example, test results can include cross-version comparisons of the success rate of event triggering for the same vehicle model but different system versions.
[0098] This application embodiment loads and executes a preset event tracking script in response to a test start command to obtain test data during the script's execution. This achieves automated testing based on the event tracking script, improving the inconsistency of event tracking data caused by different operators' habits during manual testing and increasing the reliability of the test data. On one hand, the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle terminal. This means that the event tracking script can be updated to match different vehicle models and versions, meeting the rapid iteration needs of different vehicle models. On the other hand, after the vehicle terminal obtains the test data, it sends the test data to a cloud server to obtain test results. This achieves unified collection and management of event tracking test data, eliminating the need for manual data comparison and processing, thus improving testing efficiency.
[0099] This application provides one possible implementation method, such as... Figure 5 As shown, the test results generated based on the test data include: S501, determine the test environment corresponding to the test data; classify the test data based on at least one of the test environment, vehicle parameters, hardware parameters, and software parameters, and obtain the classification result.
[0100] Specifically, the test data of the same vehicle model and terminal system software versions can be filtered and compared to obtain cross-version test data of the success rate of the test trigger.
[0101] Optionally, the system can also filter and obtain the embedded test data of in-vehicle terminals with the same vehicle configuration in the pre-production environment and the production environment to obtain a comparison of the differences in embedded data across environments.
[0102] S502, based on the classification results, performs fault analysis and obtains test results.
[0103] Specifically, the cloud server can determine the data comparison results and correlation degree of different dimensions such as test environment and vehicle parameters based on the classification results, and then perform fault analysis and location based on the above data comparison results and correlation degree to obtain test results.
[0104] In this embodiment of the application, by determining the test environment corresponding to the test data and classifying the results based on different data dimensions, the cause of the failure of the tracking point can be located through correlation analysis based on the classification results, which effectively improves the comparison accuracy and efficiency of the test data and further improves the efficiency of the tracking point test.
[0105] This application provides one possible implementation method, such as... Figure 6 As shown, the aforementioned cloud server includes multiple storage spaces; The above methods also include: S601 selects the target storage space from multiple storage spaces based on the test time corresponding to the test data.
[0106] The aforementioned storage spaces may include real-time databases, historical databases, and index databases.
[0107] S602 stores the test data in the target storage space.
[0108] Specifically, the real-time database can store the event tracking test data for the most recent hour, allowing for real-time data retrieval; the historical database can store all test data for the most recent year, enabling historical data tracing and review. The index database can create indexes for the test data based on event tracking ID, test time, and test environment, supporting fast data retrieval.
[0109] Optionally, a distributed data stream engine (Flink) can be used to classify real-time test data streams (by environment / vehicle model / version), and breakpoint resume can be achieved through Flink's fault tolerance mechanism (Checkpoint); a cloud-based layered storage system with three databases (such as Redis, HBase, and Elasticsearch) can be built; among them, Redis is used to store real-time test data for the past hour, HBase is used to store all historical test data for the past year, and Elasticsearch is used to store index retrieval, supporting cross-version / cross-environment comparative analysis and anomaly correlation location.
[0110] In this embodiment of the application, multiple storage spaces can be established to achieve hierarchical storage of data. This allows testers to quickly find test data and compare data based on the storage space where each data resides, thereby further enhancing the depth of data analysis and improving the accuracy of test results.
[0111] To better understand the above testing methods, the following will combine... Figure 7 A detailed example of a testing method of this application is provided, which includes the following steps: S701: The cloud server sends the configured real-time data tracking parameters to the vehicle terminal in an encrypted manner.
[0112] The real-time event tracking parameters can include basic information such as the event tracking strategy name, the applicable scope of the event tracking strategy (such as vehicle model, vehicle configuration and system version), and can also include a list of event tracking points to be triggered, as well as triggering parameters such as event tracking trigger order, number of retries, and timeout time.
[0113] S702: The vehicle terminal receives real-time data collection parameters and updates the local configuration file based on these parameters.
[0114] S703 generates an execution script based on the updated configuration file and general trigger parameters for the event tracking.
[0115] S704, the vehicle terminal responds to the test start command and loads the data entry script based on the preset test environment.
[0116] The testing environment can include a testing environment, a pre-production environment, and a production environment.
[0117] Optionally, the above test activation command is determined based on any of the following: (1) Generate a test start command based on the test operation received from the vehicle terminal.
[0118] (2) Generate test start command based on the test start time in the configuration file.
[0119] (3) Based on the received operation, the cloud server sends a test start command to the vehicle terminal.
[0120] Specifically, testers can remotely trigger the test start command on the cloud server to conduct remote testing.
[0121] (4) Receive the test environment switching instruction sent by the cloud server and generate a test start instruction based on the test environment switching instruction.
[0122] S705 determines multiple test points based on the test point list; triggers multiple test points sequentially based on the test point triggering order.
[0123] S706 collects test data during the execution of the event tracking script based on the test environment and sends the test data to the cloud server.
[0124] S707: The cloud server receives test data sent by the vehicle terminal and classifies the test data based on at least one of the following: test environment, vehicle model parameters, terminal hardware parameters, and terminal software parameters, to obtain the classification result.
[0125] For S708, the cloud server determines the data comparison results and correlation degree of different dimensions such as test environment and vehicle parameters based on the classification results. Based on the above data comparison results and correlation degree, fault analysis and location are carried out to obtain test results.
[0126] This application provides a testing device, such as... Figure 8 As shown, the testing device 80 may include: a determining module 801, a testing module 802, and a sending module 803; The determination module 801 is used to determine the event tracking script to be executed. The event tracking script includes a general file and a configuration file. The general file includes general event tracking trigger parameters. The configuration file includes event tracking trigger strategies that match the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. Test module 802 is used to load and execute the data tracking script in response to the test start command, and obtain test data; The sending module 803 is used to send test data to the cloud server so that the cloud server can determine the test results based on the test data.
[0127] This application embodiment provides a possible implementation method in which the determining module 801, when determining the event tracking script to be executed, is used to: Receive real-time event tracking triggering strategies; Update the configuration file based on the real-time tracking trigger strategy; The execution script is generated based on the updated configuration file and the general trigger parameters for the event tracking.
[0128] This application provides a possible implementation method, wherein the above-mentioned event triggering strategy includes an event list and an event triggering order; The aforementioned test module 802, when executing the tracking script, is used for: Multiple tracking points to be tested were identified based on the tracking point list; Multiple test points are triggered sequentially based on the trigger order of the event points.
[0129] This application embodiment provides a possible implementation method in which the above-mentioned test module 802, when triggering multiple test points sequentially based on the trigger order, is used to: For each tracking point to be tested, the tracking point is triggered according to the triggering order, and the triggering status of the tracking point is determined; the triggering status includes success status and failure status. If the trigger status is successful, then determine the tracking code, trigger time, and tracking data of the tracking point to be tested. If the trigger status is a failure status, at least one re-trigger operation will be performed until the preset stop condition is met.
[0130] This application provides a possible implementation method, wherein the above-mentioned re-triggering operation includes: Re-trigger the event tracking point under test and determine the retry trigger status of the event tracking point under test; If the retry trigger status is a failure status, then determine the number of retries for the event point to be tested; otherwise, determine the event point code, trigger time, and event point data for the event point to be tested.
[0131] This application provides a possible implementation method, wherein the above-mentioned stopping condition includes any one of the following: The number of retries exceeds the preset target number; The retry trigger status is a success status.
[0132] This application embodiment provides a possible implementation method in which the test module 802, before loading and executing the data tracking script in response to the test start command, is used to: Obtain the preset test environment; Load configuration files based on the test environment; When the aforementioned test module 802 obtains test data, it is used for: Test data is collected during the execution of the event tracking script based on the test environment.
[0133] This application provides a possible implementation method, wherein the above test activation instruction is determined based on any one of the following: Based on the test operation received from the vehicle terminal, a test start command is generated; Generate test start instructions based on the test start time in the configuration file; Based on the received operation, the cloud server sends a test start command to the vehicle terminal; Receive the test environment switching command sent by the cloud server, and generate the test start command based on the test environment switching command.
[0134] This application embodiment provides a possible implementation method in which the above-mentioned test module 802, when generating a test start command based on the test environment switching command, is used to: Generate test start command based on test environment switching command; Determine the target test environment corresponding to the test environment switching command; The aforementioned test module 802, when collecting test data during the execution of the event tracking script, is used for: Test data is collected during the execution of the event tracking script based on the target test environment.
[0135] This application provides a testing device, such as... Figure 9 As shown, the testing device 90 may include: a receiving module 901 and a generating module 902; The receiving module 901 is used to receive test data sent by the vehicle terminal; wherein, the test data is obtained by the vehicle terminal in response to the test start command, loading and executing the tracking script; the tracking script includes a general file and a configuration file; the general file includes general tracking trigger parameters; the configuration file includes tracking trigger strategies that match the vehicle model parameters, hardware parameters and software parameters of the vehicle terminal. The generation module 902 is used to generate test results based on the test data.
[0136] This application embodiment provides a possible implementation method in which the generation module 902, when generating test results based on test data, is used to: Determine the test environment corresponding to the test data; Based on at least one of the test environment, vehicle parameters, hardware parameters, and software parameters, the test data is classified to obtain the classification results. Fault analysis is performed based on the classification results to obtain test results.
[0137] This application provides a possible implementation method, wherein the cloud server includes multiple storage spaces; The above-mentioned device also includes a storage module 903, used for: Based on the test time corresponding to the test data, the target storage space is selected from multiple storage spaces; Store the test data in the target storage space.
[0138] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0139] This application embodiment loads and executes a preset event tracking script in response to a test start command to obtain test data during the script's execution. This achieves automated testing based on the event tracking script, improving the inconsistency of event tracking data caused by different operators' habits during manual testing and increasing the reliability of the test data. On one hand, the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle terminal. This means that the event tracking script can be updated to match different vehicle models and versions, meeting the rapid iteration needs of different vehicle models. On the other hand, after the vehicle terminal obtains the test data, it sends the test data to a cloud server to obtain test results. This achieves unified collection and management of event tracking test data, eliminating the need for manual data comparison and processing, thus improving testing efficiency.
[0140] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of a testing method. Compared with related technologies, this application achieves the following: By responding to a test start command, this application loads and executes a preset tracking script to obtain test data during the execution of the tracking script, realizing automated testing based on the tracking script. This improves the problem of inconsistent tracking data caused by different operators' operating habits during manual testing, increasing the reliability of test data. On the one hand, the tracking script includes a general file and a configuration file; the general file includes general tracking trigger parameters; the configuration file includes a tracking trigger strategy that matches the vehicle terminal. That is, the tracking script can be made to match different vehicle models and versions by updating the configuration file, meeting the rapid iteration needs of different vehicle models. On the other hand, after the vehicle terminal obtains the test data, it sends the test data to the cloud server to obtain the test results based on the cloud server, realizing unified collection and management of tracking test data, eliminating the need for manual data comparison and data processing, and improving testing efficiency.
[0141] In one alternative embodiment, an electronic device is provided, such as Figure 10 As shown, Figure 10 The illustrated electronic device 100 includes a processor 1001 and a memory 1003. The processor 1001 and the memory 1003 are connected, for example, via a bus 1002. Optionally, the electronic device 100 may further include a transceiver 1004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 1004 is not limited to one type, and the structure of the electronic device 100 does not constitute a limitation on the embodiments of this application.
[0142] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 1001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0143] Bus 1002 may include a pathway for transmitting information between the aforementioned components. Bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 1002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0144] The memory 1003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0145] The memory 1003 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 1001. The processor 1001 is used to execute the computer programs stored in the memory 1003 to implement the steps shown in the foregoing method embodiments.
[0146] Electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, and tablets, as well as fixed terminals such as digital TVs and desktop computers.
[0147] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method shown in the first aspect of this application.
[0148] The above description does not provide detailed technical specifications regarding the structure of each layer. However, those skilled in the art should understand that layers and regions of desired shapes can be formed using various technical means. Furthermore, to form the same structure, those skilled in the art can also design methods that are not entirely identical to those described above. Additionally, although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be advantageously combined.
[0149] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0150] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A testing method, characterized in that, Applications in vehicle-mounted terminals include: The execution of the event tracking script is determined; wherein the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. In response to the test start command, the data tracking script is loaded and executed to obtain test data; The test data is sent to the cloud server so that the cloud server can determine the test results based on the test data.
2. The method according to claim 1, characterized in that, The process of determining the event tracking script to be executed includes: Receive real-time event tracking triggering strategies; The configuration file is updated based on the real-time event tracking strategy; The execution script for the event tracking point is generated based on the updated configuration file and the general trigger parameters for the tracking point.
3. The method according to claim 1, characterized in that, The event tracking strategy includes an event tracking list and an event tracking order. The execution of the event tracking script includes: Based on the aforementioned list of embedded points, multiple embedded points to be tested are identified; The multiple test points are triggered sequentially based on the aforementioned trigger order.
4. The method according to claim 3, characterized in that, The process of sequentially triggering the plurality of data points to be tested based on the data point triggering order includes: For each data point to be tested, the data point is triggered according to the triggering sequence, and the triggering state of the data point is determined; wherein, the triggering state includes a success state and a failure state; If the triggering status is successful, then the tracking code, triggering time, and tracking data of the tracking point to be tested are determined. If the triggering state is a failure state, then at least one re-triggering operation is performed until the preset stopping condition is met.
5. The method according to claim 4, characterized in that, The re-triggering operation includes: Re-trigger the data point under test and determine the retry trigger status of the data point under test; If the retry trigger status is a failure status, then the number of retries for the test point is determined; otherwise, the test point code, trigger time, and test point data are determined.
6. The method according to claim 5, characterized in that, The stopping condition includes any of the following: The number of retries is greater than the preset target number; The retry trigger status is a success status.
7. The method according to claim 1, characterized in that, Before loading and executing the data tracking script in response to the test start command, the process includes: Obtain the preset test environment; The configuration file is loaded based on the test environment. The obtained test data includes: Test data was collected during the execution of the event tracking script based on the test environment.
8. The method according to claim 7, characterized in that, The test activation command is determined based on any of the following: Based on the received test operation from the vehicle terminal, a test start command is generated; Based on the test start time in the configuration file, a test start command is generated; Based on the received operation, the cloud server sends a test start command to the vehicle terminal; Receive the test environment switching instruction sent by the cloud server, and generate a test start instruction based on the test environment switching instruction.
9. The method according to claim 8, characterized in that, The generation of the test start command based on the test environment switching command includes: A test start command is generated based on the test environment switching command; Determine the target test environment corresponding to the test environment switching command; The collection of test data during the execution of the event tracking script includes: The test data of the instrumentation script during execution is collected based on the target test environment.
10. A testing method, characterized in that, Applications on cloud servers include: The system receives test data sent by an in-vehicle terminal; wherein the test data is obtained by the in-vehicle terminal in response to a test start command, by loading and executing a data tracking script; the data tracking script includes a general file and a configuration file; the general file includes general data tracking trigger parameters; the configuration file includes a data tracking trigger strategy that matches the vehicle model parameters, hardware parameters, and software parameters of the in-vehicle terminal. The test results are determined based on the test data.
11. The method according to claim 10, characterized in that, The generation of test results based on the test data includes: Determine the test environment corresponding to the test data; Based on at least one of the test environment, vehicle parameters, hardware parameters, and software parameters, the test data is classified to obtain a classification result. Based on the classification results, fault analysis is performed to obtain test results.
12. The method according to claim 10, characterized in that, The cloud server includes multiple storage spaces; The method further includes: Based on the test time corresponding to the test data, a target storage space is selected from the plurality of storage spaces; The test data is stored in the target storage space.
13. A testing device, characterized in that, The device, applied to an in-vehicle terminal, includes: A determination module is used to determine the event tracking script to be executed; wherein, the event tracking script includes a general file and a configuration file; the general file includes general event tracking trigger parameters; the configuration file includes event tracking trigger strategies that match the vehicle model parameters, hardware parameters, and software parameters of the vehicle terminal. The testing module is used to load and execute the data tracking script in response to the test start command, and obtain test data; The sending module is used to send the test data to the cloud server so that the cloud server can determine the test result based on the test data.
14. A testing apparatus, characterized in that, The device, applied to a cloud server, includes: A receiving module is used to receive test data sent by an in-vehicle terminal; wherein the test data is obtained by the in-vehicle terminal loading and executing a data tracking script in response to a test start command; the data tracking script includes a general file and a configuration file; the general file includes general data tracking trigger parameters; the configuration file includes a data tracking trigger strategy that matches the vehicle model parameters, hardware parameters, and software parameters of the in-vehicle terminal. The generation module is used to generate test results based on the test data.