Method and device for calibrating test data in batches and computer readable storage medium
By identifying and storing calibration variables and values in the test case set, determining their addresses and partitions, and using the XCP protocol for batch calibration, the problems of low efficiency and error proneness of manual calibration are solved, and efficient and accurate calibration of test data is achieved.
Patent Information
- Application Number
- CN202411569577.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art manual calibration test data is inefficient and error-prone, and the message calibration variable names of different projects are different, so a common DCM file cannot be used.
By obtaining the test case set, identifying the calibration variables and calibration values, storing them into the variable array, determining the address and partition according to the variable name, and using the XCP protocol to perform calibration, completing batch calibration of the test data.
It improves calibration efficiency, reduces manual errors, is suitable for testing data preparation for multiple projects, enhances testing efficiency, and solves the problems of low efficiency and error-prone manual calibration data.
Smart Images

Figure CN119440996A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of batch calibration test data, and in particular, to a method for batch calibration test data, a device for batch calibration test data, a computer-readable storage medium, and an electronic device. Background Art
[0002] Currently, the basic test data needs to be calibrated before executing automatic test cases. Taking message testing as an example, the message ID, channel, cycle, and enable need to be configured. There are a large number of messages, and manual calibration of data is inefficient and prone to errors. Different projects have different names of message calibration variables, and cannot use a common DCM file (a common file format in digital imaging and communication technology). Summary of the invention
[0003] The main purpose of the present application is to provide a method for batch calibration test data, a device for batch calibration test data, a storage medium, a processor and an electronic device, so as to at least solve the problem of low efficiency and easy error of manual calibration of data in the prior art.
[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for batch calibrating test data is provided, comprising: obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; determining a calibration variable address according to a variable name of each calibration variable, and determining a partition of each calibration variable according to each variable address; calibrating each calibration variable according to the partition and calibration value of each calibration variable to complete the calibration of the test data.
[0005] Optionally, according to the partition of each calibration variable, each calibration variable is calibrated, including: when it is determined that the partition of the calibration variable is the first partition, using the XCP protocol to send a first instruction message and a second instruction message to read the original value of the calibration variable through the calibration variable address, and storing the original value of the variable in the variable array, wherein the calibration variable of the first partition needs to be restored to the original value of the variable after the calibration is completed; according to the calibration value of the calibration variable, using the XCP protocol to send the first instruction message and the third instruction message to calibrate the calibration variable.
[0006] Optionally, each calibration variable is calibrated according to the partition of each calibration variable, including: when it is determined that the partition of the calibration variable is the second partition, according to the calibration value of the calibration variable, using the XCP protocol to send a first instruction message and a third instruction message to calibrate the calibration variable, wherein the calibration variable of the second partition does not need to be restored to the original value of the variable after the calibration is completed.
[0007] Optionally, after calibrating each of the calibration variables according to the calibration value to complete the calibration of the test data, the method further includes: when it is detected that the execution of the test case is completed, re-determining the partition of each of the calibration variables; when it is determined that the partition of the calibration variable is the first partition, restoring the variable value of the calibration variable at least according to the original value of the variable in the variable array.
[0008] Optionally, the variable value of the calibration variable is restored at least according to the original value of the variable in the variable array, including: obtaining the original value of the variable and the calibration variable address of the calibration variable from the variable array according to the XCP protocol; and sending the first instruction message and the second instruction message using the XCP protocol to restore the variable value of the calibration variable according to the original value of the variable and the calibration variable address of the calibration variable.
[0009] Optionally, determining the calibration variable address according to the variable name of each calibration variable includes: searching the calibration variable address from the A2L file according to the variable name of the calibration variable; if the calibration variable address is not found in the A2L file, determining that the A2L file does not contain the calibration variable, and storing the calibration variable in an abnormal variable array.
[0010] Optionally, after storing the calibration variables in the abnormal variable array, the method further includes: determining the test cases corresponding to each calibration variable in the abnormal variable array, and generating an abnormality report based on the calibration variables and the test cases, wherein the abnormality report is used for manual verification by testers.
[0011] According to another aspect of the present application, a device for batch calibration of test data is provided, comprising: an acquisition unit, used to acquire a test case set, identify calibration variables and calibration values of the test case set, and store the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; a determination unit, used to determine the calibration variable address according to the variable name of each calibration variable, and determine the partition of each calibration variable according to each variable address; a calibration unit, used to calibrate each calibration variable according to the partition and calibration value of each calibration variable to complete the calibration of the test data.
[0012] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for batch calibration test data.
[0013] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the batch calibration test data.
[0014] Apply the technical solution of the present application, obtain a test case set, identify the calibration variables and calibration values of the test case set, and store the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; determine the calibration variable address according to the variable name of each calibration variable, and determine the partition of each calibration variable according to each variable address; calibrate each calibration variable according to the partition and calibration value of each calibration variable to complete the calibration of the test data. By identifying the relevant variable information in the test case and calibrating it using the XCP protocol, this solution has low dependence on the calibration software, improves the calibration efficiency, and promptly restores the variables of the offline related partitions after the execution of the test case is completed to avoid affecting the offline function. The impact on the original data is small, and it can be applied to multiple projects for test data preparation, which improves the test efficiency. It solves the problem of low efficiency and easy error of manual calibration data in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1A hardware structure block diagram of a mobile terminal for executing a method for batch calibration test data provided in an embodiment of the present application is shown;
[0017] Figure 2 A schematic flow chart of a method for batch calibration of test data provided according to an embodiment of the present application is shown;
[0018] Figure 3 A schematic diagram of a calibration process for calibrating variables of a first partition provided in accordance with an embodiment of the present application is shown;
[0019] Figure 4 A schematic diagram of a process for recovering the calibration variables of the first partition after calibration according to an embodiment of the present application is shown;
[0020] Figure 5 A schematic flow chart of a method for batch calibration test data provided according to an embodiment of the present application is shown;
[0021] Figure 6 A structural block diagram of a device for batch calibration test data provided according to an embodiment of the present application is shown.
[0022] The above drawings include the following reference numerals:
[0023] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] As introduced in the background technology, the manual calibration data in the prior art is inefficient and prone to errors. In order to solve the problem that the manual calibration data in the prior art is inefficient and prone to errors, the embodiments of the present application provide a method for batch calibrating test data, an apparatus for batch calibrating test data, a computer-readable storage medium and an electronic device.
[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for batch calibration test data according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for batch calibration test data in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned network specific example may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a method for batch calibration test data running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] Figure 2 FIG. 1 is a flow chart of a method for batch calibration test data according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0033] Step S201, obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set;
[0034] Among them, the test case can be in .pkg format, which is an executable automatic test case, for example: ComRx_WVS_Water Valve Working Status.pkg. By slicing the case structure and globally matching, the test steps included in the test case are identified, and then the message-related variables included in the test step are identified, such as: the variables list in the test step "Receiving timeout fault report" contains the substitute value variable Com_xxDfl_C. The calibrated value is identified in the test step by the index keyword method. For example, the substitute value keyword SigVal_Dfl in the test step has a corresponding value of 1000, so Com_xxDfl_C needs to be calibrated to 1000, and the variables that need to be calibrated, such as ID and cycle, are also identified in turn in the above manner. Finally, all calibration quantities and calibration values are stored in the array.
[0035] Step S202, determining the calibration variable address according to the variable name of each calibration variable, and determining the partition of each calibration variable according to each variable address;
[0036] Specifically, the variable array is obtained through test case decomposition, and the A2L file of the version data is imported (the A2L file is a standard file format for describing the parameters and characteristics of the automotive electronic control unit (ECU). The file usually contains hardware and software information about the ECU, such as the configuration of sensors and actuators, calibration parameters, mapping tables, etc.), and the calibration variable name is cyclically searched in the A2L file to obtain the variable address of the calibration variable and store it in the variable array. If the variable is not included in the A2L, it is stored in the abnormal variable array and deleted from the original array, and manually checked after all executions are completed. The variable addresses are judged in turn. If the variable address is in the EOL1 area or 2 area, it indicates that the variable is related to the offline, and it needs to be restored to its original value after the test is completed. If the variable is in the EOL3 area or 4 area, there is no need to perform variable recovery processing.
[0037] Step S203, calibrating each of the calibration variables according to the partitions and calibration values of each of the calibration variables to complete the calibration of the test data.
[0038] Specifically, each calibration variable is calibrated according to its partition and calibration value, so that the tester does not need to configure and initialize the calibration software in advance, which improves the calibration efficiency and avoids calibration failure due to abnormal configuration of the calibration software.
[0039] Through this embodiment, a test case set is obtained, the calibration variables and calibration values of the above test case set are identified, and the calibration variables and calibration values are stored in a variable array, wherein the above test case set is an executable automatic test case data set; the calibration variable address is determined according to the variable name of each calibration variable, and the partition of each calibration variable is determined according to each variable address; each calibration variable is calibrated according to the partition and calibration value of each calibration variable to complete the calibration of the test data. By identifying the relevant variable information in the test case and calibrating according to the partition, this solution has low dependence on the calibration software, improves the calibration efficiency, has a small impact on the original data, can be applied to multiple projects for test data preparation, and improves the test efficiency. It solves the problem of low efficiency and easy error of manual calibration data in the prior art.
[0040] In the specific implementation process, according to the above partitions of each calibration variable, each calibration variable is calibrated, such as Figure 3 As shown, the following steps are included:
[0041] Step S301, when it is determined that the partition of the calibrated variable is the first partition, a first instruction message and a second instruction message are sent using the XCP protocol to read the original value of the calibrated variable through the calibrated variable address, and the original value of the variable is stored in the variable array, wherein the calibrated variable of the first partition needs to be restored to the original value of the variable after the calibration is completed;
[0042] XCP protocol, (Universal Measurement and Calibration Protocol) is a universal measurement and calibration protocol used in automotive electronic systems. It allows external test equipment (such as PC) to communicate with automotive electronic control units (ECU) through CAN (Controller Area Network) or other communication interfaces to achieve data exchange, parameter configuration and diagnosis functions.
[0043] Step S302: according to the calibration value of the calibration variable, the first instruction message and the third instruction message are sent using the XCP protocol to calibrate the calibration variable.
[0044] Among them, EOL test refers to the functional inspection of automotive electronic products before they go offline. Whether the variable is related to the offline is determined according to the set partition. If the variable is related to the offline, it means that it needs to be restored to its original value after the test is completed; the first partition is the offline-related partition, including the EOL1 area and the EOL2 area, the first instruction message is the F6 instruction message, the second instruction message is the F5 instruction message, and the third instruction message is the F0 instruction message.
[0045] 1) F0-Write Object command: This command is used to write data to the ECU. It can write a single value or a group of values to the ECU's memory.
[0046] 2) F5-Read Object command: used to read the value of a single object (variable) from the ECU. The parameter is the address of the object. This command is often used to obtain parameter values, measurement values or status information in the ECU.
[0047] 3) F6-Read Object Multiple instruction: The F6 instruction is used to read the values of multiple consecutive objects (variables) from the ECU. The parameters include the starting address and the number of objects to be read. This instruction can improve efficiency because it allows multiple consecutive variables to be read at one time, reducing communication overhead.
[0048] These instructions are part of the XCP protocol and are used to implement calibration, parameterization, diagnosis and monitoring of ECUs. Which instruction to use depends on the type of operation you need to perform, such as using F5 to read a single parameter value and using F0 to batch update multiple parameters. When using these instructions, you need to make sure to follow the data format and communication rules of the XCP protocol.
[0049] If the variable is the EOL1 zone or 2 zone calibration quantity, this method first uses the XCP protocol to establish a connection, then uses the XCP protocol to send F6, F5 command messages to read the current variable value through the variable address, and stores the original value of the calibration quantity into the array, then obtains the value to be calibrated in the array, uses the XCP protocol to send F6, F0 command messages to calibrate the variable, and after all variables are calibrated, prints the calibration results.
[0050] Specifically, according to the above-mentioned partition of each of the above-mentioned calibration variables, each of the above-mentioned calibration variables is calibrated, including: when it is determined that the above-mentioned partition of the above-mentioned calibration variable is the second partition, according to the above-mentioned calibration value of the above-mentioned calibration variable, using the XCP protocol to send a first instruction message and a third instruction message to calibrate the above-mentioned calibration variable, wherein the above-mentioned calibration variable of the above-mentioned second partition does not need to be restored to the original value of the variable after the calibration is completed.
[0051] The second partition is the partition that does not need to restore variables after the test is completed, including the EOL3 area and the EOL4 area;
[0052] If the variable is the EOL3 or 4 zone calibration quantity, this method first uses the XCP protocol to establish a connection, then obtains the calibration address and the value to be calibrated in the array, and uses the XCP protocol to send F6 and F0 command messages to calibrate the variable. After all variables are calibrated, print the calibration results.
[0053] More specifically, after calibrating each of the above-mentioned calibration variables according to the above-mentioned calibration values to complete the calibration of the test data, the above-mentioned method also includes: when it is detected that the execution of the test case is completed, re-determining the above-mentioned partition of each of the above-mentioned calibration variables; when it is determined that the above-mentioned partition of the above-mentioned calibration variable is the above-mentioned first partition, restoring the variable value of the above-mentioned calibration variable at least according to the original value of the above-mentioned variable in the above-mentioned variable array.
[0054] In this method, the tester performs the use case execution normally. After the test case is executed, he clicks the confirmation button to start restoring the calibrated variables of the first partition after calibration, and restores the variable values of the calibrated variables of the first partition to the original values of the variables. The first partition is an offline-related partition, which avoids affecting the offline function and has a small impact on the original data.
[0055] Furthermore, the variable value of the calibration variable is restored at least according to the original value of the variable in the variable array, such as Figure 4 As shown, the following steps are included:
[0056] Step S401, obtaining the original value of the calibrated variable and the address of the calibrated variable from the variable array according to the XCP protocol;
[0057] Step S402: according to the original value of the calibrated variable and the address of the calibrated variable, the first instruction message and the second instruction message are sent using the XCP protocol to restore the variable value of the calibrated variable.
[0058] This method first uses the XCP protocol to establish a connection, then obtains the calibration address and calibration original value in the array, and uses the XCP protocol to send F6 and F0 command messages to calibrate the variables. After all variables are calibrated, the calibration results are printed to complete the calibration value recovery operation of the calibration variables in the first partition.
[0059] Furthermore, the calibration variable address is determined according to the variable name of each of the above-mentioned calibration variables, including: searching the above-mentioned calibration variable address from the A2L file according to the above-mentioned variable name of the above-mentioned calibration variable; when the above-mentioned calibration variable address is not found in the above-mentioned A2L file, determining that the above-mentioned calibration variable is not included in the above-mentioned A2L file, and storing the above-mentioned calibration variable in the abnormal variable array.
[0060] This method searches for the calibration variable name in the A2L file in a loop, obtains the variable address of the calibration value, and stores it in the array. If the variable is not included in the A2L, it is stored in the abnormal variable array and deleted from the original array. After all executions are completed, manual verification is performed. By looping through the variable information and calibration values in the use case, accurate calibration of the variables can be achieved, which improves the accuracy of data calibration.
[0061] Specifically, after storing the above-mentioned calibration variables in the abnormal variable array, the above-mentioned method also includes: determining the test cases corresponding to each of the above-mentioned calibration variables in the above-mentioned abnormal variable array, and generating an abnormality report according to the above-mentioned calibration variables and the above-mentioned test cases, wherein the above-mentioned abnormality report is used for manual verification by testers.
[0062] This method writes the variable names recorded in the abnormal variable array into a text document or table, and records the test cases corresponding to the variables, records the calibration situation as abnormal, and prompts the tester to perform manual verification.
[0063] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for batch calibration test data of the present application will be described in detail below in combination with specific embodiments.
[0064] The present embodiment relates to a specific method for batch calibration of test data, and the present embodiment is divided into six modules: a test case processing module, a calibration address processing module, a data calibration module, a waiting case execution module, a data recovery module, and an exception handling module.
[0065] The specific method of batch calibration test data is as follows: Figure 5 As shown, including the following:
[0066] Enter the test case set in the test case processing module (the test case can be in .pkg format and is an executable automatic test case, for example: ComRx_WVS_Water Valve Working Status.pkg), identify the test steps contained in the test case by slicing and globally matching the test case structure, and then identify the message-related variables contained in the test steps, such as: the variables list in the test step "Receiving timeout fault report" contains the substitute value variable Com_xxDfl_C. Identify the calibrated value in the test step by the index keyword method, such as the substitute value keyword SigVal_Dfl in the test step, the corresponding value is 1000, then Com_xxDfl_C needs to be calibrated to 1000, and the variables that need to be calibrated, such as ID, cycle, etc., are also identified in turn in the above manner. Finally, all calibration quantities and calibration values are stored in an array for the convenience of subsequent modules.
[0067] In the calibration address processing module, input the variable array obtained by the test case decomposition, and import the A2L file of the version data. Loop through the A2L file to find the calibration variable name, obtain the variable address of the calibration quantity, and store it in the array. If the variable is not included in the A2L, store it in the abnormal variable array and delete it from the original array. After all executions are completed, manually check it. Judge the variable address in turn. If the variable address is in the EOL1 or 2 area, it indicates that the variable is related to the offline, and it needs to be restored to its original value after the test is completed. If the variable is in the EOL3-4 area, there is no need to perform variable recovery processing.
[0068] If the variable is the calibration quantity of EOL1 area or 2 area, after entering the data calibration module, first use the XCP protocol to establish a connection, then use the XCP protocol to send F6, F5 command messages to read the current variable value through the variable address, and store the original value of the calibration quantity into the array, then obtain the value to be calibrated in the array, and use the XCP protocol to send F6, F0 command messages to calibrate the variable. If the variable is the calibration quantity of EOL3 area or 4 area, after entering the data calibration module, first use the XCP protocol to establish a connection, then obtain the calibration address and the value to be calibrated in the array, and use the XCP protocol to send F6, F0 command messages to calibrate the variable. After all variables are calibrated, print the calibration results and enter the waiting module.
[0069] After entering the waiting module, the tester performs the use case execution operations normally. After the test case is executed, click the confirmation button and the system enters the data recovery module.
[0070] After entering the data recovery module, first use the XCP protocol to establish a connection, then obtain the calibration address and calibration original value in the array, and use the XCP protocol to send F6 and F0 command messages to calibrate the variables. After all variables are calibrated, print the calibration results and enter the exception handling module.
[0071] In the exception handling module, the variable name recorded in the exception variable array is written into a text document or table, and the test case corresponding to the variable is recorded. The calibration situation is recorded as abnormal, prompting the tester to perform manual verification.
[0072] This embodiment improves the reusability of the data calibration script and the efficiency of test data preparation by determining the use case that needs to be executed currently for calibration. By cyclically reading the variable information and calibration values in the use case, accurate calibration of the variables can be achieved, thereby improving the accuracy of data calibration. Calibration is performed using variable addresses through XCP instructions, so that testers do not need to configure and initialize the calibration software in advance, thereby improving calibration efficiency and avoiding calibration failures due to abnormal configuration of the calibration software. After the use case is executed, the variables of the offline related partitions are restored in a timely manner to avoid affecting the offline function and have a small impact on the original data.
[0073] The present application embodiment also provides a device for batch calibration test data. It should be noted that the device for batch calibration test data of the present application embodiment can be used to execute the method for batch calibration test data provided by the present application embodiment. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions have been made and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0074] The following is an introduction to the device for batch calibration test data provided in an embodiment of the present application.
[0075] Figure 6 Schematic diagram of a device for batch calibration test data according to an embodiment of the present application. Figure 6 As shown, the device comprises:
[0076] An acquisition unit 61 is used to acquire a test case set, identify calibration variables and calibration values of the test case set, and store the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set;
[0077] A determination unit 62, configured to determine a calibration variable address according to a variable name of each calibration variable, and determine a partition of each calibration variable according to each variable address;
[0078] The calibration unit 63 is used to perform calibration processing on each of the calibration variables according to the partitions and calibration values of each of the calibration variables to complete the calibration of the test data.
[0079] Specifically, each calibration variable is calibrated according to its partition and calibration value, so that the tester does not need to configure and initialize the calibration software in advance, which improves the calibration efficiency and avoids calibration failure due to abnormal configuration of the calibration software.
[0080] In this embodiment, the acquisition unit is used to acquire a test case set, identify the calibration variables and calibration values of the above test case set, and store the above calibration variables and calibration values in a variable array, wherein the above test case set is an executable automatic test case data set; the determination unit is used to determine the calibration variable address according to the variable name of each calibration variable, and determine the partition of each calibration variable according to each variable address; the calibration unit is used to calibrate each calibration variable according to the partition and calibration value of each calibration variable to complete the calibration of the test data. By identifying the relevant variable information in the test case and calibrating according to the partition, this solution has a low dependence on the calibration software, improves the calibration efficiency, has a small impact on the original data, can be applied to multiple projects for test data preparation, and improves the test efficiency. It solves the problem of low efficiency and easy error of manual calibration data in the prior art.
[0081] As an optional scheme, the calibration unit includes a reading module and a first calibration processing module. The reading module is used to, when determining that the partition of the calibration variable is the first partition, use the XCP protocol to send the first instruction message and the second instruction message to read the original value of the calibration variable through the calibration variable address, and store the original value of the variable in the variable array, wherein the calibration variable of the first partition needs to be restored to the original value of the variable after the calibration is completed; the first calibration processing module is used to send the first instruction message and the third instruction message using the XCP protocol to calibrate the calibration variable according to the calibration value of the calibration variable.
[0082] The first partition includes an EOL1 area and an EOL2 area, the first instruction message is an F6 instruction message, the second instruction message is an F5 instruction message, and the third instruction message is an F0 instruction message.
[0083] Specifically, if the variable is the EOL1 zone or 2 zone calibration quantity, first use the XCP protocol to establish a connection, then use the XCP protocol to send F6, F5 command messages to read the current variable value through the variable address, and store the original value of the calibration quantity into the array, then obtain the value to be calibrated in the array, use the XCP protocol to send F6, F0 command messages to calibrate the variable, and after all variables are calibrated, print the calibration results.
[0084] An optional scheme, the calibration unit also includes a second calibration processing module, which is used to calibrate the calibration variable by sending a first instruction message and a third instruction message using the XCP protocol according to the calibration value of the calibration variable when it is determined that the partition of the calibration variable is the second partition, wherein the calibration variable of the second partition does not need to be restored to the original value of the variable after the calibration is completed.
[0085] Among them, the first partition includes EOL3 area and EOL4 area;
[0086] Specifically, if the variable is a calibration value in EOL3 or 4 zone, first use the XCP protocol to establish a connection, then obtain the calibration address and the value to be calibrated in the array, and use the XCP protocol to send F6 and F0 command messages to calibrate the variable. After all variables are calibrated, print the calibration results.
[0087] An optional solution, the device also includes a detection unit and a recovery processing unit, the detection unit is used to calibrate each of the above-mentioned calibration variables according to the above-mentioned calibration values to complete the calibration of the test data, and then, when it is detected that the execution of the test case is completed, re-determine the above-mentioned partition of each of the above-mentioned calibration variables; the recovery processing unit is used to restore the variable value of the above-mentioned calibration variable at least according to the original value of the above-mentioned variable in the above-mentioned variable array when it is determined that the above-mentioned partition of the above-mentioned calibration variable is the above-mentioned first partition.
[0088] Specifically, when the tester performs the use case execution normally, after the test case is executed, he clicks the confirmation button to start restoring the calibrated variables of the first partition after calibration, and restores the variable values of the calibrated variables of the first partition to the original values of the variables. The first partition is an offline-related partition, which avoids affecting the offline function and has a small impact on the original data.
[0089] An optional solution, the recovery processing unit includes an acquisition module and a recovery processing module; the acquisition module is used to obtain the original value of the above-mentioned variable and the above-mentioned calibration variable address of the above-mentioned calibration variable from the above-mentioned variable array according to the above-mentioned XCP protocol; the recovery processing module is used to send the above-mentioned first instruction message and the above-mentioned second instruction message using the above-mentioned XCP protocol to restore the above-mentioned variable value of the above-mentioned calibration variable according to the above-mentioned variable original value and the above-mentioned calibration variable address of the above-mentioned calibration variable.
[0090] Specifically, first use the XCP protocol to establish a connection, then obtain the calibration address and calibration original value in the array, and use the XCP protocol to send F6 and F0 command messages to calibrate the variables. After all variables are calibrated, print the calibration results to complete the calibration value recovery operation of the calibration variables in the first partition.
[0091] An optional solution, the determination unit includes a search module and a determination module; the search module is used to search the calibration variable address from the A2L file according to the variable name of the calibration variable; the determination module is used to determine that the A2L file does not contain the calibration variable if the calibration variable address is not found in the A2L file, and store the calibration variable in the abnormal variable array.
[0092] Specifically, the calibration variable name is searched in the A2L file in a loop, the variable address of the calibration variable is obtained, and it is stored in the array. If the variable is not included in the A2L, it is stored in the abnormal variable array and deleted from the original array, and then manually checked after all executions are completed. By looping and reading the variable information and calibration values in the use case, accurate calibration of the variables can be achieved, which improves the accuracy of data calibration.
[0093] In an optional scheme, the determination unit also includes a generation module, which is used to determine the test cases corresponding to each of the above-mentioned calibration variables in the above-mentioned abnormal variable array after storing the above-mentioned calibration variables in the above-mentioned abnormal variable array, and generate an abnormality report according to the above-mentioned calibration variables and the above-mentioned test cases, wherein the above-mentioned abnormality report is used for manual verification by testers.
[0094] Specifically, the variable names recorded in the abnormal variable array are written into a text document or a table, and the test cases corresponding to the variables are recorded. The calibration situation is recorded as abnormal, prompting the tester to perform manual verification.
[0095] The device for batch calibration test data includes a processor and a memory. The acquisition unit, determination unit, calibration unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0096] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of low efficiency and easy error in manual calibration of data in the prior art can be solved by adjusting kernel parameters.
[0097] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0098] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute the method for batch calibration test data.
[0099] Specifically, the method for batch calibration test data includes:
[0100] Step S201, obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set;
[0101] Step S202, determining the calibration variable address according to the variable name of each calibration variable, and determining the partition of each calibration variable according to each variable address;
[0102] Step S203, calibrating each of the calibration variables according to the partitions and calibration values of each of the calibration variables to complete the calibration of the test data.
[0103] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for batch calibration test data is executed when the program is run.
[0104] Specifically, the method for batch calibration test data includes:
[0105] Step S201, obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set;
[0106] Step S202, determining the calibration variable address according to the variable name of each calibration variable, and determining the partition of each calibration variable according to each variable address;
[0107] Step S203, calibrating each of the calibration variables according to the partitions and calibration values of each of the calibration variables to complete the calibration of the test data.
[0108] An embodiment of the present invention provides an electronic device, the device comprising a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0109] Step S201, obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set;
[0110] Step S202, determining the calibration variable address according to the variable name of each calibration variable, and determining the partition of each calibration variable according to each variable address;
[0111] Step S203, calibrating each of the calibration variables according to the partitions and calibration values of each of the calibration variables to complete the calibration of the test data.
[0112] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0113] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0114] Step S201, obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set;
[0115] Step S202, determining the calibration variable address according to the variable name of each calibration variable, and determining the partition of each calibration variable according to each variable address;
[0116] Step S203, calibrating each of the calibration variables according to the partitions and calibration values of each of the calibration variables to complete the calibration of the test data.
[0117] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0118] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0119] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0122] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0123] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0124] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0125] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0126] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0127] 1) A method for batch calibration of test data in the present application includes: obtaining a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; determining the calibration variable address according to the variable name of each calibration variable, and determining the partition of each calibration variable according to each variable address; calibrating each calibration variable according to the partition and calibration value of each calibration variable to complete the calibration of the test data. By identifying the relevant variable information in the test case and calibrating according to the partition, this solution has low dependence on the calibration software, improves the calibration efficiency, has a small impact on the original data, can be applied to multiple projects for test data preparation, and improves the test efficiency. It solves the problem of low efficiency and easy errors in manual calibration of data in the prior art.
[0128] 2) A device for batch calibration of test data of the present application includes: an acquisition unit, used to acquire a test case set, identify calibration variables and calibration values of the test case set, and store the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; a determination unit, used to determine the calibration variable address according to the variable name of each calibration variable, and determine the partition of each calibration variable according to each variable address; a calibration unit, used to calibrate each calibration variable according to the partition and calibration value of each calibration variable to complete the calibration of the test data. By identifying the relevant variable information in the test case and calibrating according to the partition, this solution has a low dependence on the calibration software, improves the calibration efficiency, has a small impact on the original data, can be applied to multiple projects for test data preparation, and improves the test efficiency. It solves the problem of low efficiency and easy error in manual calibration of data in the prior art.
[0129] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for batch calibration of test data, characterized in that: include: Acquire a test case set, identify calibration variables and calibration values of the test case set, and store the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; Determine the calibration variable address according to the variable name of each calibration variable, and determine the partition of each calibration variable according to each variable address; Each calibration variable is calibrated according to the partition and the calibration value of each calibration variable to complete the calibration of the test data.
2. The method according to claim 1, characterized in that According to the partitions of the calibration variables, calibration processing is performed on the calibration variables, including: In the case where it is determined that the partition of the calibration variable is the first partition, a first instruction message and a second instruction message are sent using the XCP protocol to read the original value of the calibration variable through the calibration variable address, and store the original value of the variable in the variable array, wherein the calibration variable of the first partition needs to be restored to the original value of the variable after the calibration is completed; According to the calibration value of the calibration variable, the first instruction message and the third instruction message are sent using the XCP protocol to calibrate the calibration variable.
3. The method according to claim 1, characterized in that According to the partitions of the calibration variables, calibration processing is performed on the calibration variables, including: When it is determined that the partition of the calibration variable is the second partition, the calibration variable is calibrated by sending a first instruction message and a third instruction message using the XCP protocol according to the calibration value of the calibration variable, wherein the calibration variable of the second partition does not need to be restored to the original value of the variable after the calibration is completed.
4. The method according to claim 2, characterized in that: After calibrating each of the calibration variables according to the calibration value to complete the calibration of the test data, the method further includes: When it is detected that the execution of the test case is completed, re-determining the partition of each of the calibration variables; When it is determined that the partition of the calibration variable is the first partition, the variable value of the calibration variable is restored at least according to the original value of the variable in the variable array.
5. The method according to claim 4, characterized in that Restoring the variable value of the calibration variable at least according to the original value of the variable in the variable array includes: Obtaining the variable original value and the calibration variable address of the calibration variable from the variable array according to the XCP protocol; According to the original value of the variable and the address of the calibration variable, the first instruction message and the second instruction message are sent using the XCP protocol to restore the variable value of the calibration variable.
6. The method according to claim 1, characterized in that Determining the calibration variable address according to the variable name of each calibration variable includes: Searching the calibration variable address from the A2L file according to the variable name of the calibration variable; When the calibration variable address is not found in the A2L file, it is determined that the A2L file does not contain the calibration variable, and the calibration variable is stored in an abnormal variable array.
7. The method according to claim 6, characterized in that After storing the calibration variables in the abnormal variable array, the method further includes: Determine the test case corresponding to each of the calibration variables in the abnormal variable array, and generate an abnormal report according to the calibration variables and the test case, wherein the abnormal report is used for manual verification by test personnel.
8. A device for batch calibration of test data, characterized in that: include: An acquisition unit, used for acquiring a test case set, identifying calibration variables and calibration values of the test case set, and storing the calibration variables and calibration values in a variable array, wherein the test case set is an executable automatic test case data set; A determination unit, used to determine a calibration variable address according to a variable name of each calibration variable, and determine a partition of each calibration variable according to each variable address; The calibration unit is used to perform calibration processing on each calibration variable according to the partition and the calibration value of each calibration variable to complete the calibration of the test data.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for batch calibration test data according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing batch calibration test data as described in any one of claims 1 to 7.
Citation Information
Cited By
Variable calibration method, device, equipment, medium and product
CN120653616A