Measurement terminal application compatibility test method, system and device

By building a directed graph and generating test instructions timing sequences, simulated and run in a virtual environment, solving the problem of high difficulty in intelligent measurement of terminal application compatibility testing and achieving efficient automated testing.

CN119271560APending Publication Date: 2025-01-07GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411382015.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The compatibility testing of intelligent measurement terminal applications is difficult, and traditional testing methods are time-consuming and labor-intensive, so automated testing cannot be effectively implemented.

Method used

By building the directed graph of the function call of the application, filter out the main function call paths, generate a test instruction timing sequence, and simulate running in a virtual environment to detect compatibility conflicts between applications.

Benefits of technology

It realizes automation of application compatibility testing, reduces manual intervention, improves testing efficiency, and ensures the accuracy of time control during the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271560A_ABST
    Figure CN119271560A_ABST
Patent Text Reader

Abstract

The invention relates to a method, a system and a device for testing compatibility of application programs of a measurement terminal. The method comprises the steps that function calling digraphs of multiple to-be-tested application programs of a measuring terminal are obtained, the function calling digraphs comprise nodes representing functions of the application programs, and for each to-be-tested application program, a path is screened out from the function calling digraphs of the to-be-tested application programs, based on the duration time range of the function represented by each node on the screened path, determining a test instruction time sequence of the to-be-tested application program, combining the test instruction time sequence of the plurality of to-be-tested application programs to obtain a global test instruction time sequence, and based on the global test instruction time sequence, determining the test instruction time sequence of the to-be-tested application program. And simulating running of the plurality of to-be-tested application programs in the virtual environment, and detecting whether compatibility conflicts exist among the to-be-tested application programs or not. By adopting the method, the compatibility test efficiency of the application program of the measurement terminal can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a method, system, device, computer equipment, computer-readable storage medium, and computer program product for measuring terminal application compatibility testing. Background Art

[0002] The measurement terminal is one of the key nodes of the power grid measurement system. With the continuous expansion of power grid services and the continuous enhancement of functions, the intelligentization and platformization of measurement terminals have become a development trend. A large number of new services can be realized by installing corresponding applications on the intelligent measurement terminals. The applications of intelligent measurement terminals need to be tested before installation, among which compatibility testing is an important test content, which aims to ensure that the application can run normally on the specified hardware, operating system, network environment and other related software without errors or exceptions.

[0003] Since the intelligent measuring terminal is a special device for the power grid, its hardware and software structure and working mode are different from those of existing computers, mobile phones, etc., and each application contains multiple functional modules. There are calling relationships and sequences between the functional modules, and the running time of each functional module is uncertain. The required input formats are also different. There is also cross-use between multiple applications. This undoubtedly increases the difficulty of compatibility testing of measurement terminal applications. If traditional compatibility testing solutions are used for testing, it will take a lot of time and manpower, resulting in compatibility testing of measurement terminal applications.

[0004] Therefore, there is a need to provide a solution for automatically testing the compatibility between terminal applications. Summary of the invention

[0005] Based on this, it is necessary to provide a measurement terminal application testing method, apparatus, system, computer equipment, computer-readable storage medium and computer program product that can efficiently perform compatibility testing between measurement terminal applications in order to address the above technical problems.

[0006] In a first aspect, the present application provides a method for measuring terminal application compatibility testing, comprising:

[0007] Acquire a directed graph of function calls of multiple application programs to be tested of the measurement terminal, wherein the directed graph of function calls includes nodes representing functions of the application programs and directed edges representing call relationships between the functions;

[0008] For each application to be tested, filtering out a path from a directed graph of function calls of the application to be tested;

[0009] Determine a test instruction timing sequence of the application program to be tested based on the duration range of the function represented by each node on the screened path;

[0010] Merging the test instruction timing sequences of multiple application programs to be tested to obtain a global test instruction timing sequence including the function call time points of multiple application programs to be tested;

[0011] Based on the global test instruction timing sequence, the plurality of application programs to be tested are simulated and run in a virtual environment to detect whether there is a compatibility conflict between the application programs to be tested.

[0012] In one embodiment, the function directed graph includes a start node and an end node; and filtering out a path from the function call directed graph of the application to be tested includes any one of the following methods:

[0013] The first method is to randomly select a path from the function call directed graph of the application to be tested, where the path starts from the start node and ends at the end node;

[0014] The second method is to determine the function coverage of each path in the function call directed graph of the application to be tested, and select the path with the largest function coverage from the function call directed graph;

[0015] The third method is to determine the resource occupation conflict score of each path in the function call directed graph of the application to be tested, and select the path with the largest resource occupation conflict score from the function call directed graph.

[0016] In one embodiment, determining the test instruction timing sequence of the application to be tested based on the duration range of the function represented by each node on the screened path includes:

[0017] Randomly sampling within the duration range of the function represented by each node on the path to determine the duration of the function represented by each node;

[0018] Determining a start time of calling the function represented by each node on the path based on the duration of the function represented by each node;

