Test information processing method, device, equipment and storage medium
By building a matching of target relationships and existing relationships, we obtain target tested software similar to the software to be tested, and use its test information for software testing, solving the problem of low utilization of test information in the existing technology, and achieving efficient testing environment and use case generation.
Patent Information
- Application Number
- CN202210346095.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-03-31
AI Technical Summary
It is difficult for the prior art to efficiently utilize existing test information in software testing, resulting in inefficient testing process and insufficient information utilization.
By building a matching of target relationships and existing relationships, we obtain target tested software similar to the software to be tested, and use its test information for testing, including the multiplexing of the test environment and test cases.
It improves the efficiency of software testing and the utilization rate of test information, realizes the rapid construction of test environments and generates test cases, and improves the overall efficiency of the test process.
Smart Images

Figure CN114817003B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, in particular to the field of software testing technology, and specifically to a test information processing method, apparatus, device and storage medium. Background Art
[0002] After the software developers have completed the software development, the software testers will test the software. Before starting the test, the software testers will collect test information related to the software and test the software based on the collected test information. Summary of the Invention
[0003] The present disclosure provides a test information processing method, apparatus, device, and storage medium.
[0004] According to one aspect of the present disclosure, a test information processing method is provided, comprising:
[0005] Obtaining a target relationship between each piece of demand information, wherein the demand information is: information used for testing the software to be tested;
[0006] Matching the target relationship with the existing relationship to obtain target tested software similar to the software to be tested, wherein the existing relationship includes: various test information used to test each tested software and relationship information representing the relationship between all test information;
[0007] Obtaining target test information for testing the target tested software;
[0008] Determine test information for testing the software to be tested based on the target test information.
[0009] According to another aspect of the present disclosure, there is provided a test information processing device, comprising:
[0010] A relationship obtaining module is used to obtain target relationships between various pieces of demand information, wherein the demand information is information used to test the software to be tested;
[0011] a relationship matching module, configured to match the target relationship with existing relationships to obtain target tested software similar to the software to be tested, wherein the existing relationship includes: various test information used to test each tested software and relationship information representing the relationship between all test information;
[0012] An information acquisition module, configured to obtain target test information used to test the target tested software;
[0013] The information determination module is used to determine the test information for testing the software to be tested based on the target test information.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the test information processing method.
[0018] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned test information processing method.
[0019] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the above test information processing method when executed by a processor.
[0020] As can be seen from the above, when applying the solution provided by the embodiment of the present disclosure to process test information, the target relationship constructed based on each requirement information is first obtained, and then the target relationship is matched with the existing relationship, thereby obtaining target tested software that is similar to the software to be tested. Since the target tested software is similar to the software to be tested, the test environment, test cases, and other test information used in testing the target tested software are similar to the test environment, test cases, and other test information used in testing the software to be tested. Therefore, in the solution provided by the embodiment of the present disclosure, based on the target test information used for testing the target tested software, the test information used to test the software to be tested can be accurately determined.
[0021] On the basis of the above, when the test user tests the software to be tested, he can reuse the target test information used to test the target tested software, quickly build the test environment used when testing the software to be tested, generate test cases used when testing the software to be tested, etc. This not only enables the testing of the software to be tested and improves the efficiency of the entire testing process, but also improves the utilization rate of test information.
[0022] In addition, if the test cases and / or test environment used to test the target tested software can be applied in the testing of the software to be tested, the test cases and / or test environment used to test the target tested software can be directly reused to test the software to be tested, which can further improve the efficiency of the entire testing process.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0025] Figure 1a A flowchart of a first test information processing method provided in an embodiment of the present disclosure;
[0026] Figure 1b A schematic diagram of the structure of the first knowledge graph provided in an embodiment of the present disclosure;
[0027] Figure 1c A schematic diagram of the structure of the second knowledge graph provided in an embodiment of the present disclosure;
[0028] Figure 2 A flowchart of a second test information processing method provided in an embodiment of the present disclosure;
[0029] Figure 3 A flowchart of a third test information processing method provided in an embodiment of the present disclosure;
[0030] Figure 4 A flowchart of a fourth test information processing method provided in an embodiment of the present disclosure;
[0031] Figure 5 A schematic structural diagram of a first test information processing device provided in an embodiment of the present disclosure;
[0032] Figure 6 The present invention is a block diagram of an electronic device for implementing the test information processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0034] See also Figure 1a , Figure 1a This is a flow chart of a first test information processing method provided by an embodiment of the present disclosure. The method includes the following steps S101-S104.
[0035] Step S101: Obtain the target relationship between each piece of demand information.
[0036] Requirement information refers to information used to test the software under test. For example, this information may include the software's name and identifier, the required equipment and operating system, and the software and hardware required to test the software's performance.
[0037] The above-mentioned requirement information may include software requirement information required to run the above-mentioned software to be tested, such as information on the equipment and operating system required to run the software, and may also include test requirement information required to test the above-mentioned software to be tested, such as software and hardware information required to configure the software performance test.
[0038] The target relationship may include various pieces of demand information and relationship information representing the relationship between the various pieces of demand information.
[0039] The above target relationship can be represented in the form of a knowledge graph, in the form of a relational data pair, or in other data forms.
[0040] The above-mentioned knowledge graph is a graph data consisting of nodes and edges connecting different nodes. When the above-mentioned target relationship is represented in the form of a knowledge graph, the nodes in the knowledge graph represent the demand information included in the target relationship, and the edges connecting different nodes represent the relationship information between different demand information.
[0041] There are two ways to obtain the above target relationship:
[0042] In a first implementation manner, the above-mentioned demand information may be obtained first, and then a target relationship may be constructed based on each piece of demand information.
[0043] In one embodiment of the present disclosure, when constructing a target relationship based on demand information, semantic analysis can be first performed on each piece of demand information to obtain semantic information of each piece of demand information, and then, based on the semantic information of each piece of demand information, relationship information representing the relationship between different pieces of demand information can be generated, thereby obtaining information including each piece of demand information and the relationship information between each piece of demand information as the target relationship.
[0044] In the second implementation manner, the target relationship constructed by other devices based on each demand information can also be directly obtained.
[0045] The other devices mentioned above can also perform semantic analysis on each demand information and build a target relationship based on the semantic information of each demand information, which will not be described in detail here.
[0046] Step S102: Match the target relationship with the existing relationship to obtain target tested software that is similar to the software to be tested.
[0047] The existing relationships include: various test information used to test various tested software and relationship information representing the relationship between all test information.
[0048] For example, the test information may include information about a container required to test the tested software, an operating system required to run the tested software, a storage space for storing data generated during the test, and the like.
[0049] For further description of the above test information, please refer to the subsequent embodiments and will not be described in detail here.
[0050] The above-mentioned tested software can be software developed based on programming languages such as Java and C++, software developed based on the relational database management system MySQL, or software developed based on the data analysis tool ElasticSearch, etc.
[0051] The above-mentioned target tested software is similar to the software to be tested. The above-mentioned target tested software can be understood as software in which the functions implemented in each tested software are similar to the functions implemented by the software to be tested. The above-mentioned target tested software can also be understood as software in which the software framework in each tested software is similar to the software framework of the software to be tested.
[0052] Similar to the above target relationship, the above existing relationship can also be expressed in multiple forms.
[0053] For example, Figure 1b This is a structural diagram of the existing relationships in the first form of knowledge graph. Figure 1b In the existing relationships, test information such as test case information, runtime environment information, test tag information, and tested software information is represented as multiple nodes, and the relationship information between different test information is represented as edges between different nodes. For example, the relationship information between test case information and test tag information is represented as an edge between the node corresponding to the test case and the node corresponding to the test tag.
[0054] In addition, since the tested software is software that has been tested, the information used in the testing process of the tested software can be known in advance, and then the existing relationship can be constructed. Therefore, the existing relationship can be constructed in advance.
[0055] The specific implementation method of building an existing relationship can be found in the subsequent embodiments and will not be described in detail here.
[0056] Specifically, before matching the target relationship with the existing relationship, the above-mentioned existing relationship can be obtained first, and the above-mentioned existing relationship can include software information such as the name, identifier, and service name of the tested software. Then, the target relationship and the existing relationship are matched to obtain the software information of the target tested software, and the target tested software corresponding to the software information is determined based on the obtained software information.
[0057] In addition, the target relationship and the existing relationship mentioned above may be represented in various forms, and different matching methods are used to match the target relationship and the existing relationship in different forms.
[0058] For example, the target relationship and the existing relationship can be represented in the form of a knowledge graph. In this case, the specific implementation method of matching the target relationship and the existing relationship can be found in the subsequent Figure 3 Steps S302-S303 in the illustrated embodiment.
[0059] In addition, the target relationship and the existing relationship may also be represented in other data forms. In this case, the target relationship and the existing relationship may be matched using existing data matching methods for such other data forms.
[0060] Step S103: Obtain target test information for testing the target tested software.
[0061] Specifically, since the target tested software is software that has been tested, the test information of the target tested software can be obtained in advance, so that after the target tested software is determined, the test information corresponding to the target tested software can be obtained as the target test information.
[0062] Step S104: Determine test information for testing the software to be tested based on the target test information.
[0063] In one embodiment of the present invention, the obtained target test information can be directly used as test information for testing the software to be tested, so that the test user can obtain the target test information and test the software to be tested based on the target test information.
[0064] In addition, the format of the target test information may be converted into a preset format first, and then the target test information in the preset format may be recommended to the test user.
[0065] For example, the preset format may be a YAML (YAML Ain't Markup Language) format.
[0066] In another embodiment of the present invention, test cases and / or test environments required for testing the software to be tested may be constructed based on the target test information, and the constructed test cases and / or test environments may be used as test information for testing the software to be tested.
[0067] Constructing test cases or test environments based on target test information can be achieved through existing software testing technologies, which will not be described in detail here.
[0068] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, a target relationship constructed based on each requirement information is first obtained, and then the target relationship is matched with the existing relationship, thereby obtaining target tested software that is similar to the software to be tested. Since the target tested software is similar to the software to be tested, the test environment, test cases, and other test information used in testing the target tested software are similar to the test environment, test cases, and other test information used in testing the software to be tested. Therefore, in the solution provided by the embodiment of the present disclosure, based on the target test information used for testing the target tested software, the test information used for testing the software to be tested can be accurately determined.
[0069] On the basis of the above, when the test user tests the software to be tested, he can reuse the target test information used to test the target tested software, quickly build the test environment used when testing the software to be tested, generate test cases used when testing the software to be tested, etc. This not only enables the testing of the software to be tested and improves the efficiency of the entire testing process, but also improves the utilization rate of test information.
[0070] In addition, if the test cases and / or test environment used to test the target tested software can be applied in the testing of the software to be tested, the test cases and / or test environment used to test the target tested software can be directly reused to test the software to be tested, which can further improve the efficiency of the entire testing process.
[0071] The following describes the specific implementation method of building an existing relationship.
[0072] In one embodiment of the present disclosure, the relationship similarity between any two relationships included in the existing relationships is less than a preset threshold.
[0073] Constructing an existing relationship where the relationship similarity between any two relationships in the included relationships is less than a preset threshold can be achieved in the following two ways.
[0074] In a first implementation, the preset threshold can be pre-set. For each pending relationship to be added to an existing relationship, the similarity between the pending relationship and each existing relationship in the existing relationship is calculated. If any of the calculated similarities is greater than or equal to the preset threshold, it is considered that there is a duplicate relationship in the existing relationship that is identical or similar to the pending relationship, and the pending relationship is discarded. If all the calculated similarities are not greater than the preset threshold, it is considered that the pending relationship is different from all the existing relationships, and the pending relationship is added to the existing relationship. All pending relationships are processed using the above method, and the relationship similarity between any two relationships included in the existing relationship obtained after processing is less than the preset threshold.
[0075] In the second implementation, all pending relationships used to construct the existing relationship can be collected in advance. Based on this, the similarity between each pair of pending relationships is calculated. If the similarity between two pending relationships is greater than or equal to a preset threshold, either of the two pending relationships can be discarded. If the similarity between two pending relationships is less than the set threshold, both pending relationships are retained. Finally, all remaining pending relationships are added to the existing relationship.
[0076] In addition, the above-mentioned preset threshold can be set by the test user based on experience, or can be set based on the distribution information of the similarities between the pending relationships, or can be set based on the dynamic distribution of the similarities between the relationships continuously collected during the process of building existing relationships.
[0077] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the similarity between any two relationships included in the existing relationships is less than the preset threshold, which can avoid the existence of identical or similar repeated relationships in the existing relationships, thereby reducing the amount of data in the existing relationships and improving the efficiency of test information processing.
[0078] The test information mentioned in the above step S102 is further explained below.
[0079] In one embodiment of the present disclosure, each piece of test information used to test each piece of tested software includes: environment construction information used to construct a test environment used when testing each piece of tested software.
[0080] Testing the tested software needs to be performed in a test environment. Therefore, before testing the tested software, a test environment for testing the tested software needs to be constructed first. Information used to construct the test environment may be referred to as environment construction information.
[0081] For example, the above-mentioned environment construction information may include tester information, environment tags, test tags, startup script information, hardware environment information, software environment information, etc.
[0082] In addition, the test environments used by different tested software during testing may be the same or different. Therefore, the environment construction information used to construct the test environments used by different tested software during testing may be the same or different.
[0083] In this solution, when the above-mentioned test information includes the above-mentioned environment construction information, the above-mentioned target test information includes the environment construction information for constructing the test environment used when testing the target tested software. In this way, after determining the test information for testing the software to be tested based on the target test information, the test user can refer to the environment construction information corresponding to the above-mentioned target tested software, thereby constructing a test environment for testing the software to be tested, thereby realizing the testing of the software to be tested.
[0084] In another embodiment of the present disclosure, each piece of test information used to test each piece of tested software includes: use case generation information used to generate a test case used when testing each piece of tested software.
[0085] Testing the tested software requires the use of test cases. Therefore, before testing the tested software, it is necessary to generate test cases for testing the tested software. The information used to generate the test cases can be understood as case generation information.
[0086] For example, the above-mentioned use case generation information may include test tags, test methods, operating environment, etc. In addition, the above-mentioned use case generation information may also include personnel information of testers, industry information of the industry applicable to the tested software, personnel information of the developer of the tested software, etc.
[0087] In addition, the test cases used when testing different tested software may be the same or different, and a tested software can be tested using multiple test cases. Therefore, the use case generation information used to generate the test cases used when testing different tested software may be the same or different.
[0088] In this solution, when the above-mentioned test information includes the above-mentioned use case generation information, the above-mentioned target test information includes use case generation information for generating test cases used when testing the target tested software. In this way, after determining the test information for testing the software to be tested based on the target test information, the test user can refer to the use case generation information corresponding to the above-mentioned target tested software to generate test cases for testing the software to be tested, thereby realizing the testing of the software to be tested.
[0089] In another embodiment of the present disclosure, each piece of test information used to test each piece of tested software includes two types of information: the above-mentioned environment construction information and the above-mentioned use case generation information.
[0090] In this case, the target test information obtained in step S103 includes environment construction information for constructing a test environment for testing the target tested software and use case generation information for generating test cases for testing the target tested software. Thus, after determining the test information for testing the software to be tested based on the target test information, the user can refer to the environment construction information and use case generation information corresponding to the target tested software to generate a test environment and test cases for testing the software to be tested. Therefore, the solution provided by the embodiments of the present disclosure can determine relatively rich test information.
[0091] Since software can run in containers, it is necessary to run the software when testing the software. Therefore, when building a test environment for software testing, the test environment is also built based on containers.
[0092] In view of the above situation, in one embodiment of the present disclosure, the above environment construction information may include, in addition to the information mentioned in the above embodiment, configuration information of a container for running the tested software.
[0093] The above-mentioned container can be understood as a virtual machine. A container is installed on a host machine, and a host machine can be equipped with multiple containers. For a single software, multiple containers can be assigned to it. Each container assigned to the software can independently run the software and provide the corresponding services to users. At least two containers assigned to the software can also work together to run the software and provide the corresponding services to users.
[0094] The configuration information of the above container may include: the number of containers, the orchestration method between multiple containers, etc. The configuration information of the above container may also include: configMap (configuration map) mounting information, persistent volume information, container network information, etc.
[0095] The above configMap mount information is used to record the process of mounting the software into the container according to the environment variables / file system.
[0096] The persistent volume information is a mount point, which is used to store information generated within the container. For example, the mount point can be an empty directory for storing temporary files, a host path for storing business information, or a persistent volume.
[0097] The network information of the container includes container port information and node port information. The container port refers to the port used for monitoring when the software image is started, and the node port refers to the port on the host machine.
[0098] In addition, the configuration information of the above-mentioned container can be understood as the attribute information of the above-mentioned tested software. Since there is a relationship between the attribute information of the tested software and the tested software information, the attribute information of the tested software, the tested software information and the relationship information between the two types of information can constitute a relationship, and the relationship can be expressed in the form of a knowledge graph. Therefore, the configuration information of the above-mentioned container, the information of the above-mentioned tested software and the relationship information between the two types of information can constitute a relationship, and the relationship can be expressed in the form of a knowledge graph.
[0099] For example, Figure 1c It is a structural diagram of a knowledge graph. Figure 1c The knowledge graph shown in can represent the relationship between the tested software information and the attribute information of the tested software. Figure 1c The attributes of the tested software include the account configuration information for the tested software, as well as container configuration information such as configMap mount information, persistent volume information, and container network information. The key:value pairs and key0:value0 represent two sets of information values for the configMap mount information. The emptyDir, hostPath, and persistent volume represent three different types of persistent volume information. The container port, node port, ingress controller, and load balancer represent different types of network information.
[0100] In one implementation method, when obtaining the above-mentioned configuration information, you can first obtain a record document that records the structure of the test environment used for the above-mentioned tested software test, and then extract the information required to build the test environment based on the container from the record document, and use this information as the configuration information of the container running the tested software.
[0101] For example, the above-mentioned method of building a test environment based on a container can be an existing K8s method. In this case, the information required to build the test environment according to the K8s method can be extracted from the above-mentioned record document.
[0102] After obtaining the above configuration information, the information format of the configuration information may be converted into a preset information format that meets the conditions for building an existing relationship, and an existing relationship including the above configuration information may be built based on the converted configuration information.
[0103] In addition, the above Figure 1b The knowledge graph shown and Figure 1c The knowledge graphs shown can be combined into one knowledge graph or used as two separate knowledge graphs.
[0104] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the above-mentioned environment construction information includes the configuration information of the container for running the tested software. In this case, the target test information obtained includes the configuration information of the container for running the target tested software. In this way, after determining the test information based on the target test information, the test user can know the configuration information of the container for running the target tested software. Since the software usually needs to run in a container, the test user can refer to the known configuration information of the container to accurately build a test environment for testing the software to be tested. Therefore, the application of the solution provided by the embodiment of the present disclosure can improve the accuracy of test information processing. Moreover, since the configuration information of the container in this solution can include the orchestration information of the container, under heterogeneous hardware conditions, orchestrating the container based on the test information determined by the solution provided by the embodiment of the present disclosure can reduce the learning and access costs of container orchestration.
[0105] Testing the software under test may require the use of additional hardware and / or software in addition to containers.
[0106] In view of this situation, in one embodiment of the present disclosure, see Figure 2 , provides a flow chart of a second test information processing method. In this embodiment, each existing relationship includes: nodes corresponding to the two test information with which the relationship exists, and relationship information representing the relationship between the two test information. The above step S103 can be implemented by the following steps S203-S204.
[0107] Specifically, Figure 2 The illustrated embodiment includes the following steps S201-S205.
[0108] Step S201: Obtain the target relationship between each piece of demand information.
[0109] Step S202: Match the target relationship with the existing relationship to obtain target tested software that is similar to the software to be tested.
[0110] The above steps S201-S202 are the same as the above steps Figure 1a Steps S101-S102 in the illustrated embodiment are the same and will not be described again here.
[0111] Step S203: determining a second node that has a relationship with the first node from the existing relationships, and obtaining configuration information of a container for running the target tested software from the attribute information of the first node.
[0112] There are multiple nodes in the existing relationship, each node corresponds to a type of information, and the first node corresponds to the identification information of the target tested software.
[0113] For example, the first node may correspond to identification information such as the name and label of the target tested software.
[0114] The second node corresponds to software information and / or hardware information for software testing.
[0115] For example, the software information may include information about the operating system, platform, and other software required to run the tested software.
[0116] The hardware information may include information about the CPU, GPU, and other hardware required to test the tested software.
[0117] The above existing relationships include software nodes corresponding to each tested software. Each software node has its own attribute information, which includes the configuration information of the container running the tested software corresponding to the software node. In addition, the attribute information can also include attribute information such as account configuration information of the tested software.
[0118] Specifically, after obtaining the target tested software, the first node corresponding to the target tested software can be identified in the existing relationship based on the name, identifier, and other information of the target tested software, thereby determining the attribute information of the first node. The configuration information of the container used to run the target tested software can then be extracted from the attribute information of the first node. A second node that has a relationship with the first node can also be found based on the first node.
[0119] Step S204: generating target test information for testing the target tested software according to the obtained configuration information and the determined node information of the second node.
[0120] The node information of the second node may be understood as software information and / or hardware information corresponding to the software test performed on the second node.
[0121] Specifically, after obtaining the configuration information of the container used to run the target tested software and determining the second node, the software information and / or hardware information corresponding to the second node can be obtained, and then the target test information containing the obtained configuration information, software information and / or hardware information can be generated.
[0122] Step S205: Determine test information for testing the software to be tested based on the target test information.
[0123] This step is the same as the above step S104 and will not be repeated here.
[0124] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the target test information is generated according to the obtained configuration information and the node information of the second node. Therefore, richer test information can be determined based on the target test information.
[0125] The following describes a specific implementation method for matching the target relationship with the existing relationship when the target relationship and the existing relationship are represented in the form of a knowledge graph.
[0126] See also Figure 3 A flowchart of a third test information processing method is provided. In this embodiment, the target relationship is represented by a target knowledge graph that records the relationship between each piece of requirement information. The existing relationship is represented by an existing knowledge graph that records the relationship between each piece of test information used to test each piece of tested software. The test information used to test the tested software includes the software information of the tested software. The above-mentioned step S102 can be implemented by the following steps S302-S303.
[0127] The software information of the tested software may be the name, identification and other information of the tested software.
[0128] Specifically, Figure 3 The illustrated embodiment includes the following steps S301 - S305 .
[0129] Step S301: Obtain a target knowledge graph constructed based on each demand information.
[0130] This step is similar to the above step S101. In one case, the demand information can be obtained first, and then the target knowledge graph can be constructed based on each demand information.
[0131] In another case, the knowledge graph constructed by other devices based on various demand information can also be directly obtained as the target knowledge graph.
[0132] In one embodiment of the present disclosure, when constructing a target knowledge graph, the above-mentioned demand information and the relationship information between each demand information can be first obtained, and the obtained demand information and relationship information can be converted into knowledge, and then the target knowledge graph can be constructed based on the converted knowledge.
[0133] Step S302: Perform graph matching on the target knowledge graph and the existing knowledge graph to obtain the target software information recorded in the area of the existing knowledge graph that matches the target knowledge graph.
[0134] The existing knowledge graph may be a pre-built knowledge graph that records the relationship between the software information of each tested software and each test information.
[0135] The implementation method of constructing an existing knowledge graph can be found in the subsequent embodiments and will not be described in detail here.
[0136] Specifically, since the existing knowledge graph may include the relationship between software information of multiple tested software and multiple test information, the scale of the existing knowledge graph is large. When performing graph matching, graph matching can be performed on the target knowledge graph and partial areas of the existing knowledge graph. By performing multiple graph matching on different areas of the target knowledge graph and the existing knowledge graph, the graph matching of the target knowledge graph and the existing knowledge graph is achieved, and based on the matching results of multiple graph matching, the area in the existing knowledge graph that matches the target knowledge graph is determined, so that the software information recorded in the determined area is obtained as the target software information.
[0137] Graph matching between the target knowledge graph and partial areas of the existing knowledge graph can be achieved through existing graph matching technology, which will not be described in detail here.
[0138] Step S303: Determine that the tested software corresponding to the target software information is the target tested software that is similar to the software to be tested.
[0139] The software information of the tested software can be used to search for tested software. After obtaining the target software information, the target software information can be used to search for the corresponding tested software. The found tested software is the target tested software.
[0140] Step S304: Obtain target test information used to test the target tested software.
[0141] Step S305: Determine test information for testing the software to be tested based on the target test information.
[0142] The above steps S304-S305 are the same as the above steps Figure 1a In the illustrated embodiment, steps S103 - S104 are respectively the same and will not be described again here.
[0143] From the above, it can be seen that in the solution provided by the embodiment of the present disclosure, when the target relationship and the existing relationship are represented in the form of a knowledge graph, the target knowledge graph and the existing knowledge graph are matched, and the area matching the target knowledge graph can be accurately determined in the existing knowledge graph, and the target software information recorded in the area can be obtained. Based on the target software information, the target tested software can be accurately determined, and then accurate target test information can be obtained, and the test information for testing the software to be tested can be accurately determined based on the target test information.
[0144] The following describes the specific implementation method of constructing an existing knowledge graph.
[0145] In one embodiment of the present disclosure, software information for each tested software item and relationship information between the items can be obtained. Two pieces of software information and their relationship information can form a relationship, which can also be called knowledge. Specifically, two pieces of software information and their relationship information can form a piece of knowledge. After obtaining the software information and relationship information, data preprocessing such as validation and format conversion can be performed on the obtained information. Then, an existing knowledge graph can be constructed from the pieces of knowledge formed by the obtained software information and relationship information.
[0146] In another embodiment of the present disclosure, after obtaining the above-mentioned knowledge, an existing knowledge graph can be constructed using any of the following two implementation methods.
[0147] In the first implementation, a similarity threshold can be set. For each piece of knowledge, the similarity between the knowledge and the existing knowledge in the existing knowledge graph is calculated. By comparing the calculated similarity with the similarity threshold, a decision is made as to whether the knowledge should be added to the existing knowledge graph. This process is repeated for each piece of knowledge, thereby constructing the existing knowledge graph.
[0148] In the second implementation method, after obtaining the above-mentioned knowledge, the similarity between each pair of knowledge can be calculated. If the similarity between the two pieces of knowledge is greater than or equal to the set similarity threshold, any one of the two pieces of knowledge can be discarded; if the similarity between the two pieces of knowledge is less than the similarity threshold, the two pieces of knowledge are retained, and finally the existing knowledge graph is constructed based on all the remaining knowledge.
[0149] In addition, the above-mentioned similarity threshold can be set by the test user based on experience, or it can be set based on the distribution information of the similarity between each piece of knowledge, or it can be set based on the dynamic distribution of the similarity between the relationships continuously collected in the process of constructing the existing knowledge graph.
[0150] In one embodiment of the present disclosure, when calculating the similarity between different pieces of knowledge, each piece of knowledge may be first converted into a vector, and then the similarity between different vectors may be calculated.
[0151] For example, the cosine similarity between different vectors can be calculated using the following expression as the similarity between the knowledge represented by the different vectors:
[0152]
[0153] Among them, x and y represent different knowledge, P x represents the attribute value of knowledge x, P y Represents the attribute value of knowledge y, vec(P x) represents the vector obtained by transforming knowledge x, vec(P y ) represents the vector obtained by transforming knowledge y, and sim(x, y) represents the similarity between different knowledge.
[0154] In addition, other existing similarity calculation algorithms can be used to calculate the similarity between different knowledge, which will not be described in detail here.
[0155] In one embodiment of the present invention, test information for testing the software to be tested determined based on target test information can be recommended to the test user. For the sake of simplicity, the test information recommended to the test user for testing the software to be tested is referred to as recommendation information. According to the description in the above disclosed embodiment, the above target test information can include environment construction information for constructing a test environment used when testing the target tested software. In this case, the above recommendation information can be understood as environment reference information for providing a reference for the test user to construct a test environment for testing the software to be tested. The above target test information can also include use case generation information for generating test cases used when testing the target tested software. In this case, the above recommendation information can be understood as use case reference information for providing a reference for the test user to generate test cases for testing the software to be tested.
[0156] The solution provided by the above disclosed embodiment can be understood as obtaining the above environment reference information and / or use case reference information based on the target tested software by searching for the target tested software. The test user can refer to the environment reference information to generate a test environment, and the test user can also refer to the use case reference information to generate a test case. When obtaining the above use case reference information, in addition to applying the method of obtaining the use case reference information by searching for the target tested software mentioned in the above disclosed embodiment, the following method can also be used: Figure 2 The use case reference information is obtained in the manner mentioned in the illustrated embodiment.
[0157] See also Figure 4 , a flow chart of a fourth test information processing method is provided. In the embodiment of the present disclosure, the above-mentioned test information includes use case generation information for generating test cases used when testing each tested software. The above-mentioned step S102 can be implemented by the following step S402, and the above-mentioned step S103 can be implemented by the following step S403, and the above-mentioned step S104 can be implemented by the following step S404.
[0158] Specifically, Figure 4 The illustrated embodiment includes the following steps S401-S404.
[0159] Step S401: Obtain the target relationship between each piece of demand information.
[0160] This step is the same as above Figure 1aStep S101 in the illustrated embodiment is the same and will not be described again here.
[0161] Step S402: Match the target relationship with the existing relationship to obtain first information of target tested software similar to the software to be tested and a test case indicated by the target matching relationship.
[0162] When testing the tested software, multiple test cases can be used to test the tested software separately. When generating multiple test cases, test cases can be generated based on the use case generation information corresponding to the test cases. Therefore, in the existing relationship, there is a relationship between the software information of the tested software and the use case generation information of each test case, that is, the above-mentioned existing relationship can include multiple relationships.
[0163] The target matching relationship is a relationship included in the existing relationships that matches the target relationship.
[0164] Specifically, the above-mentioned existing relationship may include the relationship between the software information of the tested software and the use case generation information of the test case. By matching the target relationship and the existing relationship, the software information of the target tested software can be determined in the existing relationship, and then the target tested software can be determined based on the software information of the target tested software. Based on the relationship between the software information of the target tested software and the information of the test case, the use case generation information of the target test case related to the software information of the target tested software is obtained, and the use case generation information of the target test case is used as the above-mentioned first information.
[0165] For example, if test case a is a test case used when testing tested software a, then the tested software a is related to test case a, and a relationship between the use case generation information of the tested software a and the test case a can be established. If the tested software a is determined to be the target tested software after relationship matching, the use case generation information of test case a can be obtained based on the established relationship as the above-mentioned first information.
[0166] In addition, since the above-mentioned existing relationship can also include the use case relationship between the identification information of the tested software and the information of the test case, after matching the target relationship and the existing relationship to obtain the target tested software, the target relationship and each use case relationship where the identification information of the target tested software is located in the existing relationship can be matched twice, and the use case relationship with the highest similarity to the target relationship in the existing relationship is obtained as the above-mentioned relationship that matches the target relationship. The use case generation information of the test case recorded in the obtained use case relationship is the above-mentioned first information.
[0167] Step S403: obtaining second information for constructing a test environment when testing the target tested software.
[0168] Specifically, the information used to construct the test environment when each tested software is tested can be obtained in advance. After determining the target tested software, the information used to construct the test environment when the target tested software is tested can be found from the information corresponding to the pre-obtained multiple tested software as the second information.
[0169] Step S404: Determine the obtained first information and second information as test information for testing the software to be tested.
[0170] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, by matching the target relationship with the existing relationship, the first information of the test case of the target tested software and the relationship indication that matches the target relationship can be obtained. The above-mentioned first information is the information of the test case of the relationship indication that matches the target relationship, which ensures the accuracy of the first information. Since the information used to build the test environment when each tested software is tested can be obtained in advance, after obtaining the above-mentioned target tested software, the second information corresponding to the target tested software can be obtained, and finally the first information and the second information are determined as the test information for testing the software to be tested. Therefore, in the solution provided by the embodiment of the present disclosure, the test information finally obtained includes the first information and the second information, thereby providing the test user with test information with richer content.
[0171] Corresponding to the above-mentioned test information processing method, an embodiment of the present disclosure further provides a test information processing device.
[0172] See also Figure 5 , provides a structural diagram of a first test information processing device, the device comprising:
[0173] The relationship obtaining module 501 is used to obtain the target relationship between each requirement information, wherein the requirement information is: information used for testing the software to be tested;
[0174] The relationship matching module 502 is configured to match the target relationship with existing relationships to obtain target tested software that is similar to the software to be tested, wherein the existing relationship includes: test information used to test each tested software and relationship information representing the relationship between all test information;
[0175] An information acquisition module 503 is used to obtain target test information used to test the target tested software;
[0176] The information determination module 504 is configured to determine test information for testing the software to be tested based on the target test information.
[0177] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, a target relationship constructed based on each requirement information is first obtained, and then the target relationship is matched with the existing relationship, thereby obtaining target tested software that is similar to the software to be tested. Since the target tested software is similar to the software to be tested, the test environment, test cases, and other test information used in testing the target tested software are similar to the test environment, test cases, and other test information used in testing the software to be tested. Therefore, in the solution provided by the embodiment of the present disclosure, based on the target test information used for testing the target tested software, the test information used for testing the software to be tested can be accurately determined.
[0178] On the basis of the above, when the test user tests the software to be tested, he can reuse the target test information used to test the target tested software, quickly build the test environment used when testing the software to be tested, generate test cases used when testing the software to be tested, etc. This not only enables the testing of the software to be tested and improves the efficiency of the entire testing process, but also improves the utilization rate of test information.
[0179] In addition, if the test cases and / or test environment used to test the target tested software can be applied in the testing of the software to be tested, the test cases and / or test environment used to test the target tested software can be directly reused to test the software to be tested, which can further improve the efficiency of the entire testing process.
[0180] In one embodiment of the present disclosure, each piece of test information used to test each piece of tested software includes: environment construction information used to construct a test environment used when testing each piece of tested software.
[0181] From the above, it can be seen that in the solution provided by the embodiment of the present disclosure, when the above-mentioned test information includes the above-mentioned environment construction information, the above-mentioned target test information includes the environment construction information for constructing the test environment used when testing the target tested software. In this way, after determining the test information for testing the software to be tested based on the target test information, the test user can refer to the environment construction information corresponding to the above-mentioned target tested software, thereby constructing a test environment for testing the software to be tested, thereby realizing the testing of the software to be tested.
[0182] In one embodiment of the present disclosure, each piece of test information used to test each piece of tested software includes: use case generation information used to generate a test case used when testing each piece of tested software.
[0183] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, when the above-mentioned test information includes the above-mentioned use case generation information, the above-mentioned target test information includes the use case generation information for generating the test case used when testing the target tested software. In this way, after determining the test information for testing the software to be tested based on the target test information, the test user can refer to the use case generation information corresponding to the above-mentioned target tested software to generate the test case used to test the software to be tested, thereby realizing the testing of the software to be tested.
[0184] In one embodiment of the present disclosure, the test information used to test each tested software includes: environment construction information for constructing the test environment used when testing each tested software and use case generation information for generating test cases used when testing each tested software.
[0185] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the target test information obtained in the above step S103 includes environment construction information for constructing a test environment for testing the target tested software and use case generation information for generating test cases used when testing the target tested software. In this way, after determining the test information for testing the software to be tested based on the target test information, the user can refer to the environment construction information and use case generation information corresponding to the above target tested software to generate a test environment and test cases for testing the software to be tested. Therefore, the solution provided by the embodiment of the present disclosure can determine relatively rich test information.
[0186] In one embodiment of the present disclosure, the environment construction information includes: configuration information of a container for running the tested software.
[0187] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the obtained target test information includes the configuration information of the container used to run the target tested software. In this way, after determining the test information based on the target test information, the test user can obtain the configuration information of the container running the target tested software. Since software usually needs to run in a container, the test user can refer to the obtained container configuration information to accurately build a test environment for testing the software to be tested. Therefore, the application of the solution provided by the embodiment of the present disclosure can improve the accuracy of test information processing.
[0188] In one embodiment of the present disclosure, each existing relationship includes: nodes corresponding to two pieces of test information having a relationship and relationship information representing the relationship between the two pieces of test information;
[0189] The information acquisition module 503 is specifically used to:
[0190] Determining a second node having a relationship with the first node from the existing relationship, and obtaining configuration information of a container for running the target tested software from attribute information of the first node, wherein the first node corresponds to identification information of the target tested software, and the second node corresponds to software information and / or hardware information for software testing;
[0191] Target test information for testing the target tested software is generated according to the obtained configuration information and the determined node information of the second node.
[0192] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the target test information is generated according to the obtained configuration information and the node information of the second node. Therefore, richer test information can be determined based on the target test information.
[0193] In one embodiment of the present disclosure, the target relationship is represented by a target knowledge graph that records the relationship between the various pieces of requirement information, and the existing relationship is represented by an existing knowledge graph that records the relationship between various pieces of test information used to test the tested software, and the test information used to test the tested software includes the software information of the tested software;
[0194] The relationship matching module 502 is specifically configured to:
[0195] Performing graph matching on the target knowledge graph and the existing knowledge graph to obtain target software information recorded in an area of the existing knowledge graph that matches the target knowledge graph;
[0196] Determine that the tested software corresponding to the target software information is target tested software similar to the software to be tested.
[0197] From the above, it can be seen that in the solution provided by the embodiment of the present disclosure, when the target relationship and the existing relationship are represented in the form of a knowledge graph, the target knowledge graph and the existing knowledge graph are matched, and the area matching the target knowledge graph can be accurately determined in the existing knowledge graph, and the target software information recorded in the area can be obtained. Based on the target software information, the target tested software can be accurately determined, and then accurate target test information can be obtained, and the test information for testing the software to be tested can be accurately determined based on the target test information.
[0198] In one embodiment of the present disclosure, the relationship similarity between any two relationships included in the existing relationships is less than a preset threshold.
[0199] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the similarity between any two relationships included in the existing relationships is less than the preset threshold, which can avoid the existence of identical or similar repeated relationships in the existing relationships, thereby reducing the amount of data in the existing relationships and improving the efficiency of test information processing.
[0200] In one embodiment of the present disclosure, the test information includes use case generation information for generating test cases used when testing each tested software;
[0201] The relationship matching module 502 is specifically configured to:
[0202] Matching the target relationship with the existing relationships to obtain target tested software similar to the software to be tested and first information of a test case indicated by a target matching relationship, wherein the target matching relationship is a relationship included in the existing relationships that matches the target relationship;
[0203] The information acquisition module 503 is specifically used to:
[0204] obtaining second information for constructing a test environment when testing the target tested software;
[0205] The information determination module 504 is specifically configured to:
[0206] The obtained first information and second information are determined as test information for testing the software to be tested.
[0207] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, by matching the target relationship with the existing relationship, the first information of the test case of the target tested software and the relationship indication that matches the target relationship can be obtained. The above-mentioned first information is the information of the test case of the relationship indication that matches the target relationship, which ensures the accuracy of the first information. Since the information used to build the test environment when each tested software is tested can be obtained in advance, after obtaining the above-mentioned target tested software, the second information corresponding to the target tested software can be obtained, and finally the first information and the second information are determined as the test information for testing the software to be tested. Therefore, in the solution provided by the embodiment of the present disclosure, the test information finally obtained includes the first information and the second information, thereby providing the test user with test information with richer content.
[0208] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0209] In one embodiment of the present disclosure, an electronic device is provided, serving as a server, including:
[0210] at least one processor; and
[0211] a memory communicatively connected to the at least one processor; wherein,
[0212] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform any test information processing method in the aforementioned method embodiments.
[0213] In one embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any application file configuration method in the aforementioned method embodiments.
[0214] In one embodiment of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the computer program implements any test information processing method in the aforementioned method embodiments.
[0215] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0216] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0217] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0218] The computing unit 601 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the test information processing method. For example, in some embodiments, the test information processing method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the test information processing method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the test information processing method by any other appropriate means (e.g., by means of firmware).
[0219] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0220] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0221] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0222] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0223] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0224] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0225] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0226] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A test information processing method, comprising: Obtaining a target relationship between each piece of requirement information, wherein the requirement information is information used to test the software to be tested, and the target relationship includes each piece of requirement information and relationship information representing the relationship between each piece of requirement information; Matching the target relationship with the existing relationship to obtain target tested software similar to the software to be tested, wherein the existing relationship includes: various test information used to test each tested software and relationship information representing the relationship between all test information; Obtaining target test information for testing the target tested software; Determine test information for testing the software to be tested based on the target test information.
2. The method according to claim 1, wherein The test information used to test each tested software includes: Environment construction information used to build the test environment used when testing each tested software; and / or Used to generate test case generation information for each tested software to be used in testing.
3. The method according to claim 2, wherein: The environment construction information includes: configuration information of a container for running the tested software.
4. The method according to claim 3, wherein: Each existing relationship includes: nodes corresponding to two test information having a relationship and relationship information representing the relationship between the two test information; The obtaining of target test information for testing the target tested software includes: Determining a second node having a relationship with the first node from the existing relationship, and obtaining configuration information of a container for running the target tested software from attribute information of the first node, wherein the first node corresponds to identification information of the target tested software, and the second node corresponds to software information and / or hardware information for software testing; Target test information for testing the target tested software is generated according to the obtained configuration information and the determined node information of the second node.
5. The method according to any one of claims 1 to 4, wherein The target relationship is represented by a target knowledge graph that records the relationship between the various pieces of requirement information. The existing relationship is represented by an existing knowledge graph that records the relationship between various pieces of test information used to test the tested software. The test information used to test the tested software includes the software information of the tested software. The matching of the target relationship with the existing relationship to obtain target tested software similar to the software to be tested includes: Performing graph matching on the target knowledge graph and the existing knowledge graph to obtain target software information recorded in an area of the existing knowledge graph that matches the target knowledge graph; Determine that the tested software corresponding to the target software information is target tested software similar to the software to be tested.
6. The method according to any one of claims 1 to 4, wherein The relationship similarity between any two relationships included in the existing relationships is less than a preset threshold.
7. The method according to claim 1, wherein The test information includes use case generation information for generating test cases used when testing each tested software; The matching of the target relationship with the existing relationship to obtain target tested software similar to the software to be tested includes: Matching the target relationship with the existing relationships to obtain target tested software similar to the software to be tested and first information of a test case indicated by a target matching relationship, wherein the target matching relationship is a relationship included in the existing relationships that matches the target relationship; The obtaining of target test information for testing the target tested software includes: obtaining second information for constructing a test environment when testing the target tested software; The determining of the test information for testing the software to be tested based on the target test information includes: The obtained first information and second information are determined as test information for testing the software to be tested.
8. A test information processing device comprising: a relationship obtaining module, configured to obtain a target relationship between each piece of requirement information, wherein the requirement information is information used for testing the software to be tested, and the target relationship includes each piece of requirement information and relationship information representing the relationship between each piece of requirement information; a relationship matching module, configured to match the target relationship with existing relationships to obtain target tested software similar to the software to be tested, wherein the existing relationship includes: various test information used to test each tested software and relationship information representing the relationship between all test information; An information acquisition module, configured to obtain target test information used to test the target tested software; An information determination module is used to determine test information for testing the software to be tested based on the target test information.
9. The device according to claim 8, wherein The test information used to test each tested software includes: Environment construction information used to build the test environment used when testing each tested software; and / or Used to generate test case generation information for each tested software to be used in testing.
10. The device according to claim 9, wherein The environment construction information includes: configuration information of a container for running the tested software.
11. The device according to claim 10, wherein Each existing relationship includes: nodes corresponding to two test information having a relationship and relationship information representing the relationship between the two test information; The information acquisition module is specifically used to: Determining a second node having a relationship with the first node from the existing relationship, and obtaining configuration information of a container for running the target tested software from attribute information of the first node, wherein the first node corresponds to identification information of the target tested software, and the second node corresponds to software information and / or hardware information for software testing; Target test information for testing the target tested software is generated according to the obtained configuration information and the determined node information of the second node.
12. The device according to any one of claims 8 to 11, wherein: The target relationship is represented by a target knowledge graph that records the relationship between the various pieces of requirement information. The existing relationship is represented by an existing knowledge graph that records the relationship between various pieces of test information used to test the tested software. The test information used to test the tested software includes the software information of the tested software. The relationship matching module is specifically used to: Performing graph matching on the target knowledge graph and the existing knowledge graph to obtain target software information recorded in an area of the existing knowledge graph that matches the target knowledge graph; Determine that the tested software corresponding to the target software information is target tested software similar to the software to be tested.
13. The device according to any one of claims 8 to 11, wherein: The relationship similarity between any two relationships included in the existing relationships is less than a preset threshold.
14. The device according to claim 8, wherein The test information includes use case generation information for generating test cases used when testing each tested software; The relationship matching module is specifically configured to match the target relationship with the existing relationships to obtain first information of target tested software similar to the software to be tested and a test case indicated by the target matching relationship, wherein the target matching relationship is a relationship included in the existing relationships that matches the target relationship; The information acquisition module is specifically used to obtain second information used to build a test environment when testing the target tested software; The information determination module is specifically configured to determine the obtained first information and second information as test information for testing the software to be tested.
15. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the test information processing method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the test information processing method according to any one of claims 1 to 7. 17 . A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the test information processing method according to claim 1 .
Citation Information
Patent Citations
Test case recommendation method and device using knowledge graph
CN113900954A