CN113535584A - Flow testing method, platform, electronic equipment and storage medium - Google Patents

Flow testing method, platform, electronic equipment and storage medium Download PDF

Info

Publication number
CN113535584A
CN113535584A CN202110886809.9A CN202110886809A CN113535584A CN 113535584 A CN113535584 A CN 113535584A CN 202110886809 A CN202110886809 A CN 202110886809A CN 113535584 A CN113535584 A CN 113535584A
Authority
CN
China
Prior art keywords
interface
parameter
tested
acquiring
test
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.)
Granted
Application number
CN202110886809.9A
Other languages
Chinese (zh)
Other versions
CN113535584B (en
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.)
Chuangyou Digital Technology Guangdong Co Ltd
Original Assignee
Chuangyou Digital Technology Guangdong 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 Chuangyou Digital Technology Guangdong Co Ltd filed Critical Chuangyou Digital Technology Guangdong Co Ltd
Priority to CN202110886809.9A priority Critical patent/CN113535584B/en
Publication of CN113535584A publication Critical patent/CN113535584A/en
Application granted granted Critical
Publication of CN113535584B publication Critical patent/CN113535584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3684Test management for test design, e.g. generating new test cases
    • 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

The invention discloses a flow testing method, a flow testing platform, electronic equipment and a storage medium, which are used for solving the technical problem that the existing flow testing method consumes too long time in a testing period. The method comprises the following steps: acquiring an approval process to be tested, wherein the approval process to be tested comprises a plurality of process nodes running on different services; acquiring to-be-tested interfaces of all process nodes, wherein the to-be-tested interfaces comprise a target interface and an interface to be quoted; responding to a parameter adding instruction aiming at the target interface, and acquiring the entry of the target interface from the interface to be quoted; generating a test flow of each flow node according to the to-be-tested interface corresponding to each flow node and the corresponding entry parameter; and acquiring the execution sequence of the approval process to be tested, executing the test process of each process node according to the execution sequence, and generating a test result.

Description

