CN116775491A - Project testing method and device, electronic equipment and storage medium - Google Patents

Project testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116775491A
CN116775491A CN202310763008.2A CN202310763008A CN116775491A CN 116775491 A CN116775491 A CN 116775491A CN 202310763008 A CN202310763008 A CN 202310763008A CN 116775491 A CN116775491 A CN 116775491A
Authority
CN
China
Prior art keywords
test
task
deployment
requirement
branch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310763008.2A
Other languages
Chinese (zh)
Inventor
杨雪超
朱莎莎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qianshengli Information Technology Shanghai Co ltd
Original Assignee
Qianshengli Information Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qianshengli Information Technology Shanghai Co ltd filed Critical Qianshengli Information Technology Shanghai Co ltd
Priority to CN202310763008.2A priority Critical patent/CN116775491A/en
Publication of CN116775491A publication Critical patent/CN116775491A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a project testing method, a project testing device, electronic equipment and a storage medium; the method comprises the following steps: detecting a requirement identifier of the project; acquiring at least one lifting branch corresponding to the requirement identifier; and acquiring at least one deployment task according to the at least one lifting branch, and generating at least one test task, wherein the deployment task comprises task information and a test environment. Therefore, through the requirement identification of the project, the basic information of the test task related to the requirement identification can be acquired, including a test branch, task information, a test environment and the like, compared with the scheme of manually notifying the test personnel of the basic information of the test task, the condition that the test task is missed due to the acquisition of the test task is avoided, the basic information of the test task is visualized, the process of manual notification is avoided, and the test efficiency is improved.

Description

Project testing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a project testing method, a device, an electronic apparatus, and a storage medium.
Background
At present, many projects belong to front-end and back-end separated systems, and comprise hundreds of subsystems, so that in order to ensure stable on-line quality, each system needs to be tested to be released to a production environment. And in the test process, a plurality of links such as requirement submission, submission test, test task generation, deployment test environment and the like are required, and a plurality of platforms are involved. The existing test scheme is that a plurality of link progress is notified in a manual mode, a tester switches in different platforms to complete a plurality of links of the test, but the test mode has scattered tools and more human participation processes, so that the test efficiency is relatively low, meanwhile, the subjectivity of the test process is high, and the problems of state handover errors, false detection, missed detection and the like are easily caused, so that the test result is influenced.
Disclosure of Invention
The embodiment of the application provides a project testing method and device, electronic equipment and a storage medium.
According to a first aspect of the present application, there is provided a project testing method comprising: detecting a requirement identifier of the project; acquiring at least one lifting branch corresponding to the requirement identifier; and acquiring at least one deployment task according to the at least one lifting branch, and generating at least one test task, wherein the deployment task comprises task information and a test environment.
According to an embodiment of the present application, the detecting the requirement identifier of the item includes: detecting a demand state of a demand corresponding to the project identifier through a project management platform according to the project identifier, wherein the demand state comprises a tested state and an unrevealed state; and under the condition that the demand state is the proposed demand state, acquiring the demand identification.
According to an embodiment of the present application, the acquiring at least one test branch corresponding to the requirement identifier includes: according to the requirement identification, at least one branch submission record related to the requirement identification is obtained through a code management platform, wherein the branch submission record comprises the requirement identification, developer information, tester information, code item identification and code item name; at least one test branch corresponding to the requirement identification is obtained from the code submission record.
According to an embodiment of the present application, according to the at least one test branch, at least one deployment task is acquired, and at least one test task is generated, including: acquiring at least one code item identifier corresponding to the at least one test branch from the at least one branch submission record; according to the at least one code item identifier, at least one deployment task corresponding to the at least one code item identifier is obtained from a deployment platform, and the deployment task comprises task information and a test environment; generating at least one test task according to the requirement identification, the at least one lifting branch corresponding to the requirement identification, the at least one code item identification corresponding to the at least one lifting branch and the at least one deployment task.
According to one embodiment of the application, the test task is displayed so that a tester can test the test task.
According to one embodiment of the application, a test task deployment instruction sent by a tester is received, the deployment instruction carries deployment information, and the deployment information comprises a deployment task, a test environment corresponding to the deployment task, a test lifting branch and a code item identifier; based on the deployment instruction, the deployment information is sent to a deployment platform, so that the deployment platform builds a test task according to the deployment information.
According to an embodiment of the application, the method further comprises: under the condition that the task construction is successful, acquiring the test progress of the test task; and under the condition that the test progress shows that the test of the test task is completed, issuing the requirement.
According to a second aspect of the present application, there is provided an item testing apparatus, the apparatus comprising: the detection module is used for detecting the requirement identification of the project; the acquisition module is used for acquiring at least one lifting branch corresponding to the requirement identifier; the generating module is used for acquiring deployment tasks according to the at least one lifting branch and generating test tasks, wherein the deployment tasks comprise task information and test environments.
According to a third aspect of the present application, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods of the present application.
According to a fourth aspect of the present application there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the present application.
According to the method, a requirement identifier of a project is detected, at least one lifting branch corresponding to the requirement identifier is obtained, a deployment task is obtained according to the at least one lifting branch, and a test task is generated, wherein the deployment task comprises task information and a test environment. Therefore, through the requirement identification of the detected project, basic information such as the test branch, task information and test environment of the test task related to the requirement identification is obtained, compared with the scheme that the existing test personnel switches on each platform to obtain the basic information of the test task, the situation that the test task is missed and the like is effectively avoided, and after the test task is generated, the test personnel can directly use the test task to conduct environmental deployment, test and the like, the process of manually notifying the test personnel is avoided, and the test efficiency is remarkably improved.
It should be understood that the teachings of the present application need not achieve all of the benefits set forth above, but rather that certain technical solutions may achieve certain technical effects, and that other embodiments of the present application may also achieve benefits not set forth above.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Fig. 1 shows an application scenario schematic diagram of an item testing method provided by an embodiment of the present application.
Fig. 2 is a schematic diagram of an implementation flow of a project test method according to an embodiment of the present application;
fig. 3 is a schematic implementation flow diagram of a branch acquisition operation of an item testing method according to an embodiment of the present application;
fig. 4 is a schematic implementation flow diagram of a test task generating operation of the project test method according to the embodiment of the present application;
fig. 5 is a schematic implementation flow diagram of a specific application example of the project test method according to the embodiment of the present application;
Fig. 6 is a schematic implementation flow diagram of a demand monitoring method of the project test method according to the embodiment of the present application;
fig. 7 is a schematic implementation flow diagram of a test task information acquisition method of the project test method according to the embodiment of the present application;
fig. 8 is a schematic implementation flow diagram of a test task deployment method of the project test method according to the embodiment of the present application;
fig. 9 is a schematic implementation flow diagram of a test task test progress acquisition method of the project test method according to the embodiment of the present application;
fig. 10 shows a schematic structural diagram of an item testing device according to an embodiment of the present application;
fig. 11 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions according to the embodiments of the present application will be clearly described in the following with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The technical scheme of the application is further elaborated below with reference to the drawings and specific embodiments.
Fig. 1 shows an application scenario schematic diagram of an item testing method provided by an embodiment of the present application.
Referring to fig. 1, the project management method of the embodiment of the application is applied to a test system, and the test system is connected with a project management platform, a code management platform and a deployment platform through interfaces. The test system can monitor a project management platform and a code management platform through an interface, the project management platform is used for managing input and output of requirements, state change, circulation, distribution and the like in the life cycle of the requirements, the code management platform is used as a code warehouse to take charge of code hosting, authority management (management according to different levels of projects, code libraries, personnel and related requirements) and the like. The method and the system have the advantages that relevant information, such as codes, requirement identifiers and the like, for generating test tasks in the code management platform and the project management platform can be obtained through the test system, the deployment tasks can be further obtained through the deployment platform, further deployment and testing of the tasks can be completed based on the test system, and the deployment state and the testing progress can be checked.
Furthermore, the project test system of the embodiment of the application can be deployed on a PC, and can also be deployed on a tablet computer, a portable computer and other movable terminal equipment.
Fig. 2 shows a schematic implementation flow chart of the project test method according to the embodiment of the application.
Referring to fig. 2, an embodiment of the present application provides a project testing method, which includes: operation 101, detecting a requirement identifier of an item; operation 102, obtaining at least one lifting branch corresponding to a requirement identifier; operation 103, obtaining at least one deployment task according to at least one test branch, and generating at least one test task, wherein the deployment task comprises task information and a test environment.
In operation 101, a requirement identification of an item is detected.
Specifically, each item corresponds to a plurality of requirements, and each requirement represents a function. Here, the project manager may create a plurality of requirements corresponding to the project in the project management platform in advance, perform a review on the plurality of requirements after the creation, and assign the requirements to the corresponding developers after the review passes. Each requirement corresponds to various basic attributes such as an item identifier of an item where the requirement is located, a requirement identifier of the requirement, a requirement state and the like, wherein the requirement state can comprise a research and development state, a test state, a release state and the like, and the basic attributes are mutually associated through the requirement identifiers.
Further, the project management platform can be a TAPD (Tencent Agile Product Development, product research and development platform), which is a collaboration and software research and development management platform, provides one-stop service throughout the agile research and development lifecycle, covers the whole product research and development lifecycle from product concept formation, product planning, demand analysis, project planning and tracking, quality testing, construction and release, and user feedback tracking, provides flexible customizable application and strong integration capability, helps research and development teams to effectively manage demands, resources, progress and quality, standardizes and improves the product research and development process, and improves research and development efficiency and product quality.
After the requirements are distributed to the corresponding developers, the developers can develop the codes based on the requirements, submit the codes to the code management platform, and then the developers correspondingly submit the requirement related information in the process of submitting the codes to the code management platform, and bind the requirement related information with the related codes, so that a code submitting record is generated. The requirement related information is automatically generated by the project management platform when the project management platform inputs the requirement, a developer only needs to copy the requirement related information to the code management platform in the process of submitting the code, and the requirement related information can comprise a requirement identifier, a developer responsible for the requirement and a requirement name.
The code management platform can be GitLab, an open source project for a warehouse management system, and a Web service which uses Git as a code management tool and is built on the basis. The Gitlab is a widely used open source code management platform based on the git, is constructed based on Ruby on Rails, and mainly manages codes and documents generated in a software development process, wherein the Gitlab mainly manages codes and documents in two dimensions of group and project, the group is a group, the project is an engineering project, one group can manage a plurality of projects, the project can be understood as a group with a plurality of software development tasks, one project can contain a plurality of branches, the branches are independent of each other, and different branches can be merged.
After the developer submits the code to the code management platform, the requirement state of the requirement in the project management platform for inputting the requirement can be changed into the submitted requirement.
In one embodiment of the application, the requirement identification of an item is detected using the following operations: according to the project identification, detecting a demand state of a demand corresponding to the project identification through the project management platform, and acquiring the demand identification of the demand under the condition that the demand state is the proposed test.
Specifically, in the requirement input stage and the code submitting stage, through the OpenApi interface of the project management platform, the requirement states of a plurality of requirements of the project can be obtained in real time according to the project identification of the test project, and the requirement identification of the requirement can be obtained under the condition that the requirement states with the requirements are tested. Wherein the item identification of the item includes an initial identification of the item and an iterative identification of the item.
In operation 102, at least one proposed branch corresponding to a requirement identity is acquired.
Specifically, referring to the description of code submission performed by the developer in operation 101, each code represents one lifting branch, and when the lifting branches are submitted, each lifting branch corresponds to lifting branch information corresponding to the lifting branch, where the lifting branch information may be requirement related information of a requirement to which the current lifting branch belongs, including a requirement identifier and the like. In this way, under the condition that the requirement identification of the requirement is obtained, at least one lifting branch corresponding to the requirement identification is obtained according to the requirement identification. Because the requirement may include a plurality of code items, each code item is designed with one test branch, so that one requirement may have a plurality of test branches, where all test branches corresponding to the requirement are obtained.
By way of example, taking a demand as a communication system, testing of the communication system may include testing of subsystems of the communication system, which may include multiple subsystems, such as a voice function subsystem, a text function subsystem, a network function subsystem, and the like. The testing of these subsystems is the required code items, each of which includes its own lifting branch. Because the requirement identification and the test branches are synchronously bound when the test branches of a plurality of code items are submitted, under the condition that the requirement identification is acquired, at least one test branch of at least one code item can be acquired through the requirement identification.
It should be noted that, the above description is only given by taking the requirement as an example of the system test, the present application is not limited to the project and the requirement, and the requirement may be any test project, such as application software or application system.
In operation 103, at least one deployment task is acquired according to the at least one test branch, and at least one test task is generated, wherein the deployment task comprises task information and a test environment.
Specifically, each test branch represents code used for testing one subsystem, and is used for constructing a virtualized subsystem so as to simulate the subsystem, so that the test tasks of each subsystem comprise a deployment task of the subsystem and the test branches, and the deployment task comprises task information and a test environment.
Further, for a plurality of code items required, deployment tasks are built in advance, each deployment task comprises task information and test environments for the code items, and the task information can comprise deployment machine information, deployment time information, deployment priority information and the like. Thus, after at least one test branch is acquired, deployment tasks corresponding to the plurality of test branches are acquired, and at least one test task for a plurality of code items is obtained. Each test task comprises a corresponding requirement identifier, a code item name, a test branch, task information and a plurality of test environments.
Therefore, the embodiment of the application can automatically acquire the requirement identification of the requirement under the condition that the requirement is tested, further acquire a plurality of test lifting branches related to the requirement, acquire the deployment tasks of the plurality of test lifting branches, and automatically generate a plurality of test tasks aiming at the requirement by monitoring the requirement state of the requirement of the project management platform in real time, thereby improving the generation efficiency of the test tasks, improving the test efficiency, avoiding the condition of missing test and wrong test of the test tasks compared with the existing method of realizing the requirement state of the requirement and the acquisition mode of each information by a manual notification mode.
Fig. 3 is a schematic implementation flow chart of a branch acquisition operation of the project test method according to the embodiment of the present application.
Referring to fig. 3, in an embodiment of the present application, the step 102 of obtaining at least one lifting branch corresponding to the requirement identifier includes: operation 201, according to a requirement identifier, acquiring at least one branch submission record related to the requirement identifier through a code management platform, wherein the branch submission record comprises the requirement identifier, developer information, tester information, a code item identifier and a code item name; operation 202 obtains at least one proposed branch corresponding to a requirement identity from at least one branch commit record.
In operation 201, at least one branch commit record associated with a demand identification is obtained by a code management platform according to the demand identification, the branch commit record including the demand identification, developer information, tester information, code item identification, and code item name.
Specifically, referring to the description of operation 102 above, after the developer takes his own responsible requirements, the developer develops the code for the requirements and submits the code to the code management platform, where the code represents the test branch of the present application. And uploading a lifting branch by a developer, and uploading branch related information of the lifting branch at the same time, wherein the branch related information comprises a requirement identifier of a requirement to which the lifting branch belongs, and the corresponding developer information, tester information, code item identifier, code item name and other branch related information of the lifting branch are used for associating submitted codes with the requirement identifier.
For example, taking the code management platform as the GitLab and the project management platform as the TAPD as an example, under the condition that the requirements are submitted to the TAPD, the TAPD generates a key word for each requirement, and the key word includes a requirement identifier, a test URL address and developer information. When a developer submits the test branch of the requirement to the GitLab, the GitLab displays a comment box aiming at the test branch, the developer copies the key code word in and annotates the code item identifier, the code item name and the like corresponding to the current test branch, and a branch submission record aiming at the test branch is generated after the operation is finished.
Further, when a test is required for a certain requirement, at least one branch submission record related to the requirement identifier can be obtained from the code management platform according to the requirement identifier of the requirement.
In operation 202, at least one proposed branch corresponding to a requirement identity is obtained from at least one branch commit record.
Specifically, from the obtained branch submitting records, extracting the extracting branches to obtain at least one extracting branch corresponding to the requirement identifier.
Therefore, the embodiment of the application can directly acquire the lifting branch from the code management platform through the requirement identification, and the lifting branch is more accurately acquired under the condition that manual acquisition is not needed any more.
Fig. 4 is a schematic implementation flow chart of a test task generating operation of the project test method according to the embodiment of the present application.
Referring to fig. 4, in an embodiment of the present application, the step 103 of obtaining at least one deployment task according to at least one test branch to generate at least one test task includes: operation 301 obtaining at least one code item identification corresponding to at least one proposed branch from at least one branch commit record; operation 302, according to at least one code item identifier, obtaining at least one deployment task corresponding to the at least one code item identifier from a deployment platform, wherein the deployment task comprises task information and a test environment; operation 303, generating at least one test task according to the requirement identifier, at least one test branch corresponding to the requirement identifier, at least one code item identifier corresponding to the at least one test branch, and at least one deployment task.
In operation 301, at least one code item identification corresponding to at least one promotion branch is obtained from a code submission record.
Specifically, there is at least one code item for each requirement, each code item including a code item identification and a code item name of the code. With reference to the description above for operation 201, the branch commit record for each test branch includes the code item identifier corresponding to the test branch. Thus, the code item identifier corresponding to each test branch can be obtained from at least one branch submission record.
In operation 302, at least one deployment task corresponding to at least one project identification is obtained from a deployment platform, the deployment task including task information and a test environment.
Specifically, for a plurality of code items in a plurality of requirements of each item, a plurality of deployment tasks are built in advance on a deployment platform, and for the plurality of built deployment tasks, association relations between the plurality of deployment tasks and the corresponding code items are associated, wherein the association can be performed through code item identification, association can also be performed through code item names, or the code item identification and the code item names are simultaneously associated with the corresponding deployment tasks. The deployment task comprises task information and a test environment, wherein the task information can be information such as a deployed machine, deployment time or deployment priority.
In the case that at least one code item identification is acquired, at least one deployment task corresponding to the at least one code item identification may be acquired from the deployment platform through the code item identification. Wherein each deployment task includes one task information and a plurality of available test environments.
The deployment platform can be Jenkins, jenkins is an open source software project, is a continuous integration tool based on Java development, is used for monitoring continuous repeated work, and aims to provide an open and easy-to-use software platform, so that the software project can be continuously integrated.
In operation 303, at least one test task is generated based on the demand identification, at least one promotion branch corresponding to the demand identification, at least one code item identification corresponding to the at least one promotion branch, and at least one deployment task.
Specifically, each test task is composed of a requirement identifier, a test lifting branch, a project name corresponding to the test lifting branch and a deployment task, wherein the deployment task comprises task information and a test environment. For multiple test branches, multiple test tasks may be generated. The deployment task of each test branch comprises a plurality of test environments for deployment selection.
Therefore, the embodiment of the application constructs the deployment task in advance on the deployment platform, and under the condition that the code item identification of the code item to be tested is obtained, the corresponding deployment task can be obtained from the deployment platform according to the code item identification, and a plurality of test tasks aiming at the requirements can be obtained according to relevant information such as the deployment task.
In one embodiment of the present application, after generating a plurality of test tasks, the test tasks may be displayed for a tester to select for deployment and testing.
In an embodiment of the present application, after generating the test task, deployment of the test task is further performed, including: receiving a test task deployment instruction sent by a tester, and sending deployment information to a deployment platform based on the deployment instruction, so that the deployment platform builds a test task according to the deployment information, wherein the deployment instruction carries the deployment information, and the deployment information comprises the deployment task, a test environment corresponding to the deployment task, a test lifting branch and a code item identifier;
Specifically, a tester can select deployment information of a test task according to a plurality of displayed test tasks, wherein the deployment information comprises the deployment task, a test environment corresponding to the deployment task, a test lifting branch and a code item identifier, after the tester selects, a deployment instruction sent by the tester is received, the deployment instruction carries the deployment information selected by the tester, the deployment information enters a deployment platform in a mode of calling an API interface, and the deployment platform builds the test task according to the deployment information. The tester can send the deployment instruction by clicking a button and the like.
In an embodiment of the application, a task identifier for a test task is generated in the process of task construction of the deployment platform, and then the task state in the deployment platform can be checked in real time through the task identifier and the calling API, and the deployment of the test task can be canceled at any time. The task state comprises states of in-construction, success, failure, cancellation and the like.
Therefore, the embodiment of the application can be directly based on the deployment instruction of the tester, and the deployment platform is automatically invoked to deploy the task, so that the situation that the tester continuously switches the platform to deploy the task is avoided, the deployment efficiency of the task is improved, and the test efficiency is improved.
In an embodiment of the application, under the condition that the task deployment is completed, the test progress of the test task is also obtained, and under the condition that the test progress of the test task shows that the task test is completed, the requirement is issued.
Specifically, under the condition that the deployment of the test task is successful, the task state becomes successful, and the test work can be performed after the success, and in the process of the test, the test progress of the test task can be obtained according to the code item identification of the test task and the test environment.
Further, the coverage rate can be used for representing the test progress of the test task, so that the coverage rate of the test task can be obtained in real time through a coverage rate obtaining tool and the like according to the code item identification and the test environment of the test task in the test process. Under the condition that the coverage rate is 100%, the test is proved to be finished, and the requirement can be issued at the moment, so that the test state of the current test task is converted into the issued state, and the test task is ended.
It should be noted that, for the test flow after the task deployment, including the operations of testing, checking the test progress, etc., reference may be made to the task testing method in the conventional project testing process, which is not described herein again.
Therefore, the embodiment of the application can acquire the basic information of the test task related to the requirement identifier through the requirement identifier of the project, including the test branch, the task information, the test environment and the like, compared with the scheme that the existing test personnel switches on each platform to acquire the basic information of the test task, the situation that the test task is missed and the like to cause test errors is avoided, after the test task is generated, the test personnel can directly use the test task to perform task deployment, test and the like, the process of manually notifying the test personnel is avoided, and the test efficiency is improved.
For further understanding of the present application, a specific example of an embodiment of the present application will be described below.
Fig. 5 is a schematic implementation flow diagram of a specific application example of the project test method according to the embodiment of the present application.
The specific application example of the present application is implemented based on the test system shown in fig. 1, the test system can provide services for users in the form of web pages or application systems, the test system provides task interfaces that can be operated and checked by users, the test system includes a monitoring module, a task analysis module, a task module and a deployment module, a project management platform, a code management platform and a deployment platform connected with the test system are respectively TAPD, GITLAB and JENKINS, and referring to fig. 5, the specific application example project test method in the embodiment of the present application includes: the monitoring module monitors the state of TAPD requirement, and determines whether a test task corresponding to the requirement exists or not under the condition that the state is tested, and calls the task analysis module under the condition that the test task does not exist; the task analysis module responds to the call to acquire a branch name and call the task module so that the task module acquires a deployment task, creates a test task and calls the deployment module; the deployment module responds to the call and deploys the test task.
It should be noted that the above operations will be described in detail in fig. 6-8, specifically, "the monitoring module monitors the status of the TAPD requirement, determines whether the test task corresponding to the requirement exists in the case that the status is already tested, and invokes the task analysis module" operations will be described in detail in fig. 6 in the case that the test task does not exist, "the task analysis module responds to the invocation, obtains the branch name, invokes the task module so that the task module obtains the deployment task, creates the test task, and invokes the deployment module" operations will be described in detail in fig. 7, and "the deployment module responds to the invocation, deploys the test task" will be described in detail in fig. 8, which is not repeated herein.
Fig. 6 is a schematic implementation flow diagram of a method for monitoring requirements of an item testing method according to an embodiment of the present application.
Referring to fig. 6, fig. 6 is a detailed description of the operation of the monitoring module to monitor the status of the tadd requirement, determine whether a test task corresponding to the requirement exists in the case that the status is already proposed, and call the task analysis module in the case that the test task does not exist, as described in fig. 5.
Specifically, the TAPD receives the demand and judges the demand state of the demand, wherein the demand state comprises to-be-reviewed, in-development, lifted and the like, specifically, the TAPD converts the demand state into to-be-reviewed under the condition of receiving the demand created by a product manager, after the demand is reviewed, the demand state is converted into in-development, and after the code corresponding to the demand is submitted, the demand state is converted into lifted. The monitoring module in fig. 5 can monitor the TAPD in real time to obtain the demand state of the demand, and display the demand state on the task page for the test personnel or other related personnel to check.
Further, the monitoring module monitors the state change of the requirement through an OpenApi interface of the TAPD according to the iteration ID of the item or the item ID of the requirement, so as to obtain the requirement that the state is in the submitting test or the test and is not recorded in the task module during the current iteration of the corresponding item, wherein the monitoring module inquires whether the requirement is recorded in the task module according to the ID of the requirement.
Fig. 7 is a schematic implementation flow diagram of a test task information acquisition method of the project test method according to the embodiment of the present application.
Referring to fig. 7, fig. 7 describes in detail the task analysis module, described above with respect to fig. 5, that is, the task analysis module obtains the branch name in response to the call, and invokes the task module, so that the task module obtains the deployment task, creates the test task, and invokes the deployment module.
Specifically, the GITLAB receives the code associated with the demand and generates a code commit record, such as: and after submitting the code related to the requirement in the GITLAB, clicking and copying the source code keyword on the requirement page of the TAPD, copying the source code keyword into the comment of the submitted code, and generating a code submitted record by the GITLAB, wherein the keyword content can be a requirement name, a requirement ID and a developer, and the requirement name comprises a test URL address.
Further, when the monitoring module finds that the requirement is proposed and the monitoring module determines that the task module does not record the requirement, the ID, the project ID and the project name of the requirement are obtained, and the task analysis module is invoked. The task analysis module queries code submitting records of items corresponding to requirements through OpenAPi of the GITLAB on the basis of the requirement ID, compares the requirement ID obtained by the monitoring module with the requirement ID of the code submitting records, and obtains the branch names. Meanwhile, the task analysis module calls the task module so that the task module queries a corresponding deployment Jenkins task in the deployment module according to the project ID, and a plurality of returned tasks are provided to generate a task record. The task module generates a test task according to the information acquired by the task analysis module, and displays the test task on a task page for a tester to select the required test task for deployment.
Fig. 8 is a schematic implementation flow diagram of a test task deployment method of the project test method according to the embodiment of the present application.
Referring to fig. 8, fig. 8 is a detailed description of the "deploy module to test task deployment in response to call" operation described above in fig. 5.
Specifically, receiving an operation of a tester for deployment, wherein the operation of the tester for deployment comprises: in a task page, a tester performs deployment, firstly selects a deployment task, establishes a deployment task to be selected to Jenkins if the deployment task does not exist, and adds the relationship between the deployment task and a corresponding project; under the condition that the deployment task is acquired, a tester selects a testing environment and deploys by clicking a deployment button provided by a task page.
Further, an API call interface is created between the deployment module and Jenkins, and the deployment module receives a deployment instruction, for example: the user clicks the deployment through the task page, the deployment module can receive the deployment instruction, call Jenkins, under the condition that Jenkins are called, firstly create a construction test task, return the task ID of the construction test task to the task page, put the test task into a queue, and wait for the completion of the deployment of the test task in construction if other test tasks in construction exist in the queue. In the case of performing deployment of a test task, the test task is in a queue, and the test task state becomes in construction. The construction condition of the test task in the Jenkins can be checked according to the returned task ID, the checking mainly comprises checking of the task state, the task state in the Jenkins is checked by calling a Jenkins task state query API, the task state comprises in-construction, success, failure and cancellation, and whether the test task is deployed successfully or not can be checked by checking the task state.
After the test task is built, jenkins finishes the service and waits for the next test task to be built. In the deployment process, when a deployment cancellation instruction of a tester is received, deployment can be cancelled at any time, for example: and under the condition that the tester cancels deployment through clicking the task page, receiving a deployment cancellation instruction.
Therefore, the embodiment of the application combines the open platform technology provided by TAPD, GITLAB, JENKIS and other platforms, can complete the information acquisition, automatic generation and deployment of the test task on one system, solves the problems of information dispersion and tool dispersion, and improves the deployment efficiency of the test task.
In this specific application example of the embodiment of the present application, after deployment is completed, the coverage rate is also monitored by the coverage rate client to obtain the test progress.
Specifically, referring to fig. 9, fig. 9 shows a schematic implementation flow diagram of a test task test progress acquisition method of an item test method according to an embodiment of the present application, after receiving a deployment click of a tester, a deployment module deploys a tested system, after deploying the tested system, starts the tested system to test, and in the test process, a coverage rate client collects coverage rates, pushes the coverage rates, provides coverage rate services, includes storage and update, and saves the coverage rates to a database according to a branch name and a test environment corresponding to the tested system.
Furthermore, according to the branch name and the test environment of the current test, the coverage rate condition can be obtained through a coverage rate button of the task display interface, and the test progress can be known. Under the condition that the coverage rate is 100%, the test task is tested and completed, and the release requirement operation clicked by the tester is received at the moment, for example: and under the condition that the tester clicks the release requirement button, receiving release requirement operation clicked by the tester, converting the requirement into a released state, and ending the current test task.
Therefore, in the specific application example of the embodiment of the application, in the process of testing the test task, the test task can be checked, compared with the prior art that the test condition is judged by judging the coverage rate through experience, the condition that the test progress is judged to be wrong is avoided, and the test progress judging accuracy rate is improved.
Fig. 10 shows a schematic structural diagram of an item testing device according to an embodiment of the present application.
Based on the project testing method, the application also provides a project testing device, the device 40 comprises: the detection module 401 is configured to detect a requirement identifier of an item; an obtaining module 402, configured to obtain at least one lifting branch corresponding to a requirement identifier; the generating module 403 is configured to obtain at least one deployment task according to at least one test branch, and generate at least one test task, where the deployment task includes task information and a test environment.
The detection module 401 includes: the monitoring sub-module is used for detecting the demand state of the demand corresponding to the project identifier through the project management platform according to the project identifier, wherein the demand state comprises the tested state and the non-tested state; the first obtaining sub-module obtains a requirement identifier of the requirement under the condition that the requirement state is the proposed requirement.
The acquisition module 402 includes: the second acquisition sub-module is used for acquiring at least one branch submission record corresponding to the requirement identifier through the code management platform according to the requirement identifier, wherein the branch submission record comprises the requirement identifier, developer information, tester information, code item identifier and code item name; and the third acquisition sub-module is used for acquiring at least one test branch corresponding to the requirement identifier from the branch submission record.
The generation module 403 includes: a fourth obtaining sub-module, configured to obtain at least one code item identifier corresponding to at least one test branch from at least one branch submission record; a fifth obtaining sub-module, configured to obtain, according to the at least one code item identifier, at least one deployment task corresponding to the at least one code item identifier from the deployment platform, where the deployment task includes task information and a test environment; the task module is used for generating at least one test task according to the requirement identification, at least one lifting branch corresponding to the requirement identification, at least one code item identification corresponding to the at least one lifting branch and at least one deployment task.
The apparatus 40 further includes a task presentation module for presenting at least one test task for a tester to test the at least one test task.
The apparatus 40 further comprises: the receiving module is used for receiving a test task deployment instruction sent by a tester, wherein the deployment instruction carries deployment information, and the deployment information comprises a deployment task, a test environment corresponding to the deployment task, a test lifting branch and a code item identifier; the sending module is used for sending the deployment information to the deployment platform based on the deployment instruction so that the deployment platform can construct the test task according to the deployment information.
The apparatus 40 further comprises: the progress acquisition module is used for acquiring the test progress of the task under the condition that the test task is successfully constructed; and the demand release module is used for releasing the demand under the condition that the test progress displays the completion of the test task test.
It should be noted that, the description of the apparatus according to the embodiment of the present application is similar to the description of the embodiment of the method described above, and has similar beneficial effects as the embodiment of the method, so that a detailed description is omitted. The technical details of the project test apparatus provided in the embodiment of the present application may be understood from the description of any one of fig. 1 to 9.
According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.
FIG. 11 shows a schematic block diagram of an example electronic device 50 that may be used to implement an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 11, the electronic device 50 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Various components in the electronic device 50 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as project test methods. For example, in some embodiments, the item testing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 50 via the ROM 502 and/or the communication unit 509. When a computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the project test method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the project test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution disclosed in the present application can be achieved, and are not limited herein.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of testing items, the method comprising:
detecting a requirement identifier of the project;
acquiring at least one lifting branch corresponding to the requirement identifier;
and acquiring at least one deployment task according to the at least one lifting branch, and generating at least one test task, wherein the deployment task comprises task information and a test environment.
2. The method of claim 1, wherein detecting the demand identification of an item comprises:
Detecting a demand state of a demand corresponding to the project identifier through a project management platform according to the project identifier, wherein the demand state comprises a tested state and an unrevealed state;
and under the condition that the requirement state is the proposed requirement, acquiring a requirement identifier of the requirement.
3. The method of claim 2, wherein the acquiring at least one lifting branch corresponding to the requirement identity comprises:
according to the requirement identification, at least one branch submission record corresponding to the requirement identification is obtained through a code management platform, wherein the branch submission record comprises the requirement identification, developer information, tester information, code item identification and code item name;
and acquiring at least one test branch corresponding to the requirement identifier from the branch submission record.
4. A method according to claim 3, wherein said obtaining at least one deployment task from said at least one test branch, generating at least one test task, comprises:
acquiring at least one code item identifier corresponding to the at least one test branch from the at least one branch submission record;
according to the at least one code item identifier, at least one deployment task corresponding to the at least one code item identifier is obtained from a deployment platform, and the deployment task comprises task information and a test environment;
Generating at least one test task according to the requirement identification, the at least one lifting branch corresponding to the requirement identification, the at least one code item identification corresponding to the at least one lifting branch and the at least one deployment task.
5. The method according to claim 2, wherein the method further comprises:
and displaying the at least one test task so that a tester can test the at least one test task.
6. The method of claim 5, wherein the method further comprises:
receiving a test task deployment instruction sent by a tester, wherein the deployment instruction carries deployment information, and the deployment information comprises a deployment task, a test environment corresponding to the deployment task, a test lifting branch and a code item identifier;
based on the deployment instruction, the deployment information is sent to a deployment platform, so that the deployment platform builds a test task according to the deployment information.
7. The method of claim 6, wherein the method further comprises:
under the condition that the test task is successfully constructed, acquiring the test progress of the test task;
and under the condition that the test progress shows that the test of the test task is completed, issuing the requirement.
8. An item testing device, the device comprising:
the detection module is used for detecting the requirement identification of the project;
the acquisition module is used for acquiring at least one lifting branch corresponding to the requirement identifier;
the generating module is used for acquiring at least one deployment task according to the at least one lifting branch and generating at least one test task, wherein the deployment task comprises task information and a test environment.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-7.
CN202310763008.2A 2023-06-26 2023-06-26 Project testing method and device, electronic equipment and storage medium Pending CN116775491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310763008.2A CN116775491A (en) 2023-06-26 2023-06-26 Project testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310763008.2A CN116775491A (en) 2023-06-26 2023-06-26 Project testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116775491A true CN116775491A (en) 2023-09-19

