Software testing environment publishing method and device, electronic equipment, storage medium and program product
By obtaining and filtering the initial code information in the code warehouse, generating a bill of lading and matching it with the publishing rules, determining the publishing tags and order, the problems of inaccurate and inefficient publishing content in the existing technology are solved, and more efficient software is achieved Test environment release.
Patent Information
- Application Number
- CN202410941134.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
AI Technical Summary
The existing software testing environment publishing methods have problems such as inaccurate release content and low testing efficiency, which leads to the release content that may be entrained with code to go online, and testers cannot clarify the urgency of multiple release tasks and cannot perform test tasks efficiently.
By obtaining the initial code information of the code warehouse, filtering and processing based on preset filter rules to generate a test order, and matching the test order with the release rule to determine the release label. Test users determine the release order and urgency based on the label to ensure the release content Accuracy and efficiency.
It avoids errors in publishing content, clarifies the urgency of the tasks to be published, improves the efficiency of the execution of the test tasks, and ensures that each test order matches a release tag, so that testers can selectively publish content to be published according to the order of release.
Smart Images

Figure CN118916268A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, storage medium, and program product for publishing a software testing environment. Background Art
[0002] Test environment release is the process of transferring the test environment from the development phase to the test phase. In order to improve the release efficiency of software test environment release, an existing method of software test environment release uses an automated deployment tool, which immediately releases the released content as soon as it detects a change in the released content, resulting in the possibility that the released content may be put online with the code; in addition, testers cannot know the urgency of multiple release tasks, and thus cannot perform test tasks efficiently. Summary of the invention
[0003] The present application provides a method, device, electronic device, storage medium and program product for publishing a software testing environment, so as to solve the technical problems of inaccurate publishing content and low testing efficiency in the existing method for publishing a software testing environment.
[0004] In a first aspect, the present application provides a method for publishing a software testing environment, comprising:
[0005] Get the initial code information submitted to the code repository;
[0006] The initial code information is screened based on a preset screening rule to obtain target code information, and a test submission form is generated based on the target code information;
[0007] Match the test submission form with a preset publishing rule to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on the at least one publishing tag, and perform a confirmation trigger operation on the to-be-published tasks corresponding to the test submission form according to the publishing order;
[0008] In response to receiving a confirmation trigger of the to-be-issued task input by the test user through an input device, a to-be-executed task is generated.
[0009] In a possible design, obtaining the initial code information submitted to the code repository includes:
[0010] Performing code monitoring on the code repository;
[0011] In response to monitoring that the initial code information is submitted to the code repository, receiving a code submission monitoring request sent by the code repository;
[0012] In response to receiving the code submission monitoring request, initial code information submitted to the code repository is obtained.
[0013] In a possible design, the screening process of the initial code information based on a preset screening rule to obtain the target code information includes:
[0014] Screening out the initial code information having the required information number from the initial code information as the primary screening code information;
[0015] The preliminary screening code information having a test request identification is screened out from the preliminary screening code information as the target code information.
[0016] In one possible design, it also includes:
[0017] When the preliminary screening code information is screened out, the corresponding requirement status is set to the status of code submission;
[0018] When the target code information is screened out, the corresponding demand status is set to the status of the test order to be generated;
[0019] When a test request form is generated based on the target code information, the corresponding requirement status is set to the test requested status.
[0020] In a possible design, the step of generating a test request form based on the target code information includes:
[0021] Adding the test information to the target code information through the input device;
[0022] The test submission form is generated based on the target code information after adding the test submission information.
[0023] In a possible design, the preset publishing rules include: publishing rules according to time points, publishing rules according to needs, and publishing rules according to priorities;
[0024] The step of matching the test submission form with a preset publishing rule to determine at least one publishing tag corresponding to the test submission form includes:
[0025] Based on the test request information in the test request form, the test request form is matched with the release rule according to the time point, the release rule according to the demand, and the release rule according to the priority in sequence;
[0026] In response to the test request form successfully matching at least one release rule, generating at least one corresponding release tag;
[0027] The at least one release tag includes at least one of the following: a priority release tag, a demand release tag, or a time point release tag:
[0028] The release urgency corresponding to the priority release tag is greater than the release urgency corresponding to the demand release tag, and the release urgency corresponding to the demand release tag is greater than the release urgency corresponding to the time point release tag.
[0029] In a possible design, the preset publishing rule further includes: manually triggering the publishing rule; and the method further includes:
[0030] If the test submission form does not match the priority release rule, the demand release rule, and the time point release rule, it is determined that the test submission form matches the manual trigger release, and the release tag corresponding to the test submission form is determined to be a manual trigger release tag;
[0031] The release urgency corresponding to the manually triggered release tag is greater than the priority release tag.
[0032] In one possible design, it also includes:
[0033] Based on the relevant information in the task to be performed, determining whether manual operation is required;
[0034] In response to determining that no manual operation is required, the task to be executed is published, so that the smoke test device performs a smoke test on the successfully published task to be executed.
[0035] In one possible design, it also includes:
[0036] In response to receiving the smoke test success information sent by the smoke test device, smoke test success notification information is sent to the test device.
[0037] In a second aspect, the present application provides a device for publishing a software testing environment, comprising:
[0038] The acquisition module is used to obtain the initial code information submitted to the code repository;
[0039] A generating module, configured to screen the initial code information based on a preset screening rule to obtain target code information, and to generate a test submission form based on the target code information;
[0040] A matching module is used to match the test submission form with a preset publishing rule to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on the at least one publishing tag, and perform a confirmation trigger operation on the to-be-published tasks corresponding to the test submission form according to the publishing order;
[0041] The confirmation module is used to generate a task to be executed in response to receiving a confirmation trigger of the task to be issued input by the test user through an input device.
[0042] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0043] The memory stores computer-executable instructions;
[0044] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.
[0045] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0046] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method as described in any one of the first aspects.
[0047] The method, device, electronic device, storage medium and program product for publishing a software testing environment provided by the present application are as follows: obtaining the initial code information submitted to the code repository; filtering and processing the initial code information based on preset filtering rules to obtain the target code information, and generating a test submission form based on the target code information; matching the test submission form with the preset publishing rules to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on at least one publishing tag, and confirm the trigger operation of the task to be published corresponding to the test submission form according to the publishing order; in response to receiving the confirmation trigger of the task to be published input by the test user through the input device, a task to be executed is generated. Thus, the tester can check and confirm the content to be published before publishing it, which can avoid errors in the published content; by matching each test submission form with a publishing tag, the tester can clarify the publishing order of the tasks to be published, so that the content to be published can be selectively published according to the publishing order, and the test task can be executed more efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0049] Figure 1 An application scenario diagram corresponding to the method for publishing a software testing environment provided in an embodiment of the present application;
[0050] Figure 2 A flowchart of a method for publishing a software testing environment provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of an interactive process of a method for publishing a software testing environment provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of a device for publishing a software testing environment provided in an embodiment of the present application;
[0053] Figure 5 This is a schematic diagram of the structure of an electronic device provided in a real-time example of the present application.
[0054] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0056] It should be noted that the methods, devices, electronic devices, storage media and program products released by the software testing environment of this application can be used in the field of computer technology, and can also be used in any field outside the field of computer technology. The application fields of the methods, devices, electronic devices, storage media and program products released by the software testing environment of this application are not limited.
[0057] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail.
[0058] Test environment release is the process of transferring the test environment from the development phase to the test phase. It involves deploying the latest software version, configuration files, and data to the test environment so that testers can perform test activities based on this environment. At present, there is an existing method for releasing software test environments using automated deployment, which can automatically deploy code from the development environment to the test environment, making the release process more automated. However, this method releases content immediately upon monitoring changes to the published content, without fully checking and confirming the published content, which may result in the release content being put online with code; in addition, testers cannot know the urgency of multiple release tasks, and thus cannot perform test tasks efficiently.
[0059] Therefore, in the face of the technical problems of the above-mentioned prior art, in order to avoid the problem of publishing content with code online and low testing efficiency. First, after generating a test submission form based on the initial code information submitted by the development user to the code repository, the information on the test submission form is matched with the preset publishing rules, and the label that matches the test submission form is determined. Then, the tester checks and confirms the content to be published, and determines the urgency of the publishing task based on the publishing label. Therefore, the tester checks and confirms the content to be published before publishing it, which can avoid errors in the published content. Each test submission form is matched with a label so that the tester can understand the urgency of the person to be published, and thus selectively publish the content to be published to perform the testing task more efficiently.
[0060] Figure 1 An application scenario diagram corresponding to the method for publishing a software testing environment provided in an embodiment of the present application, such as Figure 1 As shown in , in the application scenario provided by this embodiment, the development user uploads the initial code to the code warehouse 11 through the development user terminal 10. When the test environment publishing terminal 12 monitors that there is initial code uploaded to the code warehouse 11, the initial code information uploaded to the code warehouse 11 is obtained, and the initial code information is filtered and processed based on the preset filtering rules to obtain the target code information, and a test submission form is generated based on the target code information; the test submission form is then matched with the preset publishing rules to determine at least one publishing tag corresponding to the test submission form; the tester determines the publishing order of the test submission form based on at least one publishing tag and uses the test user terminal 13 to send the determination result of the task to be released; when the test environment publishing terminal 12 receives the determination trigger result of the task to be released sent by the test user terminal 13, it generates a task to be executed based on the trigger result of the task to be released.
[0061] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0062] Figure 2 A flowchart of a method for publishing a software testing environment provided in an embodiment of the present application is shown in FIG. Figure 2As shown, the execution subject of this embodiment is a device for publishing a software test environment, which can be implemented by a computer program or a medium storing relevant computer programs, such as a USB flash drive and / or a CD, or can be implemented by a physical device integrated or installed with relevant computer programs, such as a chip, an electronic device, etc. The electronic device can be a computer or a server, etc. The method for publishing a software test environment provided in this embodiment includes the following steps:
[0063] Step S201: Obtain the initial code information submitted to the code repository.
[0064] Specifically, by obtaining the latest or specific version of initial code information submitted by the development user from the code repository, preparation is made for subsequent code testing or deployment.
[0065] It should be noted that a code repository is a tool for storing and managing software source code, usually including one or more version control systems that can record the change history of each code version and the developer's submission record.
[0066] Optionally, before obtaining the code information in the code repository, it is first necessary to determine the address of the code repository and establish communication with the code repository using authentication information. After establishing communication with the code repository, the initial code information stored in the code repository is pulled to local storage or a designated working directory. Optionally, a version control system is used to establish communication with the code repository and manage the code repository.
[0067] Optionally, the initial code information may include development user information, code submission time, code type, code priority, code content description, and the like.
[0068] Step S202: Screen the initial code information based on preset screening rules to obtain target code information, and generate a test request form based on the target code information.
[0069] Specifically, after obtaining the initial code information, it is necessary to screen the initial code information according to a preset screening rule to obtain the target code information used for subsequent testing, and generate a test request form using the target code information.
[0070] Among them, the preset screening rules are pre-set screening rules for the initial code information, and their purpose is to screen out the initial code information that meets the requirements; the target code information is the initial code information that meets the symbol requirements after screening; and the test request form is a test list with information such as code test requirements.
[0071] Optionally, there are multiple screening methods for preset screening rules, for example, screening specific code types, screening initial code information submitted by specific development users, and screening initial code information by setting screening keywords, etc. In this embodiment, no specific limitation is made to this.
[0072] Optionally, after the target code information is determined, a test sheet is automatically generated according to the target code information. Further optionally, an automated tool is used to extract information from the target code information and then generate the test sheet. In this embodiment, the automated tool is not limited.
[0073] Optionally, after the target code information is determined, the target code information is sent to the development user terminal, and the development user adds test information to the target code information through the development user terminal to generate a test request form and send it to the test environment release terminal. Further, the test request information added by the development user includes but is not limited to configuration information and database information.
[0074] Step S203: match the test submission form with the preset publishing rules to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on the at least one publishing tag, and confirm and trigger the tasks to be published corresponding to the test submission form according to the publishing order.
[0075] Specifically, when the test order is determined, the test order is matched with the preset publishing rules, so that the test order matches at least one publishing tag. Then, the test user can clarify the publishing order of the test order according to the tag matched by the test order. When the test user confirms that the test order information is correct, the task to be published corresponding to the test order is triggered according to the publishing order. In this way, the accuracy of the test order content can be ensured, and the confirmation trigger is performed according to the publishing order, so that subsequent test users can efficiently perform test tasks.
[0076] The preset publishing rules are set by the test user according to the characteristics of the test environment. Optionally, the preset publishing rules may include time rules, demand rules, priority rules, type rules, etc. In this embodiment, the preset publishing rules are not specifically limited.
[0077] Optionally, the test submission form can match one of the preset publishing rules, and accordingly, the test submission form has a publishing tag corresponding to the publishing rule. Optionally, the test submission form can simultaneously match multiple publishing rules in the preset publishing rules, and accordingly, the test submission form can simultaneously have multiple tags corresponding to multiple publishing rules.
[0078] Optionally, when matching the test request form with the preset release rules, the test request information in the test request form is extracted and matched with multiple release rules in the preset release rules in sequence. The test request information includes but is not limited to priority information, code requirement information, and test time information.
[0079] Optionally, the release tag may be a text name corresponding to the release rule, or may be a number or a special character, etc. In this embodiment, the form of the release tag is not specifically limited as long as it can be understood by the test user.
[0080] Optionally, the test submission forms that match the release tag are classified and sorted according to the tag type, so as to facilitate the test user to clearly identify the type of the test submission form and to more efficiently confirm the task to be released corresponding to the triggering test submission form.
[0081] Step S204 : in response to receiving a confirmation trigger of the task to be released input by the test user through the input device, generating a task to be executed.
[0082] Specifically, when the test user confirms that there are no errors in the test submission form, the confirmation trigger result for the task to be released is input through the input device. After receiving the confirmation trigger result input by the test user, the confirmed task to be released is generated as a task to be executed, so as to facilitate the next step of processing based on the task to be executed.
[0083] Optionally, the input device includes but is not limited to a keyboard, a mouse and a touch screen.
[0084] Optionally, when the test user finds that there are errors in the test submission form, after verifying with the development user, the test submission form is modified using the input device to ensure that subsequent tests can proceed smoothly. Optionally, when the test user finds that there are errors in the test submission form, the test submission of the test submission form is rejected through the input device, so that the test submission form is transferred to the developer terminal for modification and re-testing.
[0085] The method for publishing a software testing environment provided in this embodiment is to obtain the initial code information submitted to the code repository; filter the initial code information based on preset filtering rules to obtain the target code information, and generate a test submission form based on the target code information; match the test submission form with the preset publishing rules to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on at least one publishing tag, and perform a confirmation trigger operation on the tasks to be published corresponding to the test submission form according to the publishing order; in response to receiving the confirmation trigger of the tasks to be published input by the test user through the input device, generate tasks to be executed. In the method provided in this embodiment, the tester can check and confirm the content to be published before publishing it, which can avoid errors in the published content; by matching each test submission form with a publishing tag, the tester can clarify the publishing order of the tasks to be published, and thus selectively publish the content to be published according to the publishing order, so that the test user can perform the test task more efficiently.
[0086] As an optional implementation, based on any of the above embodiments, obtaining the initial code information submitted to the code repository includes:
[0087] Monitor the code repository;
[0088] In response to monitoring that initial code information is submitted to the code repository, receiving a code submission monitoring request sent by the code repository;
[0089] In response to receiving the code submission monitoring request, initial code information submitted to the code repository is obtained.
[0090] Specifically, when obtaining the initial code information submitted to the code repository, first, the code repository is monitored. When it is monitored that the initial code information is submitted to the code repository, the code repository will send a code submission monitoring request to the test environment publishing terminal; thus, after the test environment publishing terminal receives the code submission monitoring request, the initial code information is obtained from the code repository.
[0091] Optionally, the code repository can be monitored through Webhook. Webhook is an event-driven communication mechanism that allows applications to pass data to other applications in real time. Specifically, the webhook event is set to push code and merge, so that both the code pushed directly to the main branch and the code introduced by merging can be captured in real time. Whenever code is pushed to the code repository, the code repository will send an HTTP POST request to the URL specified in the Webhook configuration. When the test environment publishing terminal receives the HTTP POST request from the webhook of the sub-code repository, the initial code information in the code repository is obtained.
[0092] The method for publishing a software testing environment provided in this embodiment obtains initial code information submitted to a code repository, including: monitoring the code repository; in response to monitoring that initial code information is submitted to the code repository, receiving a code submission monitoring request sent by the code repository; in response to receiving the code submission monitoring request, obtaining the initial code information submitted to the code repository. The method of this embodiment can realize automatic monitoring and response of code submission, ensure that the initial code information can be obtained in real time, and thus ensure the release efficiency of the software testing environment.
[0093] As an optional implementation, based on any of the above embodiments, the initial code information is screened based on a preset screening rule to obtain the target code information, including:
[0094] Screening out the initial code information having the required information number from the initial code information as the primary screening code information;
[0095] The preliminary screening code information having the test request identification is screened out from the preliminary screening code information as the target code information.
[0096] Specifically, when the initial code information is screened based on preset screening rules to obtain the target code information, two screenings are required; first, the initial code information with the required information number is screened out from the initial code information as the preliminary screening code information, and secondly, the preliminary screening code information is screened again to obtain the initial code information with the test identification as the target code information.
[0097] It should be noted that when developers submit code, they need to submit the following relevant information: submission type, priority, and submission content description. Among them, the submission type can be requirement number, defect number, and document format. Priority includes high, medium, and low. It must be filled in when the priority is high. The example is as follows: [High] REQ-61176_QX-20240426 Fix input validation problem. Among them, "[High]" is the priority, "REQ-61176" is the requirement number, "QX-20240426" is the defect number, and "Fix input validation problem" is the submission content description. Therefore, the preliminary screening code information is filtered out by detecting whether there is a keyword of the requirement number in the submitted code information.
[0098] It should be noted that not all initial screening code information with a requirement information number needs to be tested. Only the initial screening code information with a test mark needs to be tested. Among them, the test mark exists in the initial code information and is filled in by the developer or generated according to the content of the initial code.
[0099] The method for publishing a software testing environment provided in this embodiment screens the initial code information based on a preset screening rule to obtain the target code information, including: screening the initial code information with the requirement information number as the preliminary screening code information; screening the preliminary screening code information with the test submission mark as the target code information. By screening the initial code information twice, the target code information can be efficiently and accurately determined from the initial code information, ensuring the publishing efficiency of the software testing environment.
[0100] As an optional implementation manner, based on any of the above embodiments, it also includes:
[0101] When the preliminary screening code information is screened out, the corresponding requirement status is set to the status of code submission;
[0102] When the target code information is filtered out, the corresponding demand status is set to the status of the test order to be generated;
[0103] When a test request form is generated based on the target code information, the corresponding requirement status is set to the test requested status.
[0104] Specifically, the initial code information is matched to the requirement status at each stage, so that the test users and development users can clearly know the progress of the code submission. Specifically, when the initial screening code information is screened out, the corresponding requirement status is set to the code submission status; when the target code information is screened out, the corresponding requirement status is set to the status of the test submission form to be generated; when the test submission form is generated based on the target code information, the corresponding requirement status is set to the tested status.
[0105] Optionally, when the requirement status changes, the development user or the test user is notified according to the specific situation of the requirement status. Specifically, when the requirement status is in the state of code submission or the state of the test submission form to be generated, the development user is notified, and when the requirement status is in the state of the test submission, the test user is notified. In this way, the development user and the test user can accurately understand the progress of the test submission, and it is also convenient to trace the test submission problem when there is a problem with the test submission.
[0106] The method for publishing a software testing environment provided by this embodiment also includes: when the preliminary screening code information is screened out, the corresponding requirement status is set to the state of code submission; when the target code information is screened out, the corresponding requirement status is set to the state of a test submission form to be generated; when a test submission form is generated based on the target code information, the corresponding requirement status is set to the state of having been tested. The method of this embodiment corresponds different requirement states to each stage of code submission, so that development users and test users can know the progress of code submission.
[0107] As an optional implementation, based on any of the above embodiments, generating a test submission form based on the target code information includes:
[0108] Adding test information to the target code information through the input device;
[0109] Generate a test request form based on the target code information after adding the test request information.
[0110] Specifically, after the target code information is determined, the target code information is sent to the development user terminal. The development user adds the test information to the target code information of the development user terminal through the input device, and generates a test form based on the target code information after adding the test information and sends it to the test environment publishing terminal.
[0111] Optionally, the test information that the development user needs to add includes but is not limited to whether configuration information, database information, test modules, and expected test results are required.
[0112] Optionally, before the development user adds the test information to the target code information through the input device, the development user checks the target code information to confirm whether there are any errors in the target code information, thereby avoiding the problem that the test form cannot be generated subsequently or the generated test form contains errors.
[0113] The method for publishing a software testing environment provided in this embodiment generates a test request form based on target code information, including: adding test request information to the target code information through an input device; and generating a test request form based on the target code information after adding the test request information. By adding the test request information to the target code information and generating the test request form, the accuracy of the generated test request form is ensured, and the subsequent test tasks can be carried out smoothly.
[0114] As an optional implementation, based on any of the above embodiments, the preset publishing rules include: publishing rules according to time points, publishing rules according to needs, publishing rules according to priorities, and manually triggered publishing rules; matching the test submission form with the preset publishing rules to determine at least one publishing tag corresponding to the test submission form, including:
[0115] Based on the test request information in the test request form, the test request form is matched with the release rules according to the time point, the release rules according to the demand, and the release rules according to the priority in sequence;
[0116] In response to the test submission form successfully matching at least one release rule, generating at least one corresponding release tag;
[0117] The at least one release tag includes at least one of the following: a priority release tag, a requirement release tag, or a time point release tag:
[0118] The release urgency corresponding to the priority release tag is greater than the release urgency corresponding to the demand release tag, and the release urgency corresponding to the demand release tag is greater than the release urgency corresponding to the time point release tag;
[0119] If the test request form does not match the priority release rule, the demand release rule, or the time point release rule, the test request form is determined to match the manual trigger release, and the release tag corresponding to the test request form is determined to be the manual trigger release tag;
[0120] The release urgency corresponding to the manually triggered release tag is greater than the priority release tag.
[0121] Specifically, when matching the test submission form with the preset release rules to determine at least one release tag corresponding to the test submission form, first match the test submission form with the release rules according to the time point, the release rules according to the demand, and the release rules according to the priority one by one in sequence, and generate the corresponding release tag when the test submission form matches the release rules successfully, wherein the release tag includes the priority release tag, the demand release tag, or the time point release tag, and the release urgency corresponding to the priority release tag is greater than the release urgency corresponding to the demand release tag, and the release urgency corresponding to the demand release tag is greater than the release urgency corresponding to the time point release tag. Thus, it is ensured that the test submission form can be reasonably classified and sorted according to the urgency, and that tasks with high urgency can be given priority, and the efficiency of the test user confirming the release is also improved. In addition, if the test submission form does not match the release rules according to the priority, the release rules according to the demand, and the release rules according to the time point, it is determined that the test submission form matches the manual trigger release, and the release tag corresponding to the test submission form is determined to be a manual trigger release tag; the release urgency corresponding to the manual trigger release tag is greater than the priority release tag. By setting the manual trigger release rule, the test user can quickly process special tasks.
[0122] Optionally, the specific implementation method of the time point release rule is as follows: by configuring one or more cron expressions, each cron expression corresponds to a specific release time period, and automatically detecting the submitted test submission form in the release time period to detect whether the expected release date in the test submission form matches the release time period. If it matches, a time point release tag is generated.
[0123] Optionally, the specific implementation method according to the requirement release rules is as follows: the requirements are divided into first-level project requirements and second-level project requirements split from the first-level project requirements. When the second-level project requirements are tested, the tasks to be released are immediately generated. If the first-level project requirements involve multiple second-level project requirements, the first-level project requirements will only be tested after all the second-level project requirements are tested. Specifically, the first-level project requirements and the second-level project requirements can be confirmed by checking the code version number in the test submission form or identifying the requirement keywords. Optionally, the first-level project requirements correspond to the first-level requirement release label, and the second-level project requirements correspond to the second-level requirement release label.
[0124] Optionally, the specific implementation method according to the priority release rule is as follows: when the initial code information includes a "[High]" priority field, a high priority field is generated in the corresponding test submission form. Therefore, when the test submission form is matched with the preset release rule, if a high priority field is detected in the reminder form, a priority release tag is generated.
[0125] Optionally, in addition to the above-mentioned publishing rules, in order to adapt to the diversity of project requirements, the preset publishing rules may also include other publishing rules such as publishing according to risk level.
[0126] The method for publishing a software testing environment provided in the present embodiment, the preset publishing rules include: publishing rules according to time points, publishing rules according to requirements, publishing rules according to priorities, and manually triggered publishing rules; matching a test submission form with preset publishing rules to determine at least one publishing tag corresponding to the test submission form, including: matching the test submission form with the publishing rules according to time points, publishing rules according to requirements, and publishing rules according to priorities in sequence based on the test submission information in the test submission form; generating at least one corresponding publishing tag in response to the test submission form successfully matching with at least one publishing rule; the at least one publishing tag includes at least one of the following: a priority publishing tag, a requirement publishing tag, or a time point publishing tag: the publishing urgency corresponding to the priority publishing tag is greater than the publishing urgency corresponding to the requirement publishing tag, and the publishing urgency corresponding to the requirement publishing tag is greater than the publishing urgency corresponding to the time point publishing tag; if the test submission form does not match the publishing rules according to priority, the publishing rules according to requirements, and the publishing rules according to time points, it is determined that the test submission form matches the manually triggered publishing, and the publishing tag corresponding to the test submission form is determined to be a manually triggered publishing tag; the publishing urgency corresponding to the manually triggered publishing tag is greater than the priority publishing tag. The method of this embodiment can ensure that the test submission forms are reasonably classified and sorted according to the urgency, ensure that tasks with high urgency are given priority, and improve the efficiency of test users confirming and publishing; by setting manual triggering publishing rules, test users can quickly process special tasks.
[0127] As an optional implementation manner, based on any of the above embodiments, it also includes:
[0128] Based on the relevant information in the task to be executed, determine whether manual operation is required;
[0129] In response to determining that no manual operation is required, publishing the task to be executed, so that the smoke test device performs a smoke test on the successfully published task to be executed;
[0130] In response to receiving the smoke test success information sent by the smoke test device, smoke test success notification information is sent to the test device.
[0131] Specifically, after the task to be executed is generated, it is determined whether manual operation is required based on the generated task to be executed. When it is determined that no manual operation is required, the task to be executed is released so that the smoke test equipment performs a smoke test on the successfully released task to be executed; when the smoke test is successful, a smoke test success notification is sent to the test equipment, so that the tester can perform the next test task on the task to be executed.
[0132] Among them, smoke testing is a preliminary testing stage in the software development process, which is used to quickly verify whether the basic functions and key processes of the software or new version can operate normally; the smoke testing equipment is used to perform smoke testing on successfully released tasks to be executed; the testing equipment can receive notifications from the test environment release terminal, which can be a test user terminal.
[0133] Optionally, when it is determined that the task to be executed requires manual operation, the task to be executed is sent to the operation and maintenance user terminal. After the operation and maintenance user fills in the configuration information, the supplemented task to be executed is sent to the test environment publishing terminal through the operation and maintenance user terminal.
[0134] Optionally, when publishing of a pending task fails, the pending task that failed to be published is sent to an operation and maintenance user terminal, and the operation and maintenance user checks the failure problem and then resends it to the test environment publishing terminal for publishing.
[0135] Optionally, when the smoke test fails, the smoke test failure content is sent to the development user terminal, and the development user re-tests after repairing the smoke test failure problem.
[0136] The method for publishing a software testing environment provided by this embodiment also includes: judging whether manual operation is required based on relevant information in the task to be executed; in response to determining that manual operation is not required, publishing the task to be executed so that the smoke test device performs a smoke test on the successfully published task to be executed; in response to receiving smoke test success information sent by the smoke test device, sending smoke test success notification information to the test device. The method of this embodiment can efficiently publish tasks to be executed and execute smoke tests, and immediately notify the test device of the smoke test results, so that the tester can immediately execute subsequent test tasks.
[0137] Figure 3 A schematic diagram of an interactive process of a method for publishing a software testing environment provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the execution subject of this embodiment is a system for publishing a software test environment, which includes: a development user terminal, a test user terminal, an operation and maintenance user terminal, and a test environment publishing terminal. Specifically, the interactive process of the method for publishing a software test environment is as follows:
[0138] S301. The test environment publishing terminal pulls the initial code information uploaded by the developer to the code repository, and generates target code information after screening based on the initial code information.
[0139] Specifically, after the code repository is configured with webhook, the code repository will automatically send a message to the test environment publishing terminal each time the development user submits code. The test environment publishing terminal obtains the initial code information and filters it to filter out the initial code information that meets the filtering conditions. The filtering conditions are the initial code information containing the requirement number and the test submission.
[0140] Optionally, the target code information may be an initial test submission form.
[0141] S302: The test environment publishing terminal sends the target code information to the development user terminal.
[0142] S303: The development user terminal receives the supplementary test information for the target code information input by the development user.
[0143] S304: The development user terminal sends the target code information supplemented with the test information to the test environment publishing terminal.
[0144] S305. The test environment publishing terminal generates a test submission form based on the supplemented test submission information, and matches the test submission form with a preset publishing rule to match a corresponding publishing tag.
[0145] It should be noted that the test submission form generated by supplementing the test submission information is the final version of the test submission form.
[0146] S306: The test environment publishing terminal sends the test submission form with the publishing tag to the test user terminal.
[0147] It should be noted that the test environment publishing terminal can send a single test submission form to the test user terminal, and can also send a task form containing multiple test submission forms to the test user terminal.
[0148] S307. The test user terminal receives the inspection confirmation information of the test submission form sent by the test user, and determines to trigger or reject the to-be-released task corresponding to the test submission form based on the inspection result.
[0149] S308: The test user terminal sends the confirmation trigger or rejection result to the test environment publishing terminal.
[0150] S309: After receiving the rejection result, the test environment publishing terminal sends the rejection result to the development user terminal.
[0151] S310: The development user terminal receives the test request form after the development user completes the repair.
[0152] It should be noted that, after the development user terminal receives the rejection information, the development user repairs and adjusts the test submission form, and uploads the repaired test submission form to the development user terminal. After the development user terminal receives the repaired test submission form, it sends the repaired test submission form to the test environment publishing terminal, and executes the above S301 to S308.
[0153] S311. After receiving and confirming the trigger result, the test environment publishing terminal generates a task to be executed.
[0154] S312: The test environment publishing terminal determines whether the task to be executed requires manual operation by the operation and maintenance user.
[0155] S313. After the test environment publishing terminal determines that no manual operation by the operation and maintenance user is required, the task to be executed is automatically published.
[0156] S314. After the test environment publishing terminal determines that manual operation by the operation and maintenance user is required, the task to be executed is sent to the operation and maintenance user terminal.
[0157] S315. The operation and maintenance user terminal receives the supplementary information filled in by the operation and maintenance user.
[0158] S316. The operation and maintenance user terminal sends the to-be-executed task with supplementary information to the test environment publishing terminal.
[0159] S317: After receiving the supplemented tasks to be executed, the test environment publishing terminal publishes the supplemented tasks to be executed.
[0160] S318: When the test environment publishing terminal determines that the task to be executed fails to be published, the task to be executed that failed to be published is sent to the operation and maintenance user terminal.
[0161] S319: The operation and maintenance user terminal receives the task to be executed after the problem is fixed, which is input by the operation and maintenance user.
[0162] S320. The operation and maintenance user terminal sends the tasks to be executed after the problem is fixed to the test environment publishing terminal.
[0163] S321. The test environment publishing terminal sends the successfully published tasks to be executed to the development user terminal.
[0164] It should be noted that the status of the pending tasks that have been successfully published will be automatically changed to the published successfully status.
[0165] Optionally, when the release status changes to the release success status, the test environment publishing terminal directly triggers the smoke test. If the smoke test fails, the test environment publishing terminal sends the smoke test failure result to the development user terminal, and the development user performs analysis; if the smoke test succeeds, the test environment publishing terminal sends a smoke test success notification to the test user terminal, and the test user performs the test work.
[0166] S322: The development user terminal receives the smoke test success result input by the development user.
[0167] It should be noted that, after the development user terminal receives the successfully published task to be executed, the development user performs a smoke test through the smoke test device. When the smoke test succeeds, the development user inputs the smoke test success result to the development user terminal.
[0168] When the smoke test fails, the development user confirms whether there is a problem; when the development user determines that there is a problem and fixes it, the repaired test request form is input into the development user terminal, the development user terminal receives the repaired test request form, and sends the repaired test request form to the test environment release terminal; the test environment release terminal matches the test request form with the preset release rules to match the corresponding release tag. When the development user determines that there is no problem, the smoke test result is input into the development user terminal.
[0169] S323. The development user terminal sends the successful result of the smoke test to the test environment publishing terminal.
[0170] Specifically, after the development user confirms that the smoke test failure is a false alarm, the smoke test success result is uploaded to the development user terminal.
[0171] S324. The test environment publishing terminal sends the smoke test success result to the test user terminal.
[0172] In this embodiment, the implementation method and technical effects of S301-S324 are similar to the implementation method of the corresponding solutions in the above embodiments, and will not be repeated here.
[0173] Figure 4 A schematic diagram of the structure of a device for publishing a software testing environment provided in an embodiment of the present application, such as Figure 4 As shown, the apparatus for publishing software testing environment provided in this embodiment is located in the electronic device. The apparatus 40 for publishing software testing environment provided in this embodiment comprises: an acquisition module 41 , a generation module 42 , a matching module 43 , and a determination module 44 .
[0174] Specifically, the acquisition module 41 is used to acquire the initial code information submitted to the code repository; the generation module 42 is used to filter the initial code information based on preset filtering rules to obtain target code information, and generate a test submission form based on the target code information; the matching module 43 is used to match the test submission form with preset publishing rules to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on at least one publishing tag, and perform confirmation trigger operations on the tasks to be published corresponding to the test submission form according to the publishing order; the confirmation module 44 is used to generate a task to be executed in response to receiving a confirmation trigger for the task to be published input by the test user through an input device.
[0175] The device for publishing the software testing environment provided in this embodiment can execute Figure 2 and Figure 3 The specific implementation principles and technical effects of the method embodiments shown are similar and will not be repeated here.
[0176] Optionally, when acquiring the initial code information submitted to the code repository, the acquisition module 41 is specifically used to: perform code monitoring on the code repository; in response to monitoring that the initial code information is submitted to the code repository, receive a code submission monitoring request sent by the code repository; in response to receiving the code submission monitoring request, acquire the initial code information submitted to the code repository.
[0177] Optionally, the generation module 42, when filtering the initial code information based on preset filtering rules to obtain the target code information, is specifically used to: filter out the initial code information with the requirement information number in the initial code information as the preliminary screening code information; filter out the preliminary screening code information with the test submission mark in the preliminary screening code information as the target code information.
[0178] Optionally, the generation module 42 is also used to: when the preliminary screening code information is screened out, set the corresponding requirement status to the status of code submission; when the target code information is screened out, set the corresponding requirement status to the status of the test submission form to be generated; when the test submission form is generated based on the target code information, set the corresponding requirement status to the status of the submitted test.
[0179] Optionally, when generating a test submission form based on the target code information, the generating module 42 is specifically used to: add the test submission information to the target code information through an input device; and generate the test submission form based on the target code information after the test submission information is added.
[0180] Optionally, the preset publishing rules include: publishing rules according to time points, publishing rules according to needs, and publishing rules according to priorities.
[0181] Optionally, the matching module 43, when matching the test submission form with preset release rules to determine at least one release tag corresponding to the test submission form, is specifically used to: match the test submission form with the release rules according to the time point, the release rules according to the demand, and the release rules according to the priority in sequence based on the test submission information in the test submission form; in response to a successful match between the test submission form and at least one release rule, generate at least one corresponding release tag; the at least one release tag includes at least one of the following: a priority release tag, a demand release tag, or a time point release tag: the release urgency corresponding to the priority release tag is greater than the release urgency corresponding to the demand release tag, and the release urgency corresponding to the demand release tag is greater than the release urgency corresponding to the time point release tag.
[0182] Optionally, the preset publishing rules also include: manually triggered publishing rules.
[0183] Optionally, the matching module 43 is also used to: if the test submission form does not match the priority release rule, the demand release rule and the time point release rule, then determine that the test submission form matches the manually triggered release, and determine that the release tag corresponding to the test submission form is a manually triggered release tag; the release urgency corresponding to the manually triggered release tag is greater than the priority release tag.
[0184] Optionally, the device for publishing a software testing environment further includes: a judgment module, a publishing module, and a notification sending and receiving module.
[0185] Optionally, the judgment module is used to judge whether manual operation is required based on relevant information in the task to be executed; the publishing module is used to publish the task to be executed in response to determining that no manual operation is required, so that the smoke test device performs a smoke test on the successfully published task to be executed.
[0186] Optionally, the notification receiving and sending module is used to send smoke test success notification information to the test device in response to receiving smoke test success information sent by the smoke test device.
[0187] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: a processor 51 and a memory 52 communicatively connected to the processor.
[0188] The memory 52 stores computer-executable instructions; the processor 51 executes the computer-executable instructions stored in the memory 52 to implement the method for publishing a software testing environment provided in any one of the above embodiments.
[0189] The program may include program codes, and the program codes include computer-executable instructions. The memory 52 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0190] In this embodiment, the memory 52 is connected to the processor 51 via a bus 53. The bus 53 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus 53 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The fact that only one straight line is used in the diagram does not mean that there is only one bus or only one type of bus.
[0191] An embodiment of the present application also provides a computer-readable storage medium, including a computer-readable storage medium storing computer execution instructions, which, when executed by a processor, are used to implement the method for publishing a software testing environment provided in any of the above embodiments.
[0192] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0193] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0194] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0195] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0196] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.
[0197] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0198] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0199] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0200] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for publishing a software testing environment, characterized in that: include: Get the initial code information submitted to the code repository; The initial code information is screened based on a preset screening rule to obtain target code information, and a test submission form is generated based on the target code information; Match the test submission form with a preset publishing rule to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on the at least one publishing tag, and perform a confirmation trigger operation on the to-be-published tasks corresponding to the test submission form according to the publishing order; In response to receiving a confirmation trigger of the to-be-issued task input by the test user through an input device, a to-be-executed task is generated.
2. The method according to claim 1, characterized in that The obtaining of the initial code information submitted to the code repository includes: Performing code monitoring on the code repository; In response to monitoring that the initial code information is submitted to the code repository, receiving a code submission monitoring request sent by the code repository; In response to receiving the code submission monitoring request, initial code information submitted to the code repository is obtained.
3. The method according to claim 1, characterized in that: The screening process of the initial code information based on the preset screening rule to obtain the target code information includes: Screening out the initial code information having the required information number from the initial code information as the primary screening code information; The preliminary screening code information having a test request identification is screened out from the preliminary screening code information as the target code information.
4. The method according to claim 3, characterized in that Also includes: When the preliminary screening code information is screened out, the corresponding requirement status is set to the status of code submission; When the target code information is screened out, the corresponding demand status is set to the status of the test order to be generated; When a test request form is generated based on the target code information, the corresponding requirement status is set to the test requested status.
5. The method according to claim 1, characterized in that The step of generating a test request form based on the target code information includes: Adding the test information to the target code information through the input device; The test submission form is generated based on the target code information after adding the test submission information.
6. The method according to claim 1, characterized in that The preset publishing rules include: publishing rules according to time points, publishing rules according to needs, and publishing rules according to priorities; The step of matching the test submission form with a preset publishing rule to determine at least one publishing tag corresponding to the test submission form includes: Based on the test request information in the test request form, the test request form is matched with the release rule according to the time point, the release rule according to the demand, and the release rule according to the priority in sequence; In response to the test request form successfully matching at least one release rule, generating at least one corresponding release tag; The at least one release tag includes at least one of the following: a priority release tag, a demand release tag, or a time point release tag: The release urgency corresponding to the priority release tag is greater than the release urgency corresponding to the demand release tag, and the release urgency corresponding to the demand release tag is greater than the release urgency corresponding to the time point release tag.
7. The method according to claim 6, characterized in that The preset publishing rules also include: manually triggering publishing rules; the method also includes: If the test submission form does not match the priority release rule, the demand release rule, and the time point release rule, it is determined that the test submission form matches the manual trigger release, and the release tag corresponding to the test submission form is determined to be a manual trigger release tag; The release urgency corresponding to the manually triggered release tag is greater than the priority release tag.
8. The method according to any one of claims 1 to 7, characterized in that: Also includes: Based on the relevant information in the task to be performed, determining whether manual operation is required; In response to determining that no manual operation is required, the task to be executed is published, so that the smoke test device performs a smoke test on the successfully published task to be executed.
9. The method according to claim 8, characterized in that Also includes: In response to receiving the smoke test success information sent by the smoke test device, smoke test success notification information is sent to the test device.
10. A device for publishing a software testing environment, characterized in that: include: The acquisition module is used to obtain the initial code information submitted to the code repository; A generating module, configured to screen the initial code information based on a preset screening rule to obtain target code information, and to generate a test submission form based on the target code information; A matching module is used to match the test submission form with a preset publishing rule to determine at least one publishing tag corresponding to the test submission form, so that the test user can determine the publishing order of the test submission form based on the at least one publishing tag, and perform a confirmation trigger operation on the to-be-published tasks corresponding to the test submission form according to the publishing order; The confirmation module is used to generate a task to be executed in response to receiving a confirmation trigger of the task to be issued input by the test user through an input device.
11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.
Citation Information
Cited By
Code repository configuration method, code task processing method and code test method
WO2026194608A1