[0019] The start call time of the function represented by each node on the path is sorted to obtain a test instruction timing sequence of the application program to be tested.

[0020] In one embodiment, determining the start calling time of the function represented by each node on the path based on the duration of the function represented by each node includes:

[0021] Randomly determine the start time of the path;

[0022] For each node, the sum of the start call times of the functions represented by the preceding nodes before the node is determined as the start call time of the function represented by the node, and the start call time of the function represented by each node on the path is obtained.

[0023] In one embodiment, the step of simulating running the plurality of application programs to be tested in a virtual environment based on the global test instruction timing sequence to detect whether there is a compatibility conflict between the application programs to be tested includes:

[0024] Get the running log file;

[0025] Based on the operation log file, whether there is a compatibility conflict between the application programs to be tested is detected to obtain a compatibility conflict detection result, wherein the compatibility conflict includes at least one of an interface call conflict, a communication interface conflict, a database access conflict and a device access conflict.

[0026] In one embodiment, the method further comprises:

[0027] Based on the compatibility conflict detection results, a conflict detection report is generated.

[0028] In a second aspect, the present application also provides a device for testing compatibility of a measurement terminal application, including:

[0029] A data acquisition module, used to acquire a function call directed graph of multiple application programs to be tested of the measurement terminal, wherein the function call directed graph includes nodes representing functions of the application programs and directed edges representing call relationships between the functions;

[0030] A path screening module, used for screening a path from a function call directed graph of each application to be tested;

[0031] A sequence determination module, configured to determine a test instruction timing sequence of the application to be tested based on a duration range of a function represented by each node on the screened path;

[0032] A sequence merging module, used to merge the test instruction timing sequences of multiple application programs to be tested, and obtain a global test instruction timing sequence including the function call time points of multiple application programs to be tested;

[0033] The compatibility testing module is used to simulate the running of the multiple application programs to be tested in a virtual environment based on the global test instruction timing sequence, and detect whether there is a compatibility conflict between the application programs to be tested.

[0034] In a third aspect, the present application further provides a measurement terminal application compatibility test system, comprising: a measurement terminal, a server communication module, a virtual server, a device communication module and a plurality of virtual devices, wherein a plurality of application programs to be tested are installed on the measurement terminal, the server communication module connects the virtual server and the measurement terminal, and the device communication module connects the measurement terminal and the virtual device;

[0035] The server communication module is used to simulate the communication protocol between the actual system server and the measurement terminal, and provide a unified communication interface for the application to be tested and the virtual server;

[0036] The virtual server is used to simulate the functions of the actual system server and the measurement terminal, receive data transmitted by the measurement terminal, and perform compatibility testing on the application of the measurement terminal according to any one of the above-mentioned measurement terminal application compatibility testing methods;

[0037] The device communication module is used to simulate the communication protocol between the measurement terminal and the device, and provide a unified communication interface between the application to be tested and the virtual device;

[0038] The virtual device is used to simulate the device controlled by the measurement terminal, receive the instructions sent by the application to be tested, and transmit data to the application to be tested through the device communication module.

[0039] In a fourth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in any one of the above-mentioned embodiments of the method for measuring terminal application compatibility testing are implemented.

[0040] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in any one of the above-mentioned embodiments of the method for measuring terminal application compatibility testing are implemented.

[0041] In a sixth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned embodiments of the method for measuring terminal application compatibility testing.

[0042] The above-mentioned measurement terminal application compatibility testing method, device, system, computer equipment, computer-readable storage medium and computer program product provide a solution for generating a test instruction timing sequence by constructing and analyzing a function call directed graph of an application, and simulating the operation of multiple application programs to be tested in a virtual environment to detect compatibility conflicts between them. Specifically, by constructing a function call directed graph, the functions of the application and their call relationships are visualized, and one or more paths are screened out from the function call directed graph to ensure coverage of the main function call paths of the application. Based on the screened paths and the duration range of each function, a test instruction timing sequence is generated to make the time control in the test process more precise, and then the test instruction timing sequences of multiple applications are merged to form a global test plan. Finally, based on the global test plan, multiple applications are run simultaneously in a virtual environment, which can realize automated test execution, reduce manual intervention, and improve the efficiency of compatibility testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A diagram of an application environment for a method for measuring compatibility of terminal application programs in an embodiment;

[0045] FIG2 is a schematic diagram of a flow chart of a method for measuring terminal application compatibility testing in one embodiment;

[0046] Figure 3 A schematic diagram of a function call directed graph in one embodiment;

[0047] Figure 4 A schematic diagram of a flow chart of steps for determining a test instruction timing sequence in one embodiment;

[0048] Figure 5 A schematic diagram of a flow chart of steps for determining a test instruction timing sequence in another embodiment;

[0049] Figure 6 A schematic diagram of a flow chart of a method for measuring terminal application compatibility testing in another embodiment;

[0050] Figure 7 A schematic diagram of the architecture of a system for measuring terminal application compatibility testing in one embodiment;

