Method and device for determining test environment and computer program product
By determining and updating test environments based on joint debugging modules, the method automates the construction of tailored test environments, addressing the complexity of cross-business systems with diverse modules and improving efficiency.
Patent Information
- Application Number
- CN202411231442.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
AI Technical Summary
The complexity and tediousness of constructing test environments in end-to-end cross-business systems, such as large-scale recommendation systems, due to the involvement of multiple modules with different business functions and code architectures, require project testers to be familiar with diverse modules and scenarios, necessitating frequent communication and manual environment changes.
A method and device for determining a test environment by identifying multiple joint debugging modules based on requirement data, selecting an initial test environment, and updating it with updated codes to create a target test environment, automating the process.
This approach simplifies and enhances the efficiency of test environment construction by automatically building a joint debugging environment tailored to multiple modules, reducing manual intervention and improving compatibility.
Smart Images

Figure CN119201697A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically to the field of software development and testing technology, and in particular to a method, device, electronic device, storage medium, and computer program product for determining a test environment, which can be applied in software development and testing scenarios. Background Art
[0002] End-to-end cross-business systems, such as large-scale recommendation systems for search and advertising, have the following characteristics: there are many upstream and downstream interactive modules, and different modules have different business functions; when a single requirement is developed, it may involve the development and testing of different upstream and downstream modules; different modules have different code bases or code architectures; different modules are tested and developed by different development and testing personnel.
[0003] This requires project testers to be familiar with different businesses and modules after code modification, and to select different topology scenarios to build the test environment. In addition, project testers need to frequently communicate with the heads of different modules to change different joint debugging environments, making the test environment construction process complex and tedious. Summary of the Invention
[0004] The present disclosure provides a method, apparatus, electronic device, storage medium, and computer program product for determining a test environment.
[0005] According to the first aspect, a method for determining a test environment is provided, comprising: determining multiple joint debugging modules involved in a software project based on the requirement data of the software project; determining an initial test environment adapted to multiple joint debugging modules from a test environment set; and updating the initial test environment through updated codes corresponding to multiple joint debugging modules to obtain target test environments corresponding to multiple joint debugging modules.
[0006] According to the second aspect, a device for determining a test environment is provided, comprising: a module determination unit, configured to determine multiple joint debugging modules involved in a software project based on the requirement data of the software project; an environment determination unit, configured to determine an initial test environment adapted to multiple joint debugging modules from a test environment set; and an environment update unit, configured to update the initial test environment through updated codes corresponding to multiple joint debugging modules to obtain a target test environment corresponding to the multiple joint debugging modules.
[0007] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so as to enable the at least one processor to execute the method described in any implementation manner of the first aspect.
[0008] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method as described in any implementation of the first aspect.
[0009] According to a fifth aspect, a computer program product is provided, comprising: a computer program, which implements the method described in any implementation manner of the first aspect when executed by a processor.
[0010] According to the technology disclosed in the present invention, a method and device for determining a test environment are provided. First, an initial test environment is determined from a test environment set based on multiple joint debugging modules corresponding to the demand data. Then, the initial test environment is updated through the updated codes corresponding to the multiple joint debugging modules, and a target test environment is built. In this way, the joint debugging test environment can be automatically built, thereby improving the efficiency and convenience of the test environment building process.
[0011] 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
[0012] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0013] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0014] Figure 2 is a flowchart of an embodiment of a method for determining a test environment according to the present disclosure;
[0015] Figure 3 is a schematic diagram of the process of setting up a test environment according to this embodiment;
[0016] Figure 4 is a schematic diagram of an application scenario of the method for determining a test environment according to this embodiment;
[0017] Figure 5 is a flowchart of another embodiment of a method for determining a test environment according to the present disclosure;
[0018] Figure 6 is a structural diagram of an embodiment of a device for determining a test environment according to the present disclosure;
[0019] Figure 7 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0020] 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.
[0021] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0022] Figure 1 An exemplary architecture 100 is shown to which the test environment determination method and apparatus of the present disclosure can be applied.
[0023] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The communication connections between terminal devices 101, 102, and 103 constitute a topological network, and network 104 is used to provide a medium for communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0024] Terminal devices 101, 102, and 103 can be hardware devices or software that support network connection for data interaction and data processing. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices that support network connection, information acquisition, interaction, display, processing, and other functions, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules, for example, to provide distributed services, or they can be implemented as a single software or software module. No specific limitations are given here.
[0025] Server 105 can be a server that provides various services, such as obtaining software project requirement data input by a user through a terminal device, determining an initial test environment from a set of test environments based on multiple joint debugging modules corresponding to the requirement data, updating the initial test environment with updated code corresponding to the multiple joint debugging modules, and building a backend processing server for the target test environment. As an example, server 105 can be a cloud server.
[0026] It should be noted that the server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. No specific limitations are given here.
[0027] It should also be noted that the test environment determination method provided in the embodiments of the present disclosure is generally executed by a server, but this does not exclude the possibility of execution by a terminal device, or the server and terminal device cooperating with each other. Accordingly, the various components (e.g., various units) included in the test environment determination apparatus can be entirely located in the server, entirely located in the terminal device, or separately located in the server and the terminal device.
[0028] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the system is merely illustrative. Any number of terminal devices, networks, and servers may be provided as needed. When the electronic device on which the test environment determination method is running does not need to transmit data with other electronic devices, the system architecture may only include the electronic device (e.g., terminal device or server) on which the test environment determination method is running.
[0029] Please refer to Figure 2 , Figure 2 This is a flow chart of a method for determining a test environment provided by an embodiment of the present disclosure. In process 200, the following steps are included:
[0030] Step 201: Determine multiple joint debugging modules involved in the software project based on the requirement data of the software project.
[0031] In this embodiment, the execution subject of the test environment determination method (for example, Figure 1 The server in the software project can determine the multiple joint debugging modules involved in the software project based on the demand data of the software project.
[0032] A software project is a task or series of tasks designed to develop, maintain, or improve a software system. A module is the smallest unit of business launch. Joint debugging modules are the modules that undergo joint debugging and testing during the software development and testing process. Joint debugging testing primarily focuses on combining modules or subsystems that have undergone unit testing to test the correctness of their interfaces, whether data and control flows function as designed, and the correctness of the overall functionality after integration.
[0033] For example, the software project's requirement data is represented by text data, such as a requirement document. The execution entity can obtain the software project's requirement data remotely or locally via a wired or wireless network connection, analyze the requirement data, break it down into multiple requirement units, and identify the modules corresponding to the multiple requirement units as multiple joint debugging modules.
[0034] As another example, the requirement data of the software project is represented by requirement identification data. After receiving the requirement identification data, the execution entity determines the requirements of the software project based on the correspondence between the requirement identification data and the requirement data, and then determines multiple joint debugging modules that meet the requirements.
[0035] In some optional implementations of this embodiment, the execution entity may perform step 201 as follows:
[0036] The first step is to determine at least one sub-demand data under the demand data.
[0037] In this implementation, the demand data is specifically represented by Features, and the sub-demand data is represented by Stories.
[0038] Features and Stories are closely related; together, they constitute different levels and granularities of software requirements. In software development, a feature refers to the definition of one or more software system functions or services that meet user needs. Features are an essential component of a product, used to differentiate and provide a unique user experience. Feature definitions typically consider specific functionality, value, customer needs, and feasibility. In project management, a feature represents what a product can do or what service it provides, and is a deliverable that meets user needs.
[0039] A user story, a requirement expression method used in agile development methodologies, describes the expectations and needs of system users. A user story primarily encompasses three aspects: who, what, and why. It describes the functionality or features a system should have from the user's perspective, typically using the format "As a [user role], I want [a certain goal / action], so that [a certain benefit / value]." The purpose of user stories is to better understand user needs and expectations and, through discussions with stakeholders, ensure that the project team has a consistent understanding of the functionality or features.
[0040] A feature is a higher-level requirement, representing one or more key functions or services of a product. A story is a more granular requirement, a detailed description of the feature from the user's perspective. A feature can be broken down into multiple stories, each representing a small part of the feature's implementation. Stories depend on features for their existence; without the framework and context of a feature, stories lose their meaning. Furthermore, feature implementation depends on the completion of stories, as stories represent the specific steps involved in implementing a feature.
[0041] Continue to refer Figure 3 , which shows a schematic diagram of the process 300 of building the test environment of the present application.
[0042] In software project management, new software projects must have a primary management card (corresponding to a feature). After determining the primary management card, you need to establish module-by-module relationships between feature cards and story cards. You also need to establish relationships between code submissions and story cards, associating code with story cards assigned by direction. Story cards assigned by direction, for example, can be categorized as front-end or back-end.
[0043] In this implementation, the demand data can be represented by the number corresponding to the main management card.
[0044] The second step is to determine an updated code associated with at least one sub-requirement data.
[0045] In this implementation, for each sub-requirement data in the at least one sub-requirement data, the execution entity may determine the updated code associated with the sub-requirement data to obtain multiple updated codes, wherein the updated code is the upgraded code submitted after development.
[0046] The third step is to determine multiple joint debugging modules associated with the updated code based on the association relationship between the code and the module.
[0047] In this implementation, the online platform connects the online modules and the code base, and the above-mentioned execution entities can determine the relationship between the code and the modules through the online platform. As an example, the relationship between the code and the module can be clarified by using a code tracking matrix. First, clarify the software requirements and the corresponding module divisions. Then, create a spreadsheet, list all the requirement numbers and descriptions in the columns, and list the identifiers of the code modules or functions in the rows. Finally, mark the relationship between each module and the requirements in the cross cell. For example, if a module implements a specific requirement, mark it in the corresponding cross cell. As the development progresses, continuously update the tracking matrix to ensure its accuracy and completeness.
[0048] As another example, the execution entity can determine the relationship between code and modules through a version control system (such as Git, SVN, etc.). Version control systems are not only used for code version management, but also help track the relationship between modules and code. First, create independent branches or tags for different modules to track and manage related code. Then, when submitting code, use clear descriptions to indicate the updated code and related modules, thereby determining the relationship between code and modules and conducting subsequent tracking and backtracking.
[0049] After determining the association relationship between the code and the module, the execution entity may determine multiple joint debugging modules associated with the updated code from multiple modules in the target system targeted by the software project.
[0050] This implementation provides a specific method for determining multiple joint debugging modules based on demand data. In the actual application process of testers, they only need to provide demand data, such as Feature card numbers, to provide the corresponding test environment, further improving the efficiency and convenience of the test environment construction process.
[0051] In some optional implementations of this embodiment, before executing the second step, the execution subject may further perform the following operation: determining the association relationship between the updated code and the sub-requirement data according to the received association instruction.
[0052] For example, when a developer submits updated code, the developer may specify an association relationship between the updated code and sub-requirement data.
[0053] In this implementation, the association relationship between the updated code and the sub-requirement data is determined based on the received association instruction, which improves the accuracy of the association relationship and provides an accurate data basis for the determination process of the joint debugging module.
[0054] Step 202: Determine an initial test environment that is suitable for multiple joint debugging modules from the test environment set.
[0055] In this embodiment, the execution entity may determine an initial test environment adapted to multiple joint debugging modules from the test environment set.
[0056] As an example, at least one test environment including a plurality of joint debugging modules is determined from the test environment set, and a test environment is randomly determined from the at least one test environment as the initial test environment.
[0057] As another example, at least one test environment may be sorted according to a sorting rule, and the test environment ranked first may be used as the initial test environment.
[0058] In some optional implementations of this embodiment, the execution entity may perform step 202 as follows:
[0059] The first step is to determine multiple candidate test environments including multiple joint debugging modules from the test environment set.
[0060] It is understood that this implementation is targeted at the situation where multiple candidate test environments including multiple joint debugging modules are determined from the test environment set. When only one candidate test environment is determined, the candidate test environment can be determined as the initial test environment.
[0061] In the second step, the candidate test environment with the least number of modules other than the joint debugging module among the multiple candidate test environments is determined as the initial test environment.
[0062] As an example, the execution entity may count the number of modules other than the joint debugging modules in the candidate test environments, sort them in ascending order, and determine the candidate test environment that ranks first as the initial test environment.
[0063] In this implementation, after determining the candidate test environment including multiple joint debugging modules, the candidate test environment with the least number of modules other than the joint debugging modules is determined, thereby improving the compatibility between the determined initial test environment and the multiple joint debugging modules, as well as the simplicity of the initial test environment.
[0064] In some optional implementations of this embodiment, the execution entity may further perform the following operations:
[0065] First, in response to determining that the test environment set does not include a candidate test environment, the test environments in the test environment set are sorted in order of the number of included joint debugging modules from most to least and the number of modules other than the included joint debugging modules from few to many, and the reference test environment ranked first is determined.
[0066] In this implementation, when it is determined that all test environments in the test environment set do not include all of the multiple joint debugging modules, it is determined that the test environment set does not include a candidate test environment. In this case, it is necessary to determine the number of joint debugging modules and the number of modules other than the joint debugging modules included in each test environment in the test environment set, and then sort the test environments in descending order of the number of joint debugging modules included and the number of modules other than the joint debugging modules included, to determine the reference test environment ranked first.
[0067] The determined reference test environment is the test environment in the test environment set that is closest to the adaptation requirements of the multiple joint debugging modules.
[0068] Then, uncovered modules in the multiple joint debugging modules that are not included in the reference test environment are determined.
[0069] Continuing with the example of multiple joint debugging modules A, B, and C, when the reference test loop includes joint debugging modules A and B, the uncovered module is joint debugging module C.
[0070] Finally, based on the reference test environment and uncovered modules, extended prompt information of the test environment is generated.
[0071] The extended prompt information is used to instruct the target personnel to expand the test environment set to meet the test environment of multiple joint debugging modules.
[0072] As an example, the above-mentioned execution subject can refer to the test environment as a basic reference to generate a reference test environment that does not include uncovered modules, and can expand the extended prompt information of the test environment to meet the needs of multiple joint debugging modules by improving the reference test environment.
[0073] In this implementation, extended prompt information can be generated based on the compatibility of the test environment in the test environment set with multiple joint debugging modules, which helps to improve the richness and comprehensiveness of the test environment set, and thereby improve the adaptability of the automatic construction process of the test environment to various test scenarios.
[0074] Step 203: Update the initial test environment using the updated codes corresponding to the multiple joint debugging modules to obtain the target test environment corresponding to the multiple joint debugging modules.
[0075] In this embodiment, the above-mentioned execution entity can update the initial test environment through the updated codes corresponding to the multiple joint debugging modules to obtain the target test environment corresponding to the multiple joint debugging modules.
[0076] As an example, for each joint debugging module, the execution entity may update the joint debugging module in the initial test environment using the updated code corresponding to the joint debugging module, thereby obtaining an updated joint debugging module. After each joint debugging module in the initial test environment has been adjusted to an updated joint debugging module, the initial test environment is determined to be updated to a target test environment capable of performing joint debugging tests on multiple joint debugging modules.
[0077] In some optional implementations of this embodiment, the execution entity may perform step 203 as follows:
[0078] First, based on the association relationship between modules, the connectivity modules between multiple joint debugging modules are determined from the initial test environment.
[0079] In general, multiple joint debugging modules are not directly connected to each other, and at least some of the multiple joint debugging modules are connected through a communication module.
[0080] Continue to refer Figure 3 Module D is the connection module between modules B and C.
[0081] Second, multiple joint debugging modules in the initial test environment are adjusted using the updated codes corresponding to each of the multiple joint debugging modules, and the connectivity modules in the initial test environment are adjusted based on the online configuration data of the connectivity modules to obtain the target test environment.
[0082] In this implementation method, on the basis of adjusting multiple joint debugging modules in the initial test environment through the updated codes corresponding to each of the multiple joint debugging modules, the online configuration data of the connectivity module in the online platform is pulled, and the connectivity module in the initial test environment is adjusted according to the online configuration data, so that the target test environment is more adaptable to multiple joint debugging modules, further improving the accuracy of the target test environment.
[0083] In some optional implementations of this embodiment, the execution entity may perform the first step as follows:
[0084] First, based on the association relationship between modules, determine the topology of multiple joint debugging modules in the initial test environment.
[0085] The topology represents the connectivity paths between multiple joint debugging modules in the initial test environment. Based on the relationships between modules, the execution entity can gradually explore the connectivity paths between multiple joint debugging modules in the initial test environment and determine the topology of the multiple joint debugging modules.
[0086] Then, based on the topological structure, the connectivity modules between multiple joint debugging modules are determined.
[0087] In this embodiment, modules other than the multiple joint debugging modules in the topology structure may be determined as connected modules.
[0088] In this implementation, a specific method for determining a connectivity module is provided, thereby improving the efficiency of determining the connectivity module.
[0089] In some optional implementations of this embodiment, the execution entity may perform the topology determination process in the following manner:
[0090] First, multiple joint debugging modules are paired in pairs to obtain at least one module pair.
[0091] Continuing with the example of multiple joint debugging modules A, B, and C, we can obtain module pairs (A, B), (A, C), and (B, C).
[0092] Then, for each module pair in the at least one module pair, the shortest path between two joint debugging modules in the module pair is determined from the initial test environment according to the association relationship between the modules.
[0093] In this implementation, corresponding to at least one module pair, at least one shortest path is obtained.
[0094] Finally, the topology structure among the multiple joint debugging modules is determined based on at least one shortest path.
[0095] As an example, the above execution entity may merge at least one shortest path to obtain a topology structure between multiple joint debugging modules.
[0096] In this implementation, the topology structure between the multiple joint debugging modules is obtained based on pairing the multiple joint debugging modules and determining the shortest paths respectively, thereby improving the efficiency and accuracy of determining the topology structure.
[0097] In some optional implementations of this embodiment, the execution subject may further perform the following operation before connecting the modules: determining the association relationship between the modules according to the request relationship and / or configuration relationship between the modules.
[0098] As an example, based on the request relationship between modules, the above-mentioned execution entity can analyze the data dependency and control dependency between modules; for the configuration relationship between modules, the above-mentioned execution entity can define the association between modules through configuration files, environment variables and dependency injection.
[0099] In this implementation, the execution subject can automatically determine the association relationship between modules based on the request relationship and / or configuration relationship between the modules, thereby improving the automation processing capability and processing efficiency of the information processing process.
[0100] Continue to see Figure 4 , Figure 4 It is a schematic diagram 400 of an application scenario of the method for determining the test environment according to the present embodiment. The software development user upgrades the target system according to the requirement data of the software project. The tester 401 needs to test the upgraded module, so he uploads the requirement data of the software project to the server 403 through the terminal device 402. After receiving the requirement data of the software project, the server 403 first determines the multiple joint debugging modules A, B, and C involved in the software project according to the requirement data of the software project; then, determines the initial test environment adapted to the multiple joint debugging modules from the test environment set; finally, updates the initial test environment with the updated codes corresponding to the multiple joint debugging modules to obtain the target test environment corresponding to the multiple joint debugging modules.
[0101] In this embodiment, a method for determining a test environment is provided. First, an initial test environment is determined from a test environment set based on multiple joint debugging modules corresponding to the demand data. Then, the initial test environment is updated through the updated codes corresponding to the multiple joint debugging modules, and a target test environment is built. In this way, the joint debugging test environment can be automatically built, thereby improving the efficiency and convenience of the test environment building process.
[0102] Continue to refer Figure 5 , shows a schematic process 500 of another embodiment of a method for determining a test environment according to the present disclosure. In process 500, the following steps are included:
[0103] Step 501: Determine at least one sub-requirement data under the requirement data of the software project.
[0104] Step 502: Determine an updated code associated with at least one sub-requirement data.
[0105] Step 503: Determine multiple joint debugging modules associated with the updated code based on the association relationship between the code and the module.
[0106] Step 504: Determine multiple candidate test environments including multiple joint debugging modules from the test environment set.
[0107] Step 505 : Determine the candidate test environment with the least number of modules other than the joint debugging module among the multiple candidate test environments as the initial test environment.
[0108] Step 506: Pair the multiple joint debugging modules in pairs to obtain at least one module pair.
[0109] Step 507: For each module pair in the at least one module pair, determine the shortest path between two joint debugging modules in the module pair from the initial test environment according to the association relationship between the modules.
[0110] Step 508: Determine the topology structure between the multiple joint debugging modules based on at least one shortest path.
[0111] Step 509: Determine the connection modules between the multiple joint debugging modules according to the topology structure.
[0112] Step 510, adjust the multiple joint debugging modules in the initial test environment through the updated codes corresponding to the multiple joint debugging modules, and adjust the connectivity modules in the initial test environment according to the online configuration data of the connectivity modules to obtain the target test environment.
[0113] It can be seen from this embodiment that Figure 2 Compared with the corresponding embodiments, process 500 of the method for determining the test environment in this embodiment specifically describes the process of determining the joint debugging module, the process of determining the initial test environment, and the process of building the target test environment, further improving the efficiency and convenience of the test environment building process.
[0114] Continue to refer Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for determining a test environment. Figure 2 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0115] like Figure 6 As shown, the test environment determination device 600 includes: a module determination unit 601, which is configured to determine multiple joint debugging modules involved in the software project based on the requirement data of the software project; an environment determination unit 602, which is configured to determine an initial test environment adapted to multiple joint debugging modules from a test environment set; and an environment update unit 603, which is configured to update the initial test environment through updated codes corresponding to multiple joint debugging modules to obtain a target test environment corresponding to multiple joint debugging modules.
[0116] In some optional implementations of this embodiment, the module determination unit 601 is further configured to: determine at least one sub-requirement data under the requirement data; determine the updated code associated with each of the at least one sub-requirement data; and determine multiple joint debugging modules associated with the updated code based on the association relationship between the code and the module.
[0117] In some optional implementations of this embodiment, the apparatus further includes an association unit (not shown in the figure), configured to determine an association relationship between the updated code and the sub-requirement data according to the received association instruction.
[0118] In some optional implementations of this embodiment, the environment determination unit 602 is further configured to: determine multiple candidate test environments including multiple joint debugging modules from the test environment set; and determine the candidate test environment with the least number of modules other than the joint debugging modules among the multiple candidate test environments as the initial test environment.
[0119] In some optional implementations of this embodiment, the above-mentioned device also includes: an extended prompt unit (not shown in the figure), which is configured to: in response to determining that the test environment set does not include the candidate test environment, sort the test environments in the test environment set in the order of the number of joint debugging modules included from most to least and the number of modules other than the joint debugging modules included from least to most, and determine the reference test environment ranked first; determine the uncovered modules that are not included in the reference test environment in multiple joint debugging modules; and generate extended prompt information of the test environment based on the reference test environment and the uncovered modules.
[0120] In some optional implementations of this embodiment, the environment update unit 603 is further configured to: determine the connectivity module between multiple joint debugging modules from the initial test environment based on the association relationship between the modules; adjust the multiple joint debugging modules in the initial test environment through the updated codes corresponding to each of the multiple joint debugging modules, and adjust the connectivity module in the initial test environment based on the online configuration data of the connectivity module to obtain the target test environment.
[0121] In some optional implementations of this embodiment, the environment update unit 603 is further configured to: determine the topological structure of multiple joint debugging modules in the initial test environment based on the association relationship between the modules; and determine the connection modules between the multiple joint debugging modules based on the topological structure.
[0122] In some optional implementations of this embodiment, the environment update unit 603 is further configured to: pair multiple joint debugging modules in pairs to obtain at least one module pair; for each module pair in at least one module pair, determine the shortest path between the two joint debugging modules in the module pair from the initial test environment based on the association relationship between the modules; and determine the topological structure between the multiple joint debugging modules based on at least one shortest path.
[0123] In some optional implementations of this embodiment, the apparatus further includes a relationship determination unit (not shown in the figure), configured to determine an association relationship between modules based on a request relationship and / or a configuration relationship between the modules.
[0124] In this embodiment, a device for determining a test environment is provided. First, an initial test environment is determined from a test environment set based on multiple joint debugging modules corresponding to the demand data, and then the initial test environment is updated through the updated codes corresponding to the multiple joint debugging modules to build a target test environment. In this way, the joint debugging test environment can be automatically built, thereby improving the efficiency and convenience of the test environment building process.
[0125] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and 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, and the instructions are executed by the at least one processor so that the at least one processor can implement the method for determining the test environment described in any of the above embodiments when executing.
[0126] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium storing computer instructions, which are used to enable a computer to implement the method for determining a test environment described in any of the above embodiments when executed.
[0127] An embodiment of the present disclosure provides a computer program product. When executed by a processor, the computer program can implement the method for determining a test environment described in any of the above embodiments.
[0128] Figure 7 A schematic block diagram of an example electronic device 700 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 merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0129] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0130] Various components in device 700 are connected to I / O interface 705, including an input unit 706, such as a keyboard, mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, optical disk, etc.; and a communication unit 709, such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0131] The computing unit 701 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 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 701 performs the various methods and processes described above, such as the method for determining the test environment. For example, in some embodiments, the method for determining the test environment can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method for determining the test environment described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the method for determining the test environment by any other appropriate means (e.g., by means of firmware).
[0132] Various embodiments of the systems and techniques described herein 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), 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.
[0133] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable test environment determination 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.
[0134] 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.
[0135] 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).
[0136] 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.
[0137] A computer system may include a client and a server. The client and server are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private servers (VPS). It may also be a server in a distributed system or a server integrated with blockchain.
[0138] According to the technical solution of the embodiment of the present disclosure, a method for determining a test environment is provided. First, an initial test environment is determined from a test environment set based on multiple joint debugging modules corresponding to the demand data. Then, the initial test environment is updated through the updated codes corresponding to the multiple joint debugging modules, and a target test environment is built. In this way, the joint debugging test environment can be automatically built, thereby improving the efficiency and convenience of the test environment building process.
[0139] 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 provided by this disclosure can be achieved. This is not a limitation herein.
[0140] 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 method for determining a test environment, comprising: Determine multiple joint debugging modules involved in the software project according to the demand data of the software project; Determine an initial test environment adapted to the multiple joint debugging modules from the test environment set; The initial test environment is updated through the updated codes corresponding to the multiple joint debugging modules to obtain the target test environment corresponding to the multiple joint debugging modules.
2. The method according to claim 1, wherein: Determining multiple joint debugging modules involved in the software project according to the demand data of the software project includes: Determine at least one sub-demand data under the demand data; Determining the updated code associated with each of the at least one sub-requirement data; According to the association relationship between the code and the module, the multiple joint debugging modules associated with the updated code are determined.
3. The method according to claim 2, wherein: Before determining the updated code associated with each of the at least one sub-requirement data, the method further includes: According to the received association instruction, an association relationship between the updated code and the sub-requirement data is determined.
4. The method according to claim 1, wherein: The step of determining an initial test environment adapted to the plurality of joint debugging modules from the test environment set includes: Determine a plurality of candidate test environments including the plurality of joint debugging modules from the test environment set; The candidate test environment having the least number of modules other than the joint debugging module among the multiple candidate test environments is determined as the initial test environment.
5. The method according to claim 4, wherein: Also includes: In response to determining that the candidate test environment is not included in the test environment set, the test environments in the test environment set are sorted in the order of the number of joint debugging modules included from large to small and the number of modules other than the joint debugging modules included from small to large, and a reference test environment ranked first is determined; Determine uncovered modules among the multiple joint debugging modules that are not included in the reference test environment; Generate extended prompt information of the test environment according to the reference test environment and the uncovered modules.
6. The method according to claim 1, wherein: The updating of the initial test environment by using the updated codes corresponding to the multiple joint debugging modules to obtain the target test environment corresponding to the multiple joint debugging modules includes: Determine, from the initial test environment, the connected modules between the multiple joint debugging modules according to the association relationship between the modules; The target test environment is obtained by adjusting the multiple joint debugging modules in the initial test environment through the updated codes corresponding to the multiple joint debugging modules, and adjusting the connectivity modules in the initial test environment according to the online configuration data of the connectivity modules.
7. The method according to claim 6, wherein: The step of determining the connection modules between the plurality of joint debugging modules from the initial test environment according to the association relationship between the modules includes: Determine the topological structure of the multiple joint debugging modules in the initial test environment according to the association relationship between the modules; According to the topological structure, a connection module between the multiple joint debugging modules is determined.
8. The method according to claim 7, wherein: The determining, according to the association relationship between the modules, the topological structure of the multiple joint debugging modules in the initial test environment includes: Pairing the multiple joint debugging modules in pairs to obtain at least one module pair; For each module pair in the at least one module pair, determining the shortest path between two joint debugging modules in the module pair from the initial test environment according to the association relationship between the modules; A topological structure among the plurality of joint debugging modules is determined according to at least one of the shortest paths.
9. The method according to claim 6, wherein: Before determining the connected modules among the plurality of joint debugging modules in the initial test environment according to the association relationship among the modules, the method further includes: The association relationship between the modules is determined according to the request relationship and / or configuration relationship between the modules.
10. A device for determining a test environment, comprising: A module determination unit, configured to determine a plurality of joint debugging modules involved in the software project according to the requirement data of the software project; An environment determination unit, configured to determine an initial test environment adapted to the plurality of joint debugging modules from a test environment set; The environment updating unit is configured to update the initial test environment through the updated codes corresponding to the multiple joint debugging modules to obtain the target test environment corresponding to the multiple joint debugging modules.
11. The device according to claim 10, wherein: The module determination unit is further configured to: Determine at least one sub-requirement data under the requirement data; determine the updated code associated with each of the at least one sub-requirement data; and determine the multiple joint debugging modules associated with the updated code based on the association relationship between the code and the module.
12. The device according to claim 11, wherein Also includes: The association unit is configured as follows: According to the received association instruction, an association relationship between the updated code and the sub-requirement data is determined.
13. The device according to claim 10, wherein: The environment determination unit is further configured to: Determine a plurality of candidate test environments including the plurality of joint debugging modules from the test environment set; and determine the candidate test environment having the least number of modules other than the joint debugging modules among the plurality of candidate test environments as the initial test environment.
14. The device according to claim 13, wherein: Also includes: The extended prompt unit is configured as follows: In response to determining that the candidate test environment is not included in the test environment set, the test environments in the test environment set are sorted in order of the number of included joint debugging modules from large to small and the number of modules other than the included joint debugging modules from small to large, and a reference test environment ranked first is determined; uncovered modules that are not included in the reference test environment among the multiple joint debugging modules are determined; and extended prompt information of the test environment is generated based on the reference test environment and the uncovered modules.
15. The device according to claim 10, wherein: The environment updating unit is further configured to: According to the association relationship between the modules, the connectivity module between the multiple joint debugging modules is determined from the initial test environment; the multiple joint debugging modules in the initial test environment are adjusted through the updated codes corresponding to each of the multiple joint debugging modules, and the connectivity modules in the initial test environment are adjusted according to the online configuration data of the connectivity modules to obtain the target test environment.
16. The device according to claim 15, wherein: The environment updating unit is further configured to: According to the association relationship between the modules, the topological structure of the multiple joint debugging modules in the initial test environment is determined; according to the topological structure, the connection modules between the multiple joint debugging modules are determined.
17. The device according to claim 16, wherein: The environment updating unit is further configured to: The multiple joint debugging modules are paired in pairs to obtain at least one module pair; for each module pair in the at least one module pair, the shortest path between two joint debugging modules in the module pair is determined from the initial test environment according to the association relationship between the modules; and the topological structure between the multiple joint debugging modules is determined according to at least one of the shortest paths.
18. The device according to claim 15, wherein: Also includes: The relationship determination unit is configured to: The association relationship between the modules is determined according to the request relationship and / or configuration relationship between the modules.
19. An electronic device, characterized in that: include: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.
21. A computer program product comprising: A computer program which, when executed by a processor, implements the method according to any one of claims 1 to 9.