Test resource allocation method and apparatus, storage medium, and electronic device
By automating the processing of smart contracts through blockchain networks, the problems of low efficiency and errors in resource allocation for enterprise testing have been solved, enabling fast and accurate resource allocation.
Patent Information
- Application Number
- CN202210451580.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-04-27
AI Technical Summary
In existing technologies, the allocation of testing resources by enterprises and institutions relies on offline manual processing, which results in long processing times, low efficiency, and a high risk of errors.
The system automates the allocation of testing resources through a blockchain network, utilizes smart contracts to analyze testing information, and matches target testing environments and resources to achieve automated online processing.
It shortened processing time, improved allocation efficiency, reduced human error, and ensured the accuracy and transparency of resource allocation.
Smart Images

Figure CN114780413B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of testing, in particular to a test resource allocation method and device, a storage medium and an electronic device. BACKGROUND
[0002] In the operation process of an enterprise institution, various business systems are usually used to process various businesses. During the development and operation of the business system, the business system often needs to be tested.
[0003] Many large enterprise institutions operate in the form of headquarters and branches, for example, banks, which have a structure of head office and branch. The headquarters and branch institutions in the enterprise institution may need to independently maintain the business system, and when the branch institution has a test task, it needs to apply for test resources such as test environment, test data, test tool and test case from the headquarters institution.
[0004] At present, the application and allocation process of test resources is mainly completed offline. The branch institution submits a test application, the management department of the headquarters institution analyzes offline and feeds back available test resources to the branch institution, and the branch institution obtains test resources through offline channels from the resource provider of the headquarters institution. Based on the existing test resource application and allocation method, the test resources required by the test task need to be analyzed by the staff, and each process is handled manually, which takes a long time and has low efficiency. Secondly, manual analysis of test resources and handling of each work is prone to errors, which affects the test work. SUMMARY
[0005] Therefore, the embodiments of the present application provide a test resource allocation method to solve the problem of manual allocation of test resources, long processing time, low efficiency, and easy errors.
[0006] The embodiments of the present application also provide a test resource allocation device to ensure the implementation and application of the above method in practice.
[0007] To achieve the above object, the embodiments of the present application provide the following technical solutions:
[0008] A test resource allocation method comprises:
[0009] When a resource application instruction is received, a test task corresponding to the resource application instruction is determined, and test information corresponding to the test task is determined;
[0010] The test information is sent to a constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines a target test environment corresponding to the test information and test resources corresponding to the target test environment;
[0011] Obtaining the target test environment and the test resource corresponding to the target test environment through the blockchain network, and taking the target test environment and the test resource corresponding to the target test environment as the test resource corresponding to the test task, completing the test resource allocation process of the test task.
[0012] Optionally, the method further includes:
[0013] Determining each product corresponding to the test task and a product version corresponding to each product;
[0014] Determining a test object corresponding to the test task;
[0015] Taking the each product, the product version corresponding to each product, and the test object as the test information corresponding to the test task.
[0016] Optionally, the process of the blockchain network performing resource analysis on the test information includes:
[0017] In a plurality of preset test environments, determining each first test environment, the first test environment being a test environment currently in an unallocated state;
[0018] In the each first test environment, determining a second test environment, the second test environment being a test environment matching the test information;
[0019] Taking the second test environment as the target test environment;
[0020] Determining preset resource information corresponding to the target test environment, and determining the test resource corresponding to the target test environment according to the preset resource information.
[0021] Optionally, the method further includes:
[0022] In the preset resource information, determining test data, a test tool, and a test case corresponding to the target test environment;
[0023] Taking the test data, the test tool, and the test case as the test resource corresponding to the target test environment.
[0024] Optionally, the method further includes:
[0025] Recording a test resource allocation result of the test task in the blockchain network.
[0026] A test resource allocation apparatus includes:
[0027] The first determining unit is configured to determine a test task corresponding to the resource application instruction and determine test information corresponding to the test task when the resource application instruction is received.
[0028] The sending unit is configured to send the test information to a constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines a target test environment corresponding to the test information and test resources corresponding to the target test environment.
[0029] The allocating unit is configured to acquire the target test environment and the test resources corresponding to the target test environment through the blockchain network, and complete a test resource allocation process of the test task by taking the target test environment and the test resources corresponding to the target test environment as test resources corresponding to the test task.
[0030] The device described above, optionally, the first determining unit comprises:
[0031] The first determining sub-unit is configured to determine each product corresponding to the test task and a product version corresponding to each product.
[0032] The second determining sub-unit is configured to determine a test object corresponding to the test task.
[0033] The third determining sub-unit is configured to take the each product, the product version corresponding to each product and the test object as the test information corresponding to the test task.
[0034] The device described above, optionally, further comprises:
[0035] The second determining unit is configured to determine each first test environment in a plurality of preset test environments, the first test environment being a test environment currently in an unallocated state.
[0036] The third determining unit is configured to determine a second test environment in the each first test environment, the second test environment being a test environment matched with the test information, and take the second test environment as the target test environment.
[0037] The fourth determining unit is configured to determine preset resource information corresponding to the target test environment, and determine test resources corresponding to the target test environment according to the preset resource information.
[0038] A storage medium comprises stored instructions, wherein the instructions control a device where the storage medium is located to perform the test resource allocation method as described above when the instructions are executed.
[0039] An electronic device includes a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the test resource allocation method as described above.
[0040] Based on the test resource allocation method provided by the embodiment of the application, when the resource application instruction is received, the test task corresponding to the resource application instruction is determined, and the test information corresponding to the test task is determined; the test information is sent to the constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines the target test environment corresponding to the test information and the test resource corresponding to the target test environment; the target test environment and the test resource corresponding thereto are obtained through the blockchain network, and the target test environment and the test resource corresponding thereto are taken as the test resource corresponding to the test task, and the test resource allocation process of the test task is completed. When the test resource needs to be applied for the test task, the test information is submitted to the blockchain network, the resource analysis is performed through the blockchain network, and the target test environment and the test resource corresponding to the target test environment determined by the blockchain network are obtained, and then the test resource corresponding to the test task is determined. The test resource matched with the current test information can be analyzed through the smart contract of the blockchain network, the online automatic processing of the test resource application allocation process is realized, the resource analysis offline by the staff is not needed, the processing process is short in time and high in efficiency. Secondly, human errors can be avoided, the accuracy of the test environment allocation is improved, and the normal development of the test work is facilitated. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only belong to the embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0042] Figure 1 The method flowchart of the test resource allocation method provided by the embodiment of the application;
[0043] Figure 2 Another method flowchart of the test resource allocation method provided by the embodiment of the application;
[0044] Figure 3 Another method flowchart of the test resource allocation method provided by the embodiment of the application;
[0045] Figure 4 The structural schematic diagram of the test resource allocation device provided by the embodiment of the application;
[0046] Figure 5 Another structural schematic diagram of a test resource allocation device provided by an embodiment of the present application is shown in FIG. 6.
[0047] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0049] In the present application, the terms “comprise”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement “comprises a…” does not exclude the presence of another identical element in the process, method, article or device comprising the element.
[0050] As known from the background, the test resource application and allocation process of a branch office is offline and manually analyzed and processed. For example, in the operation process of a bank, after a branch office receives a test task, the branch office submits a test application to a head office, a management department of the head office checks the availability of the head office product environment cooperating with the test in each test environment offline, informs the branch office that a certain environment is available, and the branch office obtains the environment, and then contacts the personnel of the head office through an offline channel to obtain test data, test tools and test cases and the like. In actual operation, a large amount of time is consumed and the efficiency is low due to the influence of manual processing process. Secondly, human errors are prone to occur, for example, due to the difference in personnel experience, the analysis result of the test environment may be inaccurate, and for example, the communication between the staff is not timely, which leads to repeated allocation of the test environment and the like, and thus adverse effects such as delay of the test period are easily caused.
[0051] Therefore, the embodiments of the present application provide a test resource allocation method, which realizes application and allocation of test resources through a blockchain network, and does not need manual analysis and allocation of test resources, so that the processing time can be shortened and the resource allocation efficiency can be improved.
[0052] The embodiments of the present application provide a test resource allocation method, which can be applied to a test resource allocation platform, and the execution subject of the method can be a server of the platform. The method flowchart of the method is shown in FIG. 8. Figure 1As shown, comprising:
[0053] S101: when receiving the resource application instruction, determining the test task corresponding to the resource application instruction, and determining the test information corresponding to the test task;
[0054] In the method provided by the embodiment of the application, the staff who needs to apply for test resources for a test task can fill in the relevant information of the test task through the front end to send a resource application instruction to the server. For example, the staff of a branch office can send a resource application instruction through the platform.
[0055] When the server receives the resource application instruction, the test task that currently needs to apply for test resources can be determined, and the corresponding test information can be determined.
[0056] S102: the test information is sent to the constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines the target test environment corresponding to the test information and the test resources corresponding to the target test environment;
[0057] In the method provided by the embodiment of the application, the platform can connect the blockchain network node, and submit the test information of the current test task to the blockchain network. The blockchain network is pre-provided with a smart contract for resource analysis, and pre-stores multiple sets of test environments and the test resources corresponding to each set of test environments. When the blockchain network receives the test information, the test information can be analyzed based on the pre-set smart contract, and the test environment suitable for the current test task and the test resources corresponding to the test environment, i.e., the target test environment and the test resources corresponding to the target test environment, are matched. The smart contract is a piece of blockchain execution program, which can be accurately and automatically executed. The characteristics of the blockchain technology ensure that the entire process of storage, reading and execution is transparent and traceable, and cannot be tampered with.
[0058] S103: the target test environment and the test resources corresponding to the target test environment are obtained through the blockchain network, and the target test environment and the test resources corresponding to the target test environment are taken as the test resources corresponding to the test task, and the test resource allocation process of the test task is completed.
[0059] In the method provided by the embodiment of the application, when the blockchain network determines the target test environment and the test resources corresponding to the target test environment, the target test environment and the test resources corresponding to the target test environment can be taken as the resource analysis result, and pushed to the platform through the blockchain network node. After the platform obtains the target test environment and the test resources corresponding to the target test environment through the blockchain network, the resources are taken as the test resources corresponding to the test task, i.e., the test resources allocated to the test task, to complete the test resource allocation of the test task.
[0060] Based on the method provided in the embodiment of the application, when the resource application instruction is received, the test task corresponding to the resource application instruction is determined, and the test information corresponding to the test task is determined; the test information is sent to the constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines the target test environment corresponding to the test information and the test resource corresponding to the target test environment; the target test environment and the test resource corresponding to the target test environment are acquired through the blockchain network, and the target test environment and the test resource corresponding to the target test environment are taken as the test resource corresponding to the test task, to complete the test resource allocation process of the test task. When the branch needs to apply for test resources, the method provided in the embodiment of the application can be applied, the test information is submitted to the blockchain network by sending the resource application instruction, based on the resource analysis of the blockchain network, the target test environment and the test resource corresponding to the target test environment can be obtained as the test resource of the test task. The application and allocation of the test resource do not need offline manual work, the time consumption of the allocation process of the test resource is short, and the allocation efficiency can be improved. Secondly, based on the automatic analysis of the blockchain network, the analysis errors caused by the experience difference of manual analysis can be avoided, and the accuracy of resource allocation can be improved. In addition, the allocation process of all test resources is processed based on the blockchain network, the allocation information is stored, the repeated allocation of the test resource can be avoided, the management personnel can also query the allocation progress, and the normal development of the test work can be facilitated.
[0061] On the basis of the method provided in the above embodiment, in combination with Figure 2 The flowchart is shown, the embodiment of the application provides another test resource allocation method, in the method provided in the embodiment of the application, the process of determining the test information corresponding to the test task in step S101 includes:
[0062] S201: determining each product corresponding to the test task and the product version corresponding to each product;
[0063] In the method provided in the embodiment of the application, when the user needs to apply for test resources for the test task, the user can input the related information of the test task through the front end, including the product that needs to be used by the test task, usually referring to a certain business system, the version information such as the version number of each product and the test object and the like. The information input by the user can be acquired, and each product corresponding to the test task and the product version corresponding to each product are parsed from the information.
[0064] S202: determining the test object corresponding to the test task;
[0065] In the method provided in the embodiment of the application, the test object of the test task can be parsed from the information input by the user, and the test object can be a unit test, an interface test or an interface test and the like.
[0066] S203: take the respective product, the product version corresponding to each of the products and the test object as the test information corresponding to the test task.
[0067] In the method provided by the embodiment of the application, the respective product, the product version corresponding to each of the products and the test object are packaged as the test information corresponding to the test task.
[0068] In order to better illustrate the method provided by the embodiment of the application, in combination with the flowchart shown in the figure, the embodiment of the application provides another test resource allocation method. Figure 3 The process of resource analysis of the blockchain network on the test information in step S102 in the method provided by the embodiment of the application includes:
[0069] S301: determine, in a plurality of preset test environments, a respective first test environment, the first test environment being a test environment currently in an unallocated state;
[0070] In the method provided by the embodiment of the application, the manager of the test resource can chain each test environment, that is, a plurality of sets of test environments are preset in the blockchain network. The resource analysis process of the blockchain network can actually be understood as the allocation of test resources. The target test environment and the test resource corresponding to the target test environment determined for the current test information are the test resources allocated to the corresponding test task. Therefore, according to the resource analysis result in the running process of the blockchain network, the test environment has its corresponding use state, that is, the test environment that has been allocated is currently in an allocated state, and the test environment that has not been allocated is currently in an unallocated state. After the test task corresponding to the allocated test environment is completed, the use state of the test environment can be updated accordingly.
[0071] In the method provided by the embodiment of the application, the blockchain network can determine, in a plurality of preset test environments, a respective first test environment currently in an unallocated state based on a preset smart contract.
[0072] S302: determine, in the respective first test environment, a second test environment, the second test environment being a test environment matching the test information;
[0073] In the method provided by the embodiment of the application, the product information corresponding to each test environment is stored in the blockchain network, for example, the server state and server deployment version of each product corresponding to the test environment, and the like. The test information includes the information of the product required by the corresponding test task. The product information corresponding to each first test environment can be matched with the test information respectively to determine whether the content of the product corresponding to each first test environment matches the content of the product required by the test information. If the content of the product corresponding to the currently matched test environment matches the content of the product required by the test information, the currently matched test environment is taken as the second test environment.
[0074] It should be noted that if the product information of multiple first test environments matches the test information, one of the test environments can be randomly selected as the second test environment, or a preset selection condition can be used to select the second test environment, without affecting the function of the method provided by the embodiment of the application.
[0075] S303: taking the second test environment as the target test environment;
[0076] S304: determining preset resource information corresponding to the target test environment, and determining test resources corresponding to the target test environment according to the preset resource information.
[0077] In the method provided by the embodiment of the application, the preset resource information corresponding to each test resource is also stored in the blockchain network, for example, the test data and test case corresponding to the test resource, and the like. The preset resource information corresponding to the target test environment can be obtained from the pre-stored information to determine the test resources corresponding to the target test environment.
[0078] Further, based on the method provided in the above embodiment, in the method provided by the embodiment of the application, the determining of the test resources corresponding to the target test environment according to the preset resource information includes:
[0079] determining the test data, test tool and test case corresponding to the target test environment in the preset resource information;
[0080] taking the test data, test tool and test case as the test resources corresponding to the target test environment.
[0081] In the method provided by the embodiment of the application, the test data and the test case corresponding to the target test environment can be obtained from preset resource information corresponding to the target test environment. The preset resource information can include a plurality of test tools, and the test tool matched with the test object in the test information can be matched based on the test information, and the test tool matched with the test object is taken as the test tool corresponding to the target test environment. The test data, the test tool and the test case are taken as the test resource corresponding to the target test environment.
[0082] In Figure 1 On the basis of the method shown, the method provided by the embodiment of the application further includes:
[0083] The test resource allocation result of the test task is recorded in the blockchain network.
[0084] In the method provided by the embodiment of the application, in the resource analysis process of the blockchain network, when the target test environment corresponding to the test information and the test resource corresponding thereto are determined, the target test environment and the test resource corresponding thereto are taken as the test resource allocation result of the test task corresponding to the test information, and the test resource allocation result is recorded on the chain.
[0085] In order to better illustrate the method provided by the embodiment of the application, the embodiment of the application provides another test resource allocation method in combination with an actual application scenario. The test resource allocation method provided by the embodiment of the application is applied to a test resource allocation scene of a bank institution.
[0086] In the method provided by the embodiment of the application, the alliance chain platform of the test department of the head office / branch is built through the blockchain, information multi-party data sharing is realized under the premise of ensuring data accuracy and consistency, multiple business participants work on a unified collaboration platform, business collaboration efficiency is improved, and effective data supervision is provided. A variety of data privacy protection mechanisms are provided to ensure information transmission security. A variety of encryption mechanisms are used to ensure data storage security. The alliance chain is a form of blockchain, and is a blockchain for transactions among specific participants, and each participant node is an authorized node.
[0087] In the method provided by this invention, the head office uploads the current environment status, version deployment status, test data, test tools, and test cases of all products to the blockchain (the head office can have multiple test environments, each corresponding to the server status of each product, and the deployment versions of each server also differ). After a branch submits the products, versions, and test object types required for a certain test task, the smart contract determines which head office environment matches the branch's needs. If environment A is perfectly suitable for the branch, the corresponding test data, test tools, and test cases matching the test object are pushed to the branch. If, during the analysis, it is determined that environment B has a missing element, such as a version not being deployed, a version matching email can be directly sent to the deployer.
[0088] The method provided in this invention leverages the transparent, immutable, and permanently stored technical characteristics of blockchain to upload confirmed and allocated test environments, test data, test tool information, and test case information to the blockchain. With consensus participation from the head office and branch testing departments, the credibility of the stored data is enhanced. This allows all participants in the head office and branch testing to work on a unified collaborative platform, efficiently conducting test resource analysis. Management can monitor the test analysis progress on the blockchain platform and provide timely decision-making guidance for situations with low efficiency or numerous failure analyses during the test analysis phase.
[0089] and Figure 1 Corresponding to the test resource allocation method shown, this embodiment of the invention also provides a test resource allocation device for allocating test resources. Figure 1 The specific implementation of the method shown is illustrated in the following diagram. Figure 4 As shown, it includes:
[0090] The first determining unit 401 is used to determine the test task corresponding to the resource request instruction and the test information corresponding to the test task when a resource request instruction is received.
[0091] The sending unit 402 is used to send the test information to the constructed blockchain network so that the blockchain network can perform resource analysis on the test information and determine the target test environment corresponding to the test information and the test resources corresponding to the target test environment.
[0092] The allocation unit 403 is used to obtain the target test environment and the test resources corresponding to the target test environment through the blockchain network, and use the target test environment and the test resources corresponding to the target test environment as the test resources corresponding to the test task, thereby completing the test resource allocation process of the test task.
[0093] Based on the device provided in the embodiment of the application, when the resource application instruction is received, the test task corresponding to the resource application instruction is determined, and the test information corresponding to the test task is determined; the test information is sent to the constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines the target test environment corresponding to the test information and the test resource corresponding to the target test environment; the target test environment and the test resource corresponding to the target test environment are acquired through the blockchain network, and the target test environment and the test resource corresponding to the target test environment are taken as the test resource corresponding to the test task, so that the test resource allocation process of the test task is completed. When the branch needs to apply for test resources, the device provided in the embodiment of the application can submit the test information to the blockchain network by sending a resource application instruction, and based on the resource analysis of the blockchain network, the target test environment and the test resource corresponding to the target test environment can be obtained as the test resource of the test task. The application and allocation of test resources do not need offline manual work, the test resource allocation process is time-saving, and the allocation efficiency can be improved. Secondly, based on the automatic analysis of the blockchain network, the analysis errors caused by the experience difference of manual analysis can be avoided, and the accuracy of resource allocation can be improved. In addition, all the allocation processes of the test resources are processed based on the blockchain network, the allocation information is stored, the repeated allocation of the test resources can be avoided, the management personnel can also query the allocation progress, and the normal development of the test work can be facilitated.
[0094] The embodiment of the application further provides another test resource allocation device, a structure diagram of which is shown in Figure 5 The device shown in Figure 4 The first determination unit 401 in the device provided in the embodiment of the application comprises:
[0095] The first determination sub-unit 404 is configured to determine each product corresponding to the test task and the product version corresponding to each product.
[0096] The second determination sub-unit 405 is configured to determine the test object corresponding to the test task.
[0097] The third determination sub-unit 406 is configured to take the each product, the product version corresponding to each product and the test object as the test information corresponding to the test task.
[0098] Based on the device provided in the above embodiment, the device provided in the embodiment of the application further comprises:
[0099] The second determination unit is configured to determine each first test environment in a plurality of preset test environments, and the first test environment is a test environment currently in an unallocated state.
[0100] The third determining unit is configured to determine a second test environment in each first test environment, wherein the second test environment is a test environment matching the test information; and the second test environment is taken as the target test environment.
[0101] The fourth determining unit is configured to determine preset resource information corresponding to the target test environment, and determine test resources corresponding to the target test environment according to the preset resource information.
[0102] In the device provided in the above embodiment, the fourth determining unit comprises:
[0103] The fourth determining sub-unit is configured to determine test data, test tools and test cases corresponding to the target test environment in the preset resource information; and the test data, the test tools and the test cases are taken as the test resources corresponding to the target test environment.
[0104] In the device provided in the above embodiment, the device further comprises:
[0105] The recording sub-unit is configured to record the test resource allocation result of the test task in the blockchain network.
[0106] The embodiment of the present application further provides a storage medium, which comprises stored instructions, wherein when the instructions are executed, the device where the storage medium is located performs the test resource allocation method as described above.
[0107] The embodiment of the present application further provides an electronic device, a structural schematic diagram of which is shown in Figure 6 The electronic device specifically comprises a memory 501 and one or more than one instruction 502, wherein the one or more than one instruction 502 is stored in the memory 501, and is configured to perform the one or more than one instruction 502 by one or more than one processor 503 to perform the following operations:
[0108] When the resource application instruction is received, the test task corresponding to the resource application instruction is determined, and the test information corresponding to the test task is determined;
[0109] The test information is sent to the constructed blockchain network, so that the blockchain network performs resource analysis on the test information, determines the target test environment corresponding to the test information and the test resources corresponding to the target test environment;
[0110] Obtain the target test environment and the test resource corresponding to the target test environment through the blockchain network, and complete the test resource allocation process of the test task by taking the target test environment and the test resource corresponding to the target test environment as the test resource corresponding to the test task.
[0111] It should be noted that the test resource allocation method and device, storage medium and electronic equipment provided by the present application can be used in the financial field or other fields, for example, can be used in the application scenario of financial institution system test in the financial field. Other fields are any field other than the financial field, for example, the field of communication services. The above is only an example and does not limit the application field of the test resource allocation method and device, storage medium and electronic equipment provided by the present application.
[0112] Each embodiment in the specification is described in a progressive manner, and the same and similar parts between each embodiment can be referred to each other, and each embodiment focuses on the difference from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, it is described more simply, and the related parts can be referred to the part of the method embodiment. The system and system embodiment described above are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to the actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0113] The professional person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or combination of the two. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical scheme. The professional person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0114] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the appended claims are intended to cover all such modifications that do not depart from the true spirit and scope of the application. Therefore, the application is not limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for allocating test resources, characterized in that, include: When a resource request instruction is received, the test task corresponding to the resource request instruction is determined, and the test information corresponding to the test task is determined. The test information is sent to the established blockchain network so that the blockchain network can perform resource analysis on the test information to determine the target test environment corresponding to the test information and the test resources corresponding to the target test environment. The target test environment and the test resources corresponding to the target test environment are obtained through the blockchain network, and the target test environment and the test resources corresponding to the target test environment are used as the test resources corresponding to the test task to complete the test resource allocation process of the test task; The process by which the blockchain network performs resource analysis on the test information includes: In a set of multiple pre-defined test environments, a first test environment is determined, wherein the first test environment is the test environment that is currently in an unassigned state. In each of the first test environments, a second test environment is determined, wherein the second test environment is a test environment that matches the test information; The second test environment is used as the target test environment; Determine the preset resource information corresponding to the target test environment, and determine the test resources corresponding to the target test environment based on the preset resource information.
2. The method according to claim 1, characterized in that, The step of determining the test information corresponding to the test task includes: Determine the products corresponding to the test task and the product version corresponding to each product; Determine the test object corresponding to the test task; Each product, the product version corresponding to each product, and the test object are used as the test information corresponding to the test task.
3. The method according to claim 1, characterized in that, The step of determining the test resources corresponding to the target test environment based on the preset resource information includes: The test data, test tools, and test cases corresponding to the target test environment are determined from the preset resource information. The test data, the test tools, and the test cases are used as test resources corresponding to the target test environment.
4. The method according to claim 1, characterized in that, Also includes: The test resource allocation results of the test task are recorded in the blockchain network.
5. A test resource allocation device, characterized in that, include: The first determining unit is used to determine the test task corresponding to the resource request instruction and the test information corresponding to the test task when a resource request instruction is received. A sending unit is configured to send the test information to a constructed blockchain network, so that the blockchain network can perform resource analysis on the test information and determine the target test environment corresponding to the test information and the test resources corresponding to the target test environment. The allocation unit is used to obtain the target test environment and the test resources corresponding to the target test environment through the blockchain network, and use the target test environment and the test resources corresponding to the target test environment as the test resources corresponding to the test task to complete the test resource allocation process of the test task; The second determining unit is used to determine each first test environment among a plurality of preset test environments, wherein the first test environment is a test environment that is currently in an unassigned state; The third determining unit is used to determine a second test environment in each of the first test environments, wherein the second test environment is a test environment that matches the test information; The second test environment is used as the target test environment; The fourth determining unit is used to determine the preset resource information corresponding to the target test environment, and to determine the test resources corresponding to the target test environment based on the preset resource information.
6. The apparatus according to claim 5, characterized in that, The first determining unit includes: The first determining subunit is used to determine each product corresponding to the test task and the product version corresponding to each product. The second determining subunit is used to determine the test object corresponding to the test task; The third determining subunit is used to take each product, the product version corresponding to each product, and the test object as the test information corresponding to the test task.
7. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device where the storage medium is located is controlled to perform the test resource allocation method as described in any one of claims 1 to 4.
8. An electronic device, characterized in that, It includes memory, and one or more instructions, wherein one or more instructions are stored in memory and configured to be executed by one or more processors as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Parallel automation test method
CN105224464A
Performance testing method and device based on block chain, electronic device and storage medium
CN109753434A
Test resource access method and device, electronic equipment and storage medium
CN114070883A