System-level integration test sequence generation method for military information equipment software
By establishing a software connection relationship model and directed network, calculating the complexity and influence of software nodes, generating test importance vectors, and prioritizing the integration of software with high importance, the problems of inefficient and high cost of testing the mesh structure of military information equipment software system are solved, and efficient system-level integration testing is achieved.
Patent Information
- Application Number
- CN202211256761.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-10-14
AI Technical Summary
The prior art is difficult to effectively apply to the mesh structure of military information equipment software systems for system-level integration testing, resulting in low testing efficiency and high cost.
By establishing a software connection relationship model, building a directed software network, calculating the complexity and influence of software nodes, generating software test importance vectors, prioritizing the integration of software with high importance, and generating system-level integration test sequences.
It improves the integration testing efficiency of military information equipment software systems, detects integration defects as soon as possible, and reduces system development costs.
Smart Images

Figure CN115599672B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a method for generating a system-level integrated test sequence for software of military information equipment. Background Art
[0002] The new generation of military information-based equipment software systems utilizes an open technology architecture and a component-based development model. Software is composed of one or more components according to application requirements. Software is integrated through a service bus (such as the Data Distribution Service (DDS)). Software can interconnect, interoperate, and interoperate at different levels. The system software structure lacks a distinct hierarchy, and the connections between software components are characterized by a flat, mesh-like structure. Software within a system has varying roles and responsibilities, and this translates to varying degrees of importance. Software importance is primarily reflected in its scale, complexity, and connectivity. The larger the software scale and complexity, the greater the probability of errors. The greater the software connectivity, the greater the impact on other software within the system.
[0003] System-level integration testing, also known as assembly testing, builds upon module (software) testing by integrating and testing the interfaces of each module before assembling the system. Typical integration testing strategies are primarily based on the system tree structure, including bottom-up integration, top-down integration, and sandwich integration. The sandwich integration strategy is a hybrid of the bottom-up and top-down approaches.
[0004] Military information equipment software systems are usually large in scale, containing hundreds of software programs, forming an intricate network structure, and the tree-structure-based integration testing strategy cannot be well applied to them. Summary of the Invention
[0005] The present invention provides a method for generating a system-level integrated test sequence for military information equipment software, including the following steps:
[0006] Step 1: Establish a software connection relationship model, and construct a software directed network based on the software connection relationship model, wherein the software connection relationship model is used to represent the connection relationship between two software in the software system;
[0007] Step 2: Create an adjacency matrix A based on the software directed network = (a ij ) N×N , where 1≤i, j≤N, N≥2, N is the number of software nodes in the software directed network, and the software directed network is valid only if there is one slave software node V i To software node V j A directed edge, aij =1, otherwise a ij =0;
[0008] Step 3: Determine the software node V in the software directed network i The complexity of SC i ;
[0009] Step 4: Determine the software node V in the software directed network i and software node V j The propagation coefficient γ ij ;
[0010] Step 5: Perform iterative calculation to determine the software node V in the software directed network i The initial values of influence and comprehensive complexity are both software node V i The value of its own complexity SCi, the initial value of the two vectors of influence and comprehensive complexity of all software nodes is expressed as x(0) = (SC1, SC2, ..., SC N ) T ,y(0)=(SC1,SC2,…,SC N ) T ;
[0011] Step 6: Iteratively calculate the influence of all software nodes, where software node V i The influence iteration rule is that the software node V in the software directed network i The complexity value of all sink nodes multiplied by the propagation coefficient γ ij The sum of the results is:
[0012]
[0013] Step 7: Iteratively calculate the comprehensive complexity of all software nodes, where software node V j The complexity iteration rule is the software node V in the software directed network j The influence value of all source nodes multiplied by the propagation coefficient γ between nodes ji The sum of the results is:
[0014]
[0015] Step 8: Normalize the calculation results of steps 6 and 7:
[0016]
[0017]
[0018] Step 9: Repeat steps 5, 6, and 7 for k iterations of the influence and complexity vectors of all software nodes until the two sets of vectors tend to be stable, and then exit the iteration. Here, the condition for the two sets of vectors to tend to be stable is ‖x i (k)-x i (k-1)‖+‖y i (k)-y i (k-1)‖<ε, ε is the preset iteration stop judgment threshold;
[0019] Step 10: Determine the importance of software testing based on the influence and comprehensive complexity of all software nodes, and output the software testing importance vector W = (W1, W2, ..., W N ), arrange them in order of importance and generate a system-level integration test sequence.
[0020] In some optional implementations, establishing the software connection relationship model includes:
[0021] The software connection relationship model is established according to the software requirement specification and the interface requirement specification.
[0022] In some optional implementations, constructing a software directed network based on the software connection relationship model includes:
[0023] Number all the software included in the system to form a system software set S = {S1, S2, ..., S N};
[0024] According to the system software connection relationship model, for each software S in the software set i , establish software connection relationship model S i_mod :{SS i , DS j , CI, MI j};
[0025] According to the system software set and each software connection relationship model, a directed network topology graph SDG is established. SDG is defined as SDG = (V, E), where V = {V1, V2, ..., V N} is the set of software nodes in the graph, representing each software node in the directed network graph, E={E ij |There is a directed edge from V i to V j}, E ij Represents software node V i and V j Directed connection relationship, V i is the source software node, V j It is the sink software node, that is, when the software is running, there are messages from V i Send to Vj .
[0026] In some optional implementations, the determining of the software node V in the software directed network i The complexity of SC i ,include:
[0027] Determine software node V i Structural complexity SSC i , code size SCL i And the connection complexity value SRC i , through the formula Determine software node V i The complexity of SC i , where α, β, θ∈R are weighting coefficients, and α+β+θ=1.
[0028] In some optional implementations, the determining of the software node V in the software directed network i and software node V j The propagation coefficient γ ij ,include:
[0029] Determine the maximum message length MSLmax of the software node and the number of messages sent per unit time MSQmax by the formula Determine the propagation coefficient γ ij , where ω+δ=1.
[0030] In some optional implementations, the software testing importance is determined based on the influence and comprehensive complexity of all software nodes, and the software testing importance vector W=(W1, W2, ..., W N ),include:
[0031] According to the formula W i =ρ×x i ′(k)+σ×y j ′(k) determines the software node V i Importance of software testing i , where ρ+σ=1.
[0032] This application proposes a method for generating a system-level integration test sequence for military information equipment software. Its main starting point is to prioritize the integration of important software as much as possible for the mesh structure of an open military information equipment software system. First, a software directed network is established based on the system software connection relationship; then, the system software importance index is determined, a software importance evaluation process is formed, the software importance vector is output, and a system-level integration test sequence is generated. This application proposes a system-level integration test strategy that conforms to the characteristics of military information equipment software systems. This strategy takes software as the object and aims to generate the optimal software integration test sequence. It prioritizes the integration of important software, which can detect integration defects as early as possible, improve integration test efficiency, and reduce system development costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings illustrate generally, by way of example and not limitation, various embodiments discussed herein.
[0034] Figure 1 This is a flow chart of a method for generating a system-level integrated test sequence for military information equipment software according to an embodiment of the present application;
[0035] Figure 2 Connect the model and software directed network diagram for the example software. DETAILED DESCRIPTION
[0036] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0037] The specific embodiments of the present invention are described below with reference to the accompanying drawings and examples. Figure 1 A flow chart of a method for generating a system-level integration test sequence based on software importance is provided. The method is characterized in that it includes the following steps:
[0038] The first step is to establish a system software connection relationship model. According to the system software requirement specifications and interface requirement specifications, analyze the system software composition, clarify the connection relationship between software, including the source, destination, information transmission content and direction, and establish the system software connection relationship model. Specifically, the software connection relationship model is represented by a 4-tuple S mod: {SS, DS, CI, MI} is used to represent and describe the connection relationship between two software in the system. Specifically, it includes source software (SS), destination software (DS), communication interface (CI), and message information (MI). There can be multiple source software, indicating that multiple source software sends messages to one destination software; there can be multiple destination software, indicating that one source software sends messages to multiple destination software; the communication interface is the data distribution service (DDS); message information includes message type, message length, and message frequency. The message type is determined based on the software interface protocol of military information equipment. The message length is the number of message bytes. The message frequency is the number of messages sent per unit time.
[0039] The second step is to build a software directed network. Open military information equipment software systems contain hundreds of software components, integrated through a software service bus (DDS), creating a complex, meshed software structure. Based on the system software connection model, a graphical software directed graph (SDG) is constructed. Specifically, assuming the system contains N software components, the SDG divides the software into source software and sink software, establishing directed connections from the source software to the sink software, thereby constructing a system software directed network graph. The software directed network construction process is as follows.
[0040] (1) Number all software included in the system to form a system software set S = {S1, S2, ..., S N};
[0041] (2) According to the system software connection relationship model, for each software S in the software set i , establish software connection relationship model S i_mod :{SS i , DS j , CI, MI j}.
[0042] (3) According to the system software set and each software connection relationship model, a directed network topology graph SDG is established. The SDG graph is defined as SDG = (V, E), where V = {V1, V2, ..., V N} is the node set in the graph, representing each software node in the directed network graph; E={E ij |There is a directed edge from V i to V j}, E ij Represents software node V i and V jDirected connection relationship, V i is the source software node, V j It is the sink software node, that is, when the software is running, there are messages from V i Send to V j .
[0043] The third step is to define software complexity measurement indicators, including structural complexity, code size, and connection complexity, to characterize the complexity of the software and reflect the degree of software errors.
[0044] Software Structure Complexity (SSC): Defined as the sum of the cyclomatic complexities of all functions in the software. Software code cyclomatic complexity measures the complexity of the decision structure contained in the software code, expressed quantitatively as the number of independent paths. Software with high cyclomatic complexity is likely to have low code quality and be difficult to test and maintain. Software structure complexity can be determined by scanning the code using static analysis tools such as Testbed.
[0045] Software Code Line (SCL): Defined as the number of lines of software code. Code is the product of the software developer's mental labor, and human errors are inevitable. The larger the software, the more likely it is to introduce human errors. Software code size can be calculated using code statistics tools such as LineCount.
[0046] Software Relation Complexity (SRC): This is defined as the number of connections between a piece of software and other software in the system, including both out-degree and in-degree. Out-degree refers to the number of destination software, while in-degree refers to the number of source software. A higher degree of software connectivity indicates that the software is a "hub" node in a directed network, with complex interactions with other software in the system. A higher out-degree indicates a greater impact on other software, while a higher in-degree indicates a greater impact on the software from other software. Software connectivity complexity can be measured using directed software networks.
[0047] The fourth step is to define software importance evaluation indicators, including software complexity and software influence, to characterize the role and influence of the software in the system.
[0048] Software Complexity SC (Software Complexity): A comprehensive evaluation of software complexity metrics. Let the structural complexity, code size, and connection complexity of software i be SSC and i 、SCL i 、SRC i , then the software complexity SC iThe software complexity SC is calculated as the weighted sum of the above three metrics. i It can be expressed as:
[0049]
[0050] Wherein, α, β, θ∈R are weighting coefficients, and α+β+θ=1.
[0051] Software Influence (SI): The influence of software on its recipient software and even on the system. Software influence can be evaluated from two aspects: one is the influence of the software itself, that is, the complexity SC of the software itself; the other is the software propagation influence, which represents the software error propagation capability. Software propagation influence can be represented by the propagation coefficient γ, whose elements include the number of messages sent by the software per unit time and the message length. That is, the more messages sent and the larger the messages, the stronger the error propagation capability of the software. Assuming the maximum message length of the software is MSLmax and the number of messages sent per unit time is MSQmax, then the propagation coefficient γ from software i to software j is ij It can be expressed as the formula:
[0052]
[0053] ω+δ=1,1≤i,j≤N.
[0054] Step 5: Define the importance of software testing W i , software testing importance calculation takes into account the complexity of the software SC i and influence SI i , taking the weighted sum of the two, can be expressed as:
[0055] W i =ρ×SC i +σ×SI i (3)
[0056] ρ+σ=1,1≤i≤N.
[0057] Step 6: Design a software test importance evaluation process. This process, based on software importance evaluation metrics, incorporates software complexity into the iterative calculation of software influence and complexity. This ensures that software test importance is not only related to software complexity but also to the complexity and influence of its destination software. As the number of iterations increases, the propagation coefficient γ is added to the calculation of the software complexity SC.
[0058] The method for generating system-level integration test sequences for military information equipment software and the sample software verification process are as follows:
[0059] Step 1: Establish a software connection relationship model based on the software requirement specifications and interface requirement specifications, and construct a software directed network based on the software connection relationship model.
[0060] The sample software connection relationship model and software directed network are shown in the attached Figure 2 shown.
[0061] Step 2: Create an adjacency matrix A based on the software directed network = (a ij ) N×N , the network is valid only if there is one slave node V i To node V j A directed edge, a ij =1, otherwise a ij =0.
[0062] According to the attached Figure 2 , the sample software directed network adjacency matrix is as follows:
[0063]
[0064] Step 3: Determine the complexity SC of each software in the software directed network i .
[0065] Here, the complexity SC of each software in the software directed network can be calculated according to formula (1): i .
[0066] The software code was scanned using the Testbed static analysis tool to obtain the structural complexity of the sample software. The code size of the sample software was obtained using the Linecount code statistics tool. The connection complexity of the sample software was obtained by analyzing the software directed network. The sample software complexity is as follows.
[0067] SC1=0.0802
[0068] SC2=0.0777
[0069] SC3=0.2230
[0070] SC4=0.0815
[0071] SC5=0.1013
[0072] SC6=0.1265
[0073] SC7=0.0773
[0074] SC8=0.1743
[0075] SC9=0.0581
[0076] Step 4: Determine the software node V in the software directed network i and software node V j The propagation coefficient γ ij .
[0077] Here, the software node V in the software directed network can be calculated according to formula (2): i and software node V j The propagation coefficient γ ij ,The propagation coefficient can be calculated based on the software connection ,relationship model.
[0078] According to the attached Figure 2 In the software connection relationship model, the number of messages and message lengths per unit time between the software in the example software are shown in Table 1 below.
[0079] software S1 S2 S3 S4 S5 S6 S7 S8 S9 S1 0 0 60 / 30 0 0 0 0 0 0 S2 0 0 60 / 30 0 0 0 0 0 0 S3 0 0 0 60 / 30 0 60 / 30 60 / 30 60 / 30 0 S4 0 0 0 0 0 0 0 0 0 S5 0 0 0 0 0 20 / 20 0 20 / 20 0 S6 0 0 0 0 0 0 0 0 0 S7 0 0 0 0 0 0 0 0 0 S8 0 0 0 0 0 0 0 0 0 S9 0 0 0 0 0 0 0 30 / 50 0
[0080] Table 1
[0081] The value 60 / 30 in the S3 column of the S1 row means that S1 sends messages to S3 60 times per unit time, and the length of the transmitted messages is 30 bytes.
[0082] According to formula (2), taking ω = δ = 0.5, the propagation coefficient γ between the software in the example software is obtained ij As shown below:
[0083]
[0084] Step 5: Perform iterative calculation to determine the software node V in the software directed network i The initial values of influence and comprehensive complexity are both software node V i The value of its own complexity SCi, the initial value of the two vectors of influence and comprehensive complexity of all software nodes is expressed as x(0) = (SC1, SC2, ..., SC N ) T ,y(0)=(SC1,SC2,…,SC N ) T .
[0085] Assuming that the initial values of influence and complexity of each software node in the software directed network are the values of the complexity SCi of the software, the two vectors of influence and complexity can be expressed as x(0) = (SC1, SC2, ..., SC N ) T ,y(0)=(SC1,SC2,…,SC N ) T .
[0086] Based on the example software complexity vector calculated in step 3, the example software influence and complexity initial vectors are as follows.
[0087]
[0088] Step 6: Iteratively calculate the influence of all software nodes.
[0089] Software influence iteration rule: The influence iteration rule of each software node is the sum of the complexity values of all the sink nodes of the software node in the directed network graph multiplied by the propagation coefficient γ between nodes, that is:
[0090]
[0091] Step 7: Iteratively calculate the comprehensive complexity of all software nodes.
[0092] Software complexity iteration rule: The complexity iteration rule of each software node is the sum of the influence values of all source nodes of the software node in the directed network graph multiplied by the propagation coefficient γ between nodes, that is:
[0093]
[0094] Step 8: Normalization:
[0095]
[0096]
[0097] Here, the calculation results of step 6 and step 7 are normalized.
[0098] Step 9: Repeat steps 5, 6, and 7 for k iterations of the influence and complexity vectors of all software nodes until the two sets of vectors tend to be stable, and then exit the iteration. Here, the condition for the two sets of vectors to tend to be stable is ‖x i (k)-x i (k-1)‖+‖y i (k)-y i (k-1)‖<ε, where ε is the preset iteration stopping threshold.
[0099] Iteration stopping rule: The influence and complexity vectors of the software node repeat steps 5, 6, and 7 for k iterations until the two sets of vectors tend to be stable, and then exit the iteration. Here, the condition for the two sets of vectors to tend to be stable is ‖x i (k)-x i (k-1)‖+‖y i (k)-y i (k-1)‖<ε.
[0100] The initial vectors x(0) and y(0) of the influence and complexity of the example software are iterated k times in steps 6 and 7 and normalized. The stopping condition ε-0.01 is set. It is found that the iteration exit condition is met after 10 iterations. The iterative process of the influence and complexity of the example software is as follows.
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111] Step 10: Determine the importance of software testing based on the influence and comprehensive complexity of all software nodes, and output the software testing importance vector W = (W1, W2, ..., W N ), arrange them in order of importance and generate a system-level integration test sequence.
[0112] Calculate the software test importance according to formula (3) and output the software test importance vector W = (W1, W2, ..., W N ), arrange them in order of importance and generate a system-level integration test sequence.
[0113] Let W i =0.5×x i (k)+0.5×y i (k), Example software test importance vector W = (W1, W2, ..., W N )as follows.
[0114]
[0115] Arrange them by importance and generate the sample software integration test sequence as {S3, S8, S9, S5, S6, S4, S7, S1, S2}.
[0116] Through the above software test importance evaluation process and example software verification results, the effectiveness of the system-level integration test sequence generation method based on software importance is verified.
[0117] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the method of the present invention. These improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating system-level integration test sequences for military information equipment software, characterized in that: The following steps are involved: Step 1: Establish a software connection relationship model, and construct a software directed network based on the software connection relationship model, wherein the software connection relationship model is used to represent the connection relationship between two software in the software system; Step 2: Create an adjacency matrix A based on the software directed network. ij ) N×N , where 1≤i, j≤N, N≥2, and N is the number of software nodes in the software directed network. The software directed network is valid only if there is one slave node V i To software node V j A directed edge, a ij =1, otherwise a ij =0; Step 3: Determine the software node V in the software directed network i The complexity of SC i ; Step 4: Determine the software node V in the software directed network i and software node V j The propagation coefficient γ ij ; Step 5: Perform iterative calculation to determine the software node V in the software directed network i The initial values of influence and comprehensive complexity are both software node V i The value of its own complexity SCi, the initial value of the two vectors of influence and comprehensive complexity of all software nodes is expressed as x(0) = (SC1, SC2, ..., SC N ) T ,y(0)=(SC1,SC2,…,SC N ) T ; Step 6: Iteratively calculate the influence of all software nodes, where software node V i The influence iteration rule is that the software node V in the software directed network i The complexity value of all sink nodes multiplied by the propagation coefficient γ ij The sum of the results is: Step 7: Iteratively calculate the comprehensive complexity of all software nodes, where software node V j The complexity iteration rule is the software node V in the software directed network j The influence value of all source nodes multiplied by the propagation coefficient γ between nodes ji The sum of the results is: Step 8: Normalize the calculation results of steps 6 and 7: Step 9: Repeat steps 5, 6, and 7 for k iterations of the influence and complexity vectors of all software nodes until the two sets of vectors tend to be stable, and then exit the iteration. Here, the condition for the two sets of vectors to tend to be stable is ‖x i (k)-x i (k-1)‖+‖y i (k)-y i (k-1)‖<ε, ε is the preset iteration stop judgment threshold; Step 10: Determine the importance of software testing based on the influence and comprehensive complexity of all software nodes, and output the software testing importance vector W = (W1, W2, ..., W N ), arrange them in order of importance and generate a system-level integration test sequence.
2. The method according to claim 1, characterized in that The establishing of the software connection relationship model includes: The software connection relationship model is established according to the software requirement specification and the interface requirement specification.
3. The method according to claim 1, characterized in that The step of constructing a software directed network according to the software connection relationship model includes: Number all the software included in the system to form a system software set S = {S1, S2, ..., S N }; According to the system software connection relationship model, for each software S in the software set i , establish software connection relationship model S i_mod :{SS i , DS j , CI, MI j }; According to the system software set and each software connection relationship model, a directed network topology graph SDG is established. SDG is defined as SDG = (V, E), where V = {V1, V2, ..., V N } is the set of software nodes in the graph, representing each software node in the directed network graph, E={E ij |There is a directed edge from V i to V j }, E ij Represents software node V i and V j Directed connection relationship, V i is the source software node, V j It is the sink software node, that is, when the software is running, there are messages from V i Send to V j .
4. The method according to claim 1, wherein The determination of software nodes V in the software directed network i The complexity of SC i ,include: Determine software node V i Structural complexity SSC i , code size SCL i And the connection complexity value SRC i , through the formula Determine software node V i The complexity of SC i , where α, β, θ∈R are weighting coefficients, and α+β+θ=1.
5. The method according to claim 1, wherein The determination of software nodes V in the software directed network i and software node V j The propagation coefficient γ ij ,include: Determine the maximum message length MSLmax of the software node and the number of messages sent per unit time MSQmax by the formula Determine the propagation coefficient γ ij , where ω+δ=1.
6. The method according to claim 1, characterized in that The software testing importance is determined according to the influence and comprehensive complexity of all software nodes, and the software testing importance vector W=(W1, W2, ..., W N ),include: According to the formula W i =ρ×x i ′(k)+σ×y j ′(k) determines the software node V i Importance of software testing i , where ρ+σ=1.
Citation Information
Patent Citations
Project-software-oriented class cluster test method
CN105528296A
Directed weighted network-based software security quantitative assessment method
CN108549816A