CN110196804B - Service testing method and device, storage medium and electronic device - Google Patents

Service testing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN110196804B
CN110196804B CN201810375217.9A CN201810375217A CN110196804B CN 110196804 B CN110196804 B CN 110196804B CN 201810375217 A CN201810375217 A CN 201810375217A CN 110196804 B CN110196804 B CN 110196804B
Authority
CN
China
Prior art keywords
service
test
case
environment
mode
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
CN201810375217.9A
Other languages
Chinese (zh)
Other versions
CN110196804A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810375217.9A priority Critical patent/CN110196804B/en
Publication of CN110196804A publication Critical patent/CN110196804A/en
Application granted granted Critical
Publication of CN110196804B publication Critical patent/CN110196804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses a service testing method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring a test request, wherein the test request is used for requesting a service test on a first service in a service environment configured to be in a first abnormal mode; responding to the test request, searching a first test case corresponding to the first abnormal mode, wherein the first test case is used for configuring the operation mode of the service environment into the first abnormal mode; configuring the operation mode of the service environment into a first abnormal mode by executing a first test case; and performing service test on the first service in the service environment configured to be in the first abnormal mode, and acquiring test information generated when the service test is performed on the first service in the service environment. The invention solves the technical problem of higher time cost for testing the service in the related technology.

Description

