CN112328498A - Service testing method and device, storage medium and electronic device - Google Patents
Service testing method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN112328498A CN112328498A CN202011363246.7A CN202011363246A CN112328498A CN 112328498 A CN112328498 A CN 112328498A CN 202011363246 A CN202011363246 A CN 202011363246A CN 112328498 A CN112328498 A CN 112328498A
- Authority
- CN
- China
- Prior art keywords
- component
- components
- test
- configuration information
- running
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 268
- 238000000034 method Methods 0.000 claims abstract description 40
- 230000015654 memory Effects 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000010191 image analysis Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 6
- 230000008878 coupling Effects 0.000 description 6
- 238000010168 coupling process Methods 0.000 description 6
- 238000005859 coupling reaction Methods 0.000 description 6
- 230000010354 integration Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000010998 test method Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000000712 assembly Effects 0.000 description 2
- 238000000429 assembly Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test 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 application discloses a service testing method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring configuration information of a target test service, wherein the configuration information is configured with a plurality of components and operation sequences of the components, and each component in the components is used for representing a stage in a test flow of the target test service; running the plurality of components in the order configured by the configuration information; and obtaining the test result of the target test service obtained by operating the plurality of components. The method and the device solve the technical problem that the test operation in the related technology is complex.
Description
Technical Field
The present application relates to the field of testing, and in particular, to a method and an apparatus for testing a service, a storage medium, and an electronic apparatus.
Background
Jenkins is an open-source Continuous Integration (CI) tool providing friendly operation interfaces, originated in Hudson (a continuous integration tool developed by Java), and is mainly used for continuously and automatically building, testing software projects and monitoring the running of external tasks. Jenkins are written in Java language, and can run in popular servlet containers such as Tomcat and the like and can also run independently. Typically used in conjunction with a version management tool (SCM), build tool.
In order to test a scene in the related art, a Jenkins project needs to be configured, a test scheme is manually written through a Groovy grammar in a Jenkins pipeline mode, then testing is carried out, and the operation is complex.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a service testing method and device, a storage medium and an electronic device, so as to at least solve the technical problem that the testing operation in the related art is complex.
According to an aspect of an embodiment of the present application, a method for testing a service is provided, including: acquiring configuration information of the target test service, wherein the configuration information is configured with a plurality of components and operation sequences of the components, and each component in the components is used for representing a stage in a test flow of the target test service; running the plurality of components in the order configured by the configuration information; and obtaining a test result of the target test service obtained by operating the plurality of components.
According to another aspect of the embodiments of the present application, there is also provided a service testing apparatus, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring configuration information of a target test service, the configuration information is configured with a plurality of components and operation sequences of the plurality of components, and each component in the plurality of components is used for representing a stage in a test flow of the target test service; the operation unit is used for operating the components according to the sequence configured by the configuration information; and the acquisition unit is used for acquiring the test result of the target test service obtained by operating the plurality of components.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
In the embodiment of the application, when a target test service needs to be tested, configuration information of the target test service is obtained, a plurality of components and operation sequences of the components are configured in the configuration information, and each component in the plurality of components is used for representing one stage in a test flow of the target test service; running the plurality of components in the order configured by the configuration information; the test result of the target test service obtained by operating the plurality of components is obtained, and the test flow can be multiplexed and the components in the test flow can also be multiplexed, so that the code logic of the test flow and each stage in the test flow is not required to be edited again in each test, the technical problem that the test operation in the related technology is complex can be solved, and the technical effect of reducing the test complexity is further achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram of a hardware environment of a method of testing a service according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative service testing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative service testing scheme according to an embodiment of the application;
FIG. 4 is a schematic diagram of an alternative service testing scheme according to an embodiment of the application;
FIG. 5 is a schematic diagram of an alternative service testing arrangement according to an embodiment of the present application;
and
fig. 6 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, partial nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
jenkins: the system is a continuous integration tool developed based on Java, is used for monitoring continuous and repeated work, and aims to provide an open and easy-to-use software platform to enable continuous integration of software.
Groovy: a JVM (Java virtual machine) based agile development language that combines many of the powerful features of Python, Ruby, and Smalltalk, the Groovy code combines well with Java code and can also be used to extend existing code.
Assembling: the method refers to a process of splitting and recombining a plurality of functional modules when a complex system is decoupled.
Pipeline: and (4) pipelining.
The inventor analyzes and recognizes that the following problems exist when the test scheme is manually written through the Groovy grammar in a Jenkins pipeline mode for testing: the multiplexing limitation is large, all the processes are integrated in one project, the coupling is high, the Groovy language is needed, and the maintenance cost is high; the interactivity of the user is poor, and the pipeline is compiled through the Groovy grammar to realize the testing step; concurrent execution scenarios are not allowed, and concurrent testing of multiple scenarios cannot be realized.
In order to overcome the above problems, according to an aspect of embodiments of the present application, a method embodiment of a method for testing a service is provided.
Optionally, in this embodiment, the service testing method may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1, and the system implements operations such as writing, executing, report generating and the like of a test case, and the terminal 101 and the server 103 may be the same device, where the operations are all completed by the device; or two independent devices, which are equivalent to one of the devices performing the above operations, and the other device performing the rest of the operations, and the latter is described as an example.
As shown in fig. 1, the server 103 is connected to the terminal 101 through a network, which may be used to provide a test service for the terminal or a client installed on the terminal, and a database 105 may be provided on the server or separately from the server, and is used to provide a data storage service (e.g., storing test cases, raw data for testing, etc.) for the server 103, where the network includes but is not limited to: the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like.
The service testing method in the embodiment of the present application may be executed by the server 103, the terminal 101, or both the server 103 and the terminal 101. As shown in fig. 2, fig. 2 is a flowchart of an optional service testing method according to an embodiment of the present application, and the method may include the following steps:
step S202, the terminal obtains configuration information of the target test service from the server, the configuration information is configured with a plurality of components and operation sequences of the components, each component in the components is used for representing one stage in a test flow of the target test service, and a plurality of test cases which are edited in advance are stored on the server (each test case is equivalent to one or more test flows).
Each test flow can be divided into a plurality of stages, each stage can be regarded as one step or a plurality of steps in the test flow, each step is equivalent to one operation process, the face analysis flow in face recognition is taken as an example and comprises four stages of image analysis, image warehousing, image clustering and report generation, the operation of each stage can be regarded as an edited reusable component, and for example, when the face analysis flow needs to be executed, only four components corresponding to the four stages of image analysis, image warehousing, image clustering and report generation need to be executed.
And step S204, the terminal runs a plurality of components according to the configuration sequence of the configuration information.
Step S206, the terminal obtains the test result of the target test service obtained by operating a plurality of components.
Through the steps S202 to S206, when the target test service needs to be tested, obtaining configuration information of the target test service, where the configuration information is configured with a plurality of components and an operation sequence of the plurality of components, and each of the plurality of components is used to represent a stage in a test flow of the target test service; running the plurality of components in the order configured by the configuration information; the test result of the target test service obtained by operating the plurality of components is obtained, and the test flow can be multiplexed and the components in the test flow can also be multiplexed, so that the code logic of the test flow and each stage in the test flow is not required to be edited again in each test, the technical problem that the test operation in the related technology is complex can be solved, and the technical effect of reducing the test complexity is further achieved.
By adopting the technical scheme, componentization, loose coupling and heavy multiplexing of case scenes can be realized; test scenes are compiled in a mode of dragging the test components, and the experience of user interaction is good; the problem of concurrence of a plurality of test scenes is solved. The technical solution of the present application is further detailed below with reference to specific embodiments:
Optionally, the user may select an assembly for the test flow of the target test service from the existing assemblies through the first configuration operation, and establish the running sequence among the selected multiple assemblies through the second configuration operation; and displaying the running sequence among the selected multiple components, as shown in FIG. 4, and saving the generated configuration information.
All the edited test cases can be stored on the server in the form of configuration information so as to be convenient for other users to use and modify.
And 2, updating the test case.
After the generated configuration information is saved, when an updating operation is detected, updating the components and/or the running sequence among the components according to the indication of the updating operation, wherein the updating operation comprises the following steps: at least one of adding a component (such as adding "image denoising" before "image analysis" shown in fig. 4), deleting a component (such as deleting "image analysis" shown in fig. 4), replacing a component (such as replacing "image analysis" shown in fig. 4 with "image denoising"), and altering the workflow.
The subsequent steps 3 to 5 are sequentially executed steps, and there is no sequential relationship between step 2 and steps 3 to 5, that is, step 2 may be executed before these steps, or during or after these steps are executed.
And 3, when the target test service needs to be tested, acquiring configuration information of the target test service, wherein the configuration information is configured with a plurality of components and operation sequences of the plurality of components, and each component in the plurality of components is used for representing a stage in a test flow of the target test service.
The target test service may include a plurality of test procedures, such as a first test procedure and at least one second test procedure, which may be implemented by using a test case, for example, the face analysis, the face search, the face comparison, and the face database comparison shown in fig. 3 are put into a test case, as shown in fig. 4.
And 4, operating the plurality of components according to the configuration sequence of the configuration information, wherein the steps comprise the following step 41 and step 42.
And step 41, determining a first component set for representing the first test flow and the operation sequence of each component in the first component set according to the configuration information, and determining a second component set for representing the second test flow and the operation sequence of each component in the second component set.
For example, the order of the first component set is: image analysis, image warehousing, image clustering and report generation; the order of the second component set is: image analysis, image warehousing, image searching and report generation.
And step 42, executing the first test flow by running the components in the first component set according to the sequence configured by the configuration information, and executing the second test flow by running the components in the second component set according to the sequence configured by the configuration information.
The first test flow and the second test flow are run in parallel, for example, for the first test flow, image analysis, image warehousing, image clustering and report generation are sequentially run; and executing a second test flow while executing the first test flow, and sequentially executing image analysis, image warehousing, image searching and report generation.
Optionally, it should be noted that, for the above multiple test flows, if there are some identical flows, such as flow components at the beginning, since the processed original data are identical, these components may be multiplexed, that is, a first test flow is executed by running the components in the first component set in the order configured by the configuration information, and a second test flow is executed by running the components in the second component set in the order configured by the configuration information, a first component may be run, where the first component belongs to both the first component set and the second component set, and the first component is a component located at the initial stage of the flow, such as image analysis and image warehousing in fig. 4; and running a second component and a third component in parallel, wherein the second component is a component in the first component set after the first component, such as the image cluster shown in FIG. 4, and the third component is a component in the second component set after the first component, such as the image search shown in FIG. 4.
When the first assembly is operated, processing original data by operating the first assembly to obtain an intermediate result, wherein the original data are data processed by a first test flow and a second test flow; when the second component and the third component are operated in parallel, the intermediate result obtained by the first component can be multiplexed, the intermediate result is processed by operating the second component to obtain a first test result, and the intermediate result is processed by operating the third component to obtain a second test result, wherein the processes executed by the second component and the third component are different.
Similarly, for the above multiple test flows, if there are some identical flows, such as flow components at the end, since the obtained results can be stored in the same report, the components can be multiplexed, such as executing a first test flow by running the components in the first component set in the order configured by the configuration information, and executing a second test flow by running the components in the second component set in the order configured by the configuration information, and then running a fourth component, the fourth component belonging to both the first component set and the second component set, such as generating a report shown in fig. 4, where the position of the fourth component in the first component set is located after the second component, and the position of the fourth component in the second component set is located after the third component.
When the fourth component is operated, a first test result obtained by operating the second component and a second test result obtained by operating the third component pair are obtained; and writing the first test result and the second test result into a test report of the target test service by operating the fourth component.
And step 5, obtaining the test result of the target test service obtained by operating the plurality of components, such as the test report.
According to the technical scheme, the testing steps are modularized, and the multiplex rate of testing research and development is improved; the flow chart is pieced together in a dragging mode to form a test case scene, so that the user experience of a tester is excellent; and multi-scene concurrent execution is supported.
As an alternative example, the following detailed description is provided to further describe the technical solution of the present application in conjunction with the following specific embodiments:
for a continuous integration product, the bottom layer is realized based on jenkens, a test scene is split into components in individual steps, then the components are dragged to form a corresponding test scene, and the regression function of the whole system can be realized.
For ease of understanding, taking the example of a face recognition system, testing the system requires 4 scenes, as shown in fig. 3, a scene pipeline1(pipeline corresponds to a test pipeline or a test flow) is used for analyzing human-object relationships in a library, including image analysis, image warehousing, image clustering and report generation, a scene pipeline2 is used for searching, a daily face-brushing access control can apply the scene, including image analysis, image warehousing, image searching and report generation, a scene pipeline3 is used for analyzing differences between two pictures, specific application scenes are applications such as finding stubbles, including image analysis, image warehousing, image comparison and report generation, a scene pipeline4 is used for direct comparison between two large libraries to find people inside the same, and application of migration population between two provinces of a scene, including image analysis, image warehousing, image collision and report generation.
After the application componentization idea of the application is adopted for improvement, one pipeline completes the 4 scenes, and as shown in fig. 4, image analysis, image warehousing, image search (image clustering, image comparison, and parallel execution of image collision and image search) and report generation are sequentially performed.
By adopting the scheme, the componentization and loose coupling of case scenes can be realized, and the test classmate maintenance is facilitated through the heavy multiplexing component; the scene is created in a dragging mode, the traditional mode that the scene flow pipeline is written through the Groovy language is changed, and the user experience of testers is improved; the multi-scenario concurrent execution saves test regression time.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided a service testing apparatus for implementing the service testing method. Fig. 5 is a schematic diagram of an alternative service testing apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus may include:
an obtaining unit 51, configured to obtain configuration information of a target test service, where the configuration information includes a plurality of components and an operation sequence of the plurality of components, and each of the plurality of components is used to represent a stage in a test flow of the target test service;
an execution unit 53 configured to execute the plurality of components in the order configured by the configuration information;
an obtaining unit 55, configured to obtain a test result of the target test service obtained by running the multiple components.
It should be noted that the obtaining unit 51 in this embodiment may be configured to execute step S202 in this embodiment, the running unit 53 in this embodiment may be configured to execute step S204 in this embodiment, and the obtaining unit 55 in this embodiment may be configured to execute step S206 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the module, when the target test service needs to be tested, the configuration information of the target test service is obtained, a plurality of components and the running sequence of the components are configured in the configuration information, and each component in the plurality of components is used for representing one stage in the test flow of the target test service; running the plurality of components in the order configured by the configuration information; the test result of the target test service obtained by operating the plurality of components is obtained, and the test flow can be multiplexed and the components in the test flow can also be multiplexed, so that the code logic of the test flow and each stage in the test flow is not required to be edited again in each test, the technical problem that the test operation in the related technology is complex can be solved, and the technical effect of reducing the test complexity is further achieved.
Optionally, the target test service includes a first test flow and a second test flow, where the running unit is further configured to determine, according to the configuration information, a first component set used for representing the first test flow and a running order of each component in the first component set, and a second component set used for representing the second test flow and a running order of each component in the second component set when running the plurality of components according to the sequence configured by the configuration information; and executing a first test flow by running the components in the first component set according to the sequence configured by the configuration information, and executing a second test flow by running the components in the second component set according to the sequence configured by the configuration information, wherein the first test flow and the second test flow are run in parallel.
Optionally, the running unit is further configured to run the first component when executing the first test flow by running the components in the first component set in the order configured by the configuration information and executing the second test flow by running the components in the second component set in the order configured by the configuration information, where the first component belongs to both the first component set and the second component set; and running a second component and a third component in parallel, wherein the second component is a component in the first component set after the first component, and the third component is a component in the second component set after the first component.
Optionally, the running unit is further configured to process the original data by running the first component when the first component is running, so as to obtain an intermediate result, where the original data is data processed by the first test flow and the second test flow; the operation unit is further configured to, when the second component and the third component are operated in parallel, process the intermediate result by operating the second component to obtain a first test result, and process the intermediate result by operating the third component to obtain a second test result, where the processes performed by the second component and the third component are different.
Optionally, the running unit is further configured to run a fourth component when the first test flow is executed by running the components in the first component set in the order configured by the configuration information and the second test flow is executed by running the components in the second component set in the order configured by the configuration information, where the fourth component belongs to both the first component set and the second component set, and a position of the fourth component in the first component set is located after the second component, and a position of the fourth component in the second component set is located after the third component.
Optionally, the running unit is further configured to obtain a first test result obtained by running the second component and a second test result obtained by running the third component pair when the fourth component is run; and writing the first test result and the second test result into a test report of the target test service by operating the fourth component.
Optionally, the apparatus of the present application may further comprise: the configuration unit is used for detecting a first configuration operation before acquiring configuration information of the target test service, wherein the first configuration operation is used for indicating that a component is selected from existing components for a test flow of the target test service; detecting a second configuration operation, wherein the second configuration operation is used for establishing a running sequence among the selected multiple components; and displaying the running sequence among the selected multiple components, and storing the generated configuration information.
Optionally, the configuration unit of the present application is further configured to, after saving the generated configuration information, update the components and/or the running order between the components according to an instruction of the update operation when the update operation is detected, where the update operation includes: at least one of adding a component, deleting a component, replacing a component, and altering a flow of execution.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the application, a server or a terminal for implementing the service testing method is also provided.
Fig. 6 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 6, the terminal may include: one or more processors 601 (only one of which is shown), a memory 603, and a transmission device 605. as shown in fig. 6, the terminal may further include an input-output device 607.
The memory 603 may be configured to store software programs and modules, such as program instructions/modules corresponding to the service testing method and apparatus in the embodiment of the present application, and the processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 603, that is, implements the service testing method described above. The memory 603 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 603 may further include memory located remotely from the processor 601, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The above-mentioned transmission device 605 is used for receiving or sending data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 605 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 605 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 603 is used to store an application program, in particular.
The processor 601 may call the application stored in the memory 603 through the transmission device 605 to perform the following steps:
acquiring configuration information of a target test service, wherein the configuration information is configured with a plurality of components and an operation sequence of the plurality of components, and each component in the plurality of components is used for representing a stage in a test flow of the target test service;
running the plurality of components in the order configured by the configuration information;
and obtaining the test result of the target test service obtained by operating the plurality of components.
The processor 601 is further configured to perform the following steps:
determining a first component set used for representing the first test flow and the operation sequence of each component in the first component set according to the configuration information, and a second component set used for representing the second test flow and the operation sequence of each component in the second component set;
executing the first test flow by running the components in the first component set according to the sequence configured by the configuration information, and executing the second test flow by running the components in the second component set according to the sequence configured by the configuration information, wherein the first test flow and the second test flow are run in parallel.
By adopting the embodiment of the application, when the target test service needs to be tested, the configuration information of the target test service is obtained, a plurality of components and the running sequence of the components are configured in the configuration information, and each component in the plurality of components is used for representing one stage in the test flow of the target test service; running the plurality of components in the order configured by the configuration information; the test result of the target test service obtained by operating the plurality of components is obtained, and the test flow can be multiplexed and the components in the test flow can also be multiplexed, so that the code logic of the test flow and each stage in the test flow is not required to be edited again in each test, the technical problem that the test operation in the related technology is complex can be solved, and the technical effect of reducing the test complexity is further achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present application also provide a storage medium. Optionally, in this embodiment, the storage medium may be used to execute a program code of a service testing method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring configuration information of a target test service, wherein the configuration information is configured with a plurality of components and an operation sequence of the plurality of components, and each component in the plurality of components is used for representing a stage in a test flow of the target test service;
running the plurality of components in the order configured by the configuration information;
and obtaining the test result of the target test service obtained by operating the plurality of components.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
determining a first component set used for representing the first test flow and the operation sequence of each component in the first component set according to the configuration information, and a second component set used for representing the second test flow and the operation sequence of each component in the second component set;
executing the first test flow by running the components in the first component set according to the sequence configured by the configuration information, and executing the second test flow by running the components in the second component set according to the sequence configured by the configuration information, wherein the first test flow and the second test flow are run in parallel.
In an alternative embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of any of the embodiments of the method described above.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims (12)
1. A method for testing a service, comprising:
acquiring configuration information of a target test service, wherein the configuration information is configured with a plurality of components and an operation sequence of the plurality of components, and each component in the plurality of components is used for representing a stage in a test flow of the target test service;
running the plurality of components in the order configured by the configuration information;
and obtaining the test result of the target test service obtained by operating the plurality of components.
2. The method of claim 1, wherein the target test service comprises a first test flow and a second test flow, and wherein running the plurality of components in the order configured by the configuration information comprises:
determining a first component set used for representing the first test flow and the operation sequence of each component in the first component set according to the configuration information, and a second component set used for representing the second test flow and the operation sequence of each component in the second component set;
executing the first test flow by running the components in the first component set according to the sequence configured by the configuration information, and executing the second test flow by running the components in the second component set according to the sequence configured by the configuration information, wherein the first test flow and the second test flow are run in parallel.
3. The method of claim 2, wherein executing the first test flow by running the components in the first set of components in the order configured by the configuration information, and executing the second test flow by running the components in the second set of components in the order configured by the configuration information comprises:
running a first component, wherein the first component belongs to both the first component set and the second component set;
and running a second component and a third component in parallel, wherein the second component is a component in the first component set after the first component, and the third component is a component in the second component set after the first component.
4. The method of claim 3,
operating the first component includes: processing original data by operating the first assembly to obtain an intermediate result, wherein the original data are processed by the first test flow and the second test flow;
running the second component and the third component in parallel includes: and processing the intermediate result by operating the second component to obtain a first test result, and processing the intermediate result by operating the third component to obtain a second test result, wherein the processing executed by the second component and the processing executed by the third component are different.
5. The method of claim 3, wherein executing the first test flow by running the components in the first set of components in the order configured by the configuration information and executing the second test flow by running the components in the second set of components in the order configured by the configuration information further comprises:
running a fourth component, wherein the fourth component belongs to both the first component set and the second component set, the position of the fourth component in the first component set is after the second component, and the position of the fourth component in the second component set is after the third component.
6. The method of claim 5, wherein operating a fourth component comprises:
acquiring a first test result obtained by operating the second assembly and a second test result obtained by operating the third assembly;
and writing the first test result and the second test result into a test report of the target test service by operating the fourth component.
7. The method of claim 1, wherein before obtaining the configuration information of the target test service, the method further comprises:
detecting a first configuration operation, wherein the first configuration operation is used for indicating that a component is selected from existing components for a test flow of the target test service;
detecting a second configuration operation, wherein the second configuration operation is used for establishing a running sequence among the selected plurality of components;
and displaying the running sequence among the selected multiple components, and storing the generated configuration information.
8. The method of claim 7, wherein after saving the generated configuration information, the method further comprises:
when an update operation is detected, updating the components and/or the running sequence among the components according to the indication of the update operation, wherein the update operation comprises the following steps: at least one of adding a component, deleting a component, replacing a component, and altering a flow of execution.
9. An apparatus for testing a service, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring configuration information of a target test service, the configuration information is configured with a plurality of components and operation sequences of the components, and each component in the components is used for representing a stage in a test flow of the target test service;
an operation unit, configured to operate the plurality of components according to the configuration information configuration sequence;
and the obtaining unit is used for obtaining the test result of the target test service obtained by operating the plurality of components.
10. The apparatus of claim 9, wherein the target test service comprises a first test flow and a second test flow, and wherein the execution unit is further configured to:
determining a first component set used for representing the first test flow and the operation sequence of each component in the first component set according to the configuration information, and a second component set used for representing the second test flow and the operation sequence of each component in the second component set;
executing the first test flow by running the components in the first component set according to the sequence configured by the configuration information, and executing the second test flow by running the components in the second component set according to the sequence configured by the configuration information, wherein the first test flow and the second test flow are run in parallel.
11. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 8.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 8 by means of the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011363246.7A CN112328498A (en) | 2020-11-27 | 2020-11-27 | Service testing method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011363246.7A CN112328498A (en) | 2020-11-27 | 2020-11-27 | Service testing method and device, storage medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112328498A true CN112328498A (en) | 2021-02-05 |
Family
ID=74308437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011363246.7A Pending CN112328498A (en) | 2020-11-27 | 2020-11-27 | Service testing method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112328498A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113791942A (en) * | 2021-09-22 | 2021-12-14 | 长江存储科技有限责任公司 | Method and device for automatically distributing test tasks |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196804A (en) * | 2018-04-24 | 2019-09-03 | 腾讯科技(深圳)有限公司 | The test method and device of business, storage medium, electronic device |
CN111031133A (en) * | 2019-12-12 | 2020-04-17 | 京东数字科技控股有限公司 | Operation method and device of business engine, storage medium and electronic device |
CN111258897A (en) * | 2020-01-15 | 2020-06-09 | 网银在线(北京)科技有限公司 | Service platform testing method, device and system |
CN111552633A (en) * | 2020-03-27 | 2020-08-18 | 深圳壹账通智能科技有限公司 | Interface abnormal call testing method and device, computer equipment and storage medium |
CN111782524A (en) * | 2020-06-29 | 2020-10-16 | 京东数字科技控股有限公司 | Application testing method and device, storage medium and electronic device |
-
2020
- 2020-11-27 CN CN202011363246.7A patent/CN112328498A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196804A (en) * | 2018-04-24 | 2019-09-03 | 腾讯科技(深圳)有限公司 | The test method and device of business, storage medium, electronic device |
CN111031133A (en) * | 2019-12-12 | 2020-04-17 | 京东数字科技控股有限公司 | Operation method and device of business engine, storage medium and electronic device |
CN111258897A (en) * | 2020-01-15 | 2020-06-09 | 网银在线(北京)科技有限公司 | Service platform testing method, device and system |
CN111552633A (en) * | 2020-03-27 | 2020-08-18 | 深圳壹账通智能科技有限公司 | Interface abnormal call testing method and device, computer equipment and storage medium |
CN111782524A (en) * | 2020-06-29 | 2020-10-16 | 京东数字科技控股有限公司 | Application testing method and device, storage medium and electronic device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113791942A (en) * | 2021-09-22 | 2021-12-14 | 长江存储科技有限责任公司 | Method and device for automatically distributing test tasks |
CN113791942B (en) * | 2021-09-22 | 2024-04-19 | 长江存储科技有限责任公司 | Method and device for automatically distributing test tasks |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113034095A (en) | Man-machine interaction method and device combining RPA and AI, storage medium and electronic equipment | |
CN108255847B (en) | Page generation method and device | |
CN108334895B (en) | Target data classification method and device, storage medium and electronic device | |
CN104461693B (en) | Virtual machine update method and system under a kind of desktop cloud computing environment | |
CN106951298A (en) | A kind of method and apparatus for lifting application toggle speed | |
CN110377881B (en) | Integration method, device and system of text processing service | |
CN111782635B (en) | Data processing method and device, storage medium and electronic device | |
CN111258680B (en) | Resource loading method and device, storage medium and electronic device | |
CN111694617A (en) | Processing method of network offline model, artificial intelligence processing device and related products | |
CN115242894B (en) | Data processing method, device, storage medium and computer equipment | |
CN110833693A (en) | Game running method and device, storage medium and electronic device | |
CN115392501A (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN107368407B (en) | Information processing method and device | |
CN112328498A (en) | Service testing method and device, storage medium and electronic device | |
CN112416557B (en) | Method and device for determining call relation, storage medium and electronic device | |
CN113448690A (en) | Monitoring method and device | |
CN107544894B (en) | Log processing method and device and server | |
CN112559124A (en) | Model management system and target operation instruction processing method and device | |
CN112788576A (en) | Equipment offline processing method and system, storage medium and electronic device | |
CN113268232A (en) | Page skin generation method and device and computer readable storage medium | |
CN113726610B (en) | Routing protocol-based UI (user interface) automatic test method, device, equipment and medium | |
CN111966506B (en) | Content sharing method based on different application programs and computer equipment | |
CN114676104A (en) | Log generation method and device | |
CN108632370B (en) | Task pushing method and device, storage medium and electronic device | |
CN114003457A (en) | Data acquisition method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176 Applicant after: Jingdong Technology Holding Co.,Ltd. Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176 Applicant before: Jingdong Digital Technology Holding Co., Ltd |