Testing method, device, electronic device and storage medium for health management function

By building and configuring health management functions through automated test scripts, the problems of low code coverage and poor user experience caused by strong manual operation in existing technologies are solved, efficient testing and code file detection are achieved, and the automation level of vehicle functions is improved.

CN115543839BActive Publication Date: 2025-09-16CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211311841.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2025-09-16
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

The existing technology has problems in the PHM functional testing of the vehicle SOA service management platform, such as strong manual operation, low code coverage, long testing time, poor scenario diversity, and poor user experience.

Method used

Build multiple target applications through automated test scripts, configure health management functions on the applications, use preset loop strategies and monitoring conditions for testing, automatically download and detect code file formats, and generate log files to locate errors.

Benefits of technology

It realizes the automated testing of health management functions, improves code coverage, shortens testing time, increases scenario diversity and user experience, and improves the automation level of vehicle functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543839B_ABST
    Figure CN115543839B_ABST
Patent Text Reader

Abstract

The present application relates to the field of vehicle testing technology, and in particular to a testing method, device, electronic device and storage medium for a health management function, wherein the method comprises: obtaining a test request for the health management function of a service management platform; starting a test script according to the test request, using the test script to build multiple target applications, and configuring the health management function on the multiple target applications, and testing the health management function after the configuration is completed, and outputting the test results; if the output test result is a preset successful execution result, and the code file format generated based on the test result is correct, then the health management function test is determined to be qualified, otherwise the health management function test is determined to be unqualified. Thus, the problems in the related art of strong manual operation during health management function testing, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle testing technology, and in particular to a testing method, device, electronic device, and storage medium for health management functions. Background Art

[0002] With the continuous development of the automotive industry, the intelligence level of vehicles is constantly improving. In the field of automotive software, the PHM (Platform Health Management) functional testing of the vehicle-side SOA (Service-Oriented Architecture) service management platform is becoming increasingly important. PHM platform health management can monitor the execution of adaptive applications, provide monitoring functions, evaluate monitoring results, trigger corresponding actions, and affect the user experience.

[0003] In related technologies, when testing the PHM function of the vehicle-side SOA service management platform, the following problems exist:

[0004] 1. It requires manual construction of input and output parameters, methods, services, and applications;

[0005] 2. Manually construct a large number of checkpoints and monitoring methods;

[0006] 3. Manually configure expression input and execution action output for various logical calculations;

[0007] 4. You need to manually download the code and check the file in XML (Extensible Markup Language) format.

[0008] Due to the existence of the above problems, existing testing technologies have shortcomings such as low code coverage, low efficiency, insufficient scenario coverage, and poor user experience during testing. Summary of the Invention

[0009] The present application provides a testing method, device, electronic device and storage medium for health management functions to solve the problems in related technologies such as strong manual operation in health management function testing, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0010] The first aspect of the present application provides a method for testing a health management function, comprising the following steps: obtaining a test request for the health management function of a service management platform; starting a test script according to the test request, using the test script to build multiple target applications, and configuring the health management function on the multiple target applications, and testing the health management function after the configuration is completed, and outputting the test results; if the output result is a preset successful execution result, and the code file format generated based on the test result is detected to be correct, then the health management function test is determined to be qualified, otherwise the health management function test is determined to be unqualified.

[0011] According to the above-mentioned technical means, the embodiment of the present application can use test scripts to realize automated testing of health management functions, and realize automatic downloading and detection of code files, without the need for manual testing and manual downloading and detection of code files, thereby improving the efficiency and accuracy of testing, thereby solving the problems in related technologies such as strong manual operation when testing health management functions, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0012] Optionally, in one embodiment of the present application, constructing multiple target applications using the test script includes: constructing multiple preset data and multiple preset data types; combining the multiple preset data and multiple preset data types through a preset loop strategy to obtain multiple input parameters and output parameters; and constructing multiple target applications based on the multiple input parameters and output parameters.

[0013] According to the above-mentioned technical means, the embodiment of the present application can combine the constructed preset data and preset data types through a preset loop strategy to obtain input parameters and output parameters, and then construct a target application, thereby avoiding the tediousness of manually constructing parameters and target applications, shortening the construction time, and improving the automation level of vehicle functions.

[0014] Optionally, in one embodiment of the present application, configuring the health management function on the multiple target applications includes: configuring n checkpoints on each target application, where n is a configurable parameter of the test script, and different values ​​of n satisfy different test scenarios; configuring the monitoring mode as active monitoring, deadline monitoring, logical monitoring, local monitoring and global monitoring according to the n checkpoints and preset monitoring conditions, and performing monitoring tests using the configured monitoring mode to obtain monitoring results; configuring a preset health status report, and using the preset health status report and the monitoring results as parameters to perform one or more logical operations to obtain operation results; combining different operation results and different preset execution lists to form management rules for the health management function.

[0015] According to the above technical means, the embodiment of the present application can configure n checkpoints for the target application, where different values ​​of n satisfy different test scenarios, and use n checkpoints and preset monitoring conditions to configure different monitoring methods, and perform monitoring tests to obtain monitoring results. Then, logical operations are performed on the preset health status report and the monitoring results to obtain the operation results. Finally, the operation results and the preset execution list are combined to form management rules, thereby avoiding the tediousness of manually constructing management rules, shortening the time for configuring health management functions, increasing the diversity of scenarios, and improving the automation level of vehicle functions and user experience.

[0016] Optionally, in one embodiment of the present application, the detection is based on the correct format of the code file generated by the test result, and also includes: recording the first application information and first configuration information when the output test result is a preset successful execution result; using the test script to download the code file, and extracting the second application information and second configuration information from the code file; comparing the first application information and the first configuration information with the second application information and the second configuration information to see whether they correspond to each other. If the application information and the configuration information are consistent, the code file format is determined to be correct; otherwise, the code file format is determined to be incorrect.

[0017] According to the above technical means, the embodiment of the present application can determine the correctness of the code file format by comparing whether the first application information and the first configuration information when the output test result is a preset successful execution result are consistent with the second application information and the second configuration information extracted from the code file downloaded using the test script, thereby avoiding the complexity of manually downloading the code file and detecting it, shortening the time for detecting the code file format, and improving the code coverage of the test.

[0018] Optionally, in one embodiment of the present application, after determining that the health management function test is unqualified, it also includes: generating a log file based on the execution error data, so as to locate the error position using the execution error data in the log file.

[0019] According to the above technical means, the embodiment of the present application can locate the error location by executing erroneous data, thereby facilitating users' understanding and improvement of health management functions and improving the efficiency of subsequent improvements to health management functions.

[0020] The second aspect of the present application provides a testing device for a health management function, including: an acquisition module for obtaining a test request for the health management function of a service management platform; a testing module for starting a test script according to the test request, using the test script to build multiple target applications, and configuring the health management function on the multiple target applications, and testing the health management function after the configuration is completed, and outputting the test results; a judgment module for judging that the health management function test is qualified if the output result is a preset successful execution result and the code file format generated based on the test result is correct, otherwise judging that the health management function test is unqualified.

[0021] Optionally, in one embodiment of the present application, the test module is further used to: construct multiple preset data and multiple preset data types; combine the multiple preset data and multiple preset data types through a preset loop strategy to obtain multiple input parameters and output references; construct multiple target applications based on the multiple input parameters and output references; the test module is further used to: configure n checkpoints on each target application, where n is a configurable parameter of the test script, and different values ​​of n satisfy different test scenarios; according to the n checkpoints and preset monitoring conditions, configure the monitoring mode as active monitoring, deadline monitoring, logical monitoring, local monitoring and global monitoring, and use the configured monitoring mode to perform monitoring testing to obtain monitoring results; configure a preset health status report, and use the preset health status report and the monitoring results as parameters to perform one or more logical operations to obtain operation results; combine different operation results and different preset execution lists to form management rules for the health management function.

[0022] Optionally, in one embodiment of the present application, the determination module is further used to: record the first application information and the first configuration information when the output result is a preset successful execution result; use the test script to download the code file, and extract the second application information and the second configuration information from the code file; compare the first application information and the second configuration information with the second application information and the second configuration information to see whether they correspond to each other. If the application information and the configuration information are consistent, the code file format is determined to be correct; otherwise, the code file format is determined to be incorrect.

[0023] Optionally, in one embodiment of the present application, the determination module may also be used to: after determining that the health management function test is unqualified, generate a log file based on the execution error data, so as to locate the error position using the execution error data in the log file.

[0024] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the testing method for the health management function as described in the above embodiment.

[0025] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the testing method of the health management function as described in the above embodiment.

[0026] Therefore, this application has at least the following beneficial effects:

[0027] 1. The embodiments of the present application can use test scripts to realize automated testing of health management functions and realize automatic downloading and detection of code files, without manual testing and manual downloading and detection of code files, thereby improving the efficiency and accuracy of testing, thereby solving the problems in related technologies such as strong manual operation in health management function testing, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0028] 2. The embodiment of the present application can combine the constructed preset data and preset data types through a preset loop strategy to obtain input parameters and output parameters, and then construct a target application, thereby avoiding the tediousness of manually constructing parameters and target applications, shortening the construction time, and improving the automation level of vehicle functions.

[0029] 3. The embodiment of the present application can configure n checkpoints for the target application, where different values ​​of n satisfy different test scenarios. Different monitoring methods are configured using n checkpoints and preset monitoring conditions, and monitoring tests are performed to obtain monitoring results. Then, logical operations are performed on the preset health status report and the monitoring results to obtain the operation results. Finally, the operation results and the preset execution list are combined to form management rules, thereby avoiding the tediousness of manually constructing management rules, shortening the time for configuring health management functions, increasing the diversity of scenarios, and improving the automation level of vehicle functions and user experience.

[0030] 4. The embodiment of the present application can determine the correctness of the code file format by comparing whether the first application information and the first configuration information when the output test result is a preset successful execution result are consistent with the second application information and the second configuration information extracted from the code file downloaded using the test script, thereby avoiding the complexity of manually downloading the code file and detecting it, shortening the time for detecting the code file format, and improving the code coverage of the test.

[0031] 5. The embodiment of the present application can locate the error location by executing error data, thereby facilitating users' understanding and improvement of health management functions and improving the efficiency of subsequent improvements to health management functions.

[0032] This solves the technical problems in related technologies such as strong manual operation when testing health management functions, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0033] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0035] Figure 1 This is a flowchart of a method for testing a health management function according to an embodiment of the present application;

[0036] Figure 2 A specific flow chart of an automated testing method for a health management function provided according to an embodiment of the present application;

[0037] Figure 3 This is an example diagram of a testing device for a health management function provided according to an embodiment of the present application;

[0038] Figure 4 The figure is a schematic structural diagram of an electronic device provided according to an embodiment of the present application.

[0039] Description of reference numerals: acquisition module-100, testing module-200, determination module-300, memory-401, processor-402, communication interface-403. DETAILED DESCRIPTION

[0040] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0041] The following describes the testing method, device, electronic device and storage medium of the health management function of the embodiment of the present application with reference to the accompanying drawings. In response to the problems mentioned in the above background technology, the present application provides a testing method for the health management function, in which a test request for the health management function of the service management platform is obtained, a test script is started according to the test request, multiple target applications are constructed using the test script, and the health management function is configured on the multiple target applications. After the configuration is completed, the health management function is tested and the test results are output. If the output test result is a preset successful execution result, and the code file format generated based on the test result is correct, the health management function test is determined to be qualified, otherwise the health management function test is determined to be unqualified. As a result, the problems of strong manual operation in the health management function test in the related technology are solved, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0042] Specifically, Figure 1 A flowchart of a method for testing a health management function provided in an embodiment of the present application.

[0043] like Figure 1 As shown, the testing method of the health management function includes the following steps:

[0044] In step S101 , a test request for the health management function of the service management platform is obtained.

[0045] There are many ways to obtain test requests, such as obtaining test requests through human-computer interaction through human-computer interaction interfaces such as the vehicle's central control display screen, and obtaining communication requests through human-computer dialogue through in-vehicle intelligent voice, etc., without specific limitations.

[0046] It is understandable that a test request needs to be obtained before the test of the vehicle's health management function is started, which avoids problems such as vehicle function abnormalities that may be caused by arbitrarily starting the test, and ensures the safety of vehicle driving.

[0047] In step S102, a test script is started according to a test request, multiple target applications are constructed using the test script, and health management functions are configured on the multiple target applications. After the configuration is completed, the health management functions are tested and the test results are output.

[0048] The script may be a program saved in plain text, and the target application may be an MCU or MPU application.

[0049] It can be understood that the system starts the test script according to the test request, uses the test script to automatically build the target application, configures the health management function, completes the test, and outputs the test results, thereby avoiding the tediousness of manually building the target application, shortening the test time, and improving the automation level of vehicle functions.

[0050] Optionally, in one embodiment of the present application, multiple target applications are constructed using a test script, including: constructing multiple preset data and multiple preset data types; combining multiple preset data and multiple preset data types through a preset loop strategy to obtain multiple input parameters and output parameters; and constructing multiple target applications based on the multiple input parameters and output parameters.

[0051] Among them, the preset data includes int8, uint8, int16, uint16, bool, String, etc., the preset data types include Array, Struct and Enumeration, etc., and the preset loop strategy can be a manually preset loop method, which is set according to the specific situation and is not specifically restricted.

[0052] It can be understood that the embodiments of the present application can combine the constructed preset data and preset data types through a preset loop strategy to obtain input parameters and output parameters, and then construct a target application, thereby avoiding the tediousness of manually constructing parameters and target applications, shortening the construction time, and improving the automation level of vehicle functions.

[0053] Optionally, in one embodiment of the present application, a health management function is configured on multiple target applications, including: configuring n checkpoints on each target application, where n is a configurable parameter of the test script, and different values ​​of n satisfy different test scenarios; configuring the monitoring mode as active monitoring, deadline monitoring, logical monitoring, local monitoring, and global monitoring according to the n checkpoints and preset monitoring conditions, and performing monitoring tests using the configured monitoring mode to obtain monitoring results; configuring a preset health status report, and using the preset health status report and the monitoring results as parameters to perform one or more logical operations to obtain operation results; combining different operation results and different preset execution lists to form management rules for the health management function.

[0054] Among them, the preset monitoring conditions are monitoring conditions set manually in advance, which can be time status, active status, logical status, location status, global status, etc.

[0055] The preset health status report is a reporting mode that is manually preset and can be a healthy or unhealthy status report. Those skilled in the art can set it according to specific circumstances and it is not specifically limited.

[0056] It is understandable that the embodiments of the present application can configure n checkpoints for the target application, with different values ​​of n satisfying different test scenarios. Using n checkpoints and preset monitoring conditions, different monitoring methods can be configured, and monitoring tests can be performed to obtain monitoring results. Then, logical operations can be performed on the preset health status report and monitoring results to obtain the operation results. Finally, the operation results and the preset execution list can be combined to form management rules. This avoids the tedious manual construction of management rules, shortens the time to configure health management functions, increases the diversity of scenarios, and improves the automation level of vehicle functions and the user experience.

[0057] In step S103, if the output test result is a preset successful execution result, and the code file format generated based on the test result is detected to be correct, the health management function test is determined to be qualified, otherwise the health management function test is determined to be unqualified.

[0058] The preset successful execution result is a result preset manually. The code file is a program file compiled in a computer language.

[0059] It can be understood that after the embodiment of the present application undergoes automated testing of the health management function, if the test result is the same as the preset successful execution result and the code file format is correct, the test is judged to be qualified, otherwise the test fails, thereby not only realizing automatic downloading and detection of the code file format, but also realizing automated testing.

[0060] Optionally, in one embodiment of the present application, detecting whether the format of the code file generated based on the test result is correct also includes: recording the first application information and the first configuration information when the output test result is a preset successful execution result; using the test script to download the code file, and extracting the second application information and the second configuration information from the code file; comparing the first application information and the first configuration information with the second application information and the second configuration information to see whether they correspond to each other. If the application information and the configuration information are consistent, the code file format is determined to be correct; otherwise, the code file format is determined to be incorrect.

[0061] The first application information, the first configuration information, the second application information, and the second configuration information are all artificially set names, and are only used for distinction.

[0062] It can be understood that the correctness of the code file format is determined by comparing whether the first application information and the first configuration information when the output test result is a preset successful execution result are consistent with the second application information and the second configuration information extracted from the code file downloaded using the test script, thereby avoiding the complexity of manually downloading the code file and detecting it, shortening the time for detecting the code file format, and improving the code coverage of the test.

[0063] Optionally, in one embodiment of the present application, after determining that the health management function test is unqualified, it also includes: generating a log file based on the execution error data, so as to locate the error position by using the execution error data in the log file.

[0064] It can be understood that the embodiments of the present application can locate the error location by executing error data, thereby facilitating users' understanding and improvement of health management functions and improving the efficiency of subsequent improvements to health management functions.

[0065] According to the testing method of the health management function proposed in the embodiment of the present application, by obtaining the test request of the health management function of the service management platform, starting the test script according to the test request, using the test script to build multiple target applications, and configuring the health management function on multiple target applications, and testing the health management function after the configuration is completed, the test result is output. If the output test result is a preset successful execution result, and the code file format generated based on the test result is correct, then the health management function test is determined to be qualified, otherwise the health management function test is determined to be unqualified. This solves the problems in the related art of strong manual operation during health management function testing, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0066] Below through Figure 2 Further details on the testing methods for health management functions are provided, such as Figure 2 As shown, the specific process of the automated testing method is as follows:

[0067] Step 1. Create custom basic data and custom data types in the script. Custom basic data include int8, uint8, int16, uint16, bool, and String, and custom data types include Array, Struct, and Enumeration.

[0068] Step 2: Automatically build the service: Combine the data types defined in step 1 in a loop as input and output parameters of the service method;

[0069] Step 3. The script builds services of different service methods into MCU or MPU applications;

[0070] Step 4: Configure n checkpoints on the application. n is a configurable parameter of the script. Different values ​​of n can meet different test scenarios.

[0071] Step 5. Enter checkpoints and monitoring conditions, and configure them as active monitoring, deadline monitoring, logical monitoring, local monitoring, and global monitoring.

[0072] Step 6. After configuring the health status report, use the health status report and the monitoring results in step 5 as parameters and use the three calculation methods "AND", "OR" and "NOT" to form a logical expression;

[0073] Step 7: The script combines different logical expressions with different execution lists and configures them all into rule management;

[0074] Step 8. The script compares the executed configuration items with the configuration of the platform after execution, records the comparison results in the test result file, and records the operation log at the same time;

[0075] Step 9: Download the code file and extract the application and PHM information from the Neusar.xml file.

[0076] Step 10: Compare the extracted information with the information automatically configured by the script on the platform in steps 1-7, and automatically analyze the results.

[0077] This solves the problems in related technologies such as strong manual operation in health management function testing, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0078] Next, a testing device for the health management function proposed in an embodiment of the present application will be described with reference to the accompanying drawings.

[0079] Figure 3 This is a block diagram of a testing device for a health management function provided according to an embodiment of the present application.

[0080] like Figure 3 As shown, the health management function testing device 10 includes: an acquisition module 100 , a testing module 200 , and a determination module 300 .

[0081] Among them, the acquisition module 100 is used to obtain a test request for the health management function of the service management platform; the test module 200 is used to start the test script according to the test request, use the test script to build multiple target applications, and configure the health management function on multiple target applications, and test the health management function after the configuration is completed, and output the test results; the judgment module 300 is used to judge that the health management function test is qualified if the output result is a preset execution success result and the code file format generated based on the test result is correct, otherwise the health management function test is judged to be unqualified.

[0082] In one embodiment of the present application, the test module 200 is further used to: construct multiple preset data and multiple preset data types; combine multiple preset data and multiple preset data types through a preset loop strategy to obtain multiple input parameters and output references; construct multiple target applications based on multiple input parameters and output references; the test module 200 is further used to: configure n checkpoints on each target application, where n is a configurable parameter of the test script, and different values ​​of n satisfy different test scenarios; configure the monitoring mode as active monitoring, deadline monitoring, logical monitoring, local monitoring and global monitoring according to the n checkpoints and preset monitoring conditions, and use the configured monitoring mode to perform monitoring testing to obtain monitoring results; configure a preset health status report, and use the preset health status report and monitoring results as parameters to perform one or more logical operations to obtain operation results; combine different operation results and different preset execution lists to form management rules for the health management function.

[0083] In one embodiment of the present application, the determination module 300 is further used to: record the first application information and the first configuration information when the output result is a preset successful execution result; use the test script to download the code file, and extract the second application information and the second configuration information from the code file; compare the first application information and the second configuration information with the second application information and the second configuration information to see whether they correspond to each other. If the application information and the configuration information are consistent, the code file format is determined to be correct; otherwise, the code file format is determined to be incorrect.

[0084] In one embodiment of the present application, the determination module 300 may also be used to: after determining that the health management function test fails, generate a log file based on the execution error data, so as to locate the error position using the execution error data in the log file.

[0085] It should be noted that the above explanation of the embodiment of the testing method for the health management function is also applicable to the testing device for the health management function of this embodiment, and will not be repeated here.

[0086] According to the testing device for the health management function proposed in the embodiment of the present application, by obtaining a test request for the health management function of the service management platform, a test script is started according to the test request, multiple target applications are constructed using the test script, and the health management function is configured on the multiple target applications. After the configuration is completed, the health management function is tested and the test results are output. If the output test result is a preset successful execution result and the code file format generated based on the test result is correct, the health management function test is determined to be qualified, otherwise the health management function test is determined to be unqualified. This solves the problems in the related art of strong manual operation during health management function testing, resulting in low code coverage, long testing time, poor scenario diversity, and poor user experience.

[0087] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0088] Memory 401 , processor 402 , and computer programs stored in the memory 401 and executable on the processor 402 .

[0089] When the processor 402 executes the program, the testing method of the health management function provided in the above embodiment is implemented.

[0090] Furthermore, the electronic device further includes:

[0091] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0092] The memory 401 is used to store computer programs that can be run on the processor 402 .

[0093] The memory 401 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0094] If the memory 401, the processor 402, and the communication interface 403 are implemented independently, the communication interface 403, the memory 401, and the processor 402 can be connected to each other via a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0095] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0096] The processor 402 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0097] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned testing method for the health management function.

[0098] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0099] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "N" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0100] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0101] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiment, the N steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0102] Those skilled in the art will appreciate that all or part of the steps in the method for implementing the above-mentioned embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0103] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for testing a health management function, characterized in that: The following steps are involved: Get a test request for the health management function of the service management platform; Initiate a test script according to the test request, build multiple target applications using the test script, configure the health management function on the multiple target applications, test the health management function after the configuration is complete, and output the test results; If the output test result is a preset successful execution result, and the code file format generated based on the test result is detected to be correct, then the health management function test is determined to be qualified; otherwise, the health management function test is determined to be unqualified; The method of constructing multiple target applications using the test scripts includes: Construct multiple preset data and multiple preset data types; Combining the plurality of preset data and the plurality of preset data types through a preset loop strategy to obtain a plurality of input parameters and output parameters; Constructing a plurality of target applications according to the plurality of input parameters and output parameters; Configuring the health management function on the multiple target applications includes: Configure n checkpoints on each target application, where n is a configurable parameter of the test script, and different values ​​of n satisfy different test scenarios; According to the n checkpoints and preset monitoring conditions, the monitoring mode is configured as active monitoring, deadline monitoring, logical monitoring, local monitoring, and global monitoring, and a monitoring test is performed using the configured monitoring mode to obtain a monitoring result; Configuring a preset health status report, and performing one or more logical operations using the preset health status report and the monitoring result as parameters to obtain an operation result; Different calculation results and different preset execution lists are combined to form management rules for the health management function.

2. The method according to claim 1, characterized in that The checking that the format of the code file generated based on the test result is correct also includes: Recording the first application information and the first configuration information when the output test result is a preset successful execution result; Downloading a code file using the test script, and extracting second application information and second configuration information from the code file; Compare the first application information and the first configuration information with the second application information and the second configuration information to see if they correspond to each other. If the application information and the configuration information are consistent, determine that the code file format is correct; otherwise, determine that the code file format is incorrect.

3. The method according to any one of claims 1-2, characterized in that After determining that the health management function test fails, the method further includes: A log file is generated according to the execution error data, so as to locate the error position by using the execution error data in the log file.

4. A testing device for health management function, characterized in that: include: The acquisition module is used to obtain test requests for the health management function of the service management platform; a testing module, configured to launch a test script according to the test request, construct multiple target applications using the test script, configure the health management function on the multiple target applications, test the health management function after the configuration is completed, and output the test results; a determination module, configured to determine that the health management function test is qualified if the output result is a preset successful execution result and the format of the code file generated based on the test result is correct, and otherwise determine that the health management function test is unqualified; The test module is further configured to: Construct multiple preset data and multiple preset data types; Combining the plurality of preset data and the plurality of preset data types through a preset loop strategy to obtain a plurality of input parameters and an output reference; Constructing and obtaining a plurality of target applications according to the plurality of input parameters and output references; The test module is further configured to: Configure n checkpoints on each target application, where n is a configurable parameter of the test script, and different values ​​of n satisfy different test scenarios; According to the n checkpoints and preset monitoring conditions, the monitoring mode is configured as active monitoring, deadline monitoring, logical monitoring, local monitoring, and global monitoring, and a monitoring test is performed using the configured monitoring mode to obtain a monitoring result; Configuring a preset health status report, and performing one or more logical operations using the preset health status report and the monitoring result as parameters to obtain an operation result; Different calculation results and different preset execution lists are combined to form management rules for the health management function.

5. The device according to claim 4, characterized in that The determination module is further configured to: Recording the first application information and the first configuration information when the output result is a preset successful execution result; Downloading a code file using the test script, and extracting second application information and second configuration information from the code file; Compare the first application information and the second configuration information with the second application information and the second configuration information to see if they correspond to each other. If the application information and the configuration information are consistent, determine that the code file format is correct; otherwise, determine that the code file format is incorrect.

6. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for testing the health management function as described in any one of claims 1 to 3.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the testing method for the health management function as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Vehicle with health-based active self-testing method

    CN109624879A

  • AADL-based IMA system health monitoring test method

    CN112115022A