Service testing method and device, storage medium and electronic device
Technical Field
The invention relates to the field of internet, in particular to a service testing method and device, a storage medium and an electronic device.
Background
The anomaly test is an important component of software test, and particularly under the condition of rapid development of the current Internet, the anomaly test is required to be capable of fully testing various anomaly conditions under various complex distributed application scenes, so that the test accuracy and coverage rate are improved, and the system reliability is further improved. Therefore, how to perform the anomaly test has very important significance.
In the related art, in order to accurately test the abnormality of software and hardware, the test is usually achieved by piling codes through compiling the codes and inserting fault statistics codes into the codes through piling the codes. Therefore, when a new piece of hardware or software needs to be tested, the test code needs to be rewritten, which increases the writing and compiling time cost, and finally increases the time cost and labor cost of testing.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a service testing method and device, a storage medium and an electronic device, which are used for at least solving the technical problem of higher time cost for testing a service in the related technology.
According to an aspect of the embodiments of the present invention, a method for testing a service is provided, including: acquiring a test request, wherein the test request is used for requesting a service test on a first service in a service environment configured to be in a first abnormal mode; responding to the test request, searching a first test case corresponding to the first abnormal mode, wherein the first test case is used for configuring the operation mode of the service environment into the first abnormal mode; configuring the operation mode of the service environment into a first abnormal mode by executing a first test case; and performing service test on the first service in the service environment configured to be in the first abnormal mode, and acquiring test information generated when the service test is performed on the first service in the service environment.
According to another aspect of the embodiments of the present invention, there is also provided a service testing apparatus, including: a first obtaining unit, configured to obtain a test request, where the test request is used to request a service test on a first service in a service environment configured in a first abnormal mode; the searching unit is used for responding to the test request and searching a first test case corresponding to the first abnormal mode, wherein the first test case is used for configuring the operation mode of the service environment into the first abnormal mode; the configuration unit is used for configuring the operation mode of the service environment into a first abnormal mode by executing a first test case; and the second acquisition unit is used for carrying out service test on the first service in the service environment configured to be in the first abnormal mode and acquiring test information generated when the service test is carried out on the first service in the service environment.
According to another aspect of the embodiments of the present invention, 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 invention, 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 invention, when the test request is obtained, a reusable first test case corresponding to a first abnormal mode is searched, and the running mode of the service environment is configured to be the first abnormal mode by executing the first test case; the method comprises the steps of carrying out service test on a first service in a service environment configured to be in a first abnormal mode, and obtaining test information generated when the first service is tested by executing a first service case in the service environment, wherein the used first test case and the first service case are both edited in advance and reusable in the whole test process, in other words, new test cases and service cases are not required to be edited again in each test, the technical problem that the time cost for testing the service in the related technology is high can be solved, and the technical effect of improving the test efficiency is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. 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 invention;
FIG. 2 is a flow chart of an alternative service testing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a test case of an alternative service according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an exception interface for an optional service according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an alternative service testing method according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating an optional abnormal recovery of traffic, according to an embodiment of the invention;
FIG. 7 is a diagram illustrating test results of an alternative service according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating test results of an alternative service according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an alternative service testing arrangement according to an embodiment of the present invention;
and
fig. 10 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention 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 invention 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 terms or terms appearing in the description of the embodiments of the present invention are applied to the following explanations:
and (3) checking the environmental state: checking for the presence of an abnormal setting in the environment, such as IPTABLES or the like, which is a Linux kernel integrated IP packet filtering system, facilitates better control of IP packet filtering and firewall configuration on a Linux system if the Linux system is connected to the internet or a LAN, a server, or a proxy server connecting the LAN and the internet.
Constructing an abnormal scene: constructing exceptions in the environment according to the scenario, such as setting db read only, network unavailable, network delay, etc
And (3) recovering the exception: and (5) reversing the construction of the abnormal scene.
Exception test library: and accumulating a service abnormal scene set of the current network fault or the important abnormal scene.
According to an aspect of the embodiments of the present invention, a method embodiment of a service testing method is provided.
Optionally, in this embodiment, the service testing method may be applied to a hardware environment formed by the second device 101 as shown in fig. 1, and optionally, the hardware environment may further include the first device 103, as shown in fig. 1, the second device 101 is connected to the first device 103 through a network, and a database 105 may be provided on the second device 101 or independently of the second device 101, for providing a data storage service for the second device 101, where the network includes but is not limited to: the device (e.g., the second device 101 or the first device 103) is not limited to a PC, a mobile phone, a tablet computer, a smart television, a desktop computer, a server, etc. The method for testing the service according to the embodiment of the present invention may be performed by the second device 101, and the first device 103 may perform the method for testing the service according to the embodiment of the present invention, or may be performed by a client installed thereon.
Fig. 2 is a flowchart of an alternative service testing method according to an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
step S202, the second device obtains a test request, where the test request is used to request a service test on the first service in a service environment configured in the first abnormal mode.
Step S204, the second device responds to the test request, searches for a first test case corresponding to the first abnormal mode, and the first test case is used for configuring the operation mode of the service environment to the first abnormal mode.
Optionally, an exception test library (i.e., a first set) may be established in advance, the compiled reusable test cases may be saved in the first set, and a service exception scenario set of a current network fault or an important exception scenario may be accumulated.
In step S206, the second device configures the operation mode of the service environment to be the first abnormal mode by executing the first test case.
The method comprises the steps of constructing an abnormal scene by executing a first test case, constructing an abnormality according to the scene in an environment, wherein the test case is a business scene case, such as quick payment, balance payment and the like, and the abnormality is such as setting of database db read-only of the quick payment and the balance payment, network unavailability, network delay and the like.
Step S208, the second device instructs to perform a service test on the first service in the service environment configured as the first abnormal mode, and obtains test information generated when the service test is performed on the first service in the service environment.
Optionally, a service test, that is, an exception test, may be performed by executing a service case corresponding to the first service, where the purpose of the exception test is to test some exception conditions that are difficult to cover, and if the program is subdivided into combinations of logic units, the purpose of the test is to change the logic direction through various different approaches (data or codes) to test different exception conditions.
The business case is a set of test input, execution conditions and expected results compiled for a certain target so as to test a certain program path or verify whether a certain requirement is met, and the business case can be an abnormal branch in a normal business flow, such as an abnormal branch in an analog quick payment flow, which accesses a database db, and at this time, the business needs to perform special processing on the abnormal branch.
In the above embodiment, the service testing method of the present application is implemented by the second device 101 as an example for description, and the devices that receive the test request and perform the service test may be both the second devices, in other words, the second devices may be directly triggered and tested by the local second device; optionally, the device that receives the test request and performs the service test may be different devices, for example, the second device receives the test request, and tests the first device according to the request of the test request, that is, the service test method of the present application may also be executed by the second device 101 and the first device 103 together.
Through the steps S202 to S208, when the test request is obtained, a reusable first test case corresponding to the first abnormal mode is searched, and the operation mode of the service environment is configured to the first abnormal mode by executing the first test case; the method comprises the steps of carrying out service test on a first service in a service environment configured to be in a first abnormal mode, and obtaining test information generated when the first service is tested by executing a first service case in the service environment, wherein the used first test case and the first service case are both edited in advance and reusable in the whole test process, in other words, new test cases and service cases are not required to be edited again in each test, the technical problem that the time cost for testing the service in the related technology is high can be solved, and the technical effect of improving the test efficiency is achieved.
In the technical solution provided in step S202, the second device obtains a test request, where the test request is used to request a service test on the first service in a service environment configured in the first abnormal mode.
The service test of the present application may be performed locally, in other words, the test request may be triggered directly on the device to be tested, such as on the second device.
The service test of the application can be executed on the remote server, the remote server provides various service test services to the user, and the user can select the required fault environment and the corresponding test service on the remote server (namely, the second device) to trigger the test request.
In the technical solution provided in step S204, the second device searches, in response to the test request, a first test case corresponding to the first abnormal mode, where the first test case is used to configure the operation mode of the service environment to the first abnormal mode.
The test cases in the related art are not systematically operated, but in the technical scheme of the present application, systematic operation of the test cases can be realized, for example, before a first test case corresponding to a first abnormal pattern is searched, a first set including a plurality of test cases is created, where the plurality of test cases includes the first test case. After the first set is created, the test request can be triggered by a timer to pull up the test case with abnormal service, test the batch service and track operation, and the completeness and the correctness of the case can be maintained in real time.
Optionally, to enrich the test case library (i.e., the first set), after creating the first set comprising the plurality of test cases: the test cases can be operated in the database in a database operation mode, and under the condition that the first adding instruction is received, the test cases indicated by the first adding instruction are added into the first set to supplement new test cases; under the condition that a first modification instruction is received, modifying the test case indicated by the first modification instruction in the first set, such as adding new requirements, modifying wrong configuration and the like; and under the condition that the first deleting instruction is received, deleting the test cases indicated by the first deleting instruction in the first set, for example, the test cases which are not needed any more can be deleted.
In an embodiment of the present application, finding a first test case corresponding to a first abnormal pattern includes: a first keyword for representing a first abnormal pattern may be obtained from the test request; and then searching a first test case matched with the first keyword from a database in which the first set is positioned, wherein a plurality of test cases are stored in the first set, and the plurality of test cases comprise the first test case.
In the technical solution provided in step S206, the second device configures the operation mode of the service environment to be the first abnormal mode by executing the first test case.
It should be noted that, in the related art, the abnormal structures may affect each other, if the abnormal structure is not recovered on one machine, for example, a network from a machine a to a machine B is set to be unavailable, and if the abnormal structure is not recovered, all services of this machine may be affected, and in order to overcome this problem, in the above embodiment, when the operation mode of the service environment is configured to be the first abnormal mode by executing the first test case, the operation mode of the service environment may be detected; under the condition that the operation mode of the service environment is not detected to be the abnormal mode, the operation mode of the service environment is configured to be the first abnormal mode by executing the first test case, and the influence of the previous abnormality on the test is avoided.
Optionally, the technical solution of the present application may be classified and abstracted into a general interface by classifying the abnormal scenario construction method, the general interface may form an abnormal use case set (for example, a first set including test use cases and/or a second set including service use cases), and may also be directly constructed from a web page, when the operation mode of the service environment is configured to be the first abnormal mode by executing the first test use case, the general interface may obtain entry information of the service environment, where the entry information is used to indicate a first device where the service environment is located, such as an IP address, an MAC address, and the like of the first device; the entry information is filled into the first test case, and the operation mode of the service environment on the first device is configured into the first abnormal mode by executing the first test case.
In the foregoing embodiment, an optional implementation of configuring the operation mode of the business environment on the first device as the first exception mode by executing the first test case includes at least one of:
1) the second device sends a first instruction to the first device by executing a flow in the first test case, and configures hardware of the first device through the first instruction, such as a link address, a link interface and the like;
2) the second device sends a second instruction to the first device by executing the flow in the first test case, and the second instruction indicates that configuration is performed in a service environment on the first device, such as tampering with service package entering and exiting, environment parameters and the like;
3) the third instruction is sent to the second device by executing the flow in the first test case, the third instruction indicates that configuration is performed on the second device, a hardware environment and a software environment on the second device can be configured, the second device is a device which is in communication connection with the first device, and the specific setting can be disconnection of a link with the second device, sending of an attack packet to the second device, stopping of providing of service for the second device, and the like.
In the embodiment, complex abnormal scene construction, such as network package tampering, can be realized, uniform interface packaging is provided, uniform calling capability is provided, the abnormal scene can be directly executed, the use difficulty is low, automation construction is facilitated, and the efficiency is high.
In the technical solution provided in step S208, the second device performs a service test on the first service in a service environment configured in the first abnormal mode, and obtains test information generated when the service test is performed on the first service in the service environment.
Abnormal scene construction and service cases are mixed together in the related technology, and if the service cases are wanted to be rapidly expanded, the cases need to be rewritten; and the business exception automation is only compiled and used in the demand test, and systematic operation is not performed, so that the use case is not used for a long time and is invalid. In order to overcome the above problems, the service cases and the test cases of the present application are separated, and the service cases can be rapidly extended and operated in a systematic manner, and before the configuration is performed to the service test on the first service in the service environment under the first abnormal mode, a service case library (i.e., the second set) can be created in advance.
In order to optimize the management of the second set and quickly expand the service cases, the service case library may be managed as follows: under the condition that a second adding instruction is received, adding the service use case indicated by the second adding instruction in a second set; under the condition that a second modification instruction is received, modifying the service case indicated by the second modification instruction in the second set; and under the condition that a second deleting instruction is received, deleting the service use case indicated by the second deleting instruction in the second set.
Optionally, after establishing the second set, performing a service test on the first service in the service environment configured in the first abnormal mode may include: acquiring a second keyword used for expressing the first service from the test request; searching a first service case matched with the second keyword from a second set, wherein the second set stores a plurality of service cases, and the plurality of service cases comprise the first service case; and performing service test on the first service by executing the first service case in the service environment.
Optionally, the number of the first services may be multiple, and performing service test on the first service by executing the first service case in the service environment includes performing test in the following manner:
1) performing (or called parallel execution) a plurality of first service cases in a service environment to perform service test on a first service at the same time, wherein the number of the first service cases is the same as that of the first service, and each first service case is used for performing service test on a corresponding first service;
2) executing the plurality of first service cases in the service environment according to the acquisition sequence of the plurality of first service cases to perform service test on the plurality of first services, in other words, for the first device or the second device, the first service case received first is executed first, correspondingly, the first service corresponding to the first service case is tested first, and the first service case received later is executed later;
3) executing a plurality of first service cases in a service environment according to first priority information to perform service test on a plurality of first services, wherein the first priority information is configured with the priority of each service case in a second set, for example, in the second set, each service case is configured with a corresponding priority in advance, the configured priority can be stored in the first priority information, when the first device or the second device receives the plurality of first service cases, the priority of each first service case can be inquired in the second set one by one, and then the first service cases are executed one by one according to the sequence of the priorities from high to low;
4) in addition to configuring the priority of each service case in the second set in advance, the user may also configure the priorities of the plurality of first service cases by himself/herself when performing the test, for the first device or the second device, the priorities configured by the user may exist in the second priority information, the first device or the second device may execute the plurality of first service cases in the service environment according to the second priority information to perform the service test on the plurality of first services, and the second priority information is information that indicates the priorities of the plurality of first services to the first device or the second device.
The abnormal scene is set in a public environment, and if the abnormal condition is not recovered or the abnormal condition is not recovered in time, the execution of all use cases can be influenced, in the technical scheme of the application, the abnormal scene is constructed to realize the operation closed loop in one service use case to form abnormal self-recovery on the aspect of use case design, so that the abnormal influence time is shortened to the execution period of the abnormal use case, and the abnormal self-recovery can be realized by the following detection modes:
1) the method comprises the steps of obtaining data information in a database on first equipment at regular time, and executing a first recovery case corresponding to a second test case to recover the operation mode of the business environment to a normal mode under the condition that the data information indicates that the operation mode of the business environment is a second abnormal mode and is not recovered to the normal mode, wherein the second test case is used for configuring the business environment to the second abnormal mode, pulling up the business abnormal automation case at regular time, and constructing the business abnormal automation test efficiently and maximizing the price value of the business abnormal case through daily operation and maintenance continuous maintenance cases when a business system is tested abnormally to find a deep fault bug of the system;
2) before the operation mode of the business environment is configured to be the first abnormal mode, if the operation mode of the business environment is detected to be the third abnormal mode, executing a second recovery case corresponding to a third test case to recover the operation mode of the business environment to be the normal mode, wherein the third test case is used for configuring the business environment to be the third abnormal mode;
3) if the configuration fails when the operation mode of the service environment is configured to the first abnormal mode, the operation mode of the service environment is recovered to the normal mode;
4) and under the condition that the service test on the first service is finished, executing a third recovery case corresponding to the first test case to recover the operation mode of the service environment to a normal mode.
In the embodiment, the abnormal scene structure is respectively packaged into automation according to the abnormal type to form an abnormal case set (namely a first set), the abnormal test case and the abnormal service case adopt a modular design to quickly generate the abnormal service case, the abnormal service case pollutes the environment when being executed, an automatic recovery mechanism is adopted to recover the abnormal operation in the environment, and finally the abnormal service case is normally operated and maintained to form a service abnormality test library which can be directly executed, so that the value of the abnormal service case is prolonged.
As an alternative example, the technical solution of the present application is described in more detail in the following with a more specific implementation.
Exception use cases are used to construct exception scenarios. For example, in the case of a network delay, the use case shown in fig. 3 can be used, the source machine and the destination machine, the delay time, etc. can be specified in the use case, and the exception can be simulated by running the use case, so that the user does not need to know how to construct the specific network delay.
According to the method, the abnormal scene structure is extracted and packaged into different automatic cases according to the abnormal type through a technical means, and an abnormal case set is formed by supporting environment inspection, abnormal scene structure and abnormal recovery, so that the purpose of efficiently carrying out efficient service test is achieved.
Fig. 4 illustrates a method for encapsulating an abnormal interface into an automation use case according to the present application, where a flow of constructing and encapsulating an abnormal scene into an automation use case in fig. 4 mainly includes:
step 1, the access layer provides calls respectively according to different abnormal scenes, and a user of the automatic case only needs to provide entry parameters without concerning the specific implementation of an abnormal logic layer and the like.
Step 2, after receiving the request, the unified calling interface respectively executes different operations according to different abnormal scenes, for example, when a network delay test is requested, executes atomic operations of a remote login machine and an execution command; or when a network packet fleeing test is requested, atomic operations such as remote login of a machine, deployment of a program, execution of a command and the like are executed.
The execution command can be a command for starting and stopping a process, deleting a shared memory and the like; the deployment program may be to install a plug-in on a remote machine, such as on the first device.
As can be seen from fig. 4, the structure of the abnormal scene is completely transparent to the outer layer, the use is simple, and the abnormal scene can be directly executed after being packaged into an automatic case without understanding the specific implementation details of the abnormal structure, so that the method is simple and rapid.
The method adopts a modular programming idea, and as shown in fig. 5, the abnormal use case (or called test case) and the service use case are taken as independent modules to realize the complete isolation of the abnormal use case and the service use case, so that the advantage of doing so is that the abnormal use case only carries out abnormal construction, and the service use case carries out service logic processing. Low coupling and high cohesion between modules. And meanwhile, the abnormal use cases are used as a set, and the service use cases are used as a set. When the business abnormal use case is written, the writing of the use case can be quickly finished only by pulling the abnormal use case set and the use cases in the business use case set.
The process of the automatic design of the business anomaly test comprises the following steps:
step 1, checking the environment state, pulling the environment state check in the abnormal case set, judging whether the current environment has an abnormal structure record so as to determine whether the detected environment is normal or abnormal, if so, performing abnormal recovery, and if so, executing the next step.
And 2, constructing an abnormal scene, namely pulling the abnormal scene structure in the abnormal case set to perform abnormal construction. After the setting is successful, the detected environment becomes an abnormal environment.
And 3, executing the service case, pulling the service case in the service case set, executing the service in an abnormal environment, and going to an abnormal branch, thereby achieving the purpose of testing the abnormal service.
And 4, checking an abnormal expected result, checking the result of the service case after the service case is successfully executed, and judging whether the abnormal branch logic is correct or not. The role of the test is to ensure the correctness of the execution of the use case, which is part of the data correctness check.
And 5, recovering the exception, namely recovering the exception after the use case is executed, and recovering the environment to be in a healthy state. An exception recovery may be considered to be a reverse operation of the fabric, such as performing a reconfiguration, which is a simpler recovery, possibly recovering the network, recovering the exception data, etc.
In the automatic recovery of the exception, a try-catch model in code programming is adopted, the abnormal scene structure is automatically recovered, and the damage of the abnormal structure to the environment is realized. Therefore, a large number of abnormal use cases can be executed, a high success rate is kept, the use cases are not influenced mutually, and if the mechanism is not adopted, the abnormal use cases can be executed only once or the execution results of multiple times are unstable. Thus, the value of the abnormal automation use case is greatly discounted, and the maintenance cost is also increased. The large number of abnormal use cases refers to executing a plurality of abnormal use cases in the same environment within a certain time.
As can be seen from fig. 6, exception recovery employs a dual assurance mechanism to achieve the capability of automatic recovery.
In a real-time link, after a use case starts, the exception of any link failure in the use case execution process is captured, for example, an environmental exception is detected in environmental state inspection, the construction fails when an abnormal scene structure is constructed, after an execution interface is called, and the like, abnormal recovery is performed, so that the abnormal scene structure is prevented from being not recovered due to failure at any node, the abnormal self-recovery capability is achieved, and then the use case is ended. If recovery still fails at the time of abnormal recovery, recovery can be performed by bypassing the mechanism in the link.
In the bypass link, a timed task pulling mode is adopted to trigger the monitoring program to pull the data recorded by the abnormal structure, if the abnormal structure is not recovered, the abnormal structure data exists in the database db, and the abnormal recovery is carried out at the moment.
As shown in fig. 7, after the construction of the abnormal use case of service availability is completed, the technical scheme of the present application may be applied to a link related to fund security in a payment link, such as a link of "service security-authentication verification-short message authentication" with a plan ID of 250248, or the abnormal use case may be added to a regular batch operation, and the daily success rate is maintained. The abnormal cases can be directly used in the daily version, and meanwhile, the cases can be continuously supplemented to form an abnormal test library. Meanwhile, the modularized abnormal use cases can be opened for other business teams to directly use, the value of the abnormal use cases is maximized, and fig. 8 shows the batch operation condition of part of the abnormal use cases, for example, the total number of use cases is 209, the total power of the assembly is 92.34%, and the like.
The technical scheme can be applied to constructing the service exception automatic case through network exception, and can continuously build the case set through continuously supplementing the service scene case, so that the dynamic perfection is realized.
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 invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. 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 by the invention.
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 invention 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 invention.
According to another aspect of the embodiment of the present invention, there is also provided a service testing apparatus for implementing the service testing method. Fig. 9 is a schematic diagram of an alternative service testing apparatus according to an embodiment of the present invention, and as shown in fig. 9, the apparatus may include:
a first obtaining unit 901, configured to obtain a test request, where the test request is used to request a service test on a first service in a service environment configured in a first abnormal mode;
a searching unit 903, configured to search, in response to the test request, a first test case corresponding to the first exception mode, where the first test case is used to configure the operation mode of the service environment to the first exception mode;
a configuration unit 905, configured to configure an operation mode of the service environment to a first abnormal mode by executing the first test case;
the second obtaining unit 907 is configured to perform a service test on the first service in a service environment configured in the first abnormal mode, and obtain test information generated when the service test is performed on the first service in the service environment.
It should be noted that the first obtaining unit 901 in this embodiment may be configured to execute step S202 in this embodiment, the searching unit 903 in this embodiment may be configured to execute step S204 in this embodiment, the configuring unit 905 in this embodiment may be configured to execute step S206 in this embodiment, and the second obtaining unit 907 in this embodiment may be configured to execute step S208 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 modules, when a test request is obtained, a reusable first test case corresponding to a first abnormal mode is searched, and the running mode of the service environment is configured to be the first abnormal mode by executing the first test case; the method comprises the steps of carrying out service test on a first service in a service environment configured to be in a first abnormal mode, and obtaining test information generated when the first service is tested by executing a first service case in the service environment, wherein the used first test case and the first service case are both edited in advance and reusable in the whole test process, in other words, new test cases and service cases are not required to be edited again in each test, the technical problem that the time cost for testing the service in the related technology is high can be solved, and the technical effect of improving the test efficiency is achieved.
The search unit may include: the first obtaining module is used for obtaining a first keyword used for expressing a first abnormal mode from the test request; the first searching module is used for searching a first test case matched with the first keyword from the first set, wherein a plurality of test cases are stored in the first set, and the plurality of test cases comprise the first test case.
Optionally, the apparatus of the present application may further comprise: the first creating unit is used for creating a first set comprising a plurality of test cases before searching for the first test case corresponding to the first abnormal mode.
Optionally, the apparatus of the present application may further comprise: the first management unit is used for adding the test cases indicated by the first adding instruction in the first set under the condition that the first adding instruction is received after the first set comprising a plurality of test cases is created; under the condition that a first modification instruction is received, modifying the test case indicated by the first modification instruction in the first set; and under the condition that the first deleting instruction is received, deleting the test case indicated by the first deleting instruction in the first set.
The configuration unit may include: the detection module is used for detecting the operation mode of the service environment; the first execution module is used for configuring the operation mode of the business environment into a first abnormal mode by executing a first test case under the condition that the operation mode of the business environment is not detected to be the abnormal mode.
The first execution module may further be configured to: acquiring entry information of a service environment, wherein the entry information is used for indicating first equipment where the service environment is located; and filling the entry information into the first test case, and configuring the operation mode of the business environment on the first device into a first abnormal mode by executing the first test case.
Optionally, the first execution module may be further configured to: sending a first instruction to first equipment by executing a flow in a first test case, wherein the first instruction is used for indicating the configuration of the first equipment; sending a second instruction to the first device by executing a flow in the first test case, wherein the second instruction is used for indicating configuration in a service environment on the first device; and sending a third instruction to the second device by executing the flow in the first test case, wherein the third instruction is used for indicating the configuration on the second device, and the second device is a device which is in communication connection with the first device.
The second acquiring unit may include: the second acquisition module is used for acquiring a second keyword used for expressing the first service from the test request; the second searching module is used for searching a first service case matched with the second keyword from a second set, wherein a plurality of service cases are stored in the second set, and the plurality of service cases comprise the first service case; and the second execution module is used for carrying out service test on the first service by executing the first service case in the service environment.
Optionally, the number of the first services is multiple, and the second execution module is further configured to: simultaneously executing a plurality of first service cases in a service environment to simultaneously perform service test on first services, wherein each first service case is used for performing service test on a corresponding first service; executing the plurality of first service cases in a service environment according to the acquisition sequence of the plurality of first service cases so as to perform service test on the plurality of first services; executing a plurality of first service cases in a service environment according to first priority information to perform service test on a plurality of first services, wherein the first priority information is configured with the priority of each service case in a second set; and executing a plurality of first service cases in a service environment according to second priority information to perform service test on the plurality of first services, wherein the second priority information is information which is indicated to the first equipment and is used for representing the priorities of the plurality of first services.
The apparatus of the present application may further comprise: a second creating unit for creating a second set.
Optionally, the apparatus of the present application may further comprise: a second management unit to: under the condition that a second adding instruction is received, adding the service use case indicated by the second adding instruction in a second set; under the condition that a second modification instruction is received, modifying the service case indicated by the second modification instruction in the second set; and under the condition that a second deleting instruction is received, deleting the service use case indicated by the second deleting instruction in the second set.
Optionally, the apparatus of the present application may further include a recovery unit configured to: the method comprises the steps that data information in a database on first equipment is obtained regularly, and under the condition that the data information shows that the operation mode of the business environment is a second abnormal mode and is not recovered to a normal mode, a first recovery case corresponding to a second test case is executed to recover the operation mode of the business environment to the normal mode, wherein the second test case is used for configuring the business environment to be the second abnormal mode; before the operation mode of the business environment is configured to be the first abnormal mode, if the operation mode of the business environment is detected to be the third abnormal mode, executing a second recovery case corresponding to a third test case to recover the operation mode of the business environment to be the normal mode, wherein the third test case is used for configuring the business environment to be the third abnormal mode; if the configuration fails when the operation mode of the service environment is configured to the first abnormal mode, the operation mode of the service environment is recovered to the normal mode; and under the condition that the service test on the first service is finished, executing a third recovery case corresponding to the first test case to recover the operation mode of the service environment to a normal mode.
It should be noted that, in the related art, the abnormal structures may affect each other, if the abnormal structure is not recovered on one machine, for example, a network from a machine a to a machine B is set to be unavailable, and if the abnormal structure is not recovered, all services of this machine may be affected, and in order to overcome this problem, in the above embodiment, when the operation mode of the service environment is configured to be the first abnormal mode by executing the first test case, the operation mode of the service environment may be detected; under the condition that the operation mode of the service environment is not detected to be the abnormal mode, the operation mode of the service environment is configured to be the first abnormal mode by executing the first test case, and the influence of the previous abnormality on the test is avoided.
Optionally, the technical solution of the present application may be classified and abstracted into a general interface by classifying the abnormal scenario construction method, the general interface may form an abnormal use case set (for example, a first set including test use cases and/or a second set including service use cases), and may also be directly constructed from a web page, when the operation mode of the service environment is configured to be the first abnormal mode by executing the first test use case, the general interface may obtain entry information of the service environment, where the entry information is used to indicate a first device where the service environment is located, such as an IP address, an MAC address, and the like of the first device; the entry information is filled into the first test case, and the operation mode of the service environment on the first device is configured into the first abnormal mode by executing the first test case.
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 present invention, a server or a terminal for implementing the service testing method is also provided.
Fig. 10 is a block diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 10, the terminal may include: one or more (only one shown in fig. 10) processors 1001, memory 1003, and transmission apparatus 1005 (such as the transmission apparatus in the above embodiments), as shown in fig. 10, the terminal may further include an input-output device 1007.
The memory 1003 may be used 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 invention, and the processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1003, that is, implements the service testing method described above. The memory 1003 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 1003 may further include memory located remotely from the processor 1001, which may be connected to a terminal over 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 transmitting device 1005 is used for receiving or transmitting data via a network, and can 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 transmitting device 1005 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 transmitting device 1005 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 1003 is used to store an application program, in particular.
The processor 1001 may call an application stored in the memory 1003 via the transmitting device 1005 to perform the following steps:
acquiring a test request, wherein the test request is used for requesting a service test on a first service in a service environment configured to be in a first abnormal mode;
responding to the test request, and searching a first test case corresponding to the first abnormal mode, wherein the first test case is used for configuring the operation mode of the service environment into the first abnormal mode;
configuring the operation mode of the service environment into a first abnormal mode by executing a first test case;
and performing service test on the first service in the service environment configured to be in the first abnormal mode, and acquiring test information generated when the service test is performed on the first service in the service environment.
The processor 1001 is further configured to perform the following steps:
the method comprises the steps that data information in a database on first equipment is obtained regularly, and under the condition that the data information shows that the operation mode of the business environment is a second abnormal mode and is not recovered to a normal mode, a first recovery case corresponding to a second test case is executed to recover the operation mode of the business environment to the normal mode, wherein the second test case is used for configuring the business environment to be the second abnormal mode;
before the operation mode of the business environment is configured to be the first abnormal mode, if the operation mode of the business environment is detected to be the third abnormal mode, executing a second recovery case corresponding to a third test case to recover the operation mode of the business environment to be the normal mode, wherein the third test case is used for configuring the business environment to be the third abnormal mode;
if the configuration fails when the operation mode of the service environment is configured to the first abnormal mode, the operation mode of the service environment is recovered to the normal mode;
and under the condition that the service test on the first service is finished, executing a third recovery case corresponding to the first test case to recover the operation mode of the service environment to a normal mode.
By adopting the embodiment of the invention, when the test request is obtained, the reusable first test case corresponding to the first abnormal mode is searched, and the operation mode of the service environment is configured into the first abnormal mode by executing the first test case; the method comprises the steps of carrying out service test on a first service in a service environment configured to be in a first abnormal mode, and obtaining test information generated when the first service is tested by executing a first service case in the service environment, wherein the used first test case and the first service case are both edited in advance and reusable in the whole test process, in other words, new test cases and service cases are not required to be edited again in each test, the technical problem that the time cost for testing the service in the related technology is high can be solved, and the technical effect of improving the test efficiency is 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. 10 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. 10 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. 10, or have a different configuration than shown in FIG. 10.
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.
The embodiment of the invention also provides 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:
s11, obtaining a test request, wherein the test request is used for requesting a service test on a first service in a service environment configured in a first abnormal mode;
s12, responding to the test request, searching a first test case corresponding to the first abnormal mode, wherein the first test case is used for configuring the operation mode of the service environment to the first abnormal mode;
s13, configuring the operation mode of the service environment into a first abnormal mode by executing the first test case;
s14, performing a service test on the first service in the service environment configured as the first abnormal mode, and acquiring test information generated when the service test is performed on the first service in the service environment.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s21, acquiring data information in a database on the first device at regular time, and executing a first recovery case corresponding to a second test case to recover the operation mode of the service environment to a normal mode under the condition that the data information indicates that the operation mode of the service environment is a second abnormal mode and is not recovered to the normal mode, wherein the second test case is used for configuring the service environment to the second abnormal mode;
s22, before the operation mode of the service environment is configured to the first abnormal mode, if the operation mode of the service environment is detected to be the third abnormal mode, executing a second recovery case corresponding to a third test case to recover the operation mode of the service environment to the normal mode, wherein the third test case is used for configuring the service environment to the third abnormal mode;
s23, if the configuration failure occurs when the operation mode of the service environment is configured to the first abnormal mode, the operation mode of the service environment is recovered to the normal mode;
and S24, executing a third recovery case corresponding to the first test case to recover the operation mode of the service environment to a normal mode under the condition that the service test of the first service is completed.
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 invention 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 invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, 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 invention 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 invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method for testing a service, comprising:
creating a first set comprising a plurality of test cases and a second set comprising a plurality of service cases, wherein the plurality of test cases comprise a first test case corresponding to a first abnormal mode;
acquiring a test request triggered by a timer, wherein the test request is used for requesting a service test on a first service in a service environment configured in the first abnormal mode;
responding to the test request, searching the first test case from the first set and searching the first service case from the second set, wherein the first test case and the first service case are both edited in advance and can be reused;
configuring the operation mode of the business environment into the first abnormal mode by executing the first test case;
performing a service test on the first service by executing the first service case in the service environment configured to be in the first abnormal mode, and acquiring test information generated when the service test is performed on the first service in the service environment;
the configuring the operational mode of the business environment to the first exception mode by executing the first test case comprises:
acquiring entry information of the service environment, wherein the entry information is used for indicating first equipment where the service environment is located;
filling the entry information into the first test case, and configuring the operation mode of the business environment on the first device into the first abnormal mode by executing the first test case;
the first service is multiple, and the service testing of the first service by executing the first service case in the service environment configured in the first abnormal mode includes at least one of:
simultaneously executing a plurality of first service cases in the service environment to simultaneously perform service test on a plurality of first services, wherein each first service case is used for performing service test on a corresponding one of the first services;
executing a plurality of first service cases in the service environment according to the acquisition sequence of the plurality of first service cases so as to perform service test on the plurality of first services;
executing a plurality of first service cases in the service environment according to first priority information to perform service test on the plurality of first services, wherein the first priority information is configured with the priority of each service case in the second set;
and executing a plurality of first service use cases in the service environment according to second priority information to perform service test on the plurality of first services, wherein the second priority information is information which is indicated to first equipment and is used for representing the priorities of the plurality of first services.
2. The method of claim 1, wherein finding the first test case from the first set comprises:
acquiring a first keyword used for representing the first abnormal mode from the test request;
and searching the first test case matched with the first keyword from a first set, wherein a plurality of test cases are stored in the first set, and the plurality of test cases comprise the first test case.
3. The method of claim 1, wherein after creating the first set comprising the plurality of test cases, the method further comprises at least one of:
under the condition that a first adding instruction is received, adding a test case indicated by the first adding instruction in the first set;
under the condition that a first modification instruction is received, modifying the test case indicated by the first modification instruction in the first set;
and under the condition that a first deleting instruction is received, deleting the test case indicated by the first deleting instruction in the first set.
4. The method of any of claims 1 to 3, wherein configuring the operational mode of the business environment to the first exception mode by executing the first test case comprises:
detecting the operation mode of the service environment;
and under the condition that the operation mode of the business environment is not detected to be an abnormal mode, configuring the operation mode of the business environment into the first abnormal mode by executing the first test case.
5. The method of claim 1, wherein configuring the operational mode of the business environment on the first device to the first exception mode by executing the first test case comprises at least one of:
sending a first instruction to the first device by executing a flow in the first test case, wherein the first instruction is used for indicating that hardware of the first device is configured;
sending a second instruction to the first device by executing a flow in the first test case, wherein the second instruction is used for indicating configuration in the business environment on the first device;
and sending a third instruction to a second device by executing the flow in the first test case, wherein the third instruction is used for indicating the configuration on the second device, and the second device is a device which is in communication connection with the first device.
6. The method according to any of claims 1 to 3, wherein performing a traffic test on the first traffic in the traffic environment configured in the first abnormal mode comprises:
acquiring a second keyword used for expressing the first service from the test request;
searching a first service use case matched with the second keyword from the second set, wherein a plurality of service use cases are stored in the second set, and the plurality of service use cases comprise the first service use case;
and performing service test on the first service by executing the first service case in the service environment.
7. The method of claim 1, further comprising at least one of:
under the condition that a second adding instruction is received, adding the service use case indicated by the second adding instruction in the second set;
under the condition that a second modification instruction is received, modifying the service use case indicated by the second modification instruction in the second set;
and under the condition of receiving a second deleting instruction, deleting the service use case indicated by the second deleting instruction in the second set.
8. The method of claim 1, further comprising:
the method comprises the steps that data information in a database on first equipment is obtained regularly, and under the condition that the data information shows that the operation mode of the business environment is a second abnormal mode and is not recovered to a normal mode, a first recovery case corresponding to a second test case is executed to recover the operation mode of the business environment to the normal mode, wherein the second test case is used for configuring the business environment to be the second abnormal mode;
before the operation mode of the business environment is configured to be the first abnormal mode, if the operation mode of the business environment is detected to be a third abnormal mode, executing a second recovery case corresponding to a third test case to recover the operation mode of the business environment to be a normal mode, wherein the third test case is used for configuring the business environment to be the third abnormal mode;
if the configuration fails when the operation mode of the service environment is configured to the first abnormal mode, the operation mode of the service environment is recovered to a normal mode;
and under the condition that the service test of the first service is finished, executing a third recovery case corresponding to the first test case to recover the operation mode of the service environment to a normal mode.
9. An apparatus for testing a service, comprising:
the device is used for creating a first set comprising a plurality of test cases and a second set comprising a plurality of service cases, wherein the plurality of test cases comprise a first test case corresponding to a first abnormal mode;
a first obtaining unit, configured to obtain a test request triggered by a timer, where the test request is used to request a service test on a first service in a service environment configured in a first abnormal mode;
the searching unit is used for responding to the test request, searching the first test case from the first set and searching the first service case from the second set, wherein the first test case and the first service case are both edited in advance and can be reused;
a configuration unit, configured to configure the operation mode of the service environment to the first exception mode by executing the first test case;
a second obtaining unit, configured to perform a service test on the first service by executing the first service case in the service environment configured in the first abnormal mode, and obtain test information generated when the service test is performed on the first service in the service environment;
the configuration unit includes: a first execution module, configured to obtain entry information of the service environment, where the entry information is used to indicate a first device in which the service environment is located; filling the entry information into the first test case, and configuring the operation mode of the business environment on the first device into the first abnormal mode by executing the first test case;
the first service is multiple, and the configuration unit includes: a second execution module, configured to execute a plurality of first service use cases simultaneously in the service environment, so as to perform service testing on a plurality of first services simultaneously, where each of the first service use cases is used to perform service testing on a corresponding one of the first services; executing a plurality of first service cases in the service environment according to the acquisition sequence of the plurality of first service cases so as to perform service test on the plurality of first services; executing a plurality of first service cases in the service environment according to first priority information to perform service test on the plurality of first services, wherein the first priority information is configured with the priority of each service case in the second set; and executing a plurality of first service use cases in the service environment according to second priority information to perform service test on the plurality of first services, wherein the second priority information is information which is indicated to first equipment and is used for representing the priorities of the plurality of first services.
10. The apparatus of claim 9, wherein the lookup unit comprises:
a first obtaining module, configured to obtain a first keyword used for representing the first abnormal pattern from the test request;
the first searching module is configured to search the first test case matching the first keyword from a first set, where the first set stores a plurality of test cases, and the plurality of test cases include the first test case.
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.
CN201810375217.9A 2018-04-24 2018-04-24 Service testing method and device, storage medium and electronic device Active CN110196804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810375217.9A CN110196804B (en) 2018-04-24 2018-04-24 Service testing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810375217.9A CN110196804B (en) 2018-04-24 2018-04-24 Service testing method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110196804A CN110196804A (en) 2019-09-03
CN110196804B true CN110196804B (en) 2022-03-11

