CN112015654A - Method and apparatus for testing - Google Patents

Method and apparatus for testing Download PDF

Info

Publication number
CN112015654A
CN112015654A CN202010901522.4A CN202010901522A CN112015654A CN 112015654 A CN112015654 A CN 112015654A CN 202010901522 A CN202010901522 A CN 202010901522A CN 112015654 A CN112015654 A CN 112015654A
Authority
CN
China
Prior art keywords
test
node
flow
page
task
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
CN202010901522.4A
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010901522.4A priority Critical patent/CN112015654A/en
Publication of CN112015654A publication Critical patent/CN112015654A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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)
  • Debugging And Monitoring (AREA)

Abstract

Embodiments of the present disclosure disclose methods and apparatus for testing. One embodiment of the method comprises: in response to receiving an instruction requesting to create a test task, presenting a test task creation page, wherein the test task creation page is used for receiving a code base address and a test strategy of an object to be tested; in response to receiving an instruction for confirming to create a test task, constructing a test task, and determining an execution module of each test node in the test task; generating a test flow page based on the sequencing of each test node in the test task; associating the test flow page with the execution modules of the test nodes so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on a test flow page; responding to the triggering of the flow operation instruction, and sending the flow operation instruction to the corresponding execution module of the test node; and presenting a test flow page. The visual management and operation of the test flow are realized, and the test efficiency can be improved.

Description

