Implementation method based on automatic semi-test
By adopting an automated semi-test method in battery management system testing, combining automation tools and manual operations, the problem that existing automated testing methods are difficult to replace manual judgment in complex test scenarios is solved, and efficient and accurate test results are achieved. And improve the adaptability and efficiency of the test.
Patent Information
- Application Number
- CN202411287412.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-02-11
AI Technical Summary
When facing complex battery management system testing scenarios, existing automated testing methods are difficult to completely replace manual empirical judgments, and the testing environment is time-consuming and resource-intensive, and lack flexibility.
Adopt the implementation method based on automation semi-testing, determine the testing requirements through demand analysis, select suitable automation testing tools and platforms, develop test cases covering functions, performance and safety tests, and build a matching test environment. Execute automated test cases and monitor in real time, collect and analyze test data. Introduce manual intervention when needed, adopt semi-automatic testing methods, combining automated tools and manual operations.
Accelerate the testing process, ensure the accuracy and completeness of test results, support flexible configuration of the test environment, improve the adaptability and efficiency of the test, significantly improve the coverage and efficiency of the test, and ensure the quality of the test.
Smart Images

Figure CN119415418A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of battery management, and in particular relates to a method for implementing semi-automatic testing. Background Art
[0002] With the development of battery management system (BMS) technology, its complexity continues to increase, which puts higher requirements on testing. Traditional manual testing methods can no longer meet the needs of rapid iteration of modern BMS, especially when faced with a large number of functional tests, performance evaluations, and safety verifications. Therefore, it is necessary to develop an implementation method based on automated semi-automatic testing, which aims to improve test efficiency through automated tools while retaining the flexibility of manual intervention to cope with complex and diverse testing needs.
[0003] Although existing automated testing methods have improved testing efficiency, they still have limitations when faced with some complex test scenarios that require in-depth understanding and judgment. Especially in battery management systems, some test scenarios require a high degree of expertise to evaluate test results, and automated tools often cannot completely replace manual experience and judgment. In addition, setting up the test environment is often time-consuming and resource-intensive, and lacks flexibility. Summary of the invention
[0004] The purpose of the present invention is to provide a method based on automated semi-testing implementation, which can not only speed up the testing process, but also introduce manual judgment when necessary to ensure the accuracy and completeness of the test results, so as to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention adopts the following technical solution: a method based on automated semi-testing, comprising the following steps:
[0006] Conduct a requirements analysis to determine the test requirements of the system under test, which at least include requirements in terms of function, performance and reliability; select automated testing tools and platforms based on the determined test requirements, and the tools must adapt to the characteristics of the system under test. Use the selected automated testing tools to develop test cases covering function, performance and security testing; For the developed test cases, build a test environment that meets the characteristics of the system under test, including hardware configuration, network environment and preparation of simulators or emulators, execute the prepared automated test cases, and perform automated tests in multiple aspects such as functional verification and performance testing on the system under test; During the test process, monitor the test execution in real time, collect test data and use data analysis technology to analyze the results. For the identified test scenarios that require manual intervention, use semi-automatic testing methods that combine automated testing tools with manual operations; Based on the test results, generate a detailed test report, which should reflect the scope of test coverage, test results, problems found and improvement suggestions; Improve the test cases, test environment and test methods based on the problems and suggestions raised in the test report.
[0007] Preferably, the demand analysis includes: identifying the functional modules of the system under test, the functional modules covering the core operations of the system and its interactive interfaces; determining the performance indicators and reliability standards of each module based on the identified functional modules, the performance indicators including response time and throughput; formulating a comprehensive test plan in combination with the performance indicators and reliability standards, the test plan records and verifies the performance and reliability of the functional modules, including the design of the test scenarios, expected results and evaluation criteria.
[0008] Preferably, the selection of automated testing tools and platforms includes: analyzing the characteristics of the system under test according to the test requirements, including but not limited to the type of system under test, the required test type and the requirements of the test environment; selecting automated testing tools that can support the required test type based on the analyzed system characteristics; and determining the test platform based on the selected test tool to ensure that the platform can support the operation of the selected tool.
[0009] Preferably, the development of test cases covering functional, performance and security testing includes: designing and writing test cases based on the selected automated testing tool, covering the functional, performance and security testing requirements of the system under test; then refining the specific steps of the test cases, defining test data input, expected results and conditions for test execution; using the defined test cases, developing test scripts, and realizing automatic execution of the test cases through the automated testing tool.
[0010] Preferably, the building of a test environment that meets the characteristics of the system under test includes: analyzing the hardware environment configuration required for the system under test according to the test case, and setting up a corresponding network environment based on the hardware configuration; based on the established network environment, preparing a simulator or emulator to simulate the operating conditions of the system under test in the actual environment.
[0011] Preferably, the execution of the prepared automated test cases includes: starting the constructed test environment, confirming that all necessary hardware configurations, network environments, and simulators or emulators are in an available state; in the confirmed test environment, running the automated test tool, and loading the prepared automated test cases, and starting to perform functional verification and performance testing; monitoring the execution of the test cases, and collecting data generated during the test process.
[0012] Preferably, the collection of test data and analysis of results using data analysis techniques include: implementing real-time monitoring of test execution and analyzing the collected test data, including but not limited to performance parameters and signal strength, to verify the expected behavior of the system under test; based on the data analysis results, evaluating the performance and stability of the system under test, and recording the analysis results as a reference for subsequent test optimization.
[0013] Preferably, the combination of automated testing tools and manual operations includes: based on data analysis results, identifying test scenarios that are not fully covered by automated testing or require human experience and judgment; in the identified test scenarios, designing and implementing semi-automatic testing processes that combine automated testing tools with manual operations; through human-computer collaborative testing, improving the flexibility and controllability of the testing process, ensuring that testing tasks can be effectively completed when automated testing cannot be completed alone.
[0014] Preferably, the generating of a detailed test report includes: collecting and organizing all test result data obtained from semi-automatic testing, including test coverage, specific test results, and problems found; preparing a detailed test report based on the collected data, ensuring that the report clearly reflects all aspects of test coverage, specific test results, and problems found during the testing process.
[0015] Preferably, the issues and suggestions raised in the test report include: analyzing the issues raised in the test report and identifying deficiencies in the test cases, including insufficient test coverage and missing test scenarios; optimizing the test cases based on the analysis results, supplementing and improving the test scenarios, and ensuring that the test can fully cover all important functions and performance indicators of the system under test; and adjusting the test environment and test methods in combination with the improved test cases.
[0016] The semi-automated test implementation method proposed in the present invention has the following advantages compared with the prior art:
[0017] The present invention combines automated testing tools with manual operations, and the method can not only accelerate the testing process, but also introduce manual judgment when necessary to ensure the accuracy and completeness of the test results. In addition, the method also supports flexible configuration of the test environment, and can quickly adjust the hardware configuration, network environment, and simulator or emulator according to different test requirements, greatly improving the adaptability and efficiency of the test, and can significantly improve the coverage and efficiency of the test, while ensuring the quality of the test. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The present invention is a flow chart of a method for implementing semi-automatic testing. DETAILED DESCRIPTION
[0019] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0020] The present invention provides a method for implementing semi-automated testing, which determines the test requirements of the system under test through demand analysis, and selects appropriate automated testing tools and platforms accordingly. Use the selected tools to develop test cases covering functional, performance and security tests, and build a matching test environment. Then execute the automated test cases, monitor the test process in real time, collect data and analyze the results. For test scenarios that require manual intervention, a semi-automatic testing method is used in combination with automated tools and manual operations. Finally, a detailed report is generated based on the test results, and the test cases, environment and methods are improved based on the problems and suggestions in the report. The present invention improves test efficiency and accuracy by combining automation with manual judgment, supports flexible configuration of the test environment, and thus enhances the adaptability and quality of the test. Specifically as follows:
[0021] The present invention provides Figure 1 The method for implementing semi-automated testing shown includes the following steps:
[0022] a) Conduct requirements analysis to determine the test requirements of the system under test, which at least include requirements in terms of function, performance and reliability;
[0023] The requirement analysis step (a) further includes: a1) identifying key functional modules of the system under test, wherein the functional modules cover the core operations of the system and its interactive interfaces; a2) determining the performance indicators and reliability standards of each module based on the functional modules identified in step (a1), wherein the performance indicators include response time, throughput, etc., and the reliability standards refer to the trouble-free operation time of the system under predetermined conditions or other parameters for measuring stability; a3) formulating a comprehensive test plan in combination with the performance indicators and reliability standards defined in step (a2), wherein the test plan describes in detail how to verify the performance and reliability of the functional modules, including the design of test scenarios, expected results, and evaluation criteria.
[0024] Communication protocols are used to ensure stable and reliable communication between different components, such as the CAN bus used in the control system in the vehicle. Including CAN and LIN bus technologies, they provide a standardized interface for communication in automotive electronic systems, facilitating data transmission and control command delivery between different devices.
[0025] b) selecting appropriate automated testing tools and platforms based on the test requirements determined in step (a), wherein the tools need to be adapted to the characteristics of the system under test;
[0026] Step (b) of selecting a suitable automated testing tool and platform further includes:
[0027] b1) Based on the test requirements determined in step (a), analyze the characteristics of the system under test, including but not limited to the type of system under test (such as web application, mobile application, performance test), the required test type (such as functional test, performance test, security test) and the requirements of the test environment; b2) Based on the system characteristics analyzed in step (b1), select automated testing tools that can support the required test types, for example, select Selenium for web application testing, Appium for mobile application testing, JMeter for performance testing, etc.; b3) Based on the test tools selected in step (b2), determine a suitable test platform to ensure that the platform can support the operation of the selected tools and has good compatibility and stability to ensure the effective execution of the test.
[0028] Selenium and Appium are test automation frameworks, which are the foundation of test automation. They consist of test execution engines, test script libraries, and result analysis modules, and can realize functions such as automatic execution of test cases, automatic recording of test results, and report generation. They support writing automated test cases in programming languages and can interact with various types of applications, such as Web applications and mobile applications.
[0029] c) Using the automated testing tools selected in step (b), develop test cases covering functional, performance and security testing;
[0030] The developing test case step (c) further includes:
[0031] c1) Based on the automated testing tool selected in step (b), design and write test cases that cover the key functions, performance and security testing requirements of the system under test; c2) Based on step (c1), refine the specific steps of the test cases, define the test data input, expected results and test execution conditions, and ensure that the test cases can accurately evaluate the functional performance of the system under test; c3) Using the test cases defined in step (c2), develop test scripts, and realize automatic execution of test cases through automated testing tools to ensure the efficiency and accuracy of the testing process.
[0032] In another embodiment, an intelligent algorithm can be introduced in the test case design stage to assist in generating more efficient and comprehensive test cases. The following is a test case generation method based on an intelligent algorithm:
[0033] Using the automated testing tools selected in step (b), develop test cases covering functional, performance, and security testing, and use machine learning-based algorithms to optimize the selection and design of test cases;
[0034] Based on the automated testing tool selected in step (b), design and write preliminary test cases that cover the key functional, performance, and security testing requirements of the system under test;
[0035] On the basis of the above, refine the specific steps of the test case, define the test data input, expected results and test execution conditions, and ensure that the test case can accurately evaluate the functional performance of the system under test;
[0036] Apply genetic algorithms or reinforcement learning algorithms to optimize the test case set to ensure the effectiveness and coverage of the test cases. Specifically, new test cases can be generated from the preliminary test case set through selection, crossover and mutation operations in the genetic algorithm. These new test cases will be evaluated to check whether they can better cover the system requirements;
[0037] Algorithm formula: Let T be the initial test case set, C be the code coverage matrix of the system under test, F be the set of functional requirements, P be the set of performance indicators, and S be the set of security requirements. The goal is to maximize the coverage of C while meeting the requirements of F, P, and S.
[0038] The fitness function F(T) of the genetic algorithm is expressed as:
[0039] F(T)=w1·Coverage(C,T)+w2·Satisfaction(F,T)+w3·Performance(P,T)+w4·Security(S,T), where w1,w2,w3,w4 are weight factors used to balance the importance of each goal;
[0040] Develop test scripts using defined test cases and optimized test cases, and automate the execution of test cases through automated testing tools to ensure the efficiency and accuracy of the testing process.
[0041] Through the above methods, test cases can be made more intelligent and efficient, reducing the workload of manual design, while improving the comprehensiveness and effectiveness of testing.
[0042] d) For the test cases developed in step (c), build a test environment that meets the characteristics of the system under test, including the necessary hardware configuration, network environment and preparation of simulators or emulators;
[0043] The step (d) of setting up the test environment further includes:
[0044] d1) Based on the test cases developed in step (c), analyze the hardware environment configuration required for the system under test, including processor, memory, storage space, etc., to ensure that the test environment can support the normal operation of the system under test; d2) Based on the hardware configuration determined in step (d1), set up the corresponding network environment to ensure the stability and security of the network connection during the test, and facilitate the transmission of test data and the realization of remote monitoring; d3) Based on the network environment established in step (d2), prepare necessary simulators or emulators, such as battery simulators and circuit simulators, to simulate the operating conditions of the system under test in the actual environment to verify its performance in different scenarios.
[0045] Simulators and emulators can simulate some specific components or environments of the system under test so that testers can design and execute test cases. For testing of battery management systems, battery simulators and circuit simulators can be used for testing. These tools can simulate the charging and discharging characteristics of batteries, allowing battery management systems to be tested in various scenarios.
[0046] Remote control technology allows testers to remotely start, monitor and stop the test process to improve the flexibility and efficiency of the test work. The test system can be remotely controlled through a graphical user interface or remote command line connected to the network. At the same time, remote monitoring technology can also be used to achieve remote real-time monitoring of the test process.
[0047] e) Execute the automated test cases prepared in step (d) to perform automated tests on the system under test in multiple aspects, such as functional verification and performance testing;
[0048] The step (e) of executing the automated test case further comprises:
[0049] e1) Start the test environment built in step (d) and confirm that all necessary hardware configurations, network environments, and simulators or emulators are in an available state; e2) Run the automated testing tool under the test environment confirmed in step (e1), load the automated test cases prepared in step (d), and start functional verification and performance testing; e3) Monitor the execution of the test cases in step (e2) to ensure that the test process proceeds smoothly, and collect the data generated during the test process to prepare for subsequent analysis.
[0050] In another embodiment, an intelligent algorithm can be introduced during the test execution process to optimize the test process, especially by dynamically adjusting the test strategy to improve the test efficiency and effect. The following is a test execution optimization method based on an intelligent algorithm:
[0051] Start the test environment built in step (d) and confirm that all necessary hardware configurations, network environments, and simulators or emulators are available;
[0052] In the confirmed test environment, run the automated test tool, load the automated test cases prepared in step (d), and start to perform functional verification and performance testing;
[0053] The priority-based scheduling algorithm is used to dynamically adjust the execution order of test cases, and the test process is optimized by calculating the importance and urgency of test cases. Specifically, each test case can be given a different priority based on factors such as the impact of the test case on the system function, the critical path covered, and the expected probability of discovering defects.
[0054] Algorithm formula: Let Ui represent the importance score of the i-th test case, Ei represent its urgency score, and Pi represent the priority of test case ii.
[0055] The test case priority calculation formula is: Pi = wU·Ui+wE·Ei, where wU and wE are weight coefficients assigned to importance and urgency, which can be adjusted according to actual conditions to achieve the best test effect.
[0056] Monitor the execution of test cases to ensure the smooth progress of the test process, and collect the data generated during the test process to prepare for subsequent analysis. Through the above methods, the execution of test cases can be made more strategic and the efficiency and effectiveness of the test can be improved.
[0057] Data acquisition and analysis technology is used to collect and analyze the performance parameters and signals of the system under test in real time. These data are crucial to detect whether the system is operating as expected. Data acquisition can be achieved using sensors, data acquisition cards and other devices. Data acquisition methods include analog signal acquisition and digital signal acquisition. In terms of data analysis, machine learning and data mining technologies can be used to achieve automatic analysis of large amounts of data and fault prediction.
[0058] f) During the test process of step (e), monitor the test execution in real time, collect test data and analyze the results using data analysis technology to evaluate the performance and stability of the system under test;
[0059] The monitoring and analyzing step (f) further comprises:
[0060] f1) Implement real-time monitoring of the test execution in step (e) to ensure that any abnormal phenomena can be discovered immediately; f2) Based on the monitoring in step (f1), use data analysis technology to analyze the test data collected in step (e), including but not limited to performance parameters, signal strength, etc., to verify the expected behavior of the system under test; f3) Based on the data analysis results of step (f2), evaluate the performance and stability of the system under test, and record the analysis results as a reference for subsequent test optimization.
[0061] g) For the test scenarios that require manual intervention identified in step (f), a semi-automatic testing method is used, combining automated testing tools with manual operations to increase the flexibility and controllability of the test;
[0062] The semi-automatic testing step (g) further comprises:
[0063] g1) Based on the data analysis results in step (f), identify those test scenarios that are not fully covered by automated testing or require human experience and judgment; g2) In the test scenarios identified in step (g1), design and implement a semi-automatic testing process that combines automated testing tools with manual operations to ensure the comprehensiveness and accuracy of the test; g3) Through the human-computer collaborative testing in step (g2), improve the flexibility and controllability of the testing process to ensure that the test tasks can be effectively completed even when automated testing cannot be completed alone.
[0064] h) Generate a detailed test report based on the test results of step (g). The report should clearly reflect the test coverage, test results, problems found and improvement suggestions;
[0065] The step (h) of generating a test report further comprises:
[0066] h1) Collect and organize all test result data obtained from the semi-automatic test in step (g), including test coverage, specific test results and problems found; h2) Prepare a detailed test report based on the data collected in step (h1), ensuring that the report clearly reflects all aspects of test coverage, specific test results and problems found during the test process; h3) Based on the test report prepared in step (h2), put forward improvement suggestions based on the test results, aiming to improve the performance and reliability of the system under test.
[0067] i) Based on the issues and suggestions raised in the test report in step (h), continuously improve the test cases, test environment and test methods to improve test efficiency and quality.
[0068] The continuous improvement step (i) further includes:
[0069] i1) Analyze the issues raised in the test report in step (h) and identify deficiencies in the test cases, including insufficient test coverage, missing test scenarios, etc.; i2) Based on the analysis results of step (i1), optimize the test cases, supplement and improve the test scenarios, and ensure that the test can fully cover all important functions and performance indicators of the system under test; i3) Combined with the improved test cases in step (i2), adjust the test environment and test methods to improve the accuracy and efficiency of the test and further ensure the reliability and stability of the system under test.
[0070] Through the above steps, various communication interfaces of BMS can be tested to ensure that it can communicate with external devices normally and transmit data normally. Test the current, temperature, voltage and other parameters of BMS under different working conditions to ensure that they are within the normal working range. Automated testing can quickly perform multiple tests and reduce manual intervention time. It can reduce human errors, improve the accuracy of test results, and reduce labor costs and test equipment costs.
[0071] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method based on automated semi-testing, characterized in that: The following steps are involved: Conduct requirements analysis to determine the test requirements of the system under test, which at least include requirements in terms of function, performance and reliability; Select automated testing tools and platforms based on the determined testing requirements. The tools should be adapted to the characteristics of the system under test. Use the selected automated testing tools to develop test cases covering functional, performance and security testing. Build a test environment that meets the characteristics of the system under test for the developed test cases, including hardware configuration, network environment, and preparation of simulators or emulators, execute the prepared automated test cases, and perform automated tests on the system under test in terms of functional verification and performance testing; During the test process, the test execution is monitored in real time, test data is collected and the results are analyzed using data analysis technology. For the identified test scenarios that require manual intervention, a semi-automatic testing method is used, combining automated testing tools with manual operations; Generate a detailed test report based on the test results. The report should reflect the test coverage, test results, problems found, and improvement suggestions. Improve the test cases, test environment and test methods based on the issues and suggestions raised in the test report.
2. The method for realizing semi-automatic testing according to claim 1, characterized in that: The demand analysis includes: Identify the functional modules of the system under test, which cover the core operations of the system and its interactive interfaces; Based on the identified functional modules, determining performance indicators and reliability standards for each module, wherein the performance indicators include response time and throughput; Combining performance indicators with reliability standards, a comprehensive test plan is developed, which records the performance and reliability of the verified functional modules, including the design of test scenarios, expected results, and evaluation criteria.
3. The method for realizing semi-automatic testing according to claim 1, characterized in that: The selected automated testing tools and platforms include: Analyze the characteristics of the system under test according to the test requirements, including but not limited to the type of system under test, the type of test required, and the requirements of the test environment; Based on the system characteristics obtained through analysis, select automated testing tools that can support the required test types; Based on the selected test tools, determine the test platform to ensure that the platform can support the operation of the selected tools.
4. The method according to claim 1, characterized in that: The development of test cases covering functional, performance and security testing includes: Design and write test cases based on the selected automated testing tools, covering the functional, performance and security testing requirements of the system under test; Then refine the specific steps of the test case, define the test data input, expected results, and test execution conditions; Utilize the defined test cases to develop test scripts and automate the execution of test cases through automated testing tools.
5. The method for realizing semi-automatic testing according to claim 1, characterized in that: The construction of a test environment that meets the characteristics of the system under test includes: According to the test cases, analyze the hardware environment configuration required by the system under test, and set up the corresponding network environment based on the hardware configuration; Based on the established network environment, prepare a simulator or emulator to simulate the operating conditions of the system under test in the actual environment.
6. The method for realizing semi-automatic testing according to claim 1, characterized in that: The automated test cases prepared for execution include: Start the built test environment and confirm that all necessary hardware configurations, network environments, and simulators or emulators are available; In the confirmed test environment, run the automated test tool, load the prepared automated test cases, and start functional verification and performance testing; Monitor the execution of test cases and collect data generated during the testing process.
7. The method for realizing semi-automatic testing according to claim 1, characterized in that: The collecting of test data and analyzing the results using data analysis techniques include: Implement real-time monitoring of test execution and analyze collected test data, including but not limited to performance parameters and signal strength, to verify the expected behavior of the system under test; Based on the data analysis results, the performance and stability of the system under test are evaluated, and the analysis results are recorded as a reference for subsequent test optimization.
8. The method for realizing semi-automatic testing according to claim 1, characterized in that: The combination of automated testing tools and manual operations includes: Based on the data analysis results, identify test scenarios that are not adequately covered by automated testing or require human experience and judgment; Design and implement a semi-automatic testing process that combines automated testing tools with manual operations in the identified test scenarios; Through human-machine collaborative testing, the flexibility and controllability of the testing process are improved, ensuring that testing tasks can be effectively completed when automated testing cannot be completed alone.
9. The method for realizing semi-automatic testing according to claim 1, characterized in that: Generate a detailed test report including: Collect and organize all test result data obtained from semi-automatic testing, including test coverage, specific test results, and problems found; Prepare a detailed test report based on the collected data, ensuring that the report clearly reflects all aspects of the test coverage, specific test results, and problems found during the test process.
10. The method for realizing semi-automatic testing according to claim 1, characterized in that: The questions and suggestions raised in the test report include: Analyze issues raised in test reports and identify deficiencies in test cases, including insufficient test coverage and missing test scenarios; Based on the analysis results, optimize test cases, supplement and improve test scenarios, and ensure that the test can fully cover all important functions and performance indicators of the system under test; Adjust the test environment and test methods based on the improved test cases.