Family

ID=67751063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810375217.9A Active CN110196804B (en) 2018-04-24 2018-04-24 Service testing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN110196804B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309627B (en) * 2020-03-08 2022-11-29 苏州浪潮智能科技有限公司 Method and system for preventing test conflict in software test
CN112328498A (en) * 2020-11-27 2021-02-05 京东数字科技控股股份有限公司 Service testing method and device, storage medium and electronic device
CN114741274A (en) * 2021-01-08 2022-07-12 腾讯科技(深圳)有限公司 Abnormity testing method and device
CN117951005A (en) * 2021-01-25 2024-04-30 杭州衣科信息技术股份有限公司 Interface automation testing device, computer equipment and storage medium
CN113300912B (en) * 2021-05-21 2022-07-26 湖南快乐阳光互动娱乐传媒有限公司 Equipment testing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866219A (en) * 2005-12-09 2006-11-22 华为技术有限公司 System and method for testing measured object based on automatic test script
CN101212362A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
WO2014082908A1 (en) * 2012-11-28 2014-06-05 Siemens Aktiengesellschaft Method and apparatus for generating test case for fuzz test
CN106021093A (en) * 2016-05-05 2016-10-12 北京思特奇信息技术股份有限公司 Test case reuse method and system
CN107135390A (en) * 2017-05-08 2017-09-05 湖南快乐阳光互动娱乐传媒有限公司 The automated testing method and system of a kind of TV applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866219A (en) * 2005-12-09 2006-11-22 华为技术有限公司 System and method for testing measured object based on automatic test script
CN101212362A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
WO2014082908A1 (en) * 2012-11-28 2014-06-05 Siemens Aktiengesellschaft Method and apparatus for generating test case for fuzz test
CN106021093A (en) * 2016-05-05 2016-10-12 北京思特奇信息技术股份有限公司 Test case reuse method and system
CN107135390A (en) * 2017-05-08 2017-09-05 湖南快乐阳光互动娱乐传媒有限公司 The automated testing method and system of a kind of TV applications