Method and apparatus for testing
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to the field of software testing, and particularly relates to a method and a device for testing.
Background
With the development of the internet, various application software comes along with the development of the internet, and convenience is brought to users. However, before wide popularization and application, the accuracy, integrity, safety and quality of application software need to be comprehensively evaluated, so that software testing is an essential link.
In the related art, in the test flow of the java-based application program, different systems and platforms are required to be used by each test node, but the connection between the systems or platforms for executing the test nodes is not tight enough, so that the test flow is not consistent, the control and the quantification of the test flow are not facilitated, and the test efficiency is influenced.
Disclosure of Invention
Embodiments of the present disclosure propose methods and apparatuses for testing.
In a first aspect, an embodiment of the present disclosure provides a method for testing, the method including: in response to receiving an instruction requesting to create a test task, presenting a test task creation page, wherein the test task creation page is used for receiving a code base address and a test strategy of an object to be tested; in response to receiving an instruction for confirming establishment of a test task, constructing a test task based on the code base address of the object to be tested and the test strategy, and determining an execution module of each test node in the test task; generating a test flow page based on the sequencing of each test node in the test task, wherein the test flow page is used for presenting the test information and the flow operation instruction of each test node; associating the test flow page with the execution modules of the test nodes so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on a test flow page; responding to the triggering of the flow operation instruction, sending the flow operation instruction to the execution module of the corresponding test node, so that the execution module executes the flow operation instruction; and presenting a test flow page.
In some embodiments, the test flow page includes test node identifiers, and the test node identifiers correspond to the test nodes one to one; and presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identification.
In some embodiments, the test information includes a test progress and a test result of the test node corresponding to the test node identification.
In some embodiments, the method further comprises: and sending the test result of the current test node in response to the fact that the test progress of the current test node is determined to be completed.
In some embodiments, presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identifier includes: determining an executable flow operation instruction of the test node based on the test information of the test node; and determining the executable flow operation instruction as the flow operation instruction matched with the test node.
In some embodiments, the test policy includes a test task type; the method further comprises the following steps: if the test task type is manual test, the flow operation instruction comprises a flow change instruction, and the flow change instruction comprises skipping the current test node and repeatedly executing the historical test node; and responding to the triggering of the flow change instruction, sending the flow change instruction to the execution module of the test node pointed by the flow change instruction, so that the execution module executes the flow change instruction.
In some embodiments, the method further comprises: if the test task type is automatic test, presenting a test node parameter setting control and a test case association control on a test flow page, wherein the test node parameter setting control is used for receiving a passing threshold of each test node, and the test case association control is used for receiving a storage address of a test case associated with the test node; respectively sending the passing threshold value of each test node to an execution module of each test node; and respectively sending the storage addresses of the test cases to the execution modules of the test nodes associated with the test cases.
In some embodiments, the method further comprises: and sending a test report in response to determining that the test task is terminated or completed, wherein the test report comprises test information of each test node.
In a second aspect, embodiments of the present disclosure provide an apparatus for testing, the apparatus comprising: the task receiving unit is configured to respond to the received instruction of requesting to create the test task and present a test task creating page, and the test task creating page is used for receiving the code base address and the test strategy of the object to be tested; the task construction unit is configured to respond to the received instruction for confirming the establishment of the test task, construct the test task based on the code base address of the object to be tested and the test strategy, and determine an execution module of each test node in the test task; the page generation unit is configured to generate a test flow page based on the sequencing of the test nodes in the test task, and the test flow page is used for presenting the test information and the flow operation instruction of each test node; a page association unit configured to associate the test flow page with the execution module of each test node, so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on a test flow page; responding to the triggering of the flow operation instruction, sending the flow operation instruction to the execution module of the corresponding test node, so that the execution module executes the flow operation instruction; and the page presenting unit is configured to present the test flow page.
In some embodiments, the test flow page includes test node identifiers, and the test node identifiers correspond to the test nodes one to one; and the page generation unit is further configured to: and presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identification.
In some embodiments, the test information includes a test progress and a test result of the test node corresponding to the test node identification.
In some embodiments, the apparatus further comprises a test result sending unit configured to: and sending the test result of the current test node in response to the fact that the test progress of the current test node is determined to be completed.
In some embodiments, the page generation unit is further configured to: determining an executable flow operation instruction of the test node based on the test information of the test node; and determining the executable flow operation instruction as the flow operation instruction matched with the test node.
In some embodiments, the test policy includes a test task type; and the page generation unit further comprises a manual test module configured to: if the test task type is manual test, the flow operation instruction comprises a flow change instruction, and the flow change instruction comprises skipping the current test node and repeatedly executing the historical test node; and responding to the triggering of the flow change instruction, sending the flow change instruction to the execution module of the test node pointed by the flow change instruction, so that the execution module executes the flow change instruction.
In some embodiments, the page generation unit further comprises an automatic test module configured to: if the test task type is automatic test, presenting a test node parameter setting control and a test case association control on a test flow page, wherein the test node parameter setting control is used for receiving a passing threshold of each test node, and the test case association control is used for receiving a storage address of a test case associated with the test node; respectively sending the passing threshold value of each test node to an execution module of each test node; and respectively sending the storage addresses of the test cases to the execution modules of the test nodes associated with the test cases.
In some embodiments, the apparatus further comprises a report sending unit configured to: and sending a test report in response to determining that the test task is terminated or completed, wherein the test report comprises test information of each test node.
According to the method and the device for testing, the code base address and the testing strategy of the object to be tested are received through the presentation and test task creation page, then the testing task is constructed based on the code base address and the testing strategy of the object to be tested, the testing flow page corresponding to the testing task is generated, the testing information and the flow operation instructions of all the testing nodes can be presented on the testing flow page through associating the testing flow page with the execution modules of all the testing nodes, visual management and operation of the testing flow are achieved, and the simplification of testing flow management and improvement of testing efficiency are facilitated.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow diagram for one embodiment of a method for testing according to the present disclosure;
FIG. 3 is a schematic diagram of one scenario embodiment of a flow of the method for testing shown in FIG. 2;
FIG. 4 is a flow chart of yet another embodiment of a method for testing according to the present disclosure;
FIG. 5 is a schematic block diagram of one embodiment of an apparatus for testing according to the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 of a method for testing or an apparatus for testing to which embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Through the network 104, a user can perform data interaction between each terminal device 101, 102, 103 and the server 105, for example, each terminal device can obtain a code of an object to be tested from the server to execute one or more test nodes in a test task; the operation instruction for the test node sent by the test flow page (for example, repeating the running test node) can be received from other terminals, and the test information of the test node can be sent.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they may be electronic devices with communication functions, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
The server 105 may be a server providing data services, for example, a background data server providing code storage services for the terminal devices 101, 102, and 103, so that each terminal device may obtain the code of the object to be tested from the server according to the code library address.
It should be noted that the method for testing provided by the embodiments of the present disclosure may be executed by the terminal devices 101, 102, and 103, or may be executed by the server 105. Accordingly, the means for testing may be provided in the terminal devices 101, 102, 103, or in the server 105. And is not particularly limited herein.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules, for example, to provide distributed services, or as a single piece of software or software module. And is not particularly limited herein.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for testing in accordance with the present disclosure is shown. The method for testing comprises the following steps:
step 201, in response to receiving an instruction requesting to create a test task, presenting a test task creation page, where the test task creation page is used to receive a code base address and a test policy of an object to be tested.
When an execution main body (for example, the terminal in fig. 1) receives an instruction of a user requesting to create a test task, a test task creation page is presented so that the user can input a code base address and a test policy of an object to be tested, wherein an execution module of each test node in a subsequently-constructed test task can acquire a code of the object to be tested according to the code base address of the object to be tested; the test strategy is used to determine a test procedure of the test task, which may include, for example, a regression verification test or a functional test, and the test procedure of the test task determined based on the test strategy may include: and creating test nodes such as test extraction, application construction, code scanning, smoking test, test acceptance and the like.
As an example, the execution body may present a code library address input box and a test policy input box in the test task building page, and the user may input a code library address of an object to be tested described in a natural language in the code library address input box by clicking a browsing path or manually inputting, for example, may select an object to be tested in a pre-stored code library path (e.g., a code library address and a branch corresponding to a JAVA application), and then may select a test policy by manually inputting or in a drop-down list.
Step 202, in response to receiving an instruction for confirming creation of a test task, a test task is constructed based on the code base address of the object to be tested and the test strategy, and an execution module of each test node in the test task is determined.
In this embodiment, the execution body may determine the test nodes included in the test task and the sequence thereof according to the test policy, and determine the execution modules of the respective test nodes, and each execution module may obtain the code to be tested from a code library (for example, the code library stored in the server in fig. 1) according to the code library address of the object to be tested.
Typically, a test task comprises the following test nodes in sequence: creating a test, an application construction, a code scanning, a smoke test and a test acceptance, wherein an execution main body can determine a corresponding execution module according to a test environment and system conditions required by a test node, for example, a maven module can be determined as the execution module of the application construction node, so as to package the code of an object to be tested into a war package; the sonar module can be determined as an execution module of the code scanning node to execute the coverage rate task of the code of the object to be tested and count the result of the code scanning.
It is understood that the execution module may be installed in the execution main body itself, or may be installed in other terminal devices having a function of interacting with the execution main body data, which is not limited in this application.
Step 203, generating a test flow page based on the sequence of each test node in the test task, wherein the test flow page is used for presenting the test information and the flow operation instruction of each test node.
In this embodiment, the test information is used to characterize the execution status of the test node, and may include: the test time, the executive personnel, the test records, the execution rate of the test cases and the like, so that a user can conveniently and intuitively obtain the execution condition of each test node. The flow operation instruction is used for transmitting the instruction of the user to the execution module of the test node, so that the user can adjust the test flow according to the actual requirement.
As an example, the flow operation instruction corresponding to the smoking test node may include an associated test case instruction, and after the user clicks the associated test case instruction, the execution main body may present a storage path of the test case in a preset area of the test flow page to receive the test case required by the smoking test node selected by the user. For another example, the execution main body may present a mail sending instruction at a preset position of the test flow page, and if the user clicks the mail sending instruction, the execution main body may present a mail editing window on the test flow page, so as to receive the mail content edited by the user.
In some optional implementation manners of this embodiment, the test flow page includes test node identifiers, and the test node identifiers correspond to the test nodes one to one; and presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identification.
In this implementation manner, the flow operation instruction matched with the test node refers to an operation instruction that can be executed by an execution module of the test node, for example, a manual scan instruction can be presented at the code scan node, and an instruction of a relevant test case is not presented; as another example, at a smoking test node, instructions associated with test cases may be presented without manual scan instructions. In this way, the flow operation instructions which cannot be executed can be prevented from being presented in the test flow page.
As an example, the execution body may present the test node identifiers in the form of icons, and arrange the test nodes in the test task according to the sequence of the test nodes, and then present the test information of the test node corresponding to the icon and the flow operation instruction matched with the test node in the form of a waterfall flow below the icon, so that the test flow, and the test information and the operation instruction of each test node in the test flow can be presented more intuitively.
Preferably, the test information in this implementation manner may include a test progress and a test result of the test node corresponding to the test node identifier, where the test progress is used to represent an execution progress of the test subtask assumed by the test node, and for example, the test progress may be divided into three types, namely, completion, test, and to-be-tested, according to the execution progress. And the test result is used for representing the result output after the test subtask borne by the test node is completed.
As an example, the test node identifier may represent the test progress by a color, for example, the test node identifier corresponding to the test node that has completed running is displayed as a bright color, the test node identifier corresponding to the test node that is running is displayed by a flashing display, and the test node identifier corresponding to the test node to be run is displayed as a gray color.
Further, the implementation manner may determine the flow operation instruction matched with the test node in the following manner: determining an executable flow operation instruction of the test node based on the test information of the test node; and determining the executable flow operation instruction as the flow operation instruction matched with the test node.
In a specific example of this implementation manner, the execution main body may determine, according to the test progress of the test node, an executable flow operation instruction of the test node, for example, all flow operation instructions of the test node to be executed are non-executable operation instructions, and a completed repeat test instruction, an inquiry test detail instruction, and the like of the test node are executable operation instructions; the executable operation instruction of the test node can also be determined according to the test result, for example, for a smoking test node with a failed test result, the test instruction is manually triggered, the smoking test instruction is ignored, and the like are executable flow operation instructions, and for a code scanning node with too low code coverage, the manual refute instruction and the repeat scanning instruction are executable flow operation instructions. In this way, the unexecutable flow operation instructions can be filtered from the test flow page, so that the accuracy of the flow operation instructions presented in the test flow page can be improved.
The implementation manner can further comprise: and sending the test result of the current test node in response to the fact that the test progress of the current test node is determined to be completed. For example, the execution agent may pre-store mailbox addresses of technicians involved in each test node, and after the test node completes the test progress, the execution agent may send the test result to a preset mailbox, so that relevant personnel can know the progress of the test task in time.
Step 204, associating the test flow page with the execution modules of the test nodes, so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on a test flow page; and responding to the triggering of the flow operation instruction, sending the flow operation instruction to the execution module of the corresponding test node, so that the execution module executes the flow operation instruction.
In this embodiment, associating the test flow page with the execution module of each test node means implementing data interaction between the test flow page and the execution module of each test node.
As an example, the execution main body may associate the test flow page with the execution module of each test node in the form of a WEB service, where the test flow page is deployed at the front end of the execution main body, the execution module corresponding to each test node is deployed at the back end of the execution main body or at another terminal, and the back end exposes an interface to the front end service for use. Therefore, data interaction between the test flow page and the execution module corresponding to each test node can be realized.
Step 205, presenting a test flow page.
In this embodiment, the execution subject presents the test flow of the test task to the user by presenting the test flow page, and receives an operation instruction of the user for the test task.
Generally, one test task needs the cooperation of multiple departments, and the execution subject can directly present a test flow page after the execution module of each test node is successfully associated on the display device of the execution subject, and can also send the test flow page to other terminals, and can also send the test flow page to a server for presentation to related personnel.
With continued reference to fig. 3, fig. 3 is a schematic view of a scenario of the method shown in fig. 2. In fig. 3, the execution main body 301 may be a server or a terminal device, and when receiving an instruction of a user requesting to create a test task, the execution main body presents a test task creation page to receive relevant information of a test task to be created by the user, including a code library address and a test policy of an object to be tested; then, based on the received code base address of the object to be tested and the test strategy, a test task is constructed and an execution module of each test node in the test task is determined, which may be, for example, terminal devices 302 and 303 in fig. 3; then, the execution main body generates a test flow page based on the constructed test task, and associates the test flow page with the execution module of each test node: terminal devices 302 and 303; and finally, the associated test flow page is displayed on a display device or other terminal devices or a server of the execution main body, so that a user can intuitively acquire the test information of each test node of the test task, and an operation instruction is sent to the execution module of each test node through the test flow page.
According to the method and the device for testing, the code base address and the testing strategy of the object to be tested are received through the presentation and test task creation page, then the testing task is constructed based on the code base address and the testing strategy of the object to be tested, the testing flow page corresponding to the testing task is generated, and the testing information and the flow operation instruction of each testing node can be presented on the testing flow page through the association of the testing flow page and the execution module of each testing node. The user can realize visual management and operation of the test flow only through the test flow page, which is beneficial to simplifying test flow management and improving test efficiency.
With further reference to fig. 4, there is shown yet another embodiment of the method for testing, in which the method for testing may further include a flow 400, where the flow 400 specifically includes the following steps:
step 401, judging the type of the test task.
In this embodiment, the execution subject receives a test policy by providing a test task creation page, where the test policy includes a test task type to be constructed. By way of example, the execution principal may present a test task type selection box on the submission task creation page to facilitate the user in determining the type of test task.
Step 402, if the test task type is automatic test, presenting a test node parameter setting control and a test case association control on a test flow page, wherein the test node parameter setting control is used for receiving a passing threshold of each test node, and the test case association control is used for receiving a storage address of a test case associated with the test node.
Typically, the automatic test task is adapted to the regression verification test phase. If the execution main body determines that the type of the test task is automatic test, the test task constructed by the execution main body can automatically execute all test nodes according to the sequence, and an intermediate link after the test flow is started does not need manual operation, but the passing threshold of each test node is preset before the test flow is started, and test cases are associated. The pass threshold is used for representing whether the test result of the test node meets the test requirement or not, if the test result is higher than the pass threshold, the test result meets the test requirement, and the next test node can be started; otherwise, if the test result is lower than the pass threshold, the test result does not meet the test requirement, and the test task is terminated. The test cases can comprise smoking test cases and automation cases in the test, and respectively correspond to smoking test nodes and nodes in the test.
As an example, the execution subject may present a passing node parameter setting control in an area corresponding to each test node identifier in the test flow page, so that the user may intuitively set a passing threshold of each test node. For example, the pass threshold of a code scanning node may be set to: the unit test coverage rate is more than 30%, the bug number is less than 10, the code odor is less than 200, and after the test flow is started, if the test results of the code scanning nodes can not meet the conditions, the test task is terminated; and if the test results all meet the conditions, starting the next test node and continuing the test task.
And step 403, respectively sending the passing threshold of each test node to the execution module of each test node.
In this embodiment, the execution main body may send the pass threshold to the execution modules of the test nodes, and each execution module compares the test result with the pass threshold by itself to determine whether the test result of the test node meets the test requirement. If the test result does not meet the pass threshold, the execution module sends a signal that the test fails to pass to the execution main body, and the execution main body sends an instruction for stopping running to the next test node so as to terminate the test task; if the test result meets the passing threshold, the execution module sends a signal that the test passes to the execution main body, and the execution main body sends an instruction for starting the test to the next test node so as to continue the test task.
Step 404, the storage addresses of the test cases are respectively sent to the execution modules of the test nodes associated with the test cases.
As an example, the execution main body may further present a smoking test case selection control in an area corresponding to the smoking test flow node identifier, so as to receive a storage address of the smoking test case selected by the user, and send the storage address to the execution module corresponding to the smoking test. The method can also be used to determine automation cases in testing.
Step 405, if the test task type is manual test, the flow operation instruction comprises a flow change instruction, and the flow change instruction comprises an instruction for skipping the current test node and an instruction for repeatedly executing the historical test node; and responding to the triggering of the flow change instruction, sending the flow change instruction to the execution module of the test node pointed by the flow change instruction, so that the execution module executes the flow change instruction.
Typically, manual test tasks are applied to the functional test phase. The instruction for skipping the current node is used for indicating an execution module corresponding to the current test node to stop running and starting the next test node of the current test node; the historical test node is a test node which is operated completely and obtains a test result, and the instruction for repeatedly executing the historical test node is used for indicating the execution module of the current test node to stop operating and starting the specified historical test node. Thus, the test node can be repeatedly executed according to the actual requirement,
Step 406, in response to determining that the test task is terminated, sending a test report, where the test report includes test information of each test node.
In this embodiment, the execution subject may pre-store the mailbox address, and when the execution subject determines that the test task is terminated, for example, the termination condition may be that a certain test node is not passed in the automatic test task or that all test nodes are completely run; for another example, if the termination condition may be that the test task is manually terminated in the manual test task or all the test nodes are completed, the execution main body generates a test report based on the test information of the completed test nodes and sends the test report to a pre-stored mailbox.
As can be seen from fig. 4, the process 400 of the method for testing in this embodiment may present different information and process operation instructions on the test flow page according to different test task types, so as to meet the test conditions of the automatic test task and the manual test task. As such, the flexibility of the method for testing of the present disclosure may be improved.
It should be noted that the above step 406 is also applicable to the embodiment shown in fig. 2.
In some optional implementation manners of the above multiple embodiments, the test task creation page may receive the code base addresses of multiple objects to be tested and the corresponding test policies at the same time, and accordingly, the execution main body may create multiple test tasks based on the received code base addresses of the multiple objects to be tested and the corresponding test policies, and generate corresponding test flow pages, so that the test efficiency may be improved.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for testing, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, the apparatus 500 for testing of the present embodiment includes: the task receiving unit 501 is configured to, in response to receiving an instruction requesting to create a test task, present a test task creation page, where the test task creation page is used to receive a code base address and a test policy of an object to be tested; a task construction unit 502 configured to, in response to receiving an instruction to confirm creation of a test task, construct a test task based on a code base address of an object to be tested and a test policy, and determine an execution module of each test node in the test task; the page generating unit 503 is configured to generate a test flow page based on the sequence of the test nodes in the test task, where the test flow page is used to present the test information and the flow operation instruction of each test node; a page association unit 504 configured to associate the test flow page with the execution module of each test node, so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on a test flow page; responding to the triggering of the flow operation instruction, sending the flow operation instruction to the execution module of the corresponding test node, so that the execution module executes the flow operation instruction; and a page presenting unit 505 configured to present the test flow page.
In this embodiment, the test flow page includes test node identifiers, and the test node identifiers correspond to the test nodes one to one; and, the page generating unit 503 is further configured to: and presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identification.
In this embodiment, the test information includes a test progress and a test result of the test node corresponding to the test node identifier.
In this embodiment, the apparatus further includes a test result sending unit configured to: and sending the test result of the current test node in response to the fact that the test progress of the current test node is determined to be completed.
In this embodiment, the page generating unit 503 is further configured to: determining an executable flow operation instruction of the test node based on the test information of the test node; and determining the executable flow operation instruction as the flow operation instruction matched with the test node.
In this embodiment, the test policy includes a test task type; and, the page generating unit 503 further includes a manual testing module configured to: if the test task type is manual test, the flow operation instruction comprises a flow change instruction, and the flow change instruction comprises skipping the current test node and repeatedly executing the historical test node; and responding to the triggering of the flow change instruction, sending the flow change instruction to the execution module of the test node pointed by the flow change instruction, so that the execution module executes the flow change instruction.
In this embodiment, the page generating unit 503 further includes an automatic testing module configured to: if the test task type is automatic test, presenting a test node parameter setting control and a test case association control on a test flow page, wherein the test node parameter setting control is used for receiving a passing threshold of each test node, and the test case association control is used for receiving a storage address of a test case associated with the test node; respectively sending the passing threshold value of each test node to an execution module of each test node; and respectively sending the storage addresses of the test cases to the execution modules of the test nodes associated with the test cases.
In this embodiment, the apparatus further includes a report sending unit configured to: and sending a test report in response to determining that the test task is terminated or completed, wherein the test report comprises test information of each test node.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the server or terminal device of fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the use range of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to receiving an instruction requesting to create a test task, presenting a test task creation page, wherein the test task creation page is used for receiving a code base address and a test strategy of an object to be tested; in response to receiving an instruction for confirming establishment of a test task, constructing a test task based on the code base address of the object to be tested and the test strategy, and determining an execution module of each test node in the test task; generating a test flow page based on the sequencing of each test node in the test task, wherein the test flow page is used for presenting the test information and the flow operation instruction of each test node; associating the test flow page with the execution modules of the test nodes so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on a test flow page; responding to the triggering of the flow operation instruction, sending the flow operation instruction to the execution module of the corresponding test node, so that the execution module executes the operation pointed by the flow operation instruction; and presenting a test flow page.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a task receiving unit, a task building unit, a page generating unit, a page associating unit, and a page presenting unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, a page rendering unit may also be described as a "unit rendering a test flow page".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (18)

