CN111078534B - Test scheduling method and related equipment - Google Patents

Test scheduling method and related equipment Download PDF

Info

Publication number
CN111078534B
CN111078534B CN201911179506.2A CN201911179506A CN111078534B CN 111078534 B CN111078534 B CN 111078534B CN 201911179506 A CN201911179506 A CN 201911179506A CN 111078534 B CN111078534 B CN 111078534B
Authority
CN
China
Prior art keywords
test
routing
interface
service
dynamic 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.)
Active
Application number
CN201911179506.2A
Other languages
Chinese (zh)
Other versions
CN111078534A (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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies 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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN201911179506.2A priority Critical patent/CN111078534B/en
Publication of CN111078534A publication Critical patent/CN111078534A/en
Application granted granted Critical
Publication of CN111078534B publication Critical patent/CN111078534B/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/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the application discloses a test scheduling method and related equipment, which are applied to a server, wherein the server comprises a dynamic test routing gateway, and the method comprises the following steps: the dynamic test routing gateway receives a first interface call request, wherein the first interface call request comprises a first test parameter; the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number; the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set; and the dynamic test routing gateway performs interface calling according to the first uniform resource locator set. Therefore, by scheduling and managing the execution of the test cases, the concurrent execution of the test cases is improved, and the test time consumption is reduced.

Description

Test scheduling method and related equipment
Technical Field
The application relates to the technical field of computers, in particular to a test scheduling method and related equipment.
Background
The Service architecture (SBA, service-based Architecture) is an important feature of the fifth generation mobile communication system (5G), and combines the characteristics of the network of the mobile core network and the technical development trend to divide the network function into several services that can be reused.
When enterprise application evolves to a serviced architecture or further evolves to a micro serviced architecture, test activities in the product development process are affected relatively deeply, and the number of services is increased by one order of magnitude even in a single product, unlike the traditional single application, and the composition of the product is more complex to a certain extent; in the running process of the product, the dependency relationship among services is multi-layered, networked and the like, so that the complexity is further increased, and the testing activity under the service architecture is very time-consuming.
Disclosure of Invention
The embodiment of the application provides a test scheduling method and related equipment, which are used for scheduling and managing the execution of test cases, so that the concurrent execution of the test cases is improved, and the test time consumption is reduced.
In a first aspect, an embodiment of the present application provides a test scheduling method, applied to a server, where the server includes a dynamic test routing gateway, the method includes:
the dynamic test routing gateway receives a first interface call request, wherein the first interface call request comprises a first test parameter;
the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number;
The dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set;
and the dynamic test routing gateway performs interface calling according to the first uniform resource locator set.
In a second aspect, an embodiment of the present application provides a test scheduling device applied to a server, where the server includes a dynamic test routing gateway, the device includes:
the receiving unit is used for controlling the dynamic test routing gateway to receive a first interface call request, wherein the first interface call request comprises a first test parameter;
the analysis unit is used for controlling the dynamic test routing gateway to analyze the first test parameters to obtain a first test case number;
the searching unit is used for controlling the dynamic test routing gateway to search according to the first test case number to obtain a first uniform resource locator set;
and the calling unit is used for controlling the dynamic test routing gateway to carry out interface calling according to the first uniform resource locator set.
In a third aspect, embodiments of the present application provide a server comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the first aspect of embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a computer storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, according to the test scheduling method and the related device described in the embodiments of the present application, a dynamic test routing gateway receives a first interface call request, where the first interface call request includes a first test parameter; the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number; the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set; and the dynamic test routing gateway performs interface calling according to the first uniform resource locator set. Therefore, the dynamic test routing gateway performs scheduling management on execution of test cases with different requirements, so that the test cases with different requirements can be concurrently executed, uniform resource locators of a plurality of tested services can be searched according to the same test case, and then interfaces of all tested services of the test case are simultaneously called for testing, thereby reducing the front-end post link time in the testing process, improving the concurrent execution of the test cases and reducing the testing time consumption.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic structural diagram of a test system with a service architecture according to an embodiment of the present application;
fig. 1-1 is a schematic structural diagram of a dynamic test routing gateway according to an embodiment of the present application;
fig. 1-2 are schematic structural diagrams of a tested component or module/service according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a test scheduling method according to an embodiment of the present application;
fig. 2-1 is a schematic structural diagram of a dynamic test routing information base according to an embodiment of the present application;
fig. 2-2 is a schematic structural diagram of an interface registration information table according to an embodiment of the present application;
FIG. 3 is a flow chart of another test scheduling method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application;
Fig. 5 is a functional unit composition block diagram of a test scheduler according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a test system with a service architecture according to an embodiment of the present application. As shown in fig. 1, the test system includes: the system comprises a test scheduling module, a dynamic test routing gateway, a MUT/TS Pair and a registry. In the initialization stage of the system, each tested Module (MUT)/tested Service (SUT) and test pile (TS)/analog service (MS) register with the registry, and a service list which is globally accessible in the system is maintained in the registry; the dynamic test routing gateway monitors the registration requests of the registration center and synchronizes all registered service information to an internal interface registration information table; in the initialization stage of the test case, there are mainly the following two information inputs: interface route information of the test case is input to the dynamic test route gateway and becomes a part of a dynamic test route information base; the specific execution process and step information of the test are input into a test scheduling module; after the preparation work is finished, the test scheduling module starts to work, and the scheduling operation of the test case execution process is gradually carried out one by one.
The test scheduling module is used for scheduling test behaviors. In this embodiment of the present application, specific execution process and step information of a test are input into the test scheduling module, where the test scheduling module is mainly configured to generate an interface call request, where the interface call request includes test parameters, where the test parameters include the following information: test case number, uniform resource locator (URL, uniform Resource Locator) of the interface, parameters of the interface. The test case number is not in the normal product call, and only in the test mode, the test parameter can be a request header parameter, the test case number needs to be formatted into an Http request header, and the interface Uniform Resource Locator (URL) and the interface parameter are filled with a normal request body. In the embodiments of the present application, a Uniform Resource Locator (URL) of an interface generally refers to a path of the interface of a module under test or a service under test.
The registry is used for managing relevant interface information between all services in the service framework through the registry and the dynamic test routing gateway, so that the service release is realized. In the initialization stage of the system, each tested Module (MUT)/tested Service (SUT) and test pile (TS)/simulation service (MS) are registered with the registry to maintain a service list globally accessible in the registry. Wherein MUT (Module Under Testing), the tested component or module refers to the test object in the test activity; SUT (Service Under Testing), one of MUTs, in a Service development mode, has a relatively large number of modules as a Service (Service), and in a test activity, they are objects of a test Service type, i.e., SUTs; TS (Test Stub), test Stub (or pile module), MUT usually depends on other components associated, and the module which simulates other components depending on the association is called Test Stub when the Test activity controls the execution of the Test flow for better construction use cases; MS (Mock Service) a simulation service, one of which is tested, in the service development mode, one service typically depends on the other services, and when a simulation substitution is made for these services, i.e. the type of TS is a service, i.e. MS.
The dynamic test route gateway is used for carrying out dynamic route management on the call of the interface, and under the management of the test scheduling module, the call route of the test interface is changed according to the case level. The test scheduling module and the MUT/TS Pair module both work under the rules formulated by the dynamic test routing gateway. In addition, the dynamic test routing gateway monitors the registration request of the registration center and synchronizes all registered service information to an interface registration information table therein. Wherein the dynamic test routing gateway formulates the following rules: (1) The global test mode enabling is a globally accessible configuration item, when configured as enabling, the global test mode is entered, otherwise the global test mode is exited, and in the embodiment of the present application, all MUT/TS Pair modules must monitor the global test mode enabling to determine whether to enter or exit the test mode; (2) In the global test mode, all interface calls analyze a common request header parameter (namely test parameter) at an interface inlet, wherein the test parameter comprises a test case number executed by a current call link; (3) All interface calls must pass through the dynamic test routing gateway, and all interface calls must read the test parameters and pass through when the lower service interface is called through the dynamic test routing gateway, so as to ensure that the test parameters can be passed through in the whole call link.
Referring to fig. 1-1 together, fig. 1-1 is a schematic structural diagram of the dynamic test routing gateway, where the dynamic test routing gateway includes: the system comprises a dynamic test route information base, an interface registration information table, a route parameter analysis and route execution module, a route information management module, an interface information management module, a route operation information interface and an interface information operation interface. Some of the main data input/output and call relationships in fig. 1-1 are as follows: firstly, when test case information is recorded, calling the routing information operation interface to receive a routing management request; and then, the routing information management module maintains and updates the dynamic test routing information base according to the routing management request. And secondly, the dynamic test routing gateway can monitor the registration operation of the registration center, when the registration information of the service is monitored to be updated, the interface information operation interface is called to receive a registration information request, and the interface information management module maintains and updates the interface registration information table according to the registration information request. Thirdly, when the dynamic test routing gateway receives an interface call request, the routing parameter analyzing and routing executing module executes the following steps: analyzing test parameters in the interface call request to obtain the number of the current interface test case; inquiring the dynamic test route information base through the number of the current test case to obtain the route configuration of the current interface in the current test case; acquiring the URL of the interface finally called from the interface registration information table according to the routing configuration of the current test case; and performing interface call according to the URL of the finally called interface, wherein the MUT/SUT call calls a specific actual module or actual service, and the TS/MS call calls a pile module and a pile service.
The MUT/TS Pair module comprises MUT/SUT (tested component or module/tested service) and TS/MS (test pile/simulation service). It will be appreciated that in a multi-link test environment, each module under test typically has a corresponding pile module forming a pair. In an embodiment of the application, the MUT/SUT (component under test or module/service under test) includes a call pattern management module and associated configuration and management interfaces.
Referring to fig. 1-2 together, fig. 1-2 are schematic structural diagrams of a tested component or a module/a tested service according to an embodiment of the present application, where the tested component or the module/the tested service includes: the system comprises an internal logic module, a calling mode management module and a mode control interface. The call mode management module monitors the change of the global test mode enabling configuration through the mode control interface, switches modes according to information received by the mode control interface, namely switches between a normal mode and a test mode, and then controls internal intermediate call according to the mode in which the call mode management module is located, wherein the method specifically comprises the following steps: when in the normal mode, all intermediate calls directly call the corresponding MUT/SUT (component under test or module/service under test); when in test mode, all intermediate calls go through the dynamic test routing gateway.
Referring to fig. 2, fig. 2 is a flow chart of another test scheduling method according to an embodiment of the present application. As shown in fig. 2, the test scheduling method is applied to a server, the server includes a dynamic test routing gateway, the test scheduling method is applicable to the test system shown in fig. 1, and the test scheduling method includes:
s201, the dynamic test routing gateway receives a first interface call request, wherein the first interface call request comprises a first test parameter.
The server may further include a test scheduling module, and the first interface call request may be generated and sent by the test scheduling module.
When testing preparation work is carried out, specific execution process and step information of the test case are input into the test scheduling module; in the test process, the test scheduling module generates an interface call request, wherein the interface call request comprises test parameters, and the test parameters comprise test case numbers; and then, the test scheduling module sends the interface calling request to the dynamic test routing gateway.
It is understood that any one interface call is initiated by the test scheduling module, and the test parameters are necessarily injected by the initial initiator of the interface call, and the test parameters will not change during the execution of a single test case, but there are many connectors in one test case, and multiple test cases are executed concurrently, so for the test scheduling module, it changes the scheduling switch between different test cases, and changes dynamically when the call of different interfaces is initiated.
S202, the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number.
The parsing of the first test parameter by the dynamic test routing gateway may be JOSN data parsing, XML data parsing, or the like, which is not limited in this application.
And S203, the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set.
It should be noted that the dynamic test routing gateway includes a dynamic test routing information base and an interface registration information table, and the dynamic test routing gateway may find routing information of a test case corresponding to the first test case number according to the first test case number, and then find a plurality of uniform resource locators corresponding to the first interface call request in the interface registration information table, so as to obtain the first uniform resource locator set.
It will be appreciated that in a distributed system, there may be multiple instances providing the same interface function, and that different instances of the same interface form a collection.
The dynamic test route information base is pre-constructed according to the interface route information of all test cases, and the interface registration information table is pre-constructed according to the registration information of all services.
S204, the dynamic test routing gateway calls an interface according to the first uniform resource locator set.
It can be understood that the dynamic test routing gateway forwards the interface call request according to the Robin policy (polling) to the first uniform resource locator set, that is, forwards the interface call request to a specific MUT/SUT (tested component or module/tested service) or TS/MS (test stub/analog service) according to the interface routing result, thereby performing interface call.
It can be seen that in the embodiment of the present application, the dynamic test routing gateway receives a first interface call request, where the first interface call request includes a first test parameter, and the first interface call request is generated and sent by the test scheduling module; the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number; the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set; and the dynamic test routing gateway performs interface calling according to the first uniform resource locator set. Therefore, by scheduling and managing the execution of the test cases, the concurrent execution of the test cases is improved, and the test time consumption is reduced.
In one possible example, the dynamic test routing gateway includes a routing parameter analyzing and routing executing module, and the dynamic test routing gateway analyzes the first test parameter to obtain a first test case number, including: the dynamic test routing gateway judges whether the current test mode exists or not according to the first test parameters through the routing parameter analysis and routing execution module; and if the dynamic test routing gateway is in the test mode currently, analyzing the first test parameters through the routing parameter analyzing and routing executing module to obtain a first test case number.
It can be seen that the test case number is contained in the test parameters in the test mode, and after the route parameter analysis and route execution module receives the interface call request, whether the test parameters are in the test mode is determined, and whether the parameter analysis is performed is determined, so that the parameter analysis is avoided for all the interface call requests, and the operation time is reduced.
In one possible example, the dynamic test routing gateway further includes a dynamic test routing information base and an interface registration information table, the first test parameter includes a first uniform resource locator, and the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set, including: the dynamic test routing gateway searches in the interface registration information table according to the first uniform resource locator through the routing parameter analysis and routing execution module to obtain a first service number and a first interface number; the dynamic test routing gateway searches in the dynamic test routing information base through the routing parameter analysis and routing execution module according to the first test case number, the first service number and the first interface number to obtain a first routing strategy; the dynamic test routing gateway searches in the interface registration information table through the routing parameter analysis and routing execution module according to the first service number, the first interface number and the first routing strategy to obtain the first uniform resource locator set.
In one possible example, the dynamic test route information base includes top-level route information, second-level route information and third-level route information, where the top-level route information is a test case number index, and includes n test case numbers, where the n test case numbers are connected in series, and each test case number in the n test case numbers is associated with 1 piece of the second-level route information; the second-level routing information is a service number level and comprises n service numbers, the n service numbers are connected in parallel, and each service number in the n service numbers is associated with 1 third-level routing information; the third-level routing information is of an interface number level and comprises n-1 simulation service interface numbers and 1 tested service interface number, wherein the n-1 simulation service interface numbers and the tested service interface numbers are connected in parallel.
Referring to fig. 2-1 together, fig. 2-1 is a schematic structural diagram of a dynamic test routing information base according to an embodiment of the present application. As shown in fig. 2-1, route management is performed with granularity of test cases, and a route information storage structure of the dynamic test route information base is as follows: the top layer is indexed by test cases, namely, the routing information of each test case is independent; the second level is a service level, i.e., each service routing information is managed independently; the third level is interface level, i.e. in each service, the route information of the interface is independently managed; the routing key information is: the current interface of the current service of the current test case is a walking pile route or a simulation service or a route of a walking actual service.
In one possible example, the interface registration information table includes top-level registration information, second-level registration information and third-level registration information, where the top-level registration information is a service number index, and includes n service numbers, where the n service numbers are connected in series, and each service number in the n service numbers is associated with 1 piece of second-level registration information; the second-level registration information is an interface number level and comprises n interface numbers, the n interface numbers are connected in parallel, and each interface number in the n interface numbers is associated with 1 third-level registration information; the third-level registration information is a registration item number level and comprises n-1 simulation service registration item numbers and 1 tested service registration item number, wherein the n-1 simulation service registration item numbers and the tested service registration item numbers are connected in parallel.
The interface registration information table is an information table for searching the target service after the route parameter analysis and route execution module inquires the current route strategy, and is formed by summarizing registration information of the service in the cluster by the registration center. Referring to fig. 2-2 together, fig. 2-2 is a schematic structural diagram of an interface registration information table according to an embodiment of the present application. As shown in fig. 2-2, the storage structure is as follows: the top layer is indexed by service number, i.e. the registration information of each service is independent; the second level is interface level, that is, registration information of each service interface is independently managed; the third level is the entry level, i.e., there are multiple registration entries per interface per service; key information of the registration entry is: the registration type is an actual service or a stub type (analog service).
2-1 and 2-2, the process of searching by the dynamic test routing gateway according to the first test case number is as follows:
in the first case, assume that the first test case number in the test parameters in the call request received by the dynamic test routing gateway is test case 2 in the dynamic test routing information base shown in fig. 2-1, and the first uniform resource locator is a registration entry 1-type url in a lower interface 2 of the service 2 in the interface registration information table shown in fig. 2-2. Firstly, a routing parameter analysis and routing execution module in the dynamic test routing gateway searches up the previous-level registration information in an interface registration information table according to a registration item 1-type url to obtain second registration information corresponding to the registration item 1-type url as an interface 2; the routing parameter analysis and routing execution module searches the previous level of registration information in the interface registration information table according to the interface 2 to obtain the top level registration information corresponding to the registration item 1-type url as the service 2; to this end, the first service number is determined to be service 2 and the first interface number is determined to be interface 2. And secondly, the routing parameter analysis and routing execution module searches in a dynamic testing routing information base according to the testing case 2, the service 2 and the interface 2 to determine that the routing strategy of the testing case 2, the service 2 and the interface 2 is the routing of the tested service, namely the interface 2 is the tested service interface. And the routing parameter analysis and routing execution module searches in the interface registration information table according to the routing strategy of the service 2, the interface 2 and the routing of the tested service to obtain a registration entry 2-type real in the lower interface 2 of the service 2 in the interface registration information table shown in fig. 2-2, wherein the first uniform resource locator set has only one element.
In the second case, assume that the first test case number in the test parameters in the call request received by the dynamic test routing gateway is test case 2 in the dynamic test routing information base shown in fig. 2-1, and the first uniform resource locator is a registration entry 1-type url in the lower interface 1 of the service 2 in the interface registration information table shown in fig. 2-2. Firstly, a routing parameter analysis and routing execution module in the dynamic test routing gateway searches up the previous-level registration information in an interface registration information table according to a registration item 1-type url to obtain second registration information corresponding to the registration item 1-type url as an interface 1; the routing parameter analysis and routing execution module searches the previous level of registration information in the interface registration information table according to the interface 1 to obtain the top level registration information corresponding to the registration item 1-type url as a service 2; to this end, the first service number is determined to be service 2 and the first interface number is determined to be interface 1. And secondly, the routing parameter analysis and routing execution module searches in a dynamic testing routing information base according to the testing case 2, the service 2 and the interface 1 to determine that the routing strategy of the testing case 2, the service 2 and the interface 1 is the routing of the simulation service, namely the interface 1 is a simulation service interface. And the routing parameter analysis and routing execution module searches in the interface registration information table according to the routing strategy of the routing of the service 2, the interface 1 and the routing simulation service to obtain a registration item 1-type url, a registration item 3-type url, a registration item 4-type url, … … and a registration item n-type url in a lower interface 1 of the service 2 in the interface registration information table shown in fig. 2-2, wherein the first uniform resource locator is provided with n-1 elements.
It can be seen that the dynamic test routing gateway searches the interface registration information table according to the first uniform resource locator in the test parameters through the routing parameter analysis and routing execution module to obtain the number of the service called at this time and the interface number of the service called at this time; the dynamic test route gateway then searches in a dynamic test route information base through a route parameter analysis and route execution module according to the test case number, the number of the service called at the time and the interface number of the service called at the time, and obtains the route strategy called at the time by the interface; the dynamic test routing gateway searches in an interface registration information table through a routing parameter analysis and routing execution module according to the routing strategy called by the interface, the number of the service called by the time and the interface number of the service called by the time to obtain a first uniform resource locator set; the dynamic test routing gateway performs interface call through the first uniform resource locator set of the routing parameter analysis and routing execution module, thereby improving concurrent execution and reducing test time.
In one possible example, before the dynamic test routing gateway performs the search according to the first test case number, the method further includes: the dynamic test routing gateway receives interface routing information of all test cases; and the dynamic test routing gateway constructs the dynamic test routing information base according to the interface routing information of all the test cases.
It can be seen that before the test process is executed, the interface routing information of the test case is input into the dynamic test routing gateway in advance, so that a dynamic test routing information base is constructed, the test case can quickly find out the corresponding routing strategy in the execution process, and the test time is shortened.
In one possible example, the server further includes a registry, and before the dynamic test routing gateway performs the searching according to the first test case number, the method further includes: the dynamic test routing gateway monitors a service list in the registry, wherein the service list is obtained by registering all tested services and simulated services in the registry; and the dynamic test routing gateway constructs the interface registration information table according to the service list.
It can be seen that before the test process is executed, all actual services or simulated services are registered in the registry in advance to obtain a service list, and the dynamic test routing gateway acquires the service list to construct an interface registration information table, so that a corresponding uniform resource locator set can be quickly found in the test activity execution process, and the test time is reduced.
Referring to fig. 3, fig. 3 is a schematic flow chart of another test scheduling method according to the embodiment of the present application, consistent with the embodiment shown in fig. 2. As shown in fig. 3, the test scheduling method is applied to a server, the server includes a dynamic test routing gateway, a test scheduling module and a registry, the test scheduling method is applicable to the test system shown in fig. 1, and the test scheduling method includes:
s301, the dynamic test routing gateway receives interface routing information of all test cases.
S302, the dynamic test routing gateway constructs the dynamic test routing information base according to the interface routing information of all the test cases.
S303, the dynamic test routing gateway monitors a service list in the registry, wherein the service list is obtained by registering all tested services and simulated services in the registry.
S304, the dynamic test routing gateway constructs the interface registration information table according to the service list.
S305, the dynamic test routing gateway receives a first interface call request, wherein the first interface call request comprises a first test parameter.
S306, the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number.
S307, the dynamic test routing gateway searches in the dynamic test routing information base and the interface registration information table according to the first test case number to obtain a first uniform resource locator set.
S308, the dynamic test routing gateway performs interface calling according to the first uniform resource locator set.
It should be noted that, the specific implementation process of this embodiment may refer to the specific implementation process described in the foregoing method embodiment, which is not described herein.
It can be seen that, in the technical solution provided in this embodiment, first, a dynamic test routing gateway receives interface routing information of all test cases, so as to construct a dynamic test routing information base, and the dynamic test routing gateway monitors service lists obtained after all tested services and analog services are registered in a registry, so as to construct an interface registration information table; secondly, after receiving a first interface call request, the dynamic test routing gateway analyzes and obtains a first test case number; thirdly, the dynamic test routing gateway searches the dynamic test routing information base and the interface registration information table according to the first test case number to obtain a first uniform resource locator set; and finally, the dynamic test routing gateway performs interface calling according to the first uniform resource locator set. By the method, the dynamic test routing gateway performs scheduling management on the execution of the test cases, so that the concurrent execution of the test cases is improved, and the test time consumption is reduced.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a server according to an embodiment of the present application, which corresponds to the embodiments shown in fig. 2 and 3. As shown in fig. 4, the server 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, wherein the one or more programs 421 are stored in the memory 420 and configured to be executed by the application processor 410, and the one or more programs 421 include instructions for performing any of the steps of the method embodiments described above.
In one possible example, the server includes a dynamic test routing gateway, and the instructions in program 421 are for: the dynamic test routing gateway receives a first interface call request, wherein the first interface call request comprises a first test parameter; the dynamic test routing gateway analyzes the first test parameters to obtain a first test case number; the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set; and the dynamic test routing gateway performs interface calling according to the first uniform resource locator set.
It can be seen that, in the server provided in the embodiment of the present application, the test scheduling module sends a first interface call request to the dynamic test routing gateway; after receiving the first interface call request, the dynamic test routing gateway analyzes a first test parameter in the first interface call request to obtain a first test case number, and then searches a first uniform resource locator set according to the first test case number, and performs interface call through the first uniform resource locator set. Therefore, by scheduling and managing the execution of the test cases, the concurrent execution of the test cases is improved, and the test time consumption is reduced.
In one possible example, the dynamic test routing gateway includes a routing parameter parsing and routing execution module, where the dynamic test routing gateway parses the first test parameter to obtain a first test case number, and the program 421 further includes instructions for: the dynamic test routing gateway judges whether the current test mode exists or not according to the first test parameters through the routing parameter analysis and routing execution module; and if the dynamic test routing gateway is in the test mode at present, the routing parameter analysis and routing execution module analyzes the first test parameter to obtain a first test case number.
In one possible example, the dynamic test routing gateway further includes a dynamic test routing information base and an interface registration information table, the first test parameter includes a first uniform resource locator, and in the aspect that the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set, the program 421 further includes instructions for: the dynamic test routing gateway searches in the interface registration information table through the routing parameter analysis and routing execution module according to the first uniform resource locator to obtain a first service number and a first interface number; the dynamic test routing gateway searches in the dynamic test routing information base through the routing parameter analysis and routing execution module according to the first test case number, the first service number and the first interface number to obtain a first routing strategy; and the dynamic test routing gateway searches the interface registration information table through the routing parameter analysis and routing execution module according to the first service number, the first interface number and the first routing strategy to obtain the first uniform resource locator set.
In one possible example, the dynamic test route information base includes top-level route information, second-level route information and third-level route information, where the top-level route information is a test case number index, and includes n test case numbers, where the n test case numbers are connected in series, and each test case number in the n test case numbers is associated with 1 piece of the second-level route information; the second-level routing information is a service number level and comprises n service numbers, the n service numbers are connected in parallel, and each service number in the n service numbers is associated with 1 third-level routing information; the third-level routing information is of an interface number level and comprises n-1 simulation service interface numbers and 1 tested service interface number, wherein the n-1 simulation service interface numbers and the tested service interface numbers are connected in parallel.
In one possible example, the interface registration information table includes top-level registration information, second-level registration information, and third-level registration information, where the top-level registration information is a service number index, and includes n service numbers, where the n service numbers are connected in series, and each service number in the n service numbers is associated with 1 piece of second-level registration information; the second-level registration information is an interface number level and comprises n interface numbers, the n interface numbers are connected in parallel, and each interface number in the n interface numbers is associated with 1 third-level registration information; the third-level registration information is a registration item number level and comprises n-1 simulation service registration item numbers and 1 tested service registration item number, wherein the n-1 simulation service registration item numbers and the tested service registration item numbers are connected in parallel.
In one possible example, in terms of the dynamic test routing gateway performing a lookup according to the first test case number, the program 421 further includes instructions for: the dynamic test routing gateway receives interface routing information of all test cases; and the dynamic test routing gateway constructs the dynamic test routing information base according to the interface routing information of all the test cases.
In one possible example, the server further includes a registry, and in terms of the dynamic test routing gateway performing a lookup according to the first test case number, the program 421 further includes instructions for: the dynamic test routing gateway monitors a service list in the registry, wherein the service list is obtained by registering all tested services and simulated services in the registry; and the dynamic test routing gateway constructs the interface registration information table according to the service list.
It should be noted that, the specific implementation process of this embodiment may refer to the specific implementation process described in the foregoing method embodiment, which is not described herein.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various steps described in connection with the embodiments provided herein may be implemented as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional units of the electronic device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
Referring to fig. 5, fig. 5 is a functional unit block diagram of a test scheduler according to an embodiment of the present application. As shown in fig. 5, the test scheduler 500 is applied to a server, where the server includes a dynamic test routing gateway, and the test scheduler 500 includes:
a receiving unit 501, configured to control the dynamic test routing gateway to receive a first interface call request, where the first interface call request includes a first test parameter;
the parsing unit 502 is configured to control the dynamic test routing gateway to parse the first test parameter to obtain a first test case number;
A searching unit 503, configured to control the dynamic test routing gateway to search according to the first test case number, so as to obtain a first uniform resource locator set;
and a calling unit 504, configured to control the dynamic test routing gateway to perform interface calling according to the first uniform resource locator set.
It can be seen that, in the test scheduling device provided in the embodiment of the present application, after receiving a first interface call request from a test scheduling module, the dynamic test routing gateway parses a first test parameter in the first interface call request to obtain a first test case number, and then searches a first uniform resource locator set according to the first test case number, and performs interface call through the first uniform resource locator set. Therefore, by scheduling and managing the execution of the test cases, the concurrent execution of the test cases is improved, and the test time consumption is reduced.
In one possible example, the dynamic test routing gateway includes a routing parameter parsing and routing executing module, where the dynamic test routing gateway parses the first test parameter to obtain a first test case number, and the parsing unit 502 is specifically configured to: the dynamic test routing gateway judges whether the current test mode exists or not according to the first test parameters through the routing parameter analysis and routing execution module; and if the dynamic test routing gateway is in the test mode at present, the routing parameter analysis and routing execution module analyzes the first test parameter to obtain a first test case number.
In one possible example, the dynamic test routing gateway further includes a dynamic test routing information base and an interface registration information table, the first test parameter includes a first uniform resource locator, and the searching unit 503 is specifically configured to: the dynamic test routing gateway searches in the interface registration information table through the routing parameter analysis and routing execution module according to the first uniform resource locator to obtain a first service number and a first interface number; the dynamic test routing gateway searches in the dynamic test routing information base through the routing parameter analysis and routing execution module according to the first test case number, the first service number and the first interface number to obtain a first routing strategy; and the dynamic test routing gateway searches the interface registration information table through the routing parameter analysis and routing execution module according to the first service number, the first interface number and the first routing strategy to obtain the first uniform resource locator set.
In one possible example, the dynamic test route information base includes top-level route information, second-level route information and third-level route information, where the top-level route information is a test case number index, and includes n test case numbers, where the n test case numbers are connected in series, and each test case number in the n test case numbers is associated with 1 piece of the second-level route information; the second-level routing information is a service number level and comprises n service numbers, the n service numbers are connected in parallel, and each service number in the n service numbers is associated with 1 third-level routing information; the third-level routing information is of an interface number level and comprises n-1 simulation service interface numbers and 1 tested service interface number, wherein the n-1 simulation service interface numbers and the tested service interface numbers are connected in parallel.
In one possible example, the interface registration information table includes top-level registration information, second-level registration information, and third-level registration information, where the top-level registration information is a service number index, and includes n service numbers, where the n service numbers are connected in series, and each service number in the n service numbers is associated with 1 piece of second-level registration information; the second-level registration information is an interface number level and comprises n interface numbers, the n interface numbers are connected in parallel, and each interface number in the n interface numbers is associated with 1 third-level registration information; the third-level registration information is a registration item number level and comprises n-1 simulation service registration item numbers and 1 tested service registration item number, wherein the n-1 simulation service registration item numbers and the tested service registration item numbers are connected in parallel.
In one possible example, in terms of the dynamic test routing gateway performing a lookup according to the first test case number, the test scheduling apparatus 500 further includes:
the receiving unit 501 is further configured to receive interface routing information of all test cases by using the dynamic test routing gateway;
the first construction unit is used for constructing the dynamic test route information base by the dynamic test route gateway according to the interface route information of all the test cases.
In one possible example, the server further includes a registry, and in the aspect that the dynamic test routing gateway performs the searching according to the first test case number, the test scheduling apparatus 500 further includes:
the monitoring unit is used for monitoring a service list in the registry by the dynamic test routing gateway, wherein the service list is obtained by registering all tested services and simulated services in the registry;
and the second construction unit is used for constructing the interface registration information table by the dynamic test routing gateway according to the service list.
It can be understood that, since the method embodiment and the apparatus embodiment are in different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be adapted to the apparatus embodiment portion synchronously, which is not described herein.
The embodiment of the application also provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to execute part or all of the steps of any one of the methods described in the embodiments of the method, where the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising an electronic device.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (9)

1. A test scheduling method, applied to a server, the server including a dynamic test routing gateway, the method comprising:
the dynamic test routing gateway receives a first interface call request, wherein the first interface call request comprises a first test parameter; the dynamic test routing gateway comprises a routing parameter analysis and routing execution module;
The dynamic test routing gateway analyzes the first test parameter to obtain a first test case number, which comprises the following steps: the dynamic test routing gateway judges whether the current test mode exists or not according to the first test parameters through the routing parameter analysis and routing execution module; if the dynamic test routing gateway is in the test mode currently, the first test parameters are analyzed through the routing parameter analysis and routing execution module to obtain a first test case number;
the dynamic test routing gateway searches according to the first test case number to obtain a first uniform resource locator set;
and the dynamic test routing gateway performs interface calling according to the first uniform resource locator set.
2. The method of claim 1, wherein the dynamic test routing gateway further comprises a dynamic test routing information base and an interface registration information table, wherein the first test parameter comprises a first uniform resource locator, wherein the dynamic test routing gateway performs a lookup according to the first test case number to obtain a first uniform resource locator set, and wherein the method comprises:
the dynamic test routing gateway searches in the interface registration information table according to the first uniform resource locator through the routing parameter analysis and routing execution module to obtain a first service number and a first interface number;
The dynamic test routing gateway searches in the dynamic test routing information base through the routing parameter analysis and routing execution module according to the first test case number, the first service number and the first interface number to obtain a first routing strategy;
the dynamic test routing gateway searches in the interface registration information table through the routing parameter analysis and routing execution module according to the first service number, the first interface number and the first routing strategy to obtain the first uniform resource locator set.
3. The method of claim 2, wherein the dynamic test routing information base includes top level routing information, second level routing information, and third level routing information, wherein,
the top-level routing information is a test case number index and comprises n test case numbers, the n test case numbers are connected in series, and each test case number in the n test case numbers is associated with 1 second-level routing information;
the second-level routing information is a service number level and comprises n service numbers, the n service numbers are connected in parallel, and each service number in the n service numbers is associated with 1 third-level routing information;
The third-level routing information is of an interface number level and comprises n-1 simulation service interface numbers and 1 tested service interface number, wherein the n-1 simulation service interface numbers and the tested service interface numbers are connected in parallel.
4. The method of claim 2, wherein the interface registration information table includes top level registration information, second level registration information, and third level registration information, wherein,
the top-level registration information is a service number index and comprises n service numbers, the n service numbers are connected in series, and each service number in the n service numbers is associated with 1 piece of second-level registration information;
the second-level registration information is an interface number level and comprises n interface numbers, the n interface numbers are connected in parallel, and each interface number in the n interface numbers is associated with 1 third-level registration information;
the third-level registration information is a registration item number level and comprises n-1 simulation service registration item numbers and 1 tested service registration item number, wherein the n-1 simulation service registration item numbers and the tested service registration item numbers are connected in parallel.
5. The method of claim 2, wherein prior to the dynamic test routing gateway performing the lookup according to the first test case number, the method further comprises:
The dynamic test routing gateway receives interface routing information of all test cases;
and the dynamic test routing gateway constructs the dynamic test routing information base according to the interface routing information of all the test cases.
6. The method of claim 2, wherein the server further comprises a registry, the method further comprising, prior to the dynamic test routing gateway performing the lookup according to the first test case number:
the dynamic test routing gateway monitors a service list in the registry, wherein the service list is obtained by registering all tested services and simulated services in the registry;
and the dynamic test routing gateway constructs the interface registration information table according to the service list.
7. A test scheduler for use with a server, the server including a dynamic test routing gateway, the apparatus comprising:
the receiving unit is used for controlling the dynamic test routing gateway to receive a first interface call request, wherein the first interface call request comprises a first test parameter; the dynamic test routing gateway comprises a routing parameter analysis and routing execution module;
The parsing unit is configured to control the dynamic test routing gateway to parse the first test parameter to obtain a first test case number, and includes: the dynamic test routing gateway judges whether the current test mode exists or not according to the first test parameters through the routing parameter analysis and routing execution module; if the dynamic test routing gateway is in the test mode currently, the first test parameters are analyzed through the routing parameter analysis and routing execution module to obtain a first test case number;
the searching unit is used for controlling the dynamic test routing gateway to search according to the first test case number to obtain a first uniform resource locator set;
and the calling unit is used for controlling the dynamic test routing gateway to carry out interface calling according to the first uniform resource locator set.
8. A server comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-6.
CN201911179506.2A 2019-11-26 2019-11-26 Test scheduling method and related equipment Active CN111078534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911179506.2A CN111078534B (en) 2019-11-26 2019-11-26 Test scheduling method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911179506.2A CN111078534B (en) 2019-11-26 2019-11-26 Test scheduling method and related equipment

Publications (2)

Publication Number Publication Date
CN111078534A CN111078534A (en) 2020-04-28
CN111078534B true CN111078534B (en) 2023-06-09

Family

ID=70311763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911179506.2A Active CN111078534B (en) 2019-11-26 2019-11-26 Test scheduling method and related equipment

Country Status (1)

Country Link
CN (1) CN111078534B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546476A (en) * 2010-12-14 2012-07-04 中兴通讯股份有限公司 Media gateway and method for detecting highway resources
CN108540674B (en) * 2018-03-22 2020-12-29 平安科技(深圳)有限公司 Automatic testing method and device, computer equipment and storage medium
CN110083523A (en) * 2019-03-13 2019-08-02 中国平安人寿保险股份有限公司 Interface test method, device, computer installation and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN111078534A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN110347596B (en) Test method, device, system, electronic equipment and medium
KR100551454B1 (en) Grid computing control method for testing application program capacity of server and service method there of
CN107645562A (en) Data transmission processing method, device, equipment and system
CN106155812A (en) Method, device, system and the electronic equipment of a kind of resource management to fictitious host computer
CN108228444B (en) Test method and device
CN110765024A (en) Simulation test method, simulation test device, electronic equipment and computer-readable storage medium
US7809368B2 (en) Architecture for location independent, automated integration testing and quality assurance of next generation IMS services
CN108600034A (en) Traffic pressure management method, device, equipment, system and storage medium
US8332507B2 (en) Method for determining service demands in a network load balanced scenario
CN107346280A (en) A kind of data report the method, apparatus and electronic equipment with data processing
CN111061807A (en) Distributed data acquisition and analysis system and method, server and medium
CN111078534B (en) Test scheduling method and related equipment
CN109634752A (en) A kind of client request processing method and system based on page gateway
CN111949521B (en) Software performance test method and device
CN109587197A (en) It is associated with the methods, devices and systems of reported data
CN107229569A (en) Method and system are performed towards the automatic test centralized dispatching for performing technology more
US20080162687A1 (en) Data acquisition system and method
CN101969442B (en) Process running environment perception and migration based network analog framework implementation method
CN111158979A (en) Service dial testing method, system, device and storage medium
CN113452575B (en) Service test method, system, device and storage medium
CN111404763A (en) Core network performance test method, device and system
CN109639533A (en) A kind of test method, system and the terminal device of subdispatch strategy
Asthana et al. Maareech: Usability testing tool for voice response system using xml based user models
US9479579B2 (en) Grouping processing method and system
CN109951486B (en) Information processing method, information processing apparatus, storage medium, and electronic apparatus

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