Also Published As

Publication number Publication date
CN110196804A (en) 2019-09-03

Similar Documents

Publication Publication Date Title
CN110196804B (en) Service testing method and device, storage medium and electronic device
CN110389900B (en) Distributed database cluster testing method and device and storage medium
CN109218139B (en) Gateway test system
CN106713487A (en) Data synchronization method and device
CN108363662A (en) A kind of applied program testing method, storage medium and terminal device
US11461206B2 (en) Cloud simulation and validation system
CN106339273A (en) Application program restoration method, terminal and server
CN111651352B (en) Warehouse code merging method and device
CN111813495A (en) Node testing method and device, storage medium and electronic device
CN111782524A (en) Application testing method and device, storage medium and electronic device
CN113032245A (en) Error positioning identification test method and device, computer equipment and storage medium
CN109857391A (en) Processing method and processing device, storage medium and the electronic device of data
US10015089B1 (en) Enhanced node B (eNB) backhaul network topology mapping
CN113360361B (en) Method, device and equipment for constructing distributed operation and maintenance simulation system
Krainyk et al. Internet-of-Things Device Set Configuration for Connection to Wireless Local Area Network.
CN114244686B (en) Communication fault detection method, device and system
CN112749043B (en) Database disaster recovery method, system, device and medium
CN110876155A (en) Simulation system and method for wireless mesh network
CN110532012B (en) Distributed system software upgrading method and device
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN113067852A (en) Application resiliency system for applications deployed on a platform and method thereof
CN115543491A (en) Microservice processing method and device
CN113608750B (en) Deployment method and device of monitoring component, computer equipment and storage medium
CN109828765B (en) Method for upgrading online service, general routing platform and storage medium
CN117098164A (en) Fault detection method and device

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