Deployment method, access method and related equipment of program test project
By matching and deploying test versions and interval network segment configuration rules in the online release environment, the problems of high test environment construction costs and poor flexibility in the existing technology are solved, and resource saving and support for diverse business scenarios are achieved.
Patent Information
- Application Number
- CN202111681118.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-12-31
AI Technical Summary
Existing technology requires the construction of a complete test environment when testing software program functions, resulting in high operation and maintenance costs and waste of resources. It is also unable to customize test configuration rules according to actual needs and cannot meet diverse business scenarios.
Pre-match and deploy the test version of the program test project and the interval network segment configuration rules in the online release environment, and retrieve the corresponding data resources from the database for testing through the interval network segment configuration rules to avoid establishing a new test environment and reusing calculations resources, reduce operation and maintenance costs, and support diverse business scenarios.
It can save resources, reduce operation and maintenance costs, and support the testing needs of diverse business scenarios without affecting the online release environment. It can flexibly deploy test versions through interval network segment configuration rules to meet diverse business needs.
Smart Images

Figure CN114328263B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a deployment method, an access method and related equipment for a program test project. Background Art
[0002] With the rapid development of science and technology, there are more and more types of software programs, and the functions of various software programs are becoming more and more powerful. In the process of developing a software program, before a function is actually launched online, it is usually necessary to pre-verify the function and simulate the real online environment for verification and testing.
[0003] In the prior art, it is often necessary to build a complete test environment in advance, in which the real online environment is simulated to test the functions that need to be tested. If the test passes, the function will be released online.
[0004] However, building a complete test environment for functional testing requires relatively high operation and maintenance costs, and will also result in a certain amount of resource waste. Summary of the invention
[0005] In view of this, the purpose of this application is to propose a deployment method, access method and related equipment for program test projects to solve or partially solve the above technical problems.
[0006] Based on the above purpose, the first aspect of the present application provides a method for deploying a program test project, comprising:
[0007] Determine the test version corresponding to the program test items;
[0008] receiving at least one interval network segment configuration rule selected from a plurality of interval network segment configuration rules;
[0009] The selected at least one interval network segment configuration rule is associated with the test version and stored in a database of an online release environment, and data resources corresponding to the test version are stored in a database of the online release environment.
[0010] In some embodiments, the interval network segment configuration rule includes at least one of the following:
[0011] Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
[0012] In some embodiments, storing the data resources corresponding to the test version in the database of the online release environment includes:
[0013] receiving a storage instruction of the test version;
[0014] Obtain the version number of the test version in the storage instruction, and isolate and store the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment through object storage, wherein the database is provided with storage spaces corresponding to the version numbers of the test versions.
[0015] In some embodiments, obtaining the version number of the test version in the storage instruction and isolating and storing the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment through object storage includes:
[0016] Receiving a storage instruction for storing a test version and data resources corresponding to the test version, wherein the storage instruction includes a version number of the test version;
[0017] Extracting the version number of the test version in the storage instruction, and searching for a target storage space corresponding to the version number of the test version in a database of the online release environment;
[0018] In response to determining that the target storage space exists in the database, storing the data resource corresponding to the test version in the target storage space;
[0019] In response to determining that the target storage space does not exist in the database, a new storage space is constructed according to the version number of the test version, and the data resources corresponding to the test version are stored in the new storage space.
[0020] In some embodiments, the method further comprises:
[0021] The standard test data of the data resource is received, and the standard test data is associated with the data resource and stored in the corresponding storage space.
[0022] A second aspect of the present application provides a method for accessing a program test project, comprising:
[0023] Receiving an access request from a user terminal, and matching corresponding project information according to the access request;
[0024] In response to determining that there is an interval network segment configuration rule in the project information, a corresponding test version is retrieved from a database of an online release environment according to the interval network segment configuration rule and the project information;
[0025] The data resource corresponding to the access request is acquired according to the test version, and the data resource is fed back to the user terminal so that the user terminal performs a test according to the data resource.
[0026] In some embodiments, matching corresponding project information according to the access request includes:
[0027] According to the program test item carried in the access request, the access request is routed to match corresponding item information.
[0028] In some embodiments, in response to determining that there is an interval network segment configuration rule in the project information, retrieving a corresponding test version from a database of an online release environment according to the interval network segment configuration rule and the project information includes:
[0029] Extracting access condition information from the project information, matching the access condition information with a plurality of interval network segment configuration rules stored in a database of the online release environment, and determining a target interval network segment configuration rule corresponding to the access condition;
[0030] Retrieving at least one corresponding pending test version from the database of the online release environment according to the target interval network segment adaptation rule;
[0031] The corresponding test version is determined from the at least one pending test version according to the project information.
[0032] In some embodiments, the interval network segment configuration rule includes at least one of the following:
[0033] Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
[0034] In some embodiments, obtaining the data resource corresponding to the access request according to the test version includes:
[0035] searching, according to the test version, a storage space corresponding to the test version from a plurality of storage spaces in a database;
[0036] Determine the access function item according to the access request, search for the storage address corresponding to the access function item from the storage space corresponding to the test version, and retrieve the data resource according to the storage address, wherein each storage space pre-stores a data resource corresponding to at least one access function item.
[0037] In some embodiments, it also includes:
[0038] Receiving test result data of the data resource sent by the user terminal;
[0039] Acquire standard test data matching the data resource from the storage space corresponding to the test version;
[0040] In response to the test result data conforming to the standard test data, determining that the data resource test passes;
[0041] In response to the test result data not meeting the standard test data, difference information between the test result and the standard test data is determined, and the difference information is output and displayed so as to modify the data resource according to the difference information.
[0042] In some embodiments, the method further comprises:
[0043] receiving a test passing instruction of the data resource sent by the user terminal, and determining the test version corresponding to the data resource;
[0044] The association between the test version and the corresponding at least one interval network segment configuration rule is released from the database of the online release environment, so that the test version can be released in the online release environment.
[0045] The third aspect of the present application proposes a deployment device for a program test project, comprising:
[0046] A version determination module is used to determine the test version corresponding to the program test item;
[0047] A rule receiving module, used for receiving at least one interval network segment configuration rule selected from a plurality of interval network segment configuration rules;
[0048] An association deployment module is used to associate the selected at least one interval network segment configuration rule with the test version and store them in a database of an online release environment.
[0049] A fourth aspect of the present application provides a device for accessing a program test item, comprising:
[0050] An access receiving module, used to receive an access request sent by a user terminal, and match corresponding project information according to the access request;
[0051] A version adaptation module, configured to retrieve a corresponding test version from a database of an online release environment according to the interval network segment configuration rule and the project information in response to determining that there is an interval network segment configuration rule in the project information;
[0052] The resource feedback module is used to obtain the data resource corresponding to the access request according to the test version, and feed back the data resource to the user terminal so that the user terminal can perform testing based on the data resource.
[0053] The fifth aspect of the present application proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for deploying the program test items described in the first aspect or the method for accessing the program test items described in the second aspect is implemented.
[0054] The sixth aspect of the present application proposes a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the deployment method of the program test project described in the first aspect, or the access method of the program test project described in the second aspect.
[0055] From the above, it can be seen that the deployment method, access method and related equipment of the program test project provided by the present application can pre-match the corresponding interval network segment configuration rules for the test version corresponding to the program test project, and deploy the test version and the corresponding interval network segment configuration rules in the database of the online release environment, so that when the interval network segment configuration rules exist in the project information corresponding to the access request sent by the user terminal, the corresponding data resources are obtained from the database of the deployed online release environment, and the data resources are sent to the user terminal for testing. The entire deployment and access process is carried out in the online release environment, without the need to establish a new test environment, and the computing resources in the online release environment can be reused without affecting the online services in the online release environment, which can save resources and reduce operation and maintenance costs. At least one interval network segment configuration rule can be deployed for the program test project according to actual needs, and it is no longer limited to one test method, and can meet a variety of business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0057] Figure 1A schematic diagram of an application scenario of an embodiment of the present application;
[0058] Figure 2A A flowchart of a method for deploying a program test project according to an embodiment of the present application;
[0059] Figure 2B A flowchart of the steps of associating and storing interval network segment configuration rules and test versions in an embodiment of the present application;
[0060] Figure 2C A flowchart of the isolation storage steps of an embodiment of the present application;
[0061] Figure 3A A flowchart of a method for accessing a program test item according to an embodiment of the present application;
[0062] Figure 3B A flowchart of the steps for retrieving the test version of an embodiment of the present application;
[0063] Figure 3C A flowchart of the steps of obtaining data resources according to an embodiment of the present application;
[0064] Figure 3D An extended flow chart of a method for accessing a program test item according to an embodiment of the present application;
[0065] Figure 3E A flowchart of the steps of automatically determining test results according to an embodiment of the present application;
[0066] Figure 3F Another extended flow chart of the method for accessing program test items according to an embodiment of the present application;
[0067] Figure 4 A structural block diagram of a deployment device for a program test item according to an embodiment of the present application;
[0068] Figure 5 A structural block diagram of a device for accessing a program test item according to an embodiment of the present application;
[0069] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0070] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0071] According to the implementation manner of the present application, a deployment method, an access method and related equipment of a program test project are proposed.
[0072] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0073] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application.
[0074] In related technologies, when testing a function of a developed software program, it is necessary to build a complete test environment, which includes independent computing resources and storage resources, and requires independent isolated networks, independent test domain names, etc. to access the test environment. This requires maintaining a complete set of test environments that are basically consistent with the online ones, which requires additional operation and maintenance costs. Since the service performance requirements of the test environment are not high, building a complete set of test environments in this way will result in a waste of resources. In addition, independent test environments can usually only be accessed through independent domain names or fixed forwarding rules, so users cannot customize some configuration rules according to actual needs, and cannot meet the diverse needs of users.
[0075] In order to solve the above problems, the present application provides a solution for the deployment and access of program test projects, which can pre-match the corresponding interval network segment configuration rules for the test version corresponding to the program test project, and deploy the test version and the corresponding interval network segment configuration rules in the database of the online release environment, so that when the interval network segment configuration rules exist in the project information corresponding to the access request sent by the user terminal, the corresponding data resources are obtained from the database of the deployed online release environment, and the data resources are sent to the user terminal for testing. The entire deployment and access process is carried out in the online release environment, without the need to establish a new test environment, and the computing resources in the online release environment can be reused without affecting the online services in the online release environment, which can save resources and reduce operation and maintenance costs. In addition, at least one interval network segment configuration rule can be deployed for the program test project according to actual needs, and it is no longer limited to one testing method, and can meet a variety of business scenarios.
[0076] refer to Figure 1, which is a schematic diagram of an application scenario of a deployment method of a program test project and an access method of a program test project provided in an embodiment of the present application. The application scenario includes a terminal device 101, a server 102, and a data storage system 103. Among them, the terminal device 101, the server 102 and the data storage system 103 can be connected through a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, an intelligent wearable device, a personal digital assistant (PDA) or other electronic devices capable of implementing the above functions. The server 102 and the data storage system 103 can both be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0077] The server 102 is used to provide multimedia content publishing services to users of the terminal device 101. The terminal device 101 is installed with a client that communicates with the server 102, and the user can publish multimedia content through the client; in the scenario of the multimedia content publishing, the terminal device 101 that publishes multimedia content can be called a publishing terminal in the embodiment of the present application. In the above-mentioned multimedia content publishing, the client obtains the multimedia content to be published by the user by calling the input component (such as keyboard, microphone, etc.) of the terminal device 101, and sends the multimedia content to the server 102. The data storage system 103 provides data storage support for the operation of the server 102, such as storing multimedia content, storing time tags, storing training samples of the machine learning model used in the embodiment of the present application, etc. The server 102 can extract features from the multimedia content and the time tags in the time tag pool (text feature extraction for the time tags) according to the multimedia content to be published, and determine at least one candidate time tag matching the multimedia content according to the correlation of the extracted features, and send the candidate time tags to the terminal device 101 for the user to select in the client to achieve the recommendation of time tags.
[0078] Combine the following Figure 1 The application scenarios are used to describe the deployment method of the program test project and the access method of the program test project according to the exemplary implementation of the present application. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this respect. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0079] An embodiment of the present application provides a method for deploying a program test project, and the method for deploying a program test project is applied to a server corresponding to an online release environment.
[0080] refer to Figure 2A The deployment method of the program test project of this embodiment may include the following steps:
[0081] Step 201, determine the test version corresponding to the program test item.
[0082] In this embodiment, the program test project refers to a research and development project of some software by some enterprises. After the research and development is completed, the program test project needs to be tested. Each program test project will match a test version (for example, the test version is 1.0.0.0 or the test version is 1.0.0.1). And after the program test project is developed, there will be one or more data resources corresponding to the test version.
[0083] Step 202: Receive at least one interval network segment configuration rule selected from a plurality of interval network segment (ie, small traffic) configuration rules.
[0084] In this embodiment, a user (e.g., a programmer) can select one or more interval network segment configuration rules from multiple interval network segment configuration rules as the rule that the test version is allowed to access according to actual needs. This can meet the diverse needs of users, and the user can also delete or replace the selected interval network segment configuration rule according to actual conditions.
[0085] In some embodiments, the interval network segment configuration rule includes at least one of the following:
[0086] Header (request header) regular rules, Query (query) regular rules, UserAgent (string) regular rules, UrlPath (Uniform Resource Locator path) regular rules, population selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
[0087] In this embodiment, the Header regular rule: pre-specify the corresponding request header, and access the data resource of the corresponding test version through the specified request header during subsequent access.
[0088] Query regular rule: pre-specify the corresponding Url (Uniform Resource Locator) Query parameter, and access the data resources of the corresponding test version through the specified Url Query parameter during subsequent access.
[0089] UserAgent regular rule: pre-specify the corresponding UA (UserAgent, string), and access the data resources of the corresponding test version through the specified UA during subsequent access.
[0090] UrlPath regular rule: specify the corresponding Url Path in advance, and access the data resources of the corresponding test version through the specified Url Path during subsequent access.
[0091] Crowd selection rules: pre-specify the corresponding user group, and access the corresponding test version of the data resources through the specified user group during subsequent visits. The methods of specifying the user group include at least one of the following: UID (User Identification) regularization (i.e., specified UID), UID whitelist, UID blacklist, and portrait system selection. Among them, the portrait system refers to a customized crowd analysis system, and the portrait system can be used to select the corresponding portraits that can access the corresponding test version of the data resources.
[0092] Customized experiment splitting rules (i.e., AB experiment rules): Create two (A / B) or more (A / B / n) test versions, let the user groups randomly access these test versions, determine the performance of each test version based on the results of the access feedback, and select the test version that can be launched. This rule is generally used when multiple test versions are developed but you don't know how to choose.
[0093] Client version rule: specify the corresponding client version in advance, and access the data resources of the corresponding test version through the specified client version during subsequent access. This solution supports configuration of IOS platform, Android platform, HarmonyOS platform, etc.
[0094] Random percentage rule: Use a random method to allow a corresponding percentage of online users to access the data resources of the corresponding test version.
[0095] Parameter expression rule: specify the corresponding parameter expression in advance (for example, did%2==1), and access the data resources of the corresponding test version through the specified parameter expression during subsequent access.
[0096] Custom string whitelist: A string whitelist is pre-configured. During the access phase, the string returned by the user-defined interface (i.e., the string returned by the custom interface of the visitor's terminal device) is compared with the configured string whitelist. If the string is in the string whitelist, access to the data resources of the corresponding test version is allowed.
[0097] Custom string regular expression: Pre-configure the corresponding string, and perform regular matching between the string returned by the user-defined interface (i.e., the string returned by the custom interface of the visitor's terminal device) and the configured string during the access phase to determine whether to allow access to the data resources of the corresponding test version. Regular matching refers to matching through regular expressions (regular expressions are a logical formula for string and special character operations).
[0098] Completely customized rules: pre-configure the data request custom interface, and during the access phase, determine whether to access the data resources of the corresponding test version by carrying the configured data request custom interface.
[0099] Binding the micro-frontend main application version rule: Only used in the micro-frontend scenario, so that the micro-frontend sub-application is bound to the test version of the corresponding main application and obtains the data resources of the test version for testing.
[0100] Bind the interval network segment rule of the micro-frontend main application: Only used in the micro-frontend scenario, so that the micro-frontend sub-application can be bound to the specified network segment interval (that is, small traffic) of the main application, so that users can access the data resources of the test version within the specified network segment interval bound to the main application for testing.
[0101] Step 203: associate the selected at least one interval network segment configuration rule with the test version and store them in a database of the online release environment, and store the data resources corresponding to the test version in the database of the online release environment.
[0102] Through the above steps, all the data required for testing can be stored in the online release environment. In this way, when a user accesses it through a terminal, it can be determined whether the user is a tester based on whether there is a zone network segment configuration rule in the access request. If so, the user is allowed to access the corresponding test version of the data resources through the terminal for testing. Otherwise, the user accesses other corresponding versions of the data resources in the online release environment through the terminal. In this way, there is no need to configure an independent test environment for the program test project, which saves resources and is easy to use.
[0103] In some embodiments, the data resources corresponding to the test version in step 203 are stored in the database of the online release environment, such as Figure 2B As shown, including:
[0104] Step 2031, receiving a storage instruction for the test version.
[0105] Step 2032, obtain the version number of the test version in the storage instruction, and isolate and store the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment through object storage, wherein the database is provided with respective storage spaces corresponding to the version numbers of respective test versions.
[0106] In this embodiment, the object storage may include at least one of the following: COS (Cloud Object Storage), OSS (Object Storage Service), and FSS (File System Store).
[0107] The storage space corresponding to each test version can be distributed in different servers in the online environment, and stored in an isolated manner to avoid data resource call errors.
[0108] In some embodiments, Figure 2C As shown, step 2032 includes:
[0109] Step 20321: Receive a storage instruction for storing a test version and data resources corresponding to the test version, wherein the storage instruction includes a version number of the test version.
[0110] Step 20322: extract the version number of the test version in the storage instruction, and search the database of the online release environment for a target storage space corresponding to the version number of the test version.
[0111] Step 20323: In response to determining that the target storage space exists in the database, the data resource corresponding to the test version is stored in the target storage space.
[0112] Step 20324, in response to determining that the target storage space does not exist in the database, construct a new storage space according to the version number of the test version, and store the data resources corresponding to the test version in the new storage space.
[0113] In this embodiment, the data resources corresponding to each test version can be stored in different areas, and a test version may have multiple data resources. Different storage partitions can be divided in the storage space corresponding to the test version, and a corresponding storage address is matched for each storage partition, and each data resource is stored in the corresponding storage address. The data resource corresponds to the storage address one by one.
[0114] In addition, after storing the data resources corresponding to the test version, the user can also delete or replace these data resources to meet the user's needs.
[0115] In some embodiments, the deployment method further comprises:
[0116] Step 204: Receive standard test data of the data resource, and associate the standard test data with the data resource and store them in the corresponding storage space.
[0117] In this embodiment, the user can configure corresponding standard test data for the data resources corresponding to the test version, so that subsequent users can access the data resources corresponding to the test version through the terminal and then test and run the test. The test results of the test run are fed back to the online environment, so that it can be judged whether the test results meet the configured standard test data. If they do, it proves that the test has passed. If not, it proves that the test has failed. In this way, whether the test results have passed can be automatically judged, which can save labor costs.
[0118] Based on the same inventive concept, the embodiment of the present application also proposes a method for accessing a program test project.
[0119] like Figure 3A As shown, the access methods include:
[0120] Step 301: receiving an access request from a user terminal, and matching corresponding project information according to the access request.
[0121] In this embodiment, the user terminal can be a user terminal for testing or a common user terminal. The access request includes: the code number of the program test item to be accessed, the access function item and the client identification number.
[0122] In some embodiments, matching corresponding project information according to the access request in step 301 includes: matching corresponding project information for the access request route according to the program test project carried in the access request.
[0123] Among them, if the access request is sent from a user terminal for testing, the corresponding project information will carry the corresponding interval network segment configuration rules. If the access request is sent from an ordinary user terminal, the project information will not carry the corresponding interval network segment configuration rules. For ordinary user terminals, the corresponding data to be accessed can be directly retrieved from the online publishing environment for user access. The solution of this application is mainly aimed at the processing process of access requests sent by user terminals for testing.
[0124] In addition, the project information may also include: an identification code of a user terminal, at least one of an access target (eg, querying certain file data), and other data, which are not specifically limited here.
[0125] Step 302, in response to determining that there is an interval network segment configuration rule in the project information, retrieve the corresponding test version from the database of the online release environment according to the interval network segment configuration rule and the project information.
[0126] In some embodiments, Figure 3B As shown, step 302 includes:
[0127] Step 3021, extracting access condition information from the project information, matching the access condition information with a plurality of interval network segment configuration rules stored in the database of the online release environment, and determining a target interval network segment configuration rule corresponding to the access condition.
[0128] Step 3022: retrieve at least one corresponding pending test version from the database of the online release environment according to the target interval network segment adaptation rule.
[0129] Step 3023: Determine the corresponding test version from the at least one pending test version according to the project information.
[0130] In this embodiment, the user will pre-configure the corresponding interval network segment configuration rules for each test version in the corresponding embodiment of the previous deployment method. Therefore, only one pending test version may be found through the interval network segment configuration rules alone, and the data resources of the pending test version can be directly retrieved for testing. It is also possible to find multiple pending test versions, and it is necessary to find the corresponding test version from the multiple pending test versions based on the project information (for example, according to the access target in the project information, find the test version corresponding to the access target from the multiple pending test versions). The above method can quickly and accurately locate the test version corresponding to the access request.
[0131] In some embodiments, the interval network segment configuration rule includes at least one of the following:
[0132] Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
[0133] The specific setting method and the corresponding access rules corresponding to each interval network segment configuration rule are the same as those described in the above embodiment, and can be referred to the description of the above embodiment and are not specifically limited here.
[0134] Step 303: acquiring data resources corresponding to the access request according to the test version, and feeding back the data resources to the user terminal so that the user terminal can perform testing according to the data resources.
[0135] In this embodiment, after determining the data resources that the user wants based on the test version, the data resources are fed back to the user terminal, and the user terminal can complete the corresponding required functions based on the data resources, and then complete the test. The user can test and judge the data resources based on the response time and accuracy of the test process, as well as the accuracy of the test results, to determine whether the program test items corresponding to the data resources can be fully launched.
[0136] In some embodiments, Figure 3C As shown, obtaining the data resource corresponding to the access request according to the test version in step 303 includes:
[0137] Step 3031: Search for a storage space corresponding to the test version from multiple storage spaces in a database according to the test version.
[0138] Step 3032, determine the access function item according to the access request, search for the storage address corresponding to the access function item from the storage space corresponding to the test version, and retrieve the data resource according to the storage address, wherein each storage space pre-stores a data resource corresponding to at least one access function item.
[0139] In this embodiment, a storage space corresponding to a test version may store data resources that can implement various functional items, and a corresponding storage address will be assigned to each data resource for storage. In this way, the access function item to be accessed can be determined according to the access request, and then the corresponding storage address can be determined according to the access function item to retrieve the corresponding data resource. The entire data resource retrieval process is simple and fast. In this way, the data resources can be fed back to the user terminal so that the user terminal can perform the corresponding test task according to the data resources and complete the test process.
[0140] In some embodiments, Figure 3D As shown, the access further includes: step 304, automatically determining whether the test is passed according to the test result data of the data resource sent by the user terminal.
[0141] like Figure 3E As shown, the determination process of step 304 includes:
[0142] Step 3041: Receive test result data of the data resource sent by the user terminal.
[0143] Step 3042: Acquire standard test data matching the data resource from the storage space corresponding to the test version.
[0144] Step 3043: In response to the test result data conforming to the standard test data, determine that the data resource test passes.
[0145] Step 3044, in response to the test result data not meeting the standard test data, determining difference information between the test result and the standard test data, and outputting and displaying the difference information so as to modify the data resource according to the difference information.
[0146] In this embodiment, the user terminal can feed back the test results to the online release environment, so that the test results can be matched with the standard test data pre-stored in the online release environment according to the deployment method of the above embodiment, and whether the data resources of the test version have passed the test is determined according to the matching results. This method can save human resources. If the test passes after matching, whether the corresponding test version is online also needs to be manually determined. If the test fails after matching, the difference between the test result data and the standard test data will be output and displayed as a difference report, so that the programmer can determine the problem of the test according to the difference report and make targeted corrections.
[0147] In some embodiments, Figure 3F As shown, the access method also includes:
[0148] Step 305: Receive a test pass instruction of the data resource, and determine the test version corresponding to the data resource.
[0149] The user can manually determine whether the test is passed based on the test results on the user terminal. If the test is passed, a test pass instruction will be returned through the user terminal. Alternatively, the test can be automatically determined according to the process of step 304 above. If the test is passed, a test pass instruction will be generated.
[0150] Step 306: Remove the association between the test version and the corresponding at least one interval network segment configuration rule from the database of the online release environment, so as to release the test version in the online release environment.
[0151] In this embodiment, since the data resources of the test version have been stored in the online release environment, the online process only needs to remove the association between the test version and the corresponding at least one interval network segment configuration rule, which simplifies the online release procedure.
[0152] Through the scheme of the above-mentioned embodiment, there is no need to establish a new test environment during the testing process. The computing resources in the online release environment can be reused without affecting the online services in the online release environment, which can save resources and reduce operation and maintenance costs. In addition, at least one interval network segment configuration rule can be deployed for the program test project according to actual needs. It is no longer limited to one testing method and can meet a variety of business scenarios.
[0153] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0154] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0155] Based on the same inventive concept, corresponding to the deployment method of any of the above embodiments, the present application also provides a deployment device for a program test project.
[0156] refer to Figure 4 , the deployment device of the program test project includes:
[0157] A version determination module 41 is used to determine the test version corresponding to the program test item;
[0158] A rule receiving module 42, configured to receive at least one interval network segment configuration rule selected from a plurality of interval network segment configuration rules;
[0159] The associated deployment module 43 is used to associate the selected at least one interval network segment configuration rule with the test version and store them in the database of the online release environment.
[0160] In some embodiments, the interval network segment configuration rule includes at least one of the following:
[0161] Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
[0162] In some embodiments, the association deployment module 43 includes:
[0163] A storage receiving unit, configured to receive a storage instruction of the test version;
[0164] An object storage unit is used to obtain the version number of the test version in the storage instruction, and isolate and store the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment through object storage, wherein the database is provided with respective storage spaces corresponding to the version numbers of respective test versions.
[0165] In some embodiments, the object storage unit is specifically used for:
[0166] Receive a storage instruction for storing a test version, and data resources corresponding to the test version, wherein the storage instruction includes a version number of the test version; extract the version number of the test version in the storage instruction, and search for a target storage space corresponding to the version number of the test version in a database of the online release environment; in response to determining that the target storage space exists in the database, store the data resources corresponding to the test version in the target storage space; in response to determining that the target storage space does not exist in the database, construct a new storage space based on the version number of the test version, and store the data resources corresponding to the test version in the new storage space.
[0167] In some embodiments, the deployment device further comprises:
[0168] The standard test data storage module is used to receive the standard test data of the data resource, and associate the standard test data with the data resource and store them in the corresponding storage space.
[0169] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0170] The device of the above embodiment is used to implement the corresponding deployment method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0171] Based on the same inventive concept, corresponding to the access method of any of the above embodiments, the present application also proposes an access device for program test items.
[0172] like Figure 5 As shown, the access device of the program test project includes:
[0173] The access receiving module 51 is used to receive the access request sent by the user terminal and match the corresponding project information according to the access request;
[0174] The version adaptation module 52, in response to determining that there is an interval network segment configuration rule in the project information, retrieves a corresponding test version from a database of an online release environment according to the interval network segment configuration rule and the project information;
[0175] The resource feedback module 53 is used to obtain the data resource corresponding to the access request according to the test version, and feed back the data resource to the user terminal so that the user terminal can perform testing according to the data resource.
[0176] In some embodiments, the access receiving module 51 is further used to: match corresponding project information for the access request route according to the program test project carried in the access request.
[0177] In some embodiments, the version adaptation module 52 includes:
[0178] An extraction and matching unit, configured to extract access condition information from the project information, match the access condition information with a plurality of interval network segment configuration rules stored in a database of the online release environment, and determine a target interval network segment configuration rule corresponding to the access condition;
[0179] A version retrieving unit, configured to retrieve at least one corresponding pending test version from the database of the online release environment according to the target interval network segment adaptation rule;
[0180] A version determination unit is used to determine the corresponding test version from the at least one pending test version according to the project information.
[0181] In some embodiments, the interval network segment configuration rule includes at least one of the following:
[0182] Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
[0183] In some embodiments, the resource feedback module 53 includes:
[0184] A storage space search unit, configured to search for a storage space corresponding to the test version from a plurality of storage spaces in a database according to the test version;
[0185] A data resource retrieval unit is used to determine an access function item according to the access request, search for a storage address corresponding to the access function item from the storage space corresponding to the test version, and retrieve the data resource according to the storage address, wherein each storage space pre-stores a data resource corresponding to at least one access function item.
[0186] In some embodiments, the access device further comprises:
[0187] A test result determination module is used to receive the test result data of the data resource sent by the user terminal; obtain standard test data matching the data resource from the storage space corresponding to the test version; in response to the test result data being consistent with the standard test data, determine that the data resource test has passed; in response to the test result data not being consistent with the standard test data, determine the difference information between the test result and the standard test data, and output and display the difference information so that the data resource can be corrected according to the difference information.
[0188] In some embodiments, the access device further comprises:
[0189] An online release module is used to receive a test pass instruction of the data resource and determine the test version corresponding to the data resource; and to release the association between the test version and at least one corresponding interval network segment configuration rule from the database of the online release environment so as to release the test version in the online release environment.
[0190] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0191] The device of the above embodiment is used to implement the corresponding access method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0192] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for deploying the program test project or the method for accessing the program test project described in any of the above embodiments is implemented.
[0193] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 610, a memory 620, an input / output interface 630, a communication interface 640, and a bus 650. The processor 610, the memory 620, the input / output interface 630, and the communication interface 640 are connected to each other through the bus 650 in the device.
[0194] The processor 610 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0195] The memory 620 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 620 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 620 and are called and executed by the processor 610.
[0196] The input / output interface 630 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0197] The communication interface 640 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0198] The bus 650 comprises a pathway for transmitting information between the various components of the device (eg, the processor 610, the memory 620, the input / output interface 630, and the communication interface 640).
[0199] It should be noted that, although the above device only shows the processor 610, the memory 620, the input / output interface 630, the communication interface 640 and the bus 650, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0200] The electronic device of the above embodiment is used to implement the corresponding method for deploying program test items or the method for accessing program test items in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0201] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the program test project deployment method or the program test project access method described in any of the above embodiments.
[0202] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0203] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the method for deploying a program test project or the method for accessing a program test project as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0204] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0205] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0206] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0207] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for deploying a program test project, characterized in that: include: Determine the test version corresponding to the program test items; receiving at least one interval network segment configuration rule selected from a plurality of interval network segment configuration rules; Associating the selected at least one interval network segment configuration rule with the test version and storing them in a database of an online release environment, and storing data resources corresponding to the test version in a database of the online release environment; Storing the data resources corresponding to the test version in the database of the online release environment includes: receiving a storage instruction of the test version; Obtain the version number of the test version in the storage instruction, and isolate and store the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment through object storage, wherein the database is provided with storage spaces corresponding to the version numbers of the test versions.
2. The method according to claim 1, characterized in that The interval network segment configuration rule includes at least one of the following: Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
3. The method according to claim 1, characterized in that The obtaining the version number of the test version in the storage instruction, and isolating and storing the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment by means of object storage, includes: Receiving a storage instruction for storing a test version and data resources corresponding to the test version, wherein the storage instruction includes a version number of the test version; Extracting the version number of the test version in the storage instruction, and searching for a target storage space corresponding to the version number of the test version in a database of the online release environment; In response to determining that the target storage space exists in the database, storing the data resource corresponding to the test version in the target storage space; In response to determining that the target storage space does not exist in the database, a new storage space is constructed according to the version number of the test version, and the data resources corresponding to the test version are stored in the new storage space.
4. The method according to claim 1, characterized in that: Also includes: The standard test data of the data resource is received, and the standard test data is associated with the data resource and stored in the corresponding storage space.
5. A method for accessing a program test item, characterized in that: include: Receiving an access request from a user terminal, and matching corresponding project information according to the access request; In response to determining that there is an interval network segment configuration rule in the project information, a corresponding test version is retrieved from a database of an online release environment according to the interval network segment configuration rule and the project information; Acquire data resources corresponding to the access request according to the test version, and feed the data resources back to the user terminal so that the user terminal can perform testing according to the data resources; In response to determining that there is an interval network segment configuration rule in the project information, retrieving a corresponding test version from a database of an online release environment according to the interval network segment configuration rule and the project information, including: Extracting access condition information from the project information, matching the access condition information with a plurality of interval network segment configuration rules stored in a database of the online release environment, and determining a target interval network segment configuration rule corresponding to the access condition; Retrieving at least one corresponding pending test version from the database of the online release environment according to the target interval network segment adaptation rule; The corresponding test version is determined from the at least one pending test version according to the project information.
6. The method according to claim 5, characterized in that The matching corresponding project information according to the access request includes: According to the program test item carried in the access request, the access request is routed to match corresponding item information.
7. The method according to claim 5, characterized in that The interval network segment configuration rule includes at least one of the following: Header regular rules, Query regular rules, UserAgent regular rules, UrlPath regular rules, crowd selection rules, custom experiment diversion rules, client version rules, random percentage rules, parameter expression rules, custom string whitelist, custom string regular, fully custom rules, binding micro-frontend main application version rules, binding micro-frontend main application interval network segment rules.
8. The method according to claim 5, characterized in that Acquiring data resources corresponding to the access request according to the test version includes: searching, according to the test version, a storage space corresponding to the test version from a plurality of storage spaces in a database; Determine the access function item according to the access request, search for the storage address corresponding to the access function item from the storage space corresponding to the test version, and retrieve the data resource according to the storage address, wherein each storage space pre-stores a data resource corresponding to at least one access function item.
9. The method according to claim 8, characterized in that Also includes: Receiving test result data of the data resource sent by the user terminal; Acquire standard test data matching the data resource from the storage space corresponding to the test version; In response to the test result data conforming to the standard test data, determining that the data resource test passes; In response to the test result data not meeting the standard test data, difference information between the test result and the standard test data is determined, and the difference information is output and displayed so as to modify the data resource according to the difference information.
10. The method according to claim 5, characterized in that The method further comprises: receiving a test passing instruction of the data resource, and determining the test version corresponding to the data resource; The association between the test version and the corresponding at least one interval network segment configuration rule is released from the database of the online release environment, so that the test version can be released in the online release environment.
11. A deployment device for a program test project, characterized in that: include: A version determination module is used to determine the test version corresponding to the program test item; A rule receiving module, used for receiving at least one interval network segment configuration rule selected from a plurality of interval network segment configuration rules; An association deployment module, used to associate the selected at least one interval network segment configuration rule with the test version and store it in a database of an online release environment; The associated deployment modules include: A storage receiving unit, configured to receive a storage instruction of the test version; An object storage unit is used to obtain the version number of the test version in the storage instruction, and isolate and store the data resources corresponding to the test version in the storage space corresponding to the version number of the test version in the database of the online release environment through object storage, wherein the database is provided with respective storage spaces corresponding to the version numbers of respective test versions.
12. A device for accessing a program test item, characterized in that: include: An access receiving module, used to receive an access request sent by a user terminal, and match corresponding project information according to the access request; A version adaptation module, configured to retrieve a corresponding test version from a database of an online release environment according to the interval network segment configuration rule and the project information in response to determining that there is an interval network segment configuration rule in the project information; A resource feedback module, configured to obtain data resources corresponding to the access request according to the test version, and feed back the data resources to the user terminal so that the user terminal can perform testing according to the data resources; The version adaptation module includes: An extraction and matching unit, configured to extract access condition information from the project information, match the access condition information with a plurality of interval network segment configuration rules stored in a database of the online release environment, and determine a target interval network segment configuration rule corresponding to the access condition; A version retrieving unit, configured to retrieve at least one corresponding pending test version from the database of the online release environment according to the target interval network segment adaptation rule; A version determination unit is used to determine the corresponding test version from the at least one pending test version according to the project information.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for deploying a program test item according to any one of claims 1 to 4 or the method for accessing a program test item according to any one of claims 5 to 10 is implemented.
14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method for deploying a program test item as described in any one of claims 1 to 4, or the method for accessing a program test item as described in any one of claims 5 to 10.
Citation Information
Patent Citations
Project testing method and device based on configuration system
CN103714002A
Online test method, gray scale shunting device and storage medium
CN111737128A
Test method and device, electronic equipment and computer readable storage medium
CN111831566A
Project version release management method and device, electronic equipment and computer readable medium
CN113504939A
Smart tool for enterprise-wide software integration and deployment
US20190243742A1
