Core board cross-platform function test and verification method

By building a multi-platform testing environment, compatible test scripts are automatically generated, and hash comparison algorithms and performance tuning tools are used to solve the problems of complex configuration of the existing mid-to-cross-platform testing environment, poor script portability, inaccurate functional verification and lack of unified optimization methods for performance testing, and cross-platform functional consistency and performance optimization are achieved.

CN119829352AActive Publication Date: 2025-04-15INNER MONGOLIA XIANHONG SCI

Patent Information

Application Number
CN202411914155.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-15
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

The existing cross-platform testing solutions have problems such as complex environment configuration, poor portability of automation scripts, inaccurate functional verification, and lack of unified optimization methods for performance testing in multi-operating systems and multi-hardware architecture environments.

Method used

Through the combination of virtualization technology and actual hardware, a multi-platform testing environment is built, a script generation engine is used to automatically generate cross-platform compatible test scripts, a hash comparison algorithm is used to verify the consistency of the output data, and a performance tuning tool is used for real-time performance monitoring and optimization.

Benefits of technology

It realizes consistency verification of core board functions and performance stability and optimization in cross-platform environments, simplifies the construction of test environments and script generation, and improves the visualization and management efficiency of test efficiency and reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829352A_ABST
    Figure CN119829352A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of core board testing, in particular to a core board cross-platform function testing and verifying method which comprises the following steps: building a testing environment of a plurality of operating systems and hardware platforms through a virtualization technology or actual hardware, automatically generating a cross-platform compatible testing script based on core board function requirements, supporting multi-platform operation, and verifying the core board cross-platform function. Executing the test scripts in parallel on the platforms, recording and analyzing running logs and outputting results; functional consistency on different platforms is verified through a Hash comparison algorithm, it is ensured that the core board has the same function under the multi-platform environment, performance testing is conducted on all the platforms, performance bottlenecks are recognized, and optimization is conducted through an adjusting and optimizing tool; and finally, verifying the repairing effect through fault positioning and regression testing, and automatically generating a test report. According to the method, the efficiency of cross-platform testing of the core board, the accuracy of function verification and the effect of performance optimization are improved, and the method is suitable for core board testing and optimization scenes in a complex multi-platform environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of core board testing, and in particular to a core board cross-platform function testing and verification method. Background Art

[0002] With the widespread application of embedded systems, IoT devices and smart terminals, the core board, as the core component of these devices, has a direct impact on the operation of the entire system due to its functional stability and performance. In a multi-platform environment, the core board needs to support different operating systems (such as Linux, Windows, Android) and hardware architectures (such as ARM, x86) to meet the needs of different application scenarios. In order to ensure the functional consistency and performance optimization of the core board on multiple platforms, cross-platform functional testing and performance tuning have become key links in product development.

[0003] Existing cross-platform testing solutions have many shortcomings in dealing with the environment construction of multiple operating systems and multiple hardware architectures, automatic script generation, and consistency verification of test results. First, the configuration of the test environment is complex and it is difficult to ensure consistency. The manually built environment is easily interfered by human factors. Secondly, the existing automated test scripts are difficult to adapt to the differences between different platforms, resulting in poor script portability and inability to ensure consistent operation on different platforms. In addition, existing functional verification is mostly based on simple result comparisons and lacks efficient verification methods, especially the lack of accurate verification methods for cross-platform output data consistency. At the same time, performance testing and tuning are usually only performed on a single platform, lacking a unified optimization method for performance bottlenecks under multiple platforms, and cannot comprehensively improve the performance of the system in a multi-platform environment. Summary of the invention

[0004] The invention provides a core board cross-platform function testing and verification method.

[0005] The core board cross-platform function testing and verification method includes the following steps:

[0006] S1, initialization of multi-platform environment: build test environments for multiple operating systems and hardware platforms through virtualization technology or actual hardware, the multiple operating systems include Linux, Windows and Android, the hardware platforms include ARM and x86 architectures, and manage the creation and destruction of platform environments through a unified interface;

[0007] S2, automatic generation of test scripts: Based on the functional requirements of the core board, a script generation engine is used to automatically generate cross-platform compatible test scripts, and the script language supports multi-platform operation;

[0008] S3, multi-platform functional test execution: the generated test scripts are executed in parallel on each test platform, the operation logs and result outputs of each platform are recorded during the test, the functional execution of each platform is monitored in real time through log analysis tools, and a functional execution report for each platform is generated;

[0009] S4, functional consistency verification: Compare and analyze the test results of different platforms to verify whether the functional performance of the core board on different platforms is consistent, and use the hash comparison algorithm to verify the consistency of the output data;

[0010] S5, performance testing and tuning: Based on functional testing, the performance of each platform is tested, including CPU usage, memory usage, and response time. Performance bottlenecks are analyzed and optimized through performance tuning tools.

[0011] S6, Fault location and regression testing: Use regression testing to reproduce the functional or performance problems found during the test, locate the problem with the help of fault location tools, and verify whether the problem is completely solved through regression testing after the problem is fixed.

[0012] S7, automatic report generation of test results: The test results of all platforms are summarized and analyzed through the test management platform to generate a cross-platform functional test and verification report, which includes functional test results, performance test results and fault analysis report.

[0013] Optionally, the S2 specifically includes:

[0014] S11, building a virtualization environment of multiple operating systems through virtualization technology, the operating systems include Linux, Windows and Android, and the virtualization tools support KVM, VMware, VirtualBox, etc.;

[0015] S12, building a test platform based on different hardware architectures through actual hardware devices, the hardware architectures including ARM and x86, and specific devices such as Raspberry Pi (ARM architecture) and Intel / AMD (x86 architecture);

[0016] S13, through a unified interface management system, automatically creates and destroys the test environment of each virtual machine instance or actual hardware to ensure the consistency and repeatability of each test environment. The unified interface is implemented based on Docker or Kubernetes;

[0017] S14: In the created test environment, install and configure the dependent libraries and drivers required for the test to ensure that the test environment is consistent with the target actual environment.

[0018] Optionally, the S2 specifically includes:

[0019] S21, based on the functional requirements of the core board, input the test case specifications into the script generation engine to analyze the functional requirements characteristics of the core board;

[0020] S22, the script generation engine automatically generates scripts compatible with different platforms based on the differences between different platforms, such as file path format, API call method, and hardware resource access method;

[0021] S23, choose a scripting language that supports multi-platform operation, such as Python, Bash, Powershell, etc., to ensure that the same set of scripts can run on Linux, Windows and Android platforms;

[0022] S24: The generated test script includes a platform difference processing module, which uses conditional branches or preprocessing mechanisms to automatically adapt to system characteristics of different platforms;

[0023] S25: Simulate user operations or functional operations of the core board through scripts, and automatically generate test data and expected results.

[0024] Optionally, the S3 specifically includes:

[0025] S31, deploy the automatically generated test scripts to the test environments of various operating systems (Linux, Windows, and Android) and hardware platforms, ensuring that the same script version is used on each platform;

[0026] S32, execute the test scripts in parallel on different hardware platforms, use multi-threading or multi-process technology to improve test efficiency, and record the test logs of each hardware platform, including script execution time, error logs and output results;

[0027] S33, using log collection tools to centralize the log files of each platform on a unified log analysis platform, and monitor the function execution status of each hardware platform in real time;

[0028] S34, generating a preliminary test report, recording the function execution results and abnormal conditions of each hardware platform.

[0029] Optionally, the S4 specifically includes:

[0030] S41, formatting the test output results of each hardware platform to ensure that the result data types and output formats of different hardware platforms are consistent;

[0031] S42, verifying the consistency of the output data based on a hash comparison algorithm;

[0032] S43, if the hash values ​​are consistent, it means the output data is the same; if the hash values ​​are inconsistent, it is marked as inconsistent functions and the cause of the difference is analyzed;

[0033] S44, generating a functional consistency verification report, recording the verification results of each hardware platform, and performing difference analysis based on the results of the hash comparison algorithm.

[0034] Optionally, the S5 specifically includes:

[0035] S51, while executing functional tests on each hardware platform, use performance monitoring tools (such as Prometheus and Grafana) to monitor system resource usage in real time, including CPU usage, memory usage, and I / O response time;

[0036] S52, calculates performance bottlenecks based on performance data of different hardware platforms;

[0037] S53, using performance tuning tools to optimize platforms with performance bottlenecks, such as adjusting the number of threads and optimizing memory allocation strategies;

[0038] S54, record the results of performance testing and tuning, and generate a performance testing report.

[0039] Optionally, the S6 specifically includes:

[0040] S61, using a log analysis tool to analyze abnormal logs found during the function or performance test to locate specific fault points;

[0041] S62, use the problem reproduction tool to repeat the test scenario where the problem occurs to ensure the reproducibility of the problem;

[0042] S63, fix the located functional or performance problems, and re-execute the corresponding test cases for regression testing to verify whether the problems are solved;

[0043] S64, compare the results of regression testing with the initial test results to ensure that the problem will not affect other functions after it is fixed.

[0044] Optionally, the S7 specifically includes:

[0045] S71, summarize the test results of functional testing, performance testing and fault location of all hardware platforms through the test management platform;

[0046] S72, automatically analyzing the aggregated data to generate function test results, performance test results and a fault analysis report;

[0047] S73, automatically generates cross-platform functional testing and verification reports, including detailed test data, test results, exception analysis and optimization suggestions;

[0048] S74, export the report in PDF or HTML format for easy viewing and sharing.

[0049] Optionally, in S53, the platform with the performance bottleneck is optimized by using a performance tuning tool, specifically including:

[0050] Identify performance bottlenecks: Use performance monitoring tools (such as Prometheus, Grafana, top, htop, perf, etc.) to identify abnormal resource consumption in the system and identify possible performance bottlenecks;

[0051] CPU bottleneck: Analyze the number of threads and CPU binding issues for CPU bottlenecks;

[0052] Memory bottleneck: Analyze memory allocation efficiency and memory leakage issues for memory bottlenecks;

[0053] I / O bottleneck: Analyze disk read and write performance and network transmission performance to address I / O bottlenecks;

[0054] CPU optimization: adjust the number of threads and use multiple cores to balance CPU load and improve utilization;

[0055] Memory optimization: optimize memory allocation strategy, reduce garbage collection pauses and fix memory leaks;

[0056] I / O optimization: Optimize I / O performance by asynchronous I / O operations and improving I / O throughput;

[0057] Network optimization: adjust network parameters and use load balancing to reduce network latency and improve network performance;

[0058] Verify optimization: Rerun the test to observe the performance after optimization, ensure the effectiveness of the optimization plan, and verify whether the performance of the optimized system meets expectations;

[0059] Generate report: Generate a performance tuning report to record the changes in various indicators before and after optimization, such as shortened response time and reduced CPU usage.

[0060] Beneficial effects of the present invention:

[0061] The present invention combines virtualization technology with actual hardware to build a multi-platform test environment, supporting Linux, Windows and Android operating systems as well as ARM and x86 architectures. The environment creation and destruction of the unified interface management platform ensures the consistency and repeatability of the test environment for each platform. The solution supports automation in environment construction, reduces the complexity of manually configuring the test environment, improves the flexibility of the test environment, and facilitates the rapid deployment and reuse of the test environment on multiple platforms.

[0062] The present invention adopts the method of automatic script generation and parallel test execution, so that the functional test of the core board on different platforms can be verified quickly and efficiently. The consistency of the output data is verified by the hash comparison algorithm, which ensures the consistency of the core functions in the cross-platform environment. At the same time, the performance of each platform is monitored and analyzed in real time by the performance tuning tool, and the performance bottleneck is discovered and optimized, especially in terms of CPU, memory, I / O, etc., to ensure the performance stability and optimal state of each platform under different resource consumption conditions.

[0063] The present invention automatically generates cross-platform function and performance test reports through the test management platform, covering function test results, performance tuning analysis and fault diagnosis reports, forming a complete test data tracking and analysis link. Fault location is combined with regression testing to build a closed-loop mechanism for problem discovery, location, repair and verification, effectively ensuring the stability of system functions and performance after the problem is repaired. At the same time, the generation of automated reports further improves the visualization, sharing and management efficiency of test results, and optimizes the transparency and feedback speed of the cross-platform test process. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0065] Figure 1 A schematic diagram of a method flow of an embodiment of the present invention;

[0066] Figure 2 Schematic diagram of S2 process of an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. At the same time, it is explained here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and those skilled in the art may also adopt other alternatives to implement some known technologies; and the accompanying drawings are only for more specific description of the embodiments, and are not intended to specifically limit the present invention.

[0068] It should be noted that the references to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments" and the like in the specification indicate that the embodiments described may include specific features, structures or characteristics, but not every embodiment may include the specific features, structures or characteristics. In addition, when a specific feature, structure or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the art to implement such feature, structure or characteristic in conjunction with other embodiments (whether or not explicitly described).

[0069] In general, a term can be understood, at least in part, from its use in context. For example, depending, at least in part, on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in the singular sense, or can be used to describe a combination of features, structures, or characteristics in the plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but can instead, depending, at least in part, on the context, allow for the presence of other factors that are not necessarily explicitly described.

[0070] like Figure 1-Figure 2 As shown, the core board cross-platform function testing and verification method includes the following steps:

[0071] S1, initialization of multi-platform environment: build test environments for multiple operating systems and hardware platforms through virtualization technology or actual hardware. Multiple operating systems include Linux, Windows and Android, and hardware platforms include ARM and x86 architectures. Manage the creation and destruction of platform environments through a unified interface to ensure consistency of test environments on different platforms.

[0072] S2, automatic generation of test scripts: Based on the functional requirements of the core board, a script generation engine is used to automatically generate cross-platform compatible test scripts. The script language supports multi-platform operation. The script generation process takes into account the differences between different platforms to ensure that test cases can run consistently on different platforms;

[0073] S3, multi-platform functional test execution: the generated test scripts are executed in parallel on each test platform, the operation logs and result outputs of each platform are recorded during the test, the functional execution of each platform is monitored in real time through log analysis tools, and a functional execution report for each platform is generated;

[0074] S4, functional consistency verification: Compare and analyze the test results of different platforms to verify whether the functional performance of the core board on different platforms is consistent. Use hash comparison algorithm to verify the consistency of output data to ensure the functional consistency of the core board in a multi-platform environment;

[0075] S5, performance testing and tuning: Based on functional testing, the performance of each platform is tested, including CPU usage, memory usage, and response time. Performance bottlenecks are analyzed and optimized through performance tuning tools.

[0076] S6, Fault location and regression testing: Use regression testing to reproduce the functional or performance problems found during the test, locate the problem with the help of fault location tools, and verify whether the problem is completely solved through regression testing after the problem is fixed.

[0077] S7, automatic report generation of test results: The test results of all platforms are summarized and analyzed through the test management platform to generate a cross-platform functional test and verification report, which includes functional test results, performance test results and fault analysis report.

[0078] S2 specifically includes:

[0079] S11, builds a virtualized environment for multiple operating systems through virtualization technology. The operating systems include Linux, Windows, and Android. The virtualization tools support KVM, VMware, VirtualBox, etc.

[0080] S12, build a test platform based on different hardware architectures through actual hardware devices, including ARM and x86, and specific devices such as Raspberry Pi (ARM architecture) and Intel / AMD (x86 architecture);

[0081] S13, through a unified interface management system, automatically creates and destroys the test environment of each virtual machine instance or actual hardware to ensure the consistency and repeatability of each test environment. The unified interface is implemented based on Docker or Kubernetes;

[0082] S14: In the created test environment, install and configure the dependent libraries and drivers required for the test to ensure that the test environment is consistent with the target actual environment;

[0083] By initializing the multi-platform environment, we ensure that a consistent test environment is built on different operating systems and hardware platforms. The combination of virtualization technology and actual hardware improves the flexibility and reusability of the test environment.

[0084] S2 specifically includes:

[0085] S21, based on the functional requirements of the core board, input the test case specifications into the script generation engine to analyze the functional requirements characteristics of the core board;

[0086] S22, the script generation engine automatically generates scripts compatible with different platforms based on the differences between different platforms, such as file path format, API call method, and hardware resource access method;

[0087] S23, choose a scripting language that supports multi-platform operation, such as Python, Bash, Powershell, etc., to ensure that the same set of scripts can run on Linux, Windows and Android platforms;

[0088] S24: The generated test script includes a platform difference processing module, which uses conditional branches or preprocessing mechanisms to automatically adapt to system characteristics of different platforms;

[0089] S25: Use scripts to simulate user operations or core board functional operations, and automatically generate test data and expected results to ensure the consistency of test cases;

[0090] By automatically generating test scripts compatible with different platforms, the workload of manual script writing is reduced while ensuring consistency and portability between platforms.

[0091] S3 specifically includes:

[0092] S31, deploy the automatically generated test scripts to the test environments of various operating systems (Linux, Windows, and Android) and hardware platforms, ensuring that the same script version is used on each platform;

[0093] S32, execute the test scripts in parallel on different hardware platforms, use multi-threading or multi-process technology to improve test efficiency, and record the test logs of each hardware platform, including script execution time, error logs and output results;

[0094] S33, using log collection tools to centralize the log files of each platform on a unified log analysis platform, and monitor the function execution status of each hardware platform in real time;

[0095] S34, generating a preliminary test report, recording the function execution results and abnormal conditions of each hardware platform;

[0096] By executing test scripts in parallel on different platforms, the test efficiency is improved, the real-time monitoring of the functional execution status of each platform is ensured, and the complexity of cross-platform testing is reduced.

[0097] S4 specifically includes:

[0098] S41, formatting the test output results of each hardware platform to ensure that the result data types and output formats of different hardware platforms are consistent;

[0099] S42, verifying the consistency of the output data based on a hash comparison algorithm, and calculating the hash value of the output result of each platform using the MD5 or SHA256 hash function;

[0100] Assume that the output data of each platform is D i , where i represents different platforms (such as Linux, Windows, Android, etc.), and the calculation formula of the hash value is expressed as:

[0101] H i =H(D i );

[0102] Among them, H i Represents the output data D on the i-th platform i H is the hash value of the hash function used (such as MD5 or SHA-256), and D i represents the output data generated on the i-th platform;

[0103] In order to verify whether the output data on each platform is consistent, it is necessary to compare the hash values ​​of different platforms. The formula for consistency verification is expressed as:

[0104]

[0105] That is, if the hash value H of each platform i and H j If they are equal, then the output data D of platform i and platform j i and D j are considered consistent, if the hash values ​​are not equal, the output data is considered different;

[0106] Among them, D i The output data generated for the ith platform is usually the result data of the core board function test or performance test, which can be a log file, operation output, measurement data, etc. H is a hash function used to convert the output data D i Convert to a fixed-length hash value. Common hash functions include: MD5 generates a 128-bit hash value, which is suitable for fast calculation but has low security; SHA-256 generates a 256-bit hash value, which has high security and is suitable for scenarios with strict requirements on data consistency. i is the hash value of the i-th platform, indicating the output data D on platform i i The fixed-length value generated by the hash function H, i, j are different platform numbers, for example, i = 1 represents the Linux platform, j = 2 represents the Windows platform;

[0107] S43, if the hash values ​​are consistent, it means the output data is the same. If the hash values ​​are inconsistent, it is marked as inconsistent functions. The reasons for the differences are analyzed. The consistency verification process is as follows:

[0108] (1) Calculate the hash value: for each platform's output data D i Perform hash processing to generate a hash value H i ;

[0109] (2) Compare hash values: Compare the hash values ​​H of each platform i Hash values ​​​​H j Compare them to see if they are equal;

[0110] (3) Result analysis: If the hash values ​​of all platforms are equal (i.e. H i =H j ), the output data is consistent; otherwise, there is inconsistency and further analysis of the cause of the difference is required;

[0111] S44, generating a functional consistency verification report, recording the verification results of each hardware platform, and performing difference analysis based on the results of the hash comparison algorithm;

[0112] The hash comparison algorithm ensures that the test results on different platforms remain consistent, enhancing the accuracy and reliability of cross-platform testing.

[0113] S5 specifically includes:

[0114] S51, while executing functional tests on each hardware platform, use performance monitoring tools (such as Prometheus and Grafana) to monitor system resource usage in real time, including CPU usage, memory usage, and I / O response time;

[0115] S52, calculating the performance bottleneck according to the performance data of different hardware platforms, for example, evaluating the CPU occupancy rate by the following formula:

[0116]

[0117] Among them, CPU Time (used) is the CPU time used by the system in a certain period of time, and Total CPU Time is the total CPU time of the system;

[0118] S53, using performance tuning tools to optimize platforms with performance bottlenecks, such as adjusting the number of threads and optimizing memory allocation strategies;

[0119] S54, recording the results of performance testing and tuning, and generating a performance testing report;

[0120] By testing and tuning the performance of each platform, we ensure the stability and optimization of system performance in addition to functional testing.

[0121] S6 specifically includes:

[0122] S61, using a log analysis tool to analyze abnormal logs found during the function or performance test to locate specific fault points;

[0123] S62, use the problem reproduction tool to repeat the test scenario where the problem occurs to ensure the reproducibility of the problem;

[0124] S63, fix the located functional or performance problems, and re-execute the corresponding test cases for regression testing to verify whether the problems are solved;

[0125] S64, compare the regression test results with the initial test results to ensure that the problem will not affect other functions after being fixed;

[0126] Through fault location and regression testing, ensure that all problems found during the test can be effectively repaired, and verify the consistency of system functions and performance after repair.

[0127] S7 specifically includes:

[0128] S71, summarize the test results of functional testing, performance testing and fault location of all hardware platforms through the test management platform;

[0129] S72, automatically analyzing the aggregated data to generate function test results, performance test results and a fault analysis report;

[0130] S73, automatically generates cross-platform functional testing and verification reports, including detailed test data, test results, exception analysis and optimization suggestions;

[0131] S74, export the report in PDF or HTML format for easy viewing and sharing;

[0132] By automatically generating test reports, the test result summary and analysis process is simplified, complete test data and analysis results are provided, and the efficiency of report generation is improved.

[0133] In S53, performance tuning tools are used to optimize platforms with performance bottlenecks, including:

[0134] Identify performance bottlenecks: Use performance monitoring tools (such as Prometheus, Grafana, top, htop, perf, etc.) to identify abnormal resource consumption in the system and identify possible performance bottlenecks, including:

[0135] Monitoring indicators include: CPU usage, memory usage, I / O response time, network bandwidth, disk I / O, etc. Focus on high resource usage but inefficient parts, such as CPU usage close to 100% for a long time, frequent memory garbage collection, I / O operation delays, etc.

[0136] CPU bottleneck: For CPU bottleneck, analyze the number of threads and CPU binding problems, as follows:

[0137] Thread count analysis: Determine whether there are too many or too few threads, and check thread utilization using tools such as perf or htop.

[0138] CPU binding problem: Check whether the task is bound to a specific CPU core, causing load imbalance;

[0139] Memory bottleneck: Analyze memory allocation efficiency and memory leakage issues for memory bottlenecks, as follows:

[0140] Memory allocation efficiency: Check whether the application frequently performs garbage collection (GC) or memory allocation (using valgrind, gperftools);

[0141] Memory leak: Check whether the memory is not released normally, causing the memory to gradually fill up;

[0142] I / O bottleneck: To address I / O bottlenecks, analyze disk read / write performance and network transmission performance, as follows:

[0143] Disk read and write performance: Use iostat or iotop to check the disk I / O operation performance and analyze whether there is excessive I / O waiting;

[0144] Network transmission: Use iftop or netstat to check whether the network transmission has reached a bottleneck, especially the network delay under high concurrency;

[0145] CPU optimization: Adjust the number of threads and use multiple cores to balance CPU load and improve utilization, as follows:

[0146] Adjust the number of threads: Based on the CPU load and the multi-threaded design of the application, modify the thread pool size or adjust the number of concurrent threads to avoid excessive context switching due to too many threads or underutilization of resources due to too few threads. It is recommended to use 1.5 to 2 times the number of CPU cores as the thread pool size;

[0147] Use multiple cores: If the load is concentrated on a certain core, you can use tools (such as taskset) to distribute tasks to multiple cores to balance the load;

[0148] Memory optimization: Optimize memory allocation strategy, reduce garbage collection pauses and fix memory leaks, as follows:

[0149] Optimize memory allocation strategy: reduce unnecessary object creation, reasonably adjust the life cycle of objects, reduce frequent memory allocation and release, optimize memory utilization by adjusting garbage collection (GC) strategy, and reduce GC pauses;

[0150] Memory leak check: Use tools (such as valgrind, leak sanitizer) to find and fix memory leaks and ensure that each allocated memory can be released normally;

[0151] I / O optimization: Optimize I / O performance by asynchronous I / O operations and improving I / O throughput, as follows:

[0152] Asynchronous I / O operations: If a large number of I / O operations result in a long waiting time, you can change the I / O operations to asynchronous processing to reduce the synchronous blocking time and use libraries such as epoll or libuv to implement non-blocking I / O;

[0153] Improve I / O throughput: Increase disk cache or use RAID arrays to improve disk read and write performance, or replace traditional HDDs with high-performance SSDs.

[0154] Network optimization: Adjust network parameters and use load balancing to reduce network latency and improve network performance, as follows:

[0155] Reduce network delay: Reduce network transmission delay by tuning TCP parameters (such as adjusting MTU or enabling TCP_NODELAY);

[0156] Use load balancing: In high-concurrency scenarios, use load balancing technology to distribute requests to multiple servers to avoid single-point bottlenecks;

[0157] Verify optimization: Rerun the test to observe the performance after optimization, ensure the effectiveness of the optimization plan, and verify whether the performance of the optimized system meets expectations;

[0158] Generate report: Generate performance tuning report, record the changes of various indicators before and after optimization, such as shortened response time and reduced CPU usage;

[0159] Performance tuning tools can be used to effectively identify and optimize performance bottlenecks in the system, such as by adjusting the number of threads, optimizing memory allocation, asynchronously processing I / O, improving network performance, etc., thereby ensuring the efficient operation of the system on different platforms.

[0160] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.

[0161] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. The core board cross-platform function testing and verification method is characterized by: The following steps are involved: S1, initialization of multi-platform environment: build test environments for multiple operating systems and hardware platforms through virtualization technology or actual hardware, the multiple operating systems include Linux, Windows and Android, the hardware platforms include ARM and x86 architectures, and manage the creation and destruction of platform environments through a unified interface; S2, automatic generation of test scripts: Based on the functional requirements of the core board, a script generation engine is used to automatically generate cross-platform compatible test scripts, and the script language supports multi-platform operation; S3, multi-platform functional test execution: the generated test scripts are executed in parallel on each test platform, the operation logs and result outputs of each platform are recorded during the test, the functional execution of each platform is monitored in real time through log analysis tools, and a functional execution report for each platform is generated; S4, functional consistency verification: Compare and analyze the test results of different platforms to verify whether the functional performance of the core board on different platforms is consistent, and use the hash comparison algorithm to verify the consistency of the output data; S5, performance testing and tuning: Based on functional testing, the performance of each platform is tested, including CPU usage, memory usage, and response time. Performance bottlenecks are analyzed and optimized through performance tuning tools. S6, Fault location and regression testing: Use regression testing to reproduce the functional or performance problems found during the test, locate the problem with the help of fault location tools, and verify whether the problem is completely solved through regression testing after the problem is fixed. S7, automatic report generation of test results: The test results of all platforms are summarized and analyzed through the test management platform to generate a cross-platform functional test and verification report, which includes functional test results, performance test results and fault analysis report.

2. The core board cross-platform function testing and verification method according to claim 1 is characterized in that: The S2 specifically includes: S11, building a virtualization environment of multiple operating systems through virtualization technology, wherein the operating systems include Linux, Windows and Android; S12, building a test platform based on different hardware architectures through actual hardware devices, wherein the hardware architectures include ARM and x86; S13, automatically creating and destroying the test environment of each virtual machine instance or actual hardware through a unified interface management system; S14: In the created test environment, install and configure the dependent libraries and drivers required for the test.

3. The core board cross-platform function testing and verification method according to claim 2 is characterized in that: The S2 specifically includes: S21, based on the functional requirements of the core board, input the test case specifications into the script generation engine to analyze the functional requirements characteristics of the core board; S22, the script generation engine automatically generates scripts compatible with different platforms according to the differences between different platforms; S23, select a scripting language that supports multi-platform operation to ensure that the same set of scripts can run on Linux, Windows and Android platforms; S24: The generated test script includes a platform difference processing module, which uses conditional branches or preprocessing mechanisms to automatically adapt to system characteristics of different platforms; S25: Simulate user operations or functional operations of the core board through scripts, and automatically generate test data and expected results.