[0051] Figure 8It is a schematic diagram of the architecture of a system for measuring terminal application compatibility testing in another embodiment;

[0052] Fig. 9 is a structural block diagram of a device for determining steering wheel torque in one embodiment;

[0053] FIG. 10 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The application compatibility testing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0056] Specifically, the tester can upload the function call directed graphs of multiple application programs to be tested installed on the measurement terminal to the server 104 through the terminal 102, or the server 104 can directly obtain the function call directed graphs corresponding to the application programs from the data storage system. Subsequently, the test message is sent to the server 104 through the terminal 102, and the server 104 obtains the function call directed graphs of multiple application programs to be tested on the measurement terminal, wherein the function call directed graph includes nodes representing the functions of the application programs and directed edges representing the call relationships between the functions. For each application program to be tested, a path is filtered out from the function call directed graph of the application program to be tested. Then, based on the duration range of the functions represented by each node on the filtered path, the test instruction timing sequence of the application program to be tested is determined, and then the test instruction timing sequences of multiple application programs to be tested are merged to obtain a global test instruction timing sequence including multiple function call time points of the application programs to be tested. Finally, based on the global test instruction timing sequence, the multiple application programs to be tested are simulated and run in a virtual environment to detect whether there are compatibility conflicts between the application programs to be tested.

[0057] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, measurement terminals, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0058] In an exemplary embodiment, as shown in FIG2 , a method for measuring terminal application compatibility testing is provided. Figure 1 The server 104 in the example is used for explanation, and the following steps (hereinafter referred to as S) S100 to S500 are included. Among them:

[0059] S100, obtaining a function call directed graph of multiple application programs to be tested of a measurement terminal, wherein the function call directed graph includes nodes representing functions of the application programs and directed edges representing call relationships between the functions.

[0060] The measuring terminal includes a common measuring terminal and an intelligent measuring terminal. In this embodiment, taking the measuring terminal as an intelligent measuring terminal as an example, the intelligent measuring terminal is an integrated and intelligent power equipment that can collect the voltage, current, power factor, frequency, harmonics and other electrical parameters of the power grid in real time, and can upload these data to the power grid dispatching center or cloud platform through the communication interface. At the same time, it can also process and analyze the collected data, and provide evaluation, prediction and alarm functions for the operation status of the power grid. In addition, the intelligent measuring terminal also has a remote control function, which can receive instructions from the upper system to realize remote control and optimization of power grid equipment.

[0061] The function call directed graph (hereinafter referred to as the directed graph) is essentially a directed graph, in which a node in the directed graph represents a function in an application, and an edge of the directed graph represents a call relationship between functions, that is, an edge of the directed graph represents a transfer relationship between the functions represented by the two nodes at both ends of the edge, and the direction of the edge represents the direction of the function transfer. In this embodiment, the directed graph also records the information of the node, including the function name corresponding to the function represented by the node, the function duration range, and the input format.

[0062] In specific implementation, it can be to pre-target the functions of each application and the calling relationships between the functions, parse the data through a custom script, extract the function calling relationships, and build a function call directed graph corresponding to the application. Subsequently, record the function name, function duration range, input format and other information corresponding to the function represented by each node.

[0063] For example, if application A contains three functions, namely A1, A2 and A3, A1 and A2 are functions of the same layer, A3 is the next layer function called by A1, and the application exits after running A2 and A3. Application B contains four functions, namely B1, B2, B3 and B4, B1 and B2 are first layer functions, B3 is the next layer function called by B1, B2 and B3 can both call B4, and the application exits after running B4, then the directed graphs corresponding to applications A and B are as follows: Figure 3 shown.

[0064] S200 , for each application to be tested, filter out a path from a directed graph of function calls of the application to be tested.

[0065] In this embodiment, a start node and an end node are added to the directed graph, and the path represents a sequence of nodes and edges from a certain start node (usually a program entry) to a certain end node (usually a program exit or the end of a specific function). The choice of path determines the focus and coverage of the test. In this embodiment, the path can also be understood as a test path.

[0066] In specific implementation, one or more paths are selected from the function call directed graph according to different requirements and strategies. A path can be selected from the function call directed graph based on random selection strategy, priority, coverage, etc., and the path represents the calling relationship of the tested functions of the application.

[0067] S300 , determining a test instruction timing sequence of the application program to be tested based on the screened paths and the preset duration range of each function.

[0068] The duration range of a function is the range of the duration of the function after the application is running. In actual applications, the duration range of each function can be determined through historical data, performance test data or experience data.

[0069] The test instruction timing sequence is a plan that arranges the specific execution time and order for each function node on a specific path according to the preset function duration range, which defines the exact time point of each function call during the test. Each sequence contains a node (function) and its start call time and duration. Among them, the test instruction refers to the specific operation of a function or method in the application.