1. A method for testing, comprising:
in response to receiving an instruction requesting to create a test task, presenting a test task creation page, wherein the test task creation page is used for receiving a code base address and a test strategy of an object to be tested;
in response to receiving an instruction for confirming establishment of a test task, constructing a test task based on the code base address of the object to be tested and the test strategy, and determining an execution module of each test node in the test task;
generating a test flow page based on the sequencing of the test nodes in the test task, wherein the test flow page is used for presenting the test information and the flow operation instruction of each test node;
associating the test flow page with the execution modules of the test nodes, so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on the test flow page; responding to the triggering of the flow operation instruction, sending the flow operation instruction to an execution module of the corresponding test node, so that the execution module executes the flow operation instruction;
and presenting the test flow page.
2. The method of claim 1, wherein,
the test flow page comprises test node identifiers, and the test node identifiers correspond to the test nodes one to one; and the number of the first and second groups,
and presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identification.
3. The method of claim 2, wherein the test information includes a test progress and a test result of the test node corresponding to the test node identification.
4. The method of claim 3, further comprising:
and sending the test result of the current test node in response to the fact that the test progress of the current test node is determined to be completed.
5. The method of claim 3, wherein presenting the test information of the test node and the flow operation instruction matched with the test node in the preset area corresponding to the test node identifier comprises:
determining an executable flow operation instruction of the test node based on the test information of the test node;
and determining the executable flow operation instruction as the flow operation instruction matched with the test node.
6. The method of claim 1, wherein the test policy comprises a test task type; the method further comprises the following steps:
if the test task type is manual test, the flow operation instruction comprises a flow change instruction, and the flow change instruction comprises an instruction for skipping a current test node and an instruction for repeatedly executing a historical test node; and the number of the first and second groups,
and responding to the triggering of the flow change instruction, sending the flow change instruction to an execution module of the test node pointed by the flow change instruction, so that the execution module executes the flow change instruction.
7. The method of claim 6, further comprising:
if the test task type is automatic test, presenting a test node parameter setting control and a test case association control on the test flow page, wherein the test node parameter setting control is used for receiving a passing threshold of each test node, and the test case association control is used for receiving a storage address of a test case associated with the test node; and the number of the first and second groups,
respectively sending the passing threshold value of each test node to an execution module of each test node;
and respectively sending the storage addresses of the test cases to the execution modules of the test nodes associated with the test cases.
8. The method according to one of claims 1 to 7, further comprising:
and sending a test report in response to determining that the test task is terminated, wherein the test report comprises test information of each test node.
9. An apparatus for testing, comprising:
the task receiving unit is configured to respond to the received instruction of requesting to create the test task and present a test task creating page, and the test task creating page is used for receiving the code base address and the test strategy of the object to be tested;
the task construction unit is configured to respond to the received instruction for confirming the establishment of the test task, construct a test task based on the code base address of the object to be tested and the test strategy, and determine an execution module of each test node in the test task;
the page generation unit is configured to generate a test flow page based on the sequencing of the test nodes in the test task, and the test flow page is used for presenting the test information and the flow operation instruction of each test node;
a page association unit configured to associate the test flow page with the execution module of each test node, so that the test flow page: receiving test information sent by the execution module of each test node and presenting the test information on the test flow page; responding to the triggering of the flow operation instruction, sending the flow operation instruction to an execution module of the corresponding test node, so that the execution module executes the flow operation instruction;
and the page presenting unit is configured to present the test flow page.
10. The apparatus of claim 9, wherein the test flow page includes test node identifiers, the test node identifiers corresponding one-to-one to each of the test nodes; and the number of the first and second groups,
the page generation unit is further configured to: and presenting the test information of the test node and the flow operation instruction matched with the test node in a preset area corresponding to the test node identification.
11. The apparatus of claim 10, wherein the test information comprises a test progress and a test result of the test node corresponding to the test node identification.
12. The apparatus of claim 11, the apparatus further comprising a test result sending unit configured to: and sending the test result of the current test node in response to the fact that the test progress of the current test node is determined to be completed.
13. The apparatus of claim 11, wherein the page generation unit is further configured to:
determining an executable flow operation instruction of the test node based on the test information of the test node;
and determining the executable flow operation instruction as the flow operation instruction matched with the test node.
14. The apparatus of claim 9, wherein the test policy comprises a test task type; and the page generation unit further comprises a manual test module configured to:
if the test task type is manual test, the flow operation instruction comprises a flow change instruction, and the flow change instruction comprises an instruction for skipping a current test node and an instruction for repeatedly executing a historical test node; and the number of the first and second groups,
and responding to the triggering of the flow change instruction, sending the flow change instruction to an execution module corresponding to the test node pointed by the flow change instruction, so that the execution module executes the flow change instruction.
15. The apparatus of claim 14, wherein the page generation unit further comprises an automatic test module configured to:
if the test task type is automatic test, presenting a test node parameter setting control and a test case association control on the test flow page, wherein the test node parameter setting control is used for receiving a passing threshold of each test node, and the test case association control is used for receiving a storage address of a test case associated with the test node; and the number of the first and second groups,
respectively sending the passing threshold value of each test node to an execution module of each test node;
and respectively sending the storage addresses of the test cases to the execution modules of the test nodes associated with the test cases.
16. The apparatus according to one of claims 9 to 15, the apparatus further comprising a report sending unit configured to:
and sending a test report in response to determining that the test task is terminated, wherein the test report comprises test information of each test node.
17. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
18. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-8.
CN202010901522.4A 2020-08-31 2020-08-31 Method and apparatus for testing Pending CN112015654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010901522.4A CN112015654A (en) 2020-08-31 2020-08-31 Method and apparatus for testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010901522.4A CN112015654A (en) 2020-08-31 2020-08-31 Method and apparatus for testing

Publications (1)

Publication Number Publication Date
CN112015654A true CN112015654A (en) 2020-12-01

Family

ID=73515687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010901522.4A Pending CN112015654A (en) 2020-08-31 2020-08-31 Method and apparatus for testing

Country Status (1)

Country Link
CN (1) CN112015654A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650670A (en) * 2020-12-17 2021-04-13 京东数科海益信息科技有限公司 Application testing method, device, system, electronic equipment and storage medium
CN113191114A (en) * 2021-04-30 2021-07-30 北京百度网讯科技有限公司 Method and apparatus for authenticating a system
CN113722225A (en) * 2021-08-31 2021-11-30 平安普惠企业管理有限公司 Page testing method and device, computer equipment and storage medium
CN113872831A (en) * 2021-09-28 2021-12-31 北京永信至诚科技股份有限公司 Network test visualization system and method
CN114936152A (en) * 2022-05-07 2022-08-23 阿里巴巴(中国)有限公司 Application testing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120221893A1 (en) * 2011-02-28 2012-08-30 Sap Ag Managing test automation
US20140222522A1 (en) * 2013-02-07 2014-08-07 Ibms, Llc Intelligent management and compliance verification in distributed work flow environments
US20150135164A1 (en) * 2013-11-08 2015-05-14 Halliburton Energy Services, Inc. Integrated Software Testing Management
CN107506294A (en) * 2017-07-04 2017-12-22 深圳市小牛在线互联网信息咨询有限公司 Visualize automated testing method, device, storage medium and computer equipment
CN107832206A (en) * 2017-10-16 2018-03-23 深圳市牛鼎丰科技有限公司 Method of testing, device, computer-readable recording medium and computer equipment
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case
US10528367B1 (en) * 2016-09-02 2020-01-07 Intuit Inc. Execution of workflows in distributed systems
CN110928774A (en) * 2019-11-07 2020-03-27 杭州顺网科技股份有限公司 Automatic test system based on node formula
CN111080257A (en) * 2019-12-17 2020-04-28 苏州博纳讯动软件有限公司 DevOps-based end-to-end online research and development management system and method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120221893A1 (en) * 2011-02-28 2012-08-30 Sap Ag Managing test automation
US20140222522A1 (en) * 2013-02-07 2014-08-07 Ibms, Llc Intelligent management and compliance verification in distributed work flow environments
US20150135164A1 (en) * 2013-11-08 2015-05-14 Halliburton Energy Services, Inc. Integrated Software Testing Management
US10528367B1 (en) * 2016-09-02 2020-01-07 Intuit Inc. Execution of workflows in distributed systems
CN107506294A (en) * 2017-07-04 2017-12-22 深圳市小牛在线互联网信息咨询有限公司 Visualize automated testing method, device, storage medium and computer equipment
CN107832206A (en) * 2017-10-16 2018-03-23 深圳市牛鼎丰科技有限公司 Method of testing, device, computer-readable recording medium and computer equipment
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case
CN110928774A (en) * 2019-11-07 2020-03-27 杭州顺网科技股份有限公司 Automatic test system based on node formula
CN111080257A (en) * 2019-12-17 2020-04-28 苏州博纳讯动软件有限公司 DevOps-based end-to-end online research and development management system and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
姜文;刘立康;: "基于持续集成的冒烟测试", 计算机技术与发展, no. 08 *
王红, 刘金甫, 杨小辉: "可视化测试软件平台GTEST", 测控技术, no. 03 *
董昕;郭勇;王杰;: "基于DevOps能力模型的持续集成方法", 计算机工程与设计, no. 07 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650670A (en) * 2020-12-17 2021-04-13 京东数科海益信息科技有限公司 Application testing method, device, system, electronic equipment and storage medium
CN113191114A (en) * 2021-04-30 2021-07-30 北京百度网讯科技有限公司 Method and apparatus for authenticating a system
CN113191114B (en) * 2021-04-30 2023-11-10 北京百度网讯科技有限公司 Method and apparatus for validating a system
CN113722225A (en) * 2021-08-31 2021-11-30 平安普惠企业管理有限公司 Page testing method and device, computer equipment and storage medium
CN113872831A (en) * 2021-09-28 2021-12-31 北京永信至诚科技股份有限公司 Network test visualization system and method
CN113872831B (en) * 2021-09-28 2022-09-16 北京永信至诚科技股份有限公司 Network test visualization system and method
CN114936152A (en) * 2022-05-07 2022-08-23 阿里巴巴(中国)有限公司 Application testing method and device

Similar Documents

Publication Publication Date Title
CN112015654A (en) Method and apparatus for testing
CN112036824A (en) Business approval method, system, storage medium and electronic equipment
CN109684188B (en) Test method and device
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN109117378B (en) Method and apparatus for displaying information
CN113296772A (en) Page configuration method and device, computer equipment and readable storage medium
CN111190657B (en) Activity configuration method and device, readable medium and electronic equipment
CN113282444A (en) Visualization method and device for business process debugging
CN109254778B (en) Method and apparatus for deploying an information flow system
CN114840379A (en) Log generation method, device, server and storage medium
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN107562629B (en) Method and device for testing
CN113704079B (en) Protobuf-based interface testing method and device
CN113407229B (en) Method and device for generating offline scripts
CN113238944A (en) Test method, device and system
CN113760727A (en) Interface regression testing method and device
CN112084114A (en) Method and apparatus for testing an interface
CN110022244B (en) Method and apparatus for transmitting information
CN112084115B (en) Method and device for flowsheet operation of software defects
CN115526580B (en) Node state determining method and device, electronic equipment and storage medium
CN112783753B (en) Testing method and device for stream data processing system
JP2012018476A (en) Scenario editor and scenario editing method, server apparatus and program
CN113467772B (en) Project template generation method and device, electronic equipment and storage medium
CN113760723B (en) Business process debugging method and device
CN112883697B (en) Workflow form generation method, device, electronic equipment and computer readable medium

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
CB02 Change of applicant information

Address after: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Daxing Economic and Technological Development Zone, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd

CB02 Change of applicant information