Family

ID=87991033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310763008.2A Pending CN116775491A (en) 2023-06-26 2023-06-26 Project testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116775491A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580216A (en) * 2018-06-08 2019-12-17 北京京东尚科信息技术有限公司 application extraction and detection method and device
CN111427795A (en) * 2020-04-10 2020-07-17 网易(杭州)网络有限公司 Code test control method and device, storage medium and electronic equipment
US10949331B1 (en) * 2020-01-30 2021-03-16 EMC IP Holding Company LLC Integration testing of web applications utilizing dynamically generated automation identifiers
CN114764391A (en) * 2021-01-15 2022-07-19 腾讯科技(深圳)有限公司 Code coverage testing method, server, system and computer readable storage medium
CN115454876A (en) * 2022-10-11 2022-12-09 平安银行股份有限公司 Management method for code test and related equipment
CN117407312A (en) * 2023-11-03 2024-01-16 北京自如信息科技有限公司 Application testing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580216A (en) * 2018-06-08 2019-12-17 北京京东尚科信息技术有限公司 application extraction and detection method and device
US10949331B1 (en) * 2020-01-30 2021-03-16 EMC IP Holding Company LLC Integration testing of web applications utilizing dynamically generated automation identifiers
CN111427795A (en) * 2020-04-10 2020-07-17 网易(杭州)网络有限公司 Code test control method and device, storage medium and electronic equipment
CN114764391A (en) * 2021-01-15 2022-07-19 腾讯科技(深圳)有限公司 Code coverage testing method, server, system and computer readable storage medium
CN115454876A (en) * 2022-10-11 2022-12-09 平安银行股份有限公司 Management method for code test and related equipment
CN117407312A (en) * 2023-11-03 2024-01-16 北京自如信息科技有限公司 Application testing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN111309343A (en) Development deployment method and device
CN114900379B (en) Message notification method and device, electronic equipment and storage medium
CN112306880A (en) Test method, test device, electronic equipment and computer readable storage medium
CN115016321A (en) Hardware-in-loop automatic testing method, device and system
CN113238943A (en) Method and device for continuous integration test
CN112650670A (en) Application testing method, device, system, electronic equipment and storage medium
CN115481030A (en) Automatic testing method, device, terminal and storage medium
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN110232018A (en) Interface test method, device, computer equipment
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN116775491A (en) Project testing method and device, electronic equipment and storage medium
CN112416791B (en) Defect information processing system and method for test object
CN115309558A (en) Resource scheduling management system, method, computer equipment and storage medium
CN114265737A (en) System migration integrity detection method and device and electronic equipment
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN112328473A (en) Code automation integration test method and device and electronic equipment
CN114546799A (en) Point burying log checking method and device, electronic equipment, storage medium and product
CN114116664A (en) Database table building statement processing method and device, computer equipment and storage medium
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN113011858A (en) Audit project configuration and execution method and device
CN109669871A (en) A method of realizing Oracle Form automatic test
CN111240981A (en) Interface testing method, system and platform
CN110866492A (en) Baseline branch identification method and device and computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination