Component test method and device, storage medium and electronic equipment
By classifying and self-testing the test components in Java virtual machine performance test, and using the revised target components for performance evaluation and testing, the problems of long test startup time and low efficiency are solved, and a more efficient test process is achieved.
Patent Information
- Application Number
- CN202510167911.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-06
AI Technical Summary
When performing Java virtual machine performance testing, related technologies need to run dozens or even hundreds of test components, resulting in a long test startup time, inefficient efficiency, and a long time to discover problems with the test components.
By classifying the test components, the test components in the same test group have the same configuration information. The target components are selected for self-checking and correction of the configuration information. The modified target components enter the test preheating stage, collect performance data, and perform performance evaluation and overall testing based on the performance data.
This method reduces the number of start-ups of test components and the time of error information identification, improves the self-test efficiency and accuracy of the configuration information of the test components, and thus improves the efficiency of the overall test.
Smart Images

Figure CN120104481A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a component testing method, device, storage medium and electronic device. Background Art
[0002] When performing Java virtual machine performance testing, the SPEC jbb2015 standard developed and released by the international standard performance evaluation organization SPEC is usually used for benchmark testing.
[0003] At present, related technologies need to run dozens or even hundreds of test components for large-scale test environments. It takes a long time to start a test, which results in a long time before problems with the test components are discovered, resulting in low test efficiency. Summary of the invention
[0004] The present disclosure provides a component testing method, device, storage medium and electronic device. The main purpose is to solve the problem that in the related art, dozens or even hundreds of test components need to be run in a large-scale test environment, and it takes a long time to start a test, resulting in a long time before the problem of the test component can be discovered, resulting in low test efficiency.
[0005] In a first aspect, the present application provides a component testing method, comprising:
[0006] Acquire a test group after the test components are classified, wherein the configuration information of the test components in the test group is the same;
[0007] Selecting a target component from the test group to perform self-check on configuration information, and correcting error information in the configuration information;
[0008] Entering a test warm-up phase using the corrected target component, and collecting performance data of the test warm-up phase;
[0009] A performance evaluation result of the test component is obtained according to the performance data, and an overall test of the test component is performed based on the performance evaluation result.
[0010] In a second aspect, the present application provides a component testing device, comprising:
[0011] An acquisition module is configured to acquire test groups after the test components are classified, wherein the configuration information of the test components in the test groups is the same;
[0012] A correction module is configured to select a target component from the test group to perform a self-check on the configuration information and correct error information in the configuration information;
[0013] an acquisition module configured to enter a test preheating phase using the modified target component and collect performance data of the test preheating phase;
[0014] The test module is configured to obtain a performance evaluation result of the test component according to the performance data, and perform an overall test of the test component based on the performance evaluation result.
[0015] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the component testing method described in the first aspect.
[0016] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the component testing method described in the first aspect when executing the computer program.
[0017] In a fifth aspect, the present application provides a computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the component testing method described in the first aspect.
[0018] The present disclosure provides a component testing method, device, storage medium and electronic device, wherein the method comprises: first obtaining a test group after classifying the test components, wherein the configuration information of the test components in the test group is the same; then selecting a target component from the test group to perform a configuration information self-check, and correcting error information in the configuration information; then using the corrected target component to enter a test preheating phase, and collecting performance data of the test preheating phase; finally, obtaining a performance evaluation result of the test component according to the performance data, and performing an overall test of the test component based on the performance evaluation result. Compared with the current existing technology, the present application can classify test components. Since the configuration information of test components in the same test group is the same, a target component can be selected from each test group for self-inspection, and the configuration information in the target component can be corrected, which is equivalent to correcting the configuration information of each test component in the test group. Then, the performance data of the corrected target component in the test warm-up stage is used to evaluate the performance of the test component before the formal test. An overall test is performed based on the performance evaluation results. The number of test components is reduced in the test warm-up stage, and the error information identification time of the test components is reduced. There is no need to manually locate the error information and make corrections, which improves the self-inspection efficiency and accuracy of the configuration information of the test components, thereby improving the efficiency of the overall test.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of a flow chart of a component testing method provided in an embodiment of the present application is shown;
[0021] Figure 2 A schematic diagram showing a flow chart of another component testing method provided in an embodiment of the present application is shown;
[0022] Figure 3 A schematic diagram showing an example provided by an embodiment of the present application;
[0023] Figure 4 A schematic diagram showing another example provided by an embodiment of the present application;
[0024] Figure 5 A schematic diagram showing another example provided by an embodiment of the present application;
[0025] Figure 6 A schematic structural diagram of a component testing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0027] At present, the relevant technology adopts the SPEC jbb test process, which includes the steps of setting test parameters, running tests, monitoring test logs, waiting for the end of tests, obtaining test scores, etc. For large-scale test environments, dozens or even hundreds of test components need to be run. Due to the large number of test components, it takes a long time to start a test and wait for a handshake. Usually, test errors are reported in the test startup phase, and it takes a long time for the logs to throw errors and exceptions, resulting in low test efficiency.
[0028] At the same time, manual monitoring and operation are also required during the test process. The purpose of manual monitoring is to ensure that the test automatic process does not report errors. Once an error occurs, it is necessary to manually locate the error information and manually modify the test parameters after identifying the error information. Manual monitoring and error correction are inefficient and increase labor costs, and automated testing cannot be achieved. For example, if an error problem occurs, you first need to manually kill the test process, end the test, and query the error component log. After locating the error information, you need to manually identify the error information. Errors and exceptions exist in a large number of log files. Manual detection and identification of these error messages is very difficult. After locating the error log, identifying the error information and then locating the error parameter configuration file also requires a lot of professional knowledge, time and testing experience. Then, a solution is given based on professional knowledge and testing experience, and the test parameters are modified and the test is run again. Manually modifying the test parameters also increases the probability of errors.
[0029] Secondly, when certain test parameters need to be tuned, the complete test process must be executed each time, which takes a long time and cannot quickly predict the test score. It is necessary to wait for the test to end before judging the high or low test results. As a result, it is impossible to quickly determine whether the tuning direction is correct, which affects the test efficiency.
[0030] In order to improve the current related technologies for large-scale testing environments, dozens or even hundreds of test components need to be run. It takes a long time to start a test, which results in a long time before problems with the test components are discovered, leading to technical problems such as low testing efficiency.
[0031] This embodiment provides a component testing method, such as Figure 1 As shown, the method includes:
[0032] Step 101, obtaining the test group after the test components are classified, and the configuration information of the test components in the test group is the same.
[0033] In some embodiments, the test components can be classified, and the components with the same configuration information can be grouped into the same test group to facilitate component testing and improve test efficiency. In specific application scenarios, component testing generally refers to the process of verifying and evaluating an independent module or functional unit of one or more components in a software system to ensure that the component can work normally in an isolated environment and meet the design requirements and expected behaviors. Accordingly, the test component is usually performed on an independent part of the system, minimizing dependencies on other modules, and can be run multiple times in different environments to verify its consistency and stability. Exemplarily, the test component can be a class, a function, a service, a page, a group of modules that collaborate with each other, etc.
[0034] Step 102: Select a target component from the test group to perform a self-check on the configuration information and correct the error information in the configuration information.
[0035] In some examples, a target test component can be selected from each group for self-checking and correction. Since the configuration information of each test component in a test group is the same, the target test component performs a configuration information self-check to detect whether there is error information in the error report. If the error information is stored, the error information is the error information of each component in the group. After the configuration information of the target component is corrected, the configuration information of other components in the group can be corrected in the same way, wherein the configuration information may include configuration parameters, which can be stored in the configuration files corresponding to each test component. In this way, only one target test component needs to be started from each group of test components to determine whether the test parameter configuration will cause a test error, which effectively reduces the number of test components started, thereby reducing the waiting time when the test is started, and helping to improve test efficiency.
[0036] Step 103: Use the corrected target component to enter the test warm-up phase and collect performance data of the test warm-up phase.
[0037] In some examples, after the target component is corrected, the test warm-up phase can be entered. In combination with specific business scenarios and system characteristics, the warm-up parameters and tasks can be reasonably set, and the test strategy can be dynamically adjusted to obtain more accurate test results. In the warm-up phase, the system behavior is monitored, the trend of changes in various indicators is recorded, and the cold start effect of the system such as cache not loaded, resource initialization, etc. is eliminated to adapt the system to high load or actual business scenarios, and the performance data of the system in a stable state is collected. The performance data may include but is not limited to throughput, response time, system resource utilization rate: JVM performance data, etc. For example, performance testing tools such as JMeter, LoadRunner, and Gatling can be used to record throughput and response time, monitoring tools such as Prometheus, Grafana, and Zabbix can be used to monitor system resource usage in real time, and log analysis tools such as ELK Stack (Elasticsearch, Logstash, Kibana) can be used to analyze application logs.
[0038] Step 104: Obtain a performance evaluation result of the test component according to the performance data, and perform an overall test of the test component based on the performance evaluation result.
[0039] In some examples, performance data can be analyzed to observe the trend of performance indicators changing with load, identify potential bottlenecks, find anomalies in performance data (such as a sudden increase in response time, increased error rate), analyze system resource usage, and determine whether there is resource waste or shortage to obtain performance evaluation results. For example, actual performance data can be compared with a preset performance benchmark to determine whether an overall test of all test components can be performed to enter the formal testing phase. If the preset performance benchmark is met, an overall test can be performed. After the overall test is completed, the results of the overall test can be analyzed to determine whether the system performance has been improved compared with the performance evaluation results, and improvement suggestions can be made based on the test results, such as code optimization, resource allocation adjustment, or architecture improvement. Obtaining performance evaluation results of test components based on performance data and conducting an overall test accordingly can help ensure system quality and performance and improve the efficiency and accuracy of overall testing.
[0040] Compared with the current existing technology, the present application can classify test components. Since the configuration information of test components in the same test group is the same, a target component can be selected from each test group for self-inspection, and the configuration information in the target component can be corrected, which is equivalent to correcting the configuration information of each test component in the test group. Then, the performance data of the corrected target component in the test warm-up stage is used to evaluate the performance of the test component before the formal test. An overall test is performed based on the performance evaluation results. The number of test components is reduced in the test warm-up stage, and the error information identification time of the test components is reduced. There is no need to manually locate the error information and make corrections, which improves the self-inspection efficiency and accuracy of the configuration information of the test components, thereby improving the efficiency of the overall test.
[0041] In order to further illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 2 The specific method shown includes:
[0042] Step 201, obtaining the test groups after the test components are classified, wherein the configuration information of the test components in the test groups is the same.
[0043] In some embodiments, Figure 3 As shown, self-check modules, error information identification and reasoning modules, test parameter modification modules, result estimation and calculation modules and other modules can be used to perform performance test error correction and test result estimation. Exemplarily, the self-check module may include a startup script and two log instances. The startup script may classify test components, and the parameter configuration of the same test component is the same.
[0044] Step 202: Perform self-check on configuration information of target components in different test groups, and write self-check logs corresponding to different target components into target log files.
[0045] In some embodiments, a self-check module can be used to select a target component from each test group for self-checking, thereby reducing the number of test components to be started, thereby reducing the waiting time when the test is started. Accordingly, the log can be recorded to write the self-check log into a log file, avoiding the tedious steps of locating error log information in a large number of log files. For example, after the self-check is completed, the logs corresponding to multiple components are written to the same target log file, and the target log file will contain the startup status of all test components. The tester can quickly check the startup status of each test component, such as: which components started successfully, which components reported errors, and what kind of errors were reported, thereby improving the efficiency of error information identification.
[0046] Optionally, a shell script can be used to automatically kill the corresponding test process when an error is detected in the configuration information of a test component. This eliminates the need to manually kill the test process and avoids system freezes caused by the suspended test process occupying resources while processing error information.
[0047] Further optionally, before killing the process, an alarm notification can be sent via email or messaging tool. After killing the process, the error message can be automatically corrected, and the system can automatically restart after correction to continue testing, thereby reducing manual detection and correction costs and improving testing efficiency.
[0048] Step 203: Detect error information in the target log file, perform text similarity matching between the error information and the error data set, and obtain correction information corresponding to the error information according to the matching result.
[0049] In some embodiments, an error data set can be generated based on historical error information integration, which is used to match and identify the error information in the current self-check process, provide corresponding correction information, and automatically detect and correct the error information to reduce manual detection costs. Among them, the error data set may include currently known common error problems, error phenomena, log codes, corresponding correct parameters and other data, which can be saved in a JSON file.
[0050] In specific application scenarios, the error information recognition and reasoning module can be used to obtain the correction information corresponding to the error information. First, the error information (also called error message) in the target log file of the self-check module can be read, and the text similarity can be matched with the error information dataset file that has been imported locally.
[0051] Optionally, step 203 may specifically include: performing text preprocessing on the error information using a word segmenter in a preset matching model to obtain an embedding vector corresponding to the error information after text preprocessing; evaluating the text similarity between the error information and the error data set based on the embedding vector and the embedding vector corresponding to the error data set; and determining correction information corresponding to the error information based on the text similarity and a preset similarity threshold.
[0052] In some embodiments, a preset matching model can be used to match the error information of the target component with an error data set (which may be referred to as an error database) to obtain correction information corresponding to the error information, which may include but is not limited to an AI model, a BERT model, etc.
[0053] Further optionally, based on the text similarity and a preset similarity threshold, the correction information corresponding to the error information is determined, which may specifically include: comparing the text similarity and the preset similarity threshold; if the text similarity is greater than the preset similarity threshold, it is determined that the match is successful, and the correction information corresponding to the error information is determined from the error data set; if the text similarity is less than the preset similarity threshold, it is determined that the match fails, and the correction information corresponding to the error information is inferred based on the text similarity using a preset matching model.
[0054] Exemplarily, the process of information matching based on the BERT model may specifically include the following steps:
[0055] 1. Use a script to read the log file from the self-check module and ensure that it contains sufficient error information, such as error code, error description, context information, etc.
[0056] 2. Use the BERT model to convert the error message text into a numerical vector representation for similarity calculation. First, use BERT's tokenizer to preprocess the error message text, and then input the preprocessed data into the BERT model to obtain the embedding vector. Specifically, you can use the BertTokenizer and BertModel in the transformers library in the BERT model to implement this process.
[0057] 3. Build a BERT model to calculate cosine similarity. You can also set model parameters such as learning rate, batch size, number of epochs, weight decay, etc. to facilitate subsequent fine-tuning of the model for machine learning.
[0058] 4. You can use the cosine_similarity function in torch.nn.functional to calculate the cosine similarity between two embedding vectors as the text similarity between the error information and the error dataset. Cosine similarity is a commonly used similarity metric that evaluates the similarity between two vectors by calculating the cosine value of the angle between them. In text processing, the cosine similarity calculation result can obtain a scalar value between -1 and 1, indicating the semantic proximity of the two texts. The closer the value is to 1, the higher the semantic similarity; the closer the value is to -1, the greater the semantic difference.
[0059] Specifically, the matching result between the error information of the target component and the error data set can be determined by setting a preset similarity threshold. For example, when the text similarity is greater than the preset similarity threshold, the match is considered successful. If the text similarity is less than the preset similarity threshold, it can be considered that the match cannot be made temporarily. If the match is successful, the correction information for the successful matching of the error information can be determined based on the error data set, and the test parameter modification module can be entered to call the script to write the test parameters corresponding to the correct correction information into the corresponding configuration file to complete the correction of the error information. If the match fails, the correction information corresponding to the error information can be inferred based on the BERT model, or the error information solution with the highest current matching degree can be given by inference.
[0060] 5. Update the error database: The error database can be continuously updated and improved based on the latest error logs obtained after self-checking and the feedback from users on the actual solution results. During the testing process, if the model finds new error types or problems that cannot be effectively solved by existing solutions, it can automatically incorporate this information into the model's learning process, dynamically update the error information data set and model parameters, and improve the model's reasoning ability and accuracy.
[0061] 6. Optimize the model: Use the updated error database to train the model, and evaluate the performance of the model on the validation set after each round of training. For example, regularly evaluate the matching accuracy of the model and fine-tune the model as needed. By continuously improving the accuracy of the model, the vast majority of test error phenomena can be covered and matched, the accuracy of error information recognition can be improved, and the efficiency of error information correction can be improved.
[0062] In this way, the system is self-checked and error information identification and reasoning is performed before the formal test begins. The preset matching model is used to help testers quickly identify error problems, reduce dependence on professional knowledge and testing experience in identifying error information, and automatically repair problem parameters, effectively improving the test automation rate.
[0063] Step 204: Write the correction information into the configuration file of the target component corresponding to the error information to correct the error information in the target component.
[0064] In some embodiments, step 204 may specifically include: obtaining the parameter position of the error information in the configuration file of the corresponding target component, and writing the correction information according to the parameter position.
[0065] In some embodiments, the test parameter modification module can be used to identify the specific parameter position of the error information in the configuration file, and then the correction information is automatically written according to the format and parameter position of the configuration file to correct the error information in the original configuration file. Specifically, when the error information is queried and matched successfully, the Shell script can be called to read the corresponding correct test parameters in the data set, and the correct test parameter modifications are written into the configuration file of the corresponding SPEC jbb test tool. For example, when the JVM parameters cause the test to report an error, the correct JVM setting parameter modification is written into the JVM configuration file run_multi.sh; when the configuration parameters such as the test scale cause the test to report an error, the correct test parameter modification is written into the specjbb.props file.
[0066] In this way, script automation can be achieved without manual operation to find the configuration file corresponding to the error message and locate the corresponding parameter position, avoiding new errors that may be caused by too many parameters or cumbersome steps during manual modification, reducing manual inspection costs, and improving component self-inspection and correction efficiency.
[0067] Step 205: Use the corrected target component to enter the test warm-up phase and collect performance data of the test warm-up phase.
[0068] In some embodiments, an estimated score calculation module can be used to evaluate components. The estimated score calculation module may include two instances of data collection and score calculation. Among them, data collection can be used to collect performance data such as simulated business volume request peak, simulated business actual processing volume peak, test scale, CPU occupancy peak, memory usage peak, etc. in the test warm-up phase after the test parameters are correctly configured, so as to provide a benchmark reference for the formal test.
[0069] Step 206: Obtain a performance evaluation result of the test component according to the performance data, and perform an overall test of the test component based on the performance evaluation result.
[0070] In some embodiments, step 206 may specifically include: based on the performance data and the weight corresponding to the performance data, evaluating the performance score of the test component according to the system pressure in the warm-up phase; and determining whether to perform an overall test of the test component according to the performance score.
[0071] In some examples, a corresponding weight can be set for each performance data, and a preset scoring calculation formula can be constructed. The preset scoring calculation formula can be used to estimate the performance score in combination with the system pressure in the warm-up phase. Then, based on whether the performance score meets the performance requirements of the overall test, it can be determined whether to start all test components and conduct an overall test. The performance score can also be used to indicate whether the correction of error information of each component is a positive correction, whether it improves system performance, and whether the problems existing in the current component are solved.
[0072] Exemplarily, the preset scoring calculation formula can be expressed as:
[0073]
[0074] Wherein, a may represent the peak value of simulated business volume requests in the test warm-up phase (unit: jops: the number of Java operations processed per second), b may represent the peak value of actual simulated business processing volume, c may represent the test scale, which may be an integer multiple of the target test component started during the self-check, d may represent the peak value of the system CPU occupancy collected in the warm-up phase, e may represent the peak value of memory usage, x may represent the weight value of the ratio of actual business processing to total business volume b / a, which may be set to 50%; y may represent the weight value of the current system CPU occupancy peak d, which may be set to 40%, and z may represent the weight value of the memory usage peak e, which may be set to 10%.
[0075] For example, the peak request volume of a warm-up business volume is 10,000 jops, the peak processing volume is 9,500 jops, and the test scale is 20 times the single warm-up scale, that is, the number of test components to be started in the full test is 20 times the number of test components started in the self-test, the peak CPU usage is 98%, and the peak memory usage is 90%. According to the preset scoring calculation formula, the estimated score of this test is about 182,339 jops. The specific calculation formula is as follows:
[0076]
[0077] Correspondingly, the formula calculation method takes into account three factors that affect the final score, namely the ratio of actual business processing to total business volume b / a, the current system CPU occupancy peak d, and the memory usage peak e. After adding weight values according to the impact of each item on the result, the geometric mean of these three influencing factors is taken and multiplied by the test scale. The final test result can be estimated based on the system pressure during preheating. It has been verified that this method has high accuracy and the error can be controlled within 1%.
[0078] By using a set of algorithms to estimate the test score, all factors that may affect the test score are taken into account. The test score can be estimated without waiting for the test to end, which effectively improves the efficiency of test tuning.
[0079] Optionally, based on the performance score, determine whether to perform an overall test of the test component, which may specifically include: if the performance score meets the overall test conditions, start the overall test of the test component and obtain the overall test result corresponding to the test component; if the performance score meets the overall test conditions, adjust the configuration information of the test component.
[0080] For example, a performance score threshold can be set according to the test requirements. If the performance score is greater than or equal to the performance score threshold, it can be determined that the overall test conditions are met and all test components can be started for formal testing. If the performance score is less than the performance score threshold, it can be determined that the overall test conditions are not met, and the configuration information of the test component can be optimized and adjusted, and self-inspection and performance evaluation can be re-performed after adjustment.
[0081] As a possible implementation, Figure 4 As shown, you can first configure the test parameters, then start the test, wait for each test component to start, and check whether all test components respond. If all components have responded (Y), wait for the test to end and obtain the final test results. If any component does not respond (N), you can kill the test process, locate the unresponsive test component, find the corresponding log file, identify the error information, find the erroneous test parameters, find the configuration file corresponding to the erroneous parameters, modify them, restart the test after modification, and wait for each test component to start until all test components respond and complete the test.
[0082] As another possible implementation, Figure 5As shown, a processing flow of an automated test system is provided, starting from test parameter configuration, going through multiple inspection and processing steps, and finally completing the test and obtaining the results, thereby ensuring the automation and efficiency of the test process. Specifically, the test parameters may be configured first, which may include setting up the test environment, defining test cases, etc., and then running each test component, and starting one for each test component, to detect whether there is an error message during the test process. If there is no error message (N), then skip the subsequent error handling steps and directly calculate the estimated test result score; if there is an error message (Y), then continue to execute the error recognition process, perform text matching with the error data set (such as the error message data set), and determine whether the error message finds a match in the error message data set. If the match fails (N), use the BERT model for reasoning and give the error message solution with the highest current match; if the match succeeds (Y), then call the script, give the correct parameter configuration, automatically modify the corresponding configuration file, perform performance evaluation on the modified component, calculate the estimated test result score, and determine whether it is necessary to start a complete test based on the test result score. If it is not necessary to start a complete test (N), then return to the "test parameter configuration" step to optimize the test parameters; if it is necessary to start a complete test (Y), then start the complete test process, wait for the test to end, and obtain the final test result.
[0083] In this way, a self-check module is added before the test, which can quickly solve the problem of incorrect parameters, improve test efficiency, and save test human resources. An automatic error correction module is added, which can automatically complete the identification and reasoning of erroneous test information and automatic modification of test parameters, reducing the possibility of manual setting errors and experience dependence. A test score estimation module is also added. When performing test tuning, there is no need to wait for the test to end to judge the level of the test results. It can quickly determine whether adjusting certain parameters has a positive effect, thereby improving tuning efficiency.
[0084] Compared with the current existing technology, this embodiment can integrate the logs of various target components into the same target log file, automatically detect the error information therein, use a preset matching model to quickly identify error problems, and determine the correction information based on the text similarity with the error data set. There is no need to rely on manual identification of error information, and automatic repair of error information is achieved. In addition, the performance score can be used to determine whether the adjusted parameters have a positive effect during test tuning, thereby improving the tuning efficiency.
[0085] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in this embodiment provides a component testing device, such as Figure 6 As shown, the device includes: an acquisition module 31, a correction module 32, and a testing module 33.
[0086] The acquisition module 31 is configured to acquire the test groups after the test components are classified, and the configuration information of the test components in the test groups is the same;
[0087] The correction module 32 is configured to select a target component from the test group to perform a self-check on the configuration information and correct the error information in the configuration information;
[0088] The acquisition module 31 is configured to use the modified target component to enter the test preheating phase and collect performance data of the test preheating phase;
[0089] The test module 33 is configured to obtain a performance evaluation result of the test component according to the performance data, and perform an overall test of the test component based on the performance evaluation result.
[0090] In some examples of the present embodiment, the correction module 32 is specifically configured to perform configuration information self-check on target components in different test groups, and write self-check logs corresponding to different target components into a target log file; detect error information in the target log file, perform text similarity matching on the error information with an error data set, and obtain correction information corresponding to the error information based on the matching result; write the correction information into a configuration file of the target component corresponding to the error information, and correct the error information in the target component.
[0091] In some examples of the present embodiment, the correction module 32 is specifically configured to perform text preprocessing on the error information using a word segmenter in a preset matching model, and obtain an embedding vector corresponding to the error information after text preprocessing; based on the embedding vector and the embedding vector corresponding to the error data set, evaluate the text similarity between the error information and the error data set; and determine the correction information corresponding to the error information based on the text similarity and a preset similarity threshold.
[0092] In some examples of the present embodiment, the correction module 32 is specifically configured to compare the text similarity with a preset similarity threshold. If the text similarity is greater than the preset similarity threshold, the match is determined to be successful, and the correction information corresponding to the error information is determined from the error data set; if the text similarity is less than the preset similarity threshold, the match is determined to have failed, and the preset matching model is used to infer the correction information corresponding to the error information based on the text similarity.
[0093] In some examples of this embodiment, the correction module 32 is specifically configured to obtain the parameter position of the error information in the configuration file of the corresponding target component, and write the correction information according to the parameter position.
[0094] In some examples of this embodiment, the test module 33 is specifically configured to evaluate the performance score of the test component according to the system pressure in the warm-up phase based on the performance data and the weight corresponding to the performance data; and determine whether to perform an overall test of the test component based on the performance score.
[0095] In some examples of this embodiment, the test module 33 is specifically configured to start the overall test of the test component and obtain the overall test result corresponding to the test component if the performance score meets the overall test conditions; if the performance score meets the overall test conditions, adjust the configuration information of the test component.
[0096] It should be noted that for other corresponding descriptions of the functional units involved in the component testing device provided in this embodiment, reference can be made to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0097] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0098] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The method shown.
[0099] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0100] Based on the above Figure 1 and Figure 2 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, such as a personal computer, a server, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The method shown.
[0101] In some embodiments, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may include a standard wired interface, a wireless interface (such as a WI-FI interface), etc. in some embodiments.
[0102] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0103] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the solution of this embodiment, compared with the current prior art, this embodiment can integrate the logs of various target components into the same target log file, and automatically detect the error information therein, use a preset matching model to quickly identify the error problem, determine the correction information based on the text similarity with the error data set, and do not need to rely on manual identification of error information, thereby achieving automatic repair of error information. In addition, the performance score can be used to determine whether the adjusted parameters have a positive effect during test tuning, thereby improving the tuning efficiency.
[0105] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0106] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.
Claims
1. A component testing method, characterized in that: include: Acquire a test group after the test components are classified, wherein the configuration information of the test components in the test group is the same; Selecting a target component from the test group to perform self-check on configuration information, and correcting error information in the configuration information; Entering a test warm-up phase using the corrected target component, and collecting performance data of the test warm-up phase; A performance evaluation result of the test component is obtained according to the performance data, and an overall test of the test component is performed based on the performance evaluation result.
2. The method according to claim 1, characterized in that The step of selecting a target component from the test group to perform configuration information self-checking and correcting error information in the configuration information includes: Perform self-check on the configuration information of target components in different test groups, and write the self-check logs corresponding to different target components into the target log file; Detecting error information in the target log file, performing text similarity matching between the error information and an error data set, and obtaining correction information corresponding to the error information according to the matching result; The correction information is written into a configuration file of a target component corresponding to the error information, and the error information in the target component is corrected.
3. The method according to claim 2, characterized in that The detecting the error information in the target log file, performing text similarity matching between the error information and the error data set, and obtaining correction information corresponding to the error information according to the matching result, includes: Performing text preprocessing on the error information using a word segmenter in a preset matching model to obtain an embedding vector corresponding to the error information after text preprocessing; Based on the embedding vector and the embedding vector corresponding to the error data set, evaluating the text similarity between the error information and the error data set; Correction information corresponding to the error information is determined based on the text similarity and a preset similarity threshold.
4. The method according to claim 3, characterized in that The determining, based on the text similarity and a preset similarity threshold, correction information corresponding to the error information includes: Comparing the text similarity with a preset similarity threshold, if the text similarity is greater than the preset similarity threshold, determining that the match is successful, and determining correction information corresponding to the error information from the error data set; If the text similarity is less than the preset similarity threshold, it is determined that the match fails, and the preset matching model is used to infer the correction information corresponding to the error information based on the text similarity.
5. The method according to claim 2, characterized in that: The step of writing the correction information into a configuration file of a target component corresponding to the error information to correct the error information in the target component includes: The parameter position of the error information in the configuration file of the corresponding target component is obtained, and the correction information is written according to the parameter position.
6. The method according to claim 1, characterized in that The obtaining a performance evaluation result of the test component according to the performance data, and performing an overall test of the test component based on the performance evaluation result, comprises: Based on the performance data and the weights corresponding to the performance data, evaluating the performance score of the test component according to the system pressure in the warm-up phase; Based on the performance score, determine whether to perform an overall test of the test component.
7. The method according to claim 6, characterized in that The determining, according to the performance score, whether to perform an overall test of the test component comprises: If the performance score meets the overall test condition, the overall test of the test component is started to obtain the overall test result corresponding to the test component; If the performance score meets the overall test conditions, the configuration information of the test component is adjusted.
8. A component testing device, characterized in that: include: An acquisition module is configured to acquire test groups after the test components are classified, wherein the configuration information of the test components in the test groups is the same; A correction module is configured to select a target component from the test group to perform a self-check on the configuration information and correct error information in the configuration information; an acquisition module configured to enter a test preheating phase using the modified target component and collect performance data of the test preheating phase; The test module is configured to obtain a performance evaluation result of the test component according to the performance data, and perform an overall test of the test component based on the performance evaluation result.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.