[0070] In specific implementation, after a path is screened out, a start time can be set for the first node of the path, usually starting from 0 seconds, and then the start call time of the next node can be calculated based on the end time of the previous node and the minimum duration of the current node to determine the start call time (function call time) of the function represented by each node on the path, and then the start call time of the function represented by each node on the path is sorted according to the order of the start call time to obtain the test instruction timing sequence of the application to be tested. In actual applications, the function call directed graph of each application to be tested can be processed in the above manner to obtain the test instruction timing sequence of each application to be tested.

[0071] S400, merging the test instruction timing sequences of multiple application programs to be tested to obtain a global test instruction timing sequence including function call time points of multiple application programs to be tested.

[0072] The global test instruction timing sequence includes each step that continues from the previous step. After obtaining the test instruction timing sequence of each application to be tested, the function call timing sequences of all applications can be merged in the order of the function start call time to form a total timing sequence containing all the function calls of the applications to be tested, thereby obtaining the global test instruction timing sequence.

[0073] S500, based on the global test instruction timing sequence, simulate running multiple application programs to be tested in a virtual environment to detect whether there is a compatibility conflict between the application programs to be tested.

[0074] The global test instruction timing sequence refers to merging the test instruction timing sequences of multiple applications to be tested into a unified sequence to ensure that the function calls of all applications are executed in a virtual environment in a predetermined time sequence. Through the global test instruction timing sequence, the situation of multiple applications running at the same time can be simulated to detect compatibility conflicts between them. The virtual environment can be a virtual machine or a container.

[0075] After obtaining the global test instruction timing sequence, multiple applications to be tested can be simulated in a virtual environment, and the corresponding test instructions are executed according to the calling time points of each function in the global test instruction timing sequence, triggering the corresponding function call. During the test execution, the system response is monitored and all log information is recorded, including but not limited to system resource usage, error logs, and performance indicators. Subsequently, based on the log information, it is possible to detect whether there are compatibility conflicts between applications. Specifically, compatibility testing includes but is not limited to interface call conflicts, resource usage conflicts, and device access conflicts.

[0076] The above-mentioned terminal application compatibility testing method provides a solution for generating a test instruction timing sequence by constructing and analyzing a function call directed graph of an application, and simulating the operation of multiple application programs to be tested in a virtual environment to detect compatibility conflicts between them. Specifically, by constructing a function call directed graph, the functions of the application and their call relationships are visualized, and one or more paths are screened out from the function call directed graph to ensure coverage of the main function call paths of the application. Based on the screened paths and the duration range of each function, a test instruction timing sequence is generated to make the time control in the test process more precise, and then the test instruction timing sequences of multiple applications are merged to form a global test plan. Finally, based on the global test plan, multiple applications are run simultaneously in a virtual environment, which can realize automated test execution, reduce manual intervention, and improve test efficiency.

[0077] In one embodiment, the function directed graph includes a start node and an end node; and a path is selected from the function call directed graph of the application to be tested, including any one of the following methods:

[0078] The first one randomly selects a path from the function call directed graph of the application under test, where the path starts at the start node and ends at the end node.

[0079] The second method is to determine the function coverage of each path in the function call directed graph of the application to be tested, and select the path with the largest function coverage from the function call directed graph.

[0080] The third method is to determine the resource occupation conflict score of each path in the function call directed graph of the application to be tested, and select the path with the largest resource occupation conflict score from the function call directed graph.

[0081] In practical applications, selecting a path from a directed graph may be from a starting node, randomly selecting the next node, until the end node. Specifically, a depth-first search algorithm may be used to search and generate a preset number of random paths on a function call directed graph, and then a path is randomly selected, the random path starting from the starting node and ending at the ending node, and the duration range of each node on the random path is obtained. In this embodiment, by randomly selecting a path, the test path can be determined simply and efficiently, saving certain system resources and improving test efficiency.

[0082] In other embodiments, the paths may be filtered based on the functional coverage. The functional coverage refers to the ratio of the number of functional points included in the path to all functional points of the application. Specifically, all possible paths from the start node to the end node on the directed graph may be found through a graph algorithm (such as depth-first search or breadth-first search), and then the functional coverage of each path is determined, and the path with the highest functional coverage is determined as the path of the application (i.e., the test path). In this embodiment, by filtering the paths through functional coverage, as many functions as possible can be covered and the application can be fully tested.

[0083] In other embodiments, the path can also be filtered based on the resource occupancy conflict score. The resource occupancy conflict score is used to characterize the probability of system resource occupancy conflict when the functions represented by each node on the path are executed concurrently. Specifically, the resource occupancy conflict score can be understood as a quantitative indicator of the degree of conflict caused by competing for the same resources when the functions in the function combination are executed concurrently. The higher the score, the greater the probability of resource occupancy conflict, and this type of functional test path is exactly what needs to be focused on and tested. The resource occupancy conflict score can be defined based on the resource requirements and conflict probability of each node. For example, if two nodes access the same resource at the same time, the conflict score will increase.

[0084] Specifically, it is also possible to find all possible paths from the start node to the end node on the directed graph through a graph algorithm (such as depth-first search or breadth-first search), then traverse each path, calculate the resource occupancy conflict score when the functions represented by the nodes in the path are executed concurrently, and then compare the resource occupancy conflict score of each path, and determine the test path of the application program with the highest score. In this embodiment, the path with the highest resource occupancy conflict score is found from the directed graph as the target test path, which can efficiently screen out the functional combination that needs to be focused on compatibility testing, thereby improving the test efficiency.

[0085] It is understandable that in other embodiments, the test paths may be screened out based on information of other dimensions such as path complexity, code coverage, and priority, which is not specifically limited here.

[0086] like Figure 4 As shown, in one embodiment, S300 includes:

[0087] S320 , randomly sampling within the duration range of the function represented by each node on the path to determine the duration of the function represented by each node.

[0088] S340: Determine the start time of calling the function represented by each node on the path based on the duration of the function represented by each node.

[0089] S360, sorting the start call time of the function represented by each node on the path to obtain a test instruction timing sequence of the application program to be tested.

[0090] In this embodiment, the start calling time of a function refers to the time point when the function is called. Specifically, for the path corresponding to each application, the Monte Carlo method can be used to randomly sample within the duration range of each node to obtain the duration of the function represented by each node. Exemplarily, the duration of all starts and ends can be set to 0 seconds, and the duration of nodes A1, A3, B1, B3, and B4 can be randomly selected as 5 seconds, 5 seconds, 2 seconds, 4 seconds, and 2 seconds.

[0091] Subsequently, based on the duration of the function represented by each node and the sequence of the nodes on the path, the start call time of the function represented by each node on the path is determined. Exemplarily, it can be the path of each application, each node on the path and its corresponding start call time and duration are combined into a tuple, and these tuples are sorted according to the start call time to form a final test instruction timing sequence, thereby obtaining the test instruction timing of each application.

[0092] In this embodiment, by randomly sampling within the duration range, different execution situations can be simulated, which is closer to the uncertainty of user behavior in actual applications and increases the diversity and coverage of the test.

[0093] In one embodiment, if Figure 5 As shown, S330 includes: S332, randomly determining the start time of the path, for each node, the sum of the start call time of the functions represented by the preceding nodes before the node is determined as the start call time of the function represented by the node, and the start call time of the function represented by each node on the path is obtained.

[0094] Continuing from the previous embodiment, the start time of the path can be randomly selected, and then the start call time of the next node is calculated according to the end time of the previous node and the duration of the current node. In this way, the function start call time corresponding to all nodes on the path is determined, that is, the function start call time corresponding to a certain node is the sum of the function durations corresponding to all nodes before the node. In the above embodiment, the start time of application A is selected as 0 seconds, then the start call times of A1, A3 and the end on the corresponding path are 0 seconds, 5 seconds, and 10 seconds. The start time of application B is selected as 1 second, then the start call times of B1, B3, B4 and the end on the corresponding path are 1 second, 3 seconds, 7 seconds, and 9 seconds. Subsequently, the functions corresponding to all nodes on the above path are sorted in the order of their start time to obtain a function call timing sequence of an application. Subsequently, the function call timing sequence of application A is Start A (0 seconds) - A1 (0 seconds) - A3 (5 seconds) - End A (10 seconds), and the function call timing sequence of application B is Start B (1 second) - B1 (1 second) - B3 (3 seconds) - B4 (7 seconds) - End B (9 seconds).

[0095] In this embodiment, by randomly determining the startup time of the path, the startup of applications in different time periods can be simulated to increase the diversity of the test. The start time of each node is determined based on the random startup time and the sum of the start call time of the preceding nodes. This can be closer to the uncertainty in actual user behavior and improve the realism of the test.

[0096] like Figure 6 As shown, in one embodiment, S500 includes: S520, based on a global test instruction timing sequence, simulating the running of multiple applications to be tested in a virtual environment, obtaining an operation log file, and based on the operation log file, detecting whether there is a compatibility conflict between the applications to be tested, and obtaining a compatibility conflict detection result, wherein the compatibility conflict includes at least one of an interface call conflict, a communication interface conflict, a database access conflict, and a device access conflict.

[0097] The running log file records various information generated by the application during operation, including but not limited to the timestamp, that is, the time of each log record, event type, event description information and context information, among which the event description information includes function call, data operation, exception information, etc., and the context information includes thread ID (Identity), process ID, user information, etc. The compatibility conflict detection results include the time, conflict type, conflict description information, context information and impact scope of each conflict record. Among them, the conflict types include interface call conflicts, communication interface conflicts, database access conflicts or device access conflicts. The conflict description information includes data such as modules, functions and resources involved in the conflict.

[0098] In specific implementation, it can be based on the global test instruction timing sequence, and the virtual server sends the corresponding test instructions to the application. Then, in the virtual environment, according to the sent test instructions, all the applications to be tested are run, and each application is run through an independent thread. Then, through the log mechanism, the log information generated during the operation of the application is recorded, and the log information is recorded in the operation log file. Then, after the test instructions of all applications are executed and the number of detections reaches the preset detection number threshold, the operation log files of all applications to be tested are obtained, the log files are parsed, key information is extracted and analyzed, and whether there are conflicts such as interface call conflicts, communication interface conflicts, database access conflicts, and device access conflicts between the applications are detected, and then the conflict detection results are recorded.

[0099] In this embodiment, by analyzing the operation log file and understanding the detailed context information, various types of compatibility conflicts can be covered, including interface call conflicts, communication interface conflicts, database access conflicts, and device access conflicts, so as to quickly locate and repair the problem.

[0100] like Figure 6 As shown, in one of the embodiments, after S520, the method further includes: S600, generating a conflict detection report based on the compatibility conflict detection result.

[0101] Following the previous step, after obtaining the compatibility conflict detection results, the compatibility conflict detection results can be stored in a structured data format, such as in a list, and then, based on the structured data, the corresponding report generation tool is called to generate a conflict detection report. Specifically, the generated conflict detection report may include detailed timestamps, conflict description information, context information, and recommended measures. Furthermore, a visualization tool can be called to visualize the conflict detection report so that testers can understand the test situation in a timely manner.

[0102] In this embodiment, a detailed conflict detection report is generated based on the compatibility conflict detection results, which can help the development and testing teams to discover and solve problems in a timely manner and ensure the stability and reliability of the application.

[0103] In order to make a clearer description of the measurement terminal application program compatibility test method provided by the present application, a specific embodiment is described below. The specific embodiment includes the following steps:

[0104] S1, obtaining a function call directed graph of multiple application programs to be tested of a measurement terminal, wherein the function call directed graph includes nodes representing functions of the application programs and directed edges representing call relationships between the functions.

[0105] S2, for each application under test, randomly selects a path from the function call directed graph of the application under test.

[0106] S4, randomly sampling within the duration range of the function represented by each node on the path to determine the duration of the function represented by each node.

[0107] S5, determining the start calling time of the function represented by each node on the path based on the duration of the function represented by each node.

[0108] S6, sorting the start call time of the function represented by each node on the path to obtain a test instruction timing sequence of the application program to be tested.

[0109] S7, merging the test instruction timing sequences of the multiple application programs to be tested to obtain a global test instruction timing sequence including the function call time points of the multiple application programs to be tested.

[0110] S8, based on the global test instruction timing sequence, simulate running multiple application programs to be tested in a virtual environment, and based on the running log file, detect whether there is a compatibility conflict between the application programs to be tested, and obtain a compatibility conflict detection result, wherein the compatibility conflict includes at least one of an interface call conflict, a communication interface conflict, a database access conflict, and a device access conflict.

[0111] S9, generating a conflict detection report based on the compatibility conflict detection result.

[0112] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0113] Based on the same inventive concept, Figure 7As shown, the present application also provides a measurement terminal application compatibility test system 700, including: a measurement terminal 710, a server communication module 720, a virtual server 730, a device communication module 740 and a plurality of virtual devices 750, wherein a plurality of application programs to be tested are installed on the measurement terminal 710, the server communication module 720 connects the virtual server 730 and the measurement terminal 710, and the device communication module 740 connects the measurement terminal 710 and the virtual device 750, wherein:

[0114] The server communication module 720 is used to simulate the communication protocol between the actual system server and the measurement terminal 710 , and provide a unified communication interface for the application program to be tested and the virtual server 730 .

[0115] The virtual server 730 is used to simulate the functions of the actual system server and the measurement terminal 710, receive data transmitted by the measurement terminal 710, and perform compatibility testing on the application of the measurement terminal according to any one of the above-mentioned measurement terminal application compatibility testing methods.

[0116] The device communication module 740 is used to simulate the communication protocol between the measurement terminal and the device, and provide a unified communication interface between the application to be tested and the virtual device 750.

[0117] The virtual device 750 is used to simulate the device controlled by the measurement terminal 710 , receive instructions sent by the application to be tested, and transmit data to the application to be tested through the device communication module 740 .

[0118] Specifically, the measurement terminal 710 includes an intelligent measurement terminal. The server communication module simulates the communication interface between the application of the intelligent measurement terminal in the actual system and the server, that is, provides a unified communication interface between the application and the virtual server 730, including but not limited to 4G / 5G communication interface, LAN (Local Area Network) communication interface, WIFI communication interface, 485 communication interface, infrared communication interface and Bluetooth communication interface, etc. In actual applications, instructions and data are transmitted at a certain rate and specification.

[0119] The virtual server 730 is used to simulate various functions of the server in the actual system involving the intelligent measurement terminal. In actual applications, the virtual server 730 receives data transmitted by the intelligent measurement terminal 710 and sends instructions to control the operation of various functions on the intelligent measurement terminal 710. Specifically, the data transmitted by the measurement terminal 710 includes but is not limited to the functions of each application to be tested and the calling relationship between the functions.

[0120] The device communication module 740 connects the application program with the virtual device 750, simulates the communication interface between the application program and the device of the smart measurement terminal in the actual system, and transmits instructions and data at a certain rate and specification. In actual applications, the device communication module simulates the same communication protocol between the actual smart measurement terminal and the device to provide a unified communication interface between the application program and the virtual device, including but not limited to 485 communication interface, carrier communication interface, M-BUS (Meter-Bus) communication interface, etc.

[0121] The virtual device 750 is used to simulate various devices controlled by the intelligent measurement terminal in the actual system. In actual applications, the virtual device receives instructions from the application program and sends the prepared data to the corresponding application program through the interface provided by the device communication module.

[0122] like Figure 8 As shown, in one embodiment, the system further includes a performance evaluation module 760 and a database module 770, wherein: the performance evaluation module 760 is connected to the measurement terminal, the server communication module, the virtual server, the device communication module and the plurality of virtual devices:

[0123] The performance evaluation module 760 is used to perform compatibility conflict detection on the application under test of the measurement terminal 710 according to the operation log files of the measurement terminal 710, the server communication module 720, the virtual server 730, the device communication module 740 and multiple virtual devices 750, and generate a conflict detection report.

[0124] Specifically, the database module 770 is connected to the application program to store the public data of the application program.

[0125] The performance evaluation of the performance evaluation module 760 includes but is not limited to public interface call conflicts, communication interface conflicts, database access conflicts, device access conflicts, etc. The compatibility between application programs can be evaluated through real-time monitoring and logs of each module.

[0126] Based on the same inventive concept, the embodiment of the present application also provides a measuring terminal application compatibility testing device for implementing the measuring terminal application compatibility testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more measuring terminal application compatibility testing device embodiments provided below can refer to the limitations of the steering wheel torque determination method above, and will not be repeated here.

[0127] In an exemplary embodiment, Fig. 9As shown, a measuring terminal application program compatibility testing device 900 is provided, comprising: a data acquisition module 910, a path screening module 920, a sequence determination module 930, a sequence merging module 940 and a compatibility testing module 950, wherein:

[0128] The data acquisition module 910 is used to acquire a function call directed graph of multiple application programs to be tested of the measurement terminal. The function call directed graph includes nodes representing functions of the application programs and directed edges representing call relationships between functions.

[0129] The path screening module 920 is used to screen out a path from the function call directed graph of each application to be tested.

[0130] The sequence determination module 930 is used to determine the test instruction timing sequence of the application program to be tested based on the duration range of the function represented by each node on the screened path.

[0131] The sequence merging module 940 is used to merge the test instruction timing sequences of multiple application programs to be tested to obtain a global test instruction timing sequence including the function call time points of multiple application programs to be tested.

[0132] The compatibility test module 950 is used to simulate running multiple application programs to be tested in a virtual environment based on a global test instruction timing sequence to detect whether there is a compatibility conflict between the application programs to be tested.

[0133] In one embodiment, the function directed graph includes a start node and an end node; the path screening module 920 is further used to perform any one of the following methods:

[0134] The first one randomly selects a path from the function call directed graph of the application under test, where the path starts at the start node and ends at the end node.

[0135] The second method is to determine the function coverage of each path in the function call directed graph of the application to be tested, and select the path with the largest function coverage from the function call directed graph.

[0136] The third method is to determine the resource occupation conflict score of each path in the function call directed graph of the application to be tested, and select the path with the largest resource occupation conflict score from the function call directed graph.

[0137] In one of the embodiments, the sequence determination module 930 is also used to randomly sample within the duration range of the function represented by each node on the path, determine the duration of the function represented by each node, determine the start call time of the function represented by each node on the path based on the duration of the function represented by each node, sort the start call time of the function represented by each node on the path, and obtain the test instruction timing sequence of the application to be tested.

[0138] In one embodiment, the sequence determination module 920 is also used to randomly determine the start time of the path. For each node, the sum of the start call times of the functions represented by the preceding nodes before the node is determined as the start call time of the function represented by the node, thereby obtaining the start call time of the function represented by each node on the path.

[0139] In one embodiment, the compatibility testing module 950 is also used to obtain an operation log file, and based on the operation log file, detect whether there is a compatibility conflict between the application programs to be tested, and obtain a compatibility conflict detection result, wherein the compatibility conflict includes at least one of an interface call conflict, a communication interface conflict, a database access conflict, and a device access conflict.

[0140] In one of the embodiments, the apparatus further includes a report generating module 960 for generating a conflict detection report based on the compatibility conflict detection result.

[0141] Each module in the above-mentioned measuring terminal application compatibility test device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0142] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as an application test directed graph. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for measuring terminal application compatibility testing is implemented.

[0143] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0144] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in any one of the above-mentioned embodiments of the method for measuring terminal application program compatibility are implemented.

[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above-mentioned embodiments of the method for testing compatibility of a measurement terminal application are implemented.

[0146] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned embodiments of the method for testing compatibility of a measurement terminal application are implemented.

[0147] It should be noted that the data involved in this application (including but not limited to data used for analysis such as expected turning angle, vehicle speed and turning rate, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0148] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0149] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0150] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for measuring terminal application compatibility testing, characterized in that: The method comprises: Acquire a directed graph of function calls of multiple application programs to be tested of the measurement terminal, wherein the directed graph of function calls includes nodes representing functions of the application programs and directed edges representing call relationships between the functions; For each application to be tested, filtering out a path from a directed graph of function calls of the application to be tested; Determine a test instruction timing sequence of the application program to be tested based on the duration range of the function represented by each node on the screened path; Merging the test instruction timing sequences of multiple application programs to be tested to obtain a global test instruction timing sequence including the function call time points of multiple application programs to be tested; Based on the global test instruction timing sequence, the plurality of application programs to be tested are simulated and run in a virtual environment to detect whether there is a compatibility conflict between the application programs to be tested.

2. The method according to claim 1, characterized in that The function directed graph includes a start node and an end node; and the filtering out a path from the function call directed graph of the application to be tested includes any one of the following methods: The first method is to randomly select a path from the function call directed graph of the application to be tested, where the path starts from the start node and ends at the end node; The second method is to determine the function coverage of each path in the function call directed graph of the application to be tested, and select the path with the largest function coverage from the function call directed graph; The third method is to determine the resource occupation conflict score of each path in the function call directed graph of the application to be tested, and select the path with the largest resource occupation conflict score from the function call directed graph.

3. The method according to claim 1, characterized in that The step of determining the test instruction timing sequence of the application program to be tested based on the duration range of the function represented by each node on the screened path includes: Randomly sampling within the duration range of the function represented by each node on the path to determine the duration of the function represented by each node; Determining a start time of calling the function represented by each node on the path based on the duration of the function represented by each node; The start call time of the function represented by each node on the path is sorted to obtain a test instruction timing sequence of the application program to be tested.

4. The method according to claim 1, characterized in that: The determining, based on the duration of the function represented by each node, the start calling time of the function represented by each node on the path includes: Randomly determine the start time of the path; For each node, the sum of the start call times of the functions represented by the preceding nodes before the node is determined as the start call time of the function represented by the node, and the start call time of the function represented by each node on the path is obtained.

5. The method according to any one of claims 1 to 4, characterized in that: The step of simulating running the plurality of application programs to be tested in a virtual environment based on the global test instruction timing sequence to detect whether there is a compatibility conflict between the application programs to be tested includes: Get the running log file; Based on the operation log file, whether there is a compatibility conflict between the application programs to be tested is detected to obtain a compatibility conflict detection result, wherein the compatibility conflict includes at least one of an interface call conflict, a communication interface conflict, a database access conflict and a device access conflict.

6. The method according to claim 5, characterized in that The method further comprises: Based on the compatibility conflict detection results, a conflict detection report is generated.

7. A device for testing compatibility of a measurement terminal application, characterized in that: The device includes: A data acquisition module, used to acquire a function call directed graph of multiple application programs to be tested of the measurement terminal, wherein the function call directed graph includes nodes representing functions of the application programs and directed edges representing call relationships between the functions; A path screening module, used for screening a path from a function call directed graph of each application to be tested; A sequence determination module, configured to determine a test instruction timing sequence of the application to be tested based on a duration range of a function represented by each node on the screened path; A sequence merging module, used to merge the test instruction timing sequences of multiple application programs to be tested, and obtain a global test instruction timing sequence including the function call time points of multiple application programs to be tested; The compatibility testing module is used to simulate the running of the multiple application programs to be tested in a virtual environment based on the global test instruction timing sequence, and detect whether there is a compatibility conflict between the application programs to be tested.

8. A measurement terminal application compatibility test system, characterized in that: The system comprises: a measurement terminal, a server communication module, a virtual server, a device communication module and a plurality of virtual devices, wherein a plurality of application programs to be tested are installed on the measurement terminal, the server communication module connects the virtual server and the measurement terminal, and the device communication module connects the measurement terminal and the virtual devices; The server communication module is used to simulate the communication protocol between the actual system server and the measurement terminal, and provide a unified communication interface for the application to be tested and the virtual server; The virtual server is used to simulate the functions of the actual system server and the measurement terminal, receive data transmitted by the measurement terminal, and perform compatibility testing on the application of the measurement terminal according to the measurement terminal application compatibility testing method according to any one of claims 1 to 6; The device communication module is used to simulate the communication protocol between the measurement terminal and the device, and provide a unified communication interface between the application to be tested and the virtual device; The virtual device is used to simulate the device controlled by the measurement terminal, receive the instructions sent by the application to be tested, and transmit data to the application to be tested through the device communication module.

9. The system according to claim 8, characterized in that The system further includes a performance evaluation module, which is connected to the measurement terminal, the server communication module, the virtual server, the device communication module, and the plurality of virtual devices: The performance evaluation module is used to perform compatibility conflict detection on the application to be tested of the measurement terminal according to the operation log files of the measurement terminal, the server communication module, the virtual server, the device communication module and the multiple virtual devices, and generate a conflict detection report.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Radar communication simulation method and system of self-adaptive deception strategy

    CN121150791A