Flow testing method, platform, electronic equipment and storage medium
Technical Field
The present invention relates to the field of process testing technologies, and in particular, to a process testing method, a platform, an electronic device, and a storage medium.
Background
In a practical scenario, in the process of executing a test, some functional logic that requires a long approval process is often encountered, such as a reimbursement approval process of an office system, a plant inspection process of a supply chain, a quality inspection process of the supply chain, and the like. The number of the examination and approval nodes of the examination and approval processes can be more than ten, and the examination and approval process test is executed once, wherein the test is performed half an hour in a short period and half a day in a long period, so that the test period is long.
When a small part of code logic of a certain node in the examination and approval process is modified, the examination and approval process needs to be completely executed once in the testing stage, and if all test cases need to be completed, the whole process needs to be carried out for several times to cover the test cases. This results in a long time spent testing a small spot, resulting in a lengthy test cycle.
Disclosure of Invention
The invention provides a flow testing method, a flow testing platform, electronic equipment and a storage medium, which are used for solving the technical problem that the existing flow testing method consumes too long time in a testing period.
The invention provides a process testing method, which is applied to a process testing platform and comprises the following steps:
acquiring an approval process to be tested, wherein the approval process to be tested comprises a plurality of process nodes running on different services;
acquiring to-be-tested interfaces of all process nodes, wherein the to-be-tested interfaces comprise a target interface and an interface to be quoted;
responding to a parameter adding instruction aiming at the target interface, and acquiring the entry of the target interface from the interface to be quoted;
generating a test flow of each flow node according to the to-be-tested interface corresponding to each flow node and the corresponding entry parameter;
and acquiring the execution sequence of the approval process to be tested, executing the test process of each process node according to the execution sequence, and generating a test result.
Optionally, the step of obtaining the entry of the target interface from the interface to be referred to in response to the parameter adding instruction for the target interface includes:
responding to a parameter adding instruction aiming at the target interface, and acquiring input parameters;
and determining a reference interface from the interfaces to be referenced according to the input parameters, and acquiring the input parameters of the target interface from the reference interface.
Optionally, the step of obtaining the entry of the target interface from the interface to be referred to in response to the parameter adding instruction for the target interface includes:
responding to a parameter adding instruction aiming at the target interface, and determining a reference parameter type and a parameter to be adjusted of the target interface;
responding to the selection operation of a user, selecting a reference interface in the interface to be referenced, and selecting a reference parameter name in the reference interface;
and acquiring a reference parameter value according to the reference parameter type and the reference parameter name, and taking the reference parameter value as the parameter to be adjusted.
Optionally, the step of obtaining a reference parameter value according to the reference parameter type and the reference parameter name, and using the reference parameter value as a reference of the parameter to be adjusted includes:
when the reference parameter type is a reference single-value type, acquiring a numerical value corresponding to the reference parameter name in the reference interface as a reference parameter value, and taking the reference parameter value as the reference of the parameter to be adjusted;
and when the reference parameter type is a reference multi-value type, acquiring all numerical values with the reference parameter name in the reference interface as reference parameter values, and taking the reference parameter values as the reference of the parameter to be adjusted.
Optionally, the method further comprises:
when the input parameters are a user identification code and a user name, acquiring a field corresponding to the user identification code in the target interface;
and adopting the user name as the entry parameter of the field.
Optionally, the method further comprises:
and generating an execution log of each interface to be tested, and outputting the execution log to a preset display interface.
Optionally, the step of executing the test flow of each flow node according to the execution sequence to generate a test result includes:
acquiring the execution delay of the test set corresponding to each process node;
and executing the test flow of each flow node according to the execution sequence and the execution delay of each test set to generate a test result.
The invention also provides a flow test platform, comprising:
the system comprises a to-be-tested approval process acquisition module, a to-be-tested approval process acquisition module and a to-be-tested approval process acquisition module, wherein the to-be-tested approval process comprises a plurality of process nodes running on different services;
the system comprises a to-be-tested interface acquisition module, a to-be-tested interface acquisition module and a to-be-tested interface acquisition module, wherein the to-be-tested interface acquisition module is used for acquiring to-be-tested interfaces of all process nodes, and the to-be-tested interfaces comprise target interfaces and to-be-quoted interfaces;
the parameter adding and acquiring module is used for responding to a parameter adding instruction aiming at the target interface and acquiring the parameter of the target interface from the interface to be quoted;
the test flow generation module is used for generating a test flow of each flow node according to the interface to be tested corresponding to each flow node and the corresponding entry parameter;
and the test result generation module is used for acquiring the execution sequence of the approval process to be tested, executing the test process of each process node according to the execution sequence and generating a test result.
The invention also provides an electronic device comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the flow testing method according to any one of the above instructions in the program code.
The present invention also provides a computer readable storage medium for storing program code for performing a process testing method as described in any one of the above.
According to the technical scheme, the invention has the following advantages:
the invention discloses a flow testing method, and particularly discloses: acquiring an approval process to be tested, wherein the approval process to be tested comprises a plurality of process nodes running on different services; acquiring to-be-tested interfaces of all process nodes, wherein the to-be-tested interfaces comprise a target interface and an interface to be quoted; responding to a parameter adding instruction aiming at the target interface, and acquiring the input parameters of the target interface from the interface to be quoted; generating a test flow of each flow node according to the to-be-tested interface corresponding to each flow node and the corresponding entry parameter; and acquiring an execution sequence of the approval flows to be tested, executing the test flow of each flow node according to the execution sequence, and generating a test result.
According to the invention, the test set of each process node running on different services in the process to be audited and the access parameters of each interface of the test set are configured, so that different services can be linked through the access parameters of the interfaces, different identity accounts do not need to be switched to log in different platforms and different operations are not needed to be executed continuously in the process of executing the process, the test time is reduced, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating steps of a flow testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a flow testing method according to another embodiment of the present invention;
fig. 3 is a block diagram of a flow test platform according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a flow testing method, a flow testing platform, electronic equipment and a storage medium, which are used for solving the technical problem that the existing flow testing method consumes too long time in a testing period.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a flow testing method according to an embodiment of the present invention.
The invention provides a flow test method, which is applied to a flow test platform; the method specifically comprises the following steps:
step 101, acquiring an approval process to be tested, wherein the approval process to be tested comprises a plurality of process nodes running on different services;
in the embodiment of the invention, the examination and approval process to be tested refers to an examination and approval process to be tested, the examination and approval process is a business logic, can provide convenient programmed service for diversified and complex business operations, and can be applied to a plurality of fields, for example, the examination and approval process can be an examination and approval process for reimbursement in an office system, a plant inspection process in a supply chain, a quality inspection process in the supply chain, and the like. Each type of approval process can be divided into a plurality of process nodes, each process node corresponds to different functional logics, and in one set of approval process, all process nodes can be executed by the same user or different process nodes can be respectively executed by different users. The embodiment of the present invention is not particularly limited thereto.
In the embodiment of the invention, the service refers to a platform for running the process nodes, and a complete process can be completed on one service or multiple services. For example, the approval process of reimbursement can be deployed on different service platforms according to different approval levels of the approval personnel.
102, acquiring to-be-tested interfaces of all process nodes, wherein the to-be-tested interfaces comprise a target interface and an interface to be quoted;
in the embodiment of the present invention, the interface to be tested refers to the interface to be tested, which refers to a reference type defining an agreement to ensure that it supports certain operations.
The target interface is a to-be-tested interface which needs to be processed currently, and the to-be-referenced interfaces are all to-be-tested interfaces except the target interface.
In general, when an approval process to be tested, which includes a plurality of process nodes and involves a plurality of different services, is tested, since all the process nodes need to be completely traversed once, and different user accounts need to be replaced to log in different platforms to complete the tests on different process nodes according to different users executing operations and different platforms deploying the process nodes in the test process, the time for completing one test of the approval process to be tested is long, and the test period is also long. Therefore, in the embodiment of the invention, the interfaces to be tested of all the process nodes are exposed by calling different interface testing tools so as to be convenient for adjusting each interface to be tested, establish the relation between the interfaces, realize flexible user change and cross-service process testing without platform switching, and reduce the testing time.
The interface testing tool is mainly used for detecting interaction points between an external system and an internal system and between each internal subsystem, and the testing is mainly used for checking the exchange, transmission and control management processes of data, mutual logic dependency relations between systems and the like. The interface test tool in the embodiment of the present invention may be an interface management tool implemented by python language, or may be an interface management tool such as yapi and postman, which is not specifically limited in this embodiment.
103, responding to a parameter adding instruction aiming at the target interface, and acquiring the entry of the target interface from the interface to be quoted;
in the embodiment of the present invention, the parameter adding instruction is an instruction for adding a parameter to the target interface. The parameter adding instruction can be triggered by clicking and typing corresponding information on a corresponding display interface by a user.
Entering refers to inputting parameters. In embodiments of the present invention, an entry may be a value or values of a field in the returned data of the interface.
In an actual scenario, some interfaces to be tested need to refer to a certain value or values of a certain field in data returned by an interface of a previous process node or other interfaces of a current process node as an entry, so as to realize parameter transfer between different process nodes. Therefore, in the embodiment of the present invention, the entry of the target interface can be obtained from the interface to be referred to by triggering the parameter adding instruction for the target interface.
104, generating a test flow of each flow node according to the to-be-tested interface corresponding to each flow node and the corresponding access parameter;
after the configuration of the entry of the interface to be tested of each process node is completed, the test process of each process node can be generated. The test flow indicates the test order of the interfaces and the test logic.
And 105, acquiring an execution sequence of the approval process to be tested, executing the test process of each process node according to the execution sequence, and generating a test result.
In practical application, the process nodes of the examination and approval process to be tested have the execution sequence, and the test process of each process node is executed in sequence according to the execution sequence of the process nodes, so that the test result of the whole examination and approval process to be tested can be obtained, including the result of whether the test of each test result is successful or not.
According to the invention, the test set of each process node running on different services in the process to be audited and the access parameters of each interface of the test set are configured, so that different services can be linked through the access parameters of the interfaces, different identity accounts do not need to be switched to log in different platforms and different operations are not needed to be executed continuously in the process of executing the process, the test time is reduced, and the test efficiency is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a flow testing method according to another embodiment of the present invention. The method comprises the following specific steps:
step 201, acquiring an approval process to be tested, wherein the approval process to be tested comprises a plurality of process nodes running on different services;
step 201 is the same as step 101, and reference may be specifically made to the description of step 101, which is not described herein again.
Step 202, acquiring to-be-tested interfaces of all process nodes, wherein the to-be-tested interfaces comprise a target interface and an interface to be quoted;
in a specific implementation, a corresponding test set may be selected for each process node, and the to-be-tested interface corresponding to each process node may be obtained from the test set. In one example, the interfaces to be tested for each flow node may be displayed in a list.
Step 203, responding to a parameter adding instruction aiming at the target interface, and acquiring the entry of the target interface from the interface to be quoted;
in an actual scenario, some interfaces to be tested need to refer to a certain value or values of a certain field in data returned by an interface of a previous process node or other interfaces of a current process node as an entry, so as to realize parameter transfer between different process nodes. Specifically, the parameter adding instruction for the target interface may be triggered to obtain the entry of the target interface from the interface to be referred.
In one example, step 203 may include the following sub-steps:
s11, responding to the parameter adding instruction aiming at the target interface, and acquiring input parameters;
and S12, determining a reference interface from the interfaces to be referenced according to the input parameters, and acquiring the input parameters of the target interface from the reference interface.
In the embodiment of the invention, after the parameter adding instruction for the target interface is triggered, the user can determine the reference interface by inputting the corresponding input parameter form and obtain the entry of the target interface from the reference interface.
In practical applications, the input parameters may include part or all of a parameter type, a parameter name, a reference interface ID, and a reference parameter name. The ID of the reference interface can quickly determine the reference interface for the target interface; the parameter type defines the type of the parameter to be specifically referred to, including but not limited to a single-value parameter, a multi-value parameter; the parameter name defines the field of the target interface needing to change the parameter; the referencing parameter name defines which parameter of the referencing interface is to be referenced as the target interface.
For example, when the input parameter type is quote single value, the parameter name is orderSummaryList, the quote interface ID is 8879, and the quote parameter name is records/orderSummaryCode, the parameter value of records/orderSummaryCode field of the quote interface representing the orderSummaryList field of the target interface with the ID of 8879.
Further, step 203 further comprises:
when the input parameters are the user identification code and the user name, acquiring a field corresponding to the user identification code in the target interface;
and a user name is used as a reference of a field.
A user identification code (userId), a field identifying the identity of the user.
In practical applications, in cross-service flow testing, situations that different flow nodes need to be tested by different users are sometimes encountered. In the testing process, if the user actively switches different services to log in different user accounts, the duration of the process testing is inevitably increased. Therefore, in the embodiment of the present invention, the user executing the flow node may also be switched by inputting the form of the user identification code and the user name.
For example, when the parameter name is the user identification number userld and the parameter value is the user name admin1, the target interface will use the user name admin1 as the user id field.
In another example, step 203 may comprise:
s21, responding to the parameter adding instruction aiming at the target interface, and determining the reference parameter type and the parameter to be adjusted of the target interface;
s22, responding to the selection operation of the user, selecting a reference interface in the interface to be referenced, and selecting a reference parameter name in the reference interface;
and S23, acquiring the reference parameter value according to the reference parameter type and the reference parameter name, and taking the reference parameter value as the parameter to be adjusted.
The parameter to be adjusted refers to a field in the target interface, which needs to be subjected to parameter setting.
In the embodiment of the present invention, the setting of the entry of the target interface may also be performed in a click manner. Specifically, when a parameter adding instruction for the target interface is triggered, a reference parameter type and a parameter to be adjusted of the target interface may be selected on a parameter adding interface corresponding to the target interface. And then selecting a reference interface according to actual requirements in the interface to be referenced, and selecting a reference parameter name in the reference interface. And acquiring partial or all parameter values of the name of the reference parameter as the parameters to be adjusted based on the type of the reference parameter.
In practical application, when the reference parameter type is a reference single-value type, a numerical value corresponding to the name of the reference parameter is obtained in a reference interface as a reference parameter value, and the reference parameter value is used as a reference of a parameter to be adjusted;
and when the reference parameter type is a reference multi-value type, acquiring all numerical values with reference parameter names in a reference interface as reference parameter values, and taking the reference parameter values as the reference parameters of the parameters to be adjusted.
Furthermore, the reference parameter type may further include a reference multi-value prefix type, and the specific implementation is to obtain a first value of parameter values having the same reference parameter name as a reference parameter value, and use the first value as an entry parameter of a parameter to be adjusted of the target interface.
Step 204, generating a test flow of each flow node according to the to-be-tested interface corresponding to each flow node and the corresponding access parameter;
after the test set selection and the access configuration of the interface to be tested of each process node are completed, the test process of each process node can be generated. The test flow indicates the test order of the interfaces and the test logic.
Step 205, obtaining the execution delay of the test set corresponding to each process node;
and step 206, executing the test flow of each flow node according to the execution sequence and the execution delay of each test set, and generating a test result.
In the embodiment of the present invention, an execution delay may be further set for each process node, and the test process of each process node is executed according to the execution delay, so as to generate a test result.
In the embodiment of the invention, an execution log of each interface to be tested can be generated, and the execution log is output to the preset display interface to be displayed, so that a user can conveniently check and debug.
According to the invention, the test set of each process node running on different services in the process to be audited and the access parameters of each interface of the test set are configured, so that different services can be linked through the access parameters of the interfaces, different identity accounts do not need to be switched to log in different platforms and different operations are not needed to be executed continuously in the process of executing the process, the test time is reduced, and the test efficiency is improved.
For ease of understanding, embodiments of the present invention are described below by way of specific examples:
aiming at a to-be-tested approval process A with process nodes of A (service 1) - > B (service 2) - > C (service 1) - > D (service 3) - > E (service 2) - > F (service 1). The test flow can comprise the following steps:
1. and adding a service 1 interface on the interface test tool as a project group a, and completing A, C, F node interface test on the project group a by using an interface test tool test set, wherein the numbers of the interface test set corresponding to yapi are 1, 2 and 3 respectively.
2. And adding a service 2 interface on the interface test tool as a project group b, and completing B, E node interface test on the project group b by using an interface test tool test set, wherein the numbers of yapi test sets are 4 and 5 respectively.
3. And adding a service 3 interface project group D on the interface test tool, and completing the interface test of the D node in the project group D by using an interface test tool test set, wherein the number of the corresponding interface test tool test set is 6.
4. And newly establishing the examination and approval process A to be tested on the process testing platform.
5. Since the to-be-tested approval process needs to execute a complete process only after 6 test sets of the interface test tool run out, 6 steps are required, and each step corresponds to one interface test tool test set.
6. Editing each step in the examination and approval process to be tested, editing the name of the first step as A, editing the number of the interface test tool test set to be executed in the step of A, for example 1550, and repeating the steps to finish the editing of the test set of the F.
7. For a certain interface in some steps, a parameter value of a certain field in return data of the interface in the previous step or the interface in the current step needs to be referred as an entry parameter, and then a parameter adding instruction can be triggered to call a corresponding popup window to perform parameter adding operation. The specific process of adding the parameters is as follows: and inputting or selecting a quoting mode on the popup window, inputting or selecting specific parameter information according to the prompt of the popup window to complete the setting of the entry of the interface to be tested, and quoting the parameter value of the corresponding field of the quoting interface in the previous step or the current step as the entry of the interface at this time according to the entry setting when the flow is executed.
The parameter adding instruction may include the following four instructions:
1) inputting: when the input option is selected from the parameter type options, the input value of the parameter name of the request message of the current interface can be replaced by the currently input parameter value by inputting the parameter name and the parameter value, so that the technical effects of flexibly replacing the user identity role to execute the process and flexibly transmitting the interface parameters are achieved.
2) Reference to a single value: when the reference single-value option is selected from the parameter type options, a value of a certain field in response data of a certain specific interface in the previous step can be directly referred as the parameter name input parameter set by the current interface through setting the reference step, the reference interface ID, the reference parameter name and the parameter value. If the parameter name of the current interface is orderSummaryList, the reference step is 0, the reference interface ID is 8879, and the reference parameter name is registers/orderSummarycode, a value of the parameter name of the interface 8879, i.e. registers/orderSummarycode, can be obtained as the parameter of the interface with orderSummaryList.
3) Reference to multiple values: when a reference multi-value option is selected from the parameter type options, a group of values with the same parameter name can be obtained by setting a reference step, a reference interface ID, a reference parameter name and a parameter value; the parameter name is used as the parameter entry of the current interface, so that the effect of using the whole parameter value set of a certain field of a certain interface as the parameter entry is achieved. If the parameter name of the current interface is orderSummaryList, the reference step is 0, the reference interface ID is 8879, and the reference parameter name is registers/orderSummarycode, a group of values of the parameter name of the interface 8879, i.e. registers/orderSummarycode, can be obtained as the parameters of the current interface with the parameter name of orderSummaryList.
4) The reference multi-value takes the first: when the first option of the reference multi-value is selected in the parameter type option, the first value in a group of values with the same parameter name can be obtained as the parameter name input parameter set by the current interface by setting the reference step, the reference interface ID, the reference parameter name and the parameter value.
After the operation of adding the parameters of all the interfaces is completed, the whole process is operated, and the success and failure of the operation can be identified in steps. Meanwhile, in the process of executing the flow, the execution log of each interface request in each step can be displayed on a page, so that the checking and debugging are facilitated.
Referring to fig. 3, fig. 3 is a block diagram of a flow test platform according to an embodiment of the present invention.
The embodiment of the invention provides a process test platform, which comprises:
the to-be-tested approval process acquisition module 301 is configured to acquire an approval process to be tested, where the approval process to be tested includes a plurality of process nodes running on different services;
a to-be-tested interface obtaining module 302, configured to obtain to-be-tested interfaces of all process nodes, where the to-be-tested interfaces include a target interface and an interface to be referred;
a parameter entry obtaining module 303, configured to respond to a parameter adding instruction for a target interface, and obtain an entry of the target interface from an interface to be referred;
a test flow generation module 304, configured to generate a test flow for each flow node according to the to-be-tested interface and the corresponding entry parameter corresponding to each flow node;
the test result generating module 305 is configured to obtain an execution sequence of the approval process to be tested, execute the test process of each process node according to the execution sequence, and generate a test result.
In this embodiment of the present invention, the entry parameter obtaining module 303 includes:
the input parameter acquisition submodule is used for responding to a parameter adding instruction aiming at the target interface and acquiring input parameters;
and the first entry acquisition submodule is used for determining a reference interface from the interfaces to be referenced according to the input parameters and acquiring the entry of the target interface from the reference interface.
In this embodiment of the present invention, the entry parameter obtaining module 303 includes:
the reference parameter type and parameter to be adjusted determining submodule is used for responding to a parameter adding instruction aiming at the target interface and determining the reference parameter type and the parameter to be adjusted of the target interface;
the selection submodule is used for responding to the selection operation of a user, selecting a reference interface in the interface to be referenced and selecting a reference parameter name in the reference interface;
and the second parameter-entering obtaining submodule is used for obtaining a reference parameter value according to the reference parameter type and the reference parameter name and taking the reference parameter value as the parameter-entering of the parameter to be adjusted.
In an embodiment of the present invention, the second parameter obtaining sub-module includes:
the single-value parameter-entering acquisition unit is used for acquiring a numerical value corresponding to the name of the reference parameter as a reference parameter value in the reference interface when the reference parameter type is the reference single-value type, and taking the reference parameter value as the parameter to be adjusted;
and the multi-value parameter-entering obtaining unit is used for obtaining all numerical values with reference parameter names in the reference interface as reference parameter values when the reference parameter type is the reference multi-value type, and taking the reference parameter values as the parameters to be adjusted.
In the embodiment of the present invention, the method further includes:
the field acquisition sub-module is used for acquiring a field corresponding to the user identification code in the target interface when the input parameters are the user identification code and the user name;
and the third parameter access acquisition submodule is used for adopting the user name as the parameter access of the field.
In the embodiment of the present invention, the method further includes:
and the execution log generation module is used for generating an execution log of each interface to be tested and outputting the execution log to a preset display interface.
In this embodiment of the present invention, the test result generating module 305 includes:
the execution delay obtaining submodule is used for obtaining the execution delay of the test set corresponding to each process node;
and the test result generation submodule is used for executing the test flow of each flow node according to the execution sequence and the execution delay of each test set to generate a test result.
An embodiment of the present invention further provides an electronic device, where the device includes a processor and a memory:
the memory is used for storing the program codes and transmitting the program codes to the processor;
the processor is used for executing the flow test method of the embodiment of the invention according to the instructions in the program codes.
The embodiment of the invention also provides a computer-readable storage medium, which is used for storing the program code, and the program code is used for executing the flow testing method of the embodiment of the invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A process testing method is applied to a process testing platform, and comprises the following steps:
acquiring an approval process to be tested, wherein the approval process to be tested comprises a plurality of process nodes running on different services;
acquiring to-be-tested interfaces of all process nodes, wherein the to-be-tested interfaces comprise a target interface and an interface to be quoted;
responding to a parameter adding instruction aiming at the target interface, and acquiring the entry of the target interface from the interface to be quoted;
generating a test flow of each flow node according to the to-be-tested interface corresponding to each flow node and the corresponding entry parameter;
and acquiring the execution sequence of the approval process to be tested, executing the test process of each process node according to the execution sequence, and generating a test result.
2. The method according to claim 1, wherein the step of obtaining the entry of the target interface from the interface to be referenced in response to the add parameter instruction for the target interface comprises:
responding to a parameter adding instruction aiming at the target interface, and acquiring input parameters;
and determining a reference interface from the interfaces to be referenced according to the input parameters, and acquiring the input parameters of the target interface from the reference interface.
3. The method according to claim 1, wherein the step of obtaining the entry of the target interface from the interface to be referenced in response to the add parameter instruction for the target interface comprises:
responding to a parameter adding instruction aiming at the target interface, and determining a reference parameter type and a parameter to be adjusted of the target interface;
responding to the selection operation of a user, selecting a reference interface in the interface to be referenced, and selecting a reference parameter name in the reference interface;
and acquiring a reference parameter value according to the reference parameter type and the reference parameter name, and taking the reference parameter value as the parameter to be adjusted.
4. The method according to claim 3, wherein the step of obtaining a reference parameter value according to the reference parameter type and the reference parameter name, and using the reference parameter value as the entry of the parameter to be adjusted comprises:
when the reference parameter type is a reference single-value type, acquiring a numerical value corresponding to the reference parameter name in the reference interface as a reference parameter value, and taking the reference parameter value as the reference of the parameter to be adjusted;
and when the reference parameter type is a reference multi-value type, acquiring all numerical values with the reference parameter name in the reference interface as reference parameter values, and taking the reference parameter values as the reference of the parameter to be adjusted.
5. The method of claim 2, further comprising:
when the input parameters are a user identification code and a user name, acquiring a field corresponding to the user identification code in the target interface;
and adopting the user name as the entry parameter of the field.
6. The method of any one of claims 1-5, further comprising:
and generating an execution log of each interface to be tested, and outputting the execution log to a preset display interface.
7. The method according to any one of claims 1 to 5, wherein the step of executing the test flow of each flow node according to the execution sequence to generate a test result comprises:
acquiring the execution delay of the test set corresponding to each process node;
and executing the test flow of each flow node according to the execution sequence and the execution delay of each test set to generate a test result.
8. A process test platform, comprising:
the system comprises a to-be-tested approval process acquisition module, a to-be-tested approval process acquisition module and a to-be-tested approval process acquisition module, wherein the to-be-tested approval process comprises a plurality of process nodes running on different services;
the system comprises a to-be-tested interface acquisition module, a to-be-tested interface acquisition module and a to-be-tested interface acquisition module, wherein the to-be-tested interface acquisition module is used for acquiring to-be-tested interfaces of all process nodes, and the to-be-tested interfaces comprise target interfaces and to-be-quoted interfaces;
the parameter adding and acquiring module is used for responding to a parameter adding instruction aiming at the target interface and acquiring the parameter of the target interface from the interface to be quoted;
the test flow generation module is used for generating a test flow of each flow node according to the interface to be tested corresponding to each flow node and the corresponding entry parameter;
and the test result generation module is used for acquiring the execution sequence of the approval process to be tested, executing the test process of each process node according to the execution sequence and generating a test result.
9. An electronic device, comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the flow testing method of any one of claims 1-7 according to instructions in the program code.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium is configured to store a program code for executing the flow testing method of any one of claims 1-7.
CN202110886809.9A 2021-08-03 2021-08-03 Flow testing method, platform, electronic equipment and storage medium Active CN113535584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110886809.9A CN113535584B (en) 2021-08-03 2021-08-03 Flow testing method, platform, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110886809.9A CN113535584B (en) 2021-08-03 2021-08-03 Flow testing method, platform, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113535584A true CN113535584A (en) 2021-10-22
CN113535584B CN113535584B (en) 2022-04-05

