CN-122019367-A - Method, system and medium for realizing application test in multiple terminals based on hong Mongolian application
Abstract
The application relates to an application testing method, a system and a medium for realizing multiple terminals based on Hongmon application, which comprises the steps of obtaining a current version installation package of a target Hongmon application, extracting application component information and calling relation information of the current version installation package, constructing an application service dependency graph, obtaining data flow information, constructing a dynamic data flow graph, constructing an application service chain graph, identifying potential risk items in the application service chain graph through a graph theory algorithm, generating a test case set according to the potential risk items, scheduling corresponding execution terminal clusters to execute the test case set through an execution engine, monitoring the execution process of the execution terminal clusters, and collecting test execution data.
Inventors
- Luo Xuntao
- WU XING
- LI DEXIN
Assignees
- 鸿蒙生态服务(深圳)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251226
Claims (10)
- 1. A method for realizing application testing in a plurality of terminals based on hong Mongolian application is characterized by comprising the following steps: Acquiring a current version installation package of a target hong Mongolian application, extracting application component information and calling relation information of the installation package, and constructing an application business dependency graph; dynamically analyzing the application component information based on a preset analysis mode, acquiring data flow information, and constructing a dynamic data flow diagram; Constructing an application service chain map based on the application service dependency graph and the dynamic data flow graph, and identifying potential risk items in the application service chain map through a preset graph theory algorithm, wherein the potential risk items comprise a key service path, a single-point fault node, a cyclic dependency chain and a complex coupling region; generating a corresponding test case set according to the potential risk item, and scheduling the corresponding execution terminal cluster to execute the test case set through a pre-constructed execution engine; and monitoring the execution process of the execution terminal cluster and collecting test execution data.
- 2. The method for realizing the application test in the multi-terminal based on the hong Monte application of claim 1, wherein the steps of obtaining the current version installation package of the target hong Monte application, extracting the application component information and the calling relation information thereof and constructing the application business dependency graph comprise the steps of: Analyzing a declarative configuration file of a current version installation package, and extracting application component information, wherein the application component information comprises application component units capable of being independently scheduled and metadata thereof; Scanning application codes of the current version installation package, and identifying calling relation information, wherein the calling relation information comprises explicit calling relations and connection relations of all application component units; Based on the metadata of the application component units and a preset matching rule, implicit association reasoning is carried out, and potential component association relations are identified; And constructing an application business dependency graph based on the explicit calling relationship, the connection relationship and the potential component association relationship.
- 3. The method for realizing the application test in the multi-terminal based on the hong Mongolian application of claim 2, wherein the step of performing implicit association reasoning and identifying the potential component association relationship based on the application component unit metadata and the preset matching rule comprises the following steps: Constructing corresponding component portraits for each application component unit based on the application component unit metadata, wherein the component portraits comprise a declaration capability set and a processing data format set; carrying out semantic similarity calculation on the declaration capability sets of any two component portraits, establishing capability association edges for the two component portraits with semantic similarity calculation results higher than a first threshold value, and setting the two component portraits with the capability association edges as a first component pair; Comparing the processed data format sets of all the first component pairs, and establishing a data association edge for the first component pair with successful comparison result; for the first component pair with the data association edge, determining that the first component pair has the potential component association relationship.
- 4. The method for realizing application testing in a multi-terminal based on HongMonte application of claim 1, wherein the application component information comprises application component units capable of being independently scheduled and metadata thereof, the steps of dynamically analyzing the application component information based on a preset analysis mode, obtaining data flow direction information and constructing a dynamic data flow graph comprise the steps of: deploying data flow probes at the communication interfaces of the application component units; Generating a service scene sequence based on the application service dependency graph, and driving a target hong Mongolian application to execute the service scene sequence in a preconfigured multi-terminal environment; Monitoring and recording data access and transmission events in the execution process of the service scene sequence through a data flow probe, and generating data flow information comprising a source component, a target component, a time stamp, a data size and an operation type; Performing time sequence analysis and causal relation analysis on the data flow direction information, identifying a data transmission sequence with causal relation, and constructing an initial data flow diagram by taking an application component unit as a node and the data transmission sequence as a directed edge; And performing graph structure optimization on the initial data flow graph to generate a dynamic data flow graph, wherein the graph structure optimization comprises redundant edge aggregation and critical path extraction.
- 5. The method for realizing the application test in the multi-terminal based on the hong Mongolian application of claim 1, wherein the steps of constructing an application service chain graph based on an application service dependency graph and a dynamic data flow graph, and identifying potential risk items in the application service chain graph through a preset graph theory algorithm, wherein the potential risk items comprise a key service path, a single point fault node, a cyclic dependency chain and a complex coupling region, and the method comprises the steps of: Fusing the nodes and edges in the application business dependency graph with the nodes and edges in the dynamic data flow graph to generate an application business chain graph; Calculating the betweenness centrality of all nodes in the service chain map, identifying the nodes with betweenness centrality higher than a preset centrality threshold as single-point fault nodes, and identifying candidate critical paths connecting at least two single-point fault nodes; identifying the data interaction frequency of all sides on the candidate critical path and the service attribute of the functional node contained in the candidate critical path, and screening out the core service functional node based on the service attribute; Setting candidate critical paths, of which the data interaction frequency is larger than a preset frequency threshold value and the number of the included core service function nodes exceeds a preset number threshold value, as critical service paths; performing directed loop detection on the service chain map, identifying all loop chains, analyzing type attributes of loop edges in each loop chain, and judging the loop chain as a loop dependent chain if the loop edges simultaneously contain a logic calling relationship and a real data flow direction; carrying out modularity analysis on the service chain map, and identifying a community structure with connection closeness between nodes in the service chain map being greater than a preset closeness threshold; and calculating the edge density of each community structure and the connection sparsity among the community structures, and identifying the community structure with the edge density higher than a preset density threshold and the sparse connection sparsity as a complex coupling area.
- 6. The method for realizing the application test in the multi-terminal based on the hong Mongolian application of claim 1, wherein the test case set comprises an atomic test case and an integrated test scene, the step of generating the corresponding test case set according to the potential risk item and scheduling the corresponding execution terminal cluster to execute the test case set through a pre-built execution engine comprises the following steps: generating at least one atomic test case for each potential risk item based on a pre-constructed mapping knowledge base; Based on the logic association between the application service chain atlas analysis atomic test cases, combining the atomic test cases aiming at the association risk items on the same service chain in the application service chain atlas into an integrated test scene; And loading the atomic test cases and the integrated test scenes through a pre-constructed execution engine, and executing a corresponding scheduling flow.
- 7. The method for realizing multi-terminal application testing based on hong Mongolian application of claim 6, wherein the steps of loading atomic test cases and integrated test scenes by a pre-built execution engine and executing corresponding scheduling flows comprise the steps of: The execution engine analyzes the integrated test scene, identifies the atomic test cases contained in the integrated test scene, and analyzes the execution sequence dependency relationship among the atomic test cases and the type of the required terminal equipment of the atomic test cases according to the application service chain graph; The execution engine arranges the atomic test cases into a scheduling sequence based on the execution sequence dependency relationship and the type of the required terminal equipment, and matches the corresponding execution terminal cluster; The execution engine acquires the dynamic information of each terminal in the matched execution terminal cluster in real time, wherein the dynamic information comprises types, states and network topology positions; And the execution engine sequentially distributes terminals in the execution terminal cluster for each atomic test case based on the generated scheduling sequence and the dynamic information.
- 8. The method for realizing the application test in the multiple terminals based on the hong Mongolian application of claim 1, wherein after the steps of monitoring the execution process of the execution terminal cluster and collecting test execution data, the method comprises the steps of: Acquiring expected data of a test case, comparing the test execution data with the expected data of the test case, and identifying a record defect item; analyzing and evaluating the coverage of the test process, and generating coverage condition information of the test process on nodes and edges in the application service chain map; Updating the application service chain map based on the defect item and the coverage condition information, and generating an updating test case set based on the updated application service chain map for iterative test.
- 9. An application testing system for realizing multiple terminals based on hong Mongolian application, which is characterized by comprising: The first diagram construction module is used for acquiring a current version installation package of the target hong Monte application, extracting application component information and calling relation information of the current version installation package, and constructing an application business dependency diagram; the second graph construction module is used for dynamically analyzing the application component information based on a preset analysis mode, acquiring data flow direction information and constructing a dynamic data flow graph; The map construction module is used for constructing an application service chain map based on the application service dependency graph and the dynamic data flow graph, and identifying potential risk items in the application service chain map through a preset graph theory algorithm, wherein the potential risk items comprise a key service path, a single-point fault node, a cyclic dependency chain and a complex coupling region; the test execution module is used for generating a corresponding test case set according to the potential risk item, and scheduling the corresponding execution terminal cluster to execute the test case set through a pre-constructed execution engine; The data acquisition module is used for monitoring the execution process of the execution terminal cluster and acquiring test execution data.
- 10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of a method for implementing an application test method in a multi-terminal based on a hong-and-mong application as claimed in any one of claims 1-8.
Description
Method, system and medium for realizing application test in multiple terminals based on hong Mongolian application Technical Field The application relates to the technical field of software testing, in particular to a method, a system and a medium for realizing application testing in multiple terminals based on hong Mongolian application. Background With the deep development of the universal interconnection age, the ecology of the equipment carrying the hong Mongolian operating system is continuously expanded, so that a plurality of intelligent terminals such as mobile phones, flat plates, intelligent home equipment and wearable equipment are covered, and a highly dynamic distributed application scene is formed. The hong Mongolian application depends on a distributed architecture thereof, realizes cross-equipment service collaboration, seamless data circulation and service continuity experience, and becomes a key characteristic of modern application development. However, in a multi-terminal converged operating environment, the applied business logic is not limited to the inside of a single device, but is evolved into a complex network structure which spans heterogeneous terminals and changes in real time in interaction relation, and potential defects such as critical business path interruption, cascading failure caused by single-point faults, deadlock risks caused by cyclic dependence and unpredictable behaviors caused by complex coupling among components are highly hidden, and the defects are difficult to trigger and reproduce effectively in the traditional testing environment because dynamic factors such as device type difference, network state fluctuation, implicit association among components and the like need to be considered in the testing process. The existing testing methods mainly use traditional software testing frameworks, such as automatic testing based on user operation, functional testing for a single interface, and the like, and have clear limitations in facing the honest distributed application. The method is characterized in that an automatic test based on user interface operation is focused on a front-end interaction layer, data exchange logic and a bottom communication mechanism in a distributed service call chain cannot be deeply verified, an application interface is sensitive in iteration, a test script is high in maintenance cost, the integrity of a cross-equipment business process is split by aiming at functional test of a single service interface, the reliability, fault tolerance and data consistency of the end of the distributed business chain are difficult to evaluate, weak links or fault nodes on a critical path are difficult to identify, in addition, a static test case set excessively depends on manual experience design, coverage is limited to a preset scene, and mass edge scenes derived from equipment isomerism, network topology dynamic change and complex dependency among components are difficult to adapt. Disclosure of Invention In order to solve the defects, the application provides a method, a system and a medium for realizing application testing in multiple terminals based on hong Meng application. The first object of the present application is achieved by the following technical solutions: A method for realizing application testing in a plurality of terminals based on Hongmon application comprises the following steps: Acquiring a current version installation package of a target hong Mongolian application, extracting application component information and calling relation information of the installation package, and constructing an application business dependency graph; dynamically analyzing the application component information based on a preset analysis mode, acquiring data flow information, and constructing a dynamic data flow diagram; Constructing an application service chain map based on the application service dependency graph and the dynamic data flow graph, and identifying potential risk items in the application service chain map through a preset graph theory algorithm, wherein the potential risk items comprise a key service path, a single-point fault node, a cyclic dependency chain and a complex coupling region; generating a corresponding test case set according to the potential risk item, and scheduling the corresponding execution terminal cluster to execute the test case set through a pre-constructed execution engine; and monitoring the execution process of the execution terminal cluster and collecting test execution data. The second object of the present application is achieved by the following technical solutions: An application testing system for realizing multiple terminals based on hong Mongolian application, comprising: The first diagram construction module is used for acquiring a current version installation package of the target hong Monte application, extracting application component information and calling relation information of the current version insta