4. The core board cross-platform function testing and verification method according to claim 3 is characterized in that: The S3 specifically includes: S31, deploying the automatically generated test scripts to the test environments of various operating systems and hardware platforms; S32, execute the test scripts in parallel on different hardware platforms, use multi-threading or multi-process technology to improve test efficiency, and record the test logs of each hardware platform, including script execution time, error logs and output results; S33, using log collection tools to centralize the log files of each platform on a unified log analysis platform, and monitor the function execution status of each hardware platform in real time; S34, generating a preliminary test report, recording the function execution results and abnormal conditions of each hardware platform.

5. The core board cross-platform function testing and verification method according to claim 4 is characterized in that: The S4 specifically includes: S41, formatting the test output results of each hardware platform; S42, verifying the consistency of the output data based on a hash comparison algorithm; S43, if the hash values ​​are consistent, it means the output data is the same; if the hash values ​​are inconsistent, it is marked as inconsistent functions and the cause of the difference is analyzed; S44, generating a functional consistency verification report, recording the verification results of each hardware platform, and performing difference analysis based on the results of the hash comparison algorithm.

6. The core board cross-platform function testing and verification method according to claim 5 is characterized in that: The S5 specifically includes: S51, while executing functional tests on each hardware platform, uses performance monitoring tools to monitor system resource usage in real time, including CPU occupancy, memory usage, and I / O response time; S52, calculates performance bottlenecks based on performance data of different hardware platforms; S53, optimizes platforms with performance bottlenecks through performance tuning tools; S54, record the results of performance testing and tuning, and generate a performance testing report.

7. The core board cross-platform function testing and verification method according to claim 6 is characterized in that: The S6 specifically includes: S61, using a log analysis tool to analyze abnormal logs found during the function or performance test to locate the fault point; S62, use the problem reproduction tool to repeat the test scenario where the problem occurs; S63, fix the located functional or performance problems, and re-execute the corresponding test cases for regression testing to verify whether the problems are solved; S64, compare the results of regression testing with the initial test results to ensure that the problem will not affect other functions after it is fixed.

8. The core board cross-platform function testing and verification method according to claim 7 is characterized in that: The S7 specifically includes: S71, summarize the test results of functional testing, performance testing and fault location of all hardware platforms through the test management platform; S72, automatically analyzing the aggregated data to generate function test results, performance test results and a fault analysis report; S73, automatically generates cross-platform functional testing and verification reports, including detailed test data, test results, exception analysis and optimization suggestions; S74, export the report in PDF or HTML format for easy viewing and sharing.

9. The core board cross-platform function testing and verification method according to claim 6 is characterized in that: In the S53, the platform with performance bottleneck is optimized by using the performance tuning tool, specifically including: Identify performance bottlenecks: Use performance monitoring tools to identify areas of the system where resource consumption is abnormal and identify performance bottlenecks; CPU bottleneck: Analyze the number of threads and CPU binding issues for CPU bottlenecks; Memory bottleneck: Analyze memory allocation efficiency and memory leakage issues for memory bottlenecks; I / O bottleneck: Analyze disk read and write performance and network transmission performance to address I / O bottlenecks; CPU optimization: adjust the number of threads and use multiple cores to balance CPU load and improve utilization; Memory optimization: optimize memory allocation strategy, reduce garbage collection pauses and fix memory leaks; I / O optimization: Optimize I / O performance by asynchronous I / O operations and improving I / O throughput; Network optimization: adjust network parameters and use load balancing to reduce network latency and improve network performance; Verify optimization: Rerun the test to observe the performance after optimization, ensure the effectiveness of the optimization plan, and verify whether the performance of the optimized system meets expectations; Generate report: Generate a performance tuning report to record the changes in various indicators before and after optimization.

Citation Information

Patent Citations

  • Test platform for aging testing device of semiconductor memory

    CN109406916A

  • Core board test verification method and system

    CN117647726A

  • Chip verification method and system

    CN118095163A

  • Test method, device and system, electronic equipment and storage medium

    CN118535397A

  • Method for testing a chip, test platform, and test system

    WO2019080003A1

Cited By

  • Laptop software adaptation test method and system applied to multi-platform compatibility

    CN121051029A

  • Methods and systems for testing the compatibility of laptop software across multiple platforms

    CN121051029B

  • Cross-platform dynamically adjustable SSD automatic production test method and system

    CN122392607A