Family

ID=78090334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110886809.9A Active CN113535584B (en) 2021-08-03 2021-08-03 Flow testing method, platform, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113535584B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2056202A1 (en) * 2007-10-31 2009-05-06 Siemens Aktiengesellschaft Method for testing of a COM interface
CN106776349A (en) * 2017-02-07 2017-05-31 武汉斗鱼网络科技有限公司 A kind of method to set up and system of interface testing process
CN109614310A (en) * 2018-10-22 2019-04-12 中国平安财产保险股份有限公司 Management method, device, computer equipment and the storage medium of test interface
CN110880100A (en) * 2019-12-03 2020-03-13 北京旷视科技有限公司 Business approval processing method, device and system
CN112905441A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Test case generation method, test method, device and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2056202A1 (en) * 2007-10-31 2009-05-06 Siemens Aktiengesellschaft Method for testing of a COM interface
CN106776349A (en) * 2017-02-07 2017-05-31 武汉斗鱼网络科技有限公司 A kind of method to set up and system of interface testing process
CN109614310A (en) * 2018-10-22 2019-04-12 中国平安财产保险股份有限公司 Management method, device, computer equipment and the storage medium of test interface
CN110880100A (en) * 2019-12-03 2020-03-13 北京旷视科技有限公司 Business approval processing method, device and system
CN112905441A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Test case generation method, test method, device and equipment

Also Published As

Publication number Publication date
CN113535584B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN106294120B (en) Method, apparatus and computer program product for testing code
US8056060B2 (en) Software testing method and system
Sincero et al. Approaching non-functional properties of software product lines: Learning from products
CN108509344B (en) Daily cutting batch test method, equipment and readable storage medium
CN111522728A (en) Method for generating automatic test case, electronic device and readable storage medium
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
Walter et al. Asking" What"?, Automating the" How"? The Vision of Declarative Performance Engineering
CN113282513B (en) Interface test case generation method and device, computer equipment and storage medium
CN107733710A (en) Construction method, device, computer equipment and the storage medium of link call relation
Ståhl et al. Continuous integration and delivery traceability in industry: needs and practices
CN112395202A (en) Interface automation test method and device, computer equipment and storage medium
CN111858354A (en) Method and device for automatically generating test report, storage medium and electronic equipment
CN114996127A (en) Intelligent test method and system for solid state disk firmware module
CN113535584B (en) Flow testing method, platform, electronic equipment and storage medium
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN112911235A (en) Monitoring rule configuration method, device, server and storage medium
CN111597093B (en) Exception handling method, device and equipment thereof
CN116662203A (en) Test method, test device, computer equipment and storage medium
CN113572900A (en) Outbound test method, device, computer equipment and computer readable storage medium
CN113220586A (en) Automatic interface pressure test execution method, device and system
Sasmito White Box Testing with Basis Path Technique in the Demography Administration Website
Vats et al. AVISAR-a three tier architectural framework for the testing of Object Oriented Programs
CN108628750B (en) Test code processing method and device
CN110221974A (en) Service platform system self checking method, device, computer equipment and storage medium
CN115757123B (en) Test case generation method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant