CN112769655B - Network variation testing method, device and system - Google Patents

Network variation testing method, device and system Download PDF

Info

Publication number
CN112769655B
CN112769655B CN202110232373.1A CN202110232373A CN112769655B CN 112769655 B CN112769655 B CN 112769655B CN 202110232373 A CN202110232373 A CN 202110232373A CN 112769655 B CN112769655 B CN 112769655B
Authority
CN
China
Prior art keywords
test
network
request
information
server
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
CN202110232373.1A
Other languages
Chinese (zh)
Other versions
CN112769655A (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.)
Beijing Baijia Technology Group Co ltd
Original Assignee
Beijing Baijia Technology Group 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 Beijing Baijia Technology Group Co ltd filed Critical Beijing Baijia Technology Group Co ltd
Priority to CN202110232373.1A priority Critical patent/CN112769655B/en
Publication of CN112769655A publication Critical patent/CN112769655A/en
Application granted granted Critical
Publication of CN112769655B publication Critical patent/CN112769655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

The embodiment of the application provides a network variation testing method, a device and a system, and the network variation testing method applied to an application end comprises the following steps: sending a network request to an agent end so that the agent end processes the network request to obtain target request information and sends the target request information to a server end; when receiving an automatic test request sent by the server according to the target request information, sending confirmation information aiming at the automatic test request to the server; acquiring a variation data volume set for network variation test; sending test information to a server side according to the variation data volume set to carry out network variation test; and receiving a network test result sent by the server according to the test information. Therefore, the embodiment can automatically perform the mutation test, does not need manual configuration, and has high test efficiency and wide test range.

Description

Network variation testing method, device and system
Technical Field
The present application relates to the field of network testing, and in particular, to a method, an apparatus, and a system for testing network variation.
Background
The mutation test is a software test technology based on defects, and is an important means for guaranteeing the software quality in the software development and maintenance process during software test. In the existing network variation testing method, usually a tester configures a variation data body to be tested in a preset cyclic testing script, and then performs cyclic calling testing. However, in practice, it is found that data variants used in the test need to be manually configured in a cyclic test script, and in the whole test process, testers need to pay attention to each operation of the variant test, so that the test efficiency is low, and the test range is small. Therefore, the existing network variation testing method has a small testing range and low testing efficiency.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, and a system for testing network variation, which can automatically perform variation testing without manual configuration, and have high testing efficiency and a wide testing range.
A first aspect of an embodiment of the present application provides a network variation testing method, which is applied to an application end, and the method includes:
sending a network request to an agent end so that the agent end processes the network request to obtain target request information and sends the target request information to a server end;
when receiving an automatic test request sent by the server according to the target request information, sending confirmation information aiming at the automatic test request to the server;
acquiring a variation data volume set for network variation test;
sending test information to the server side according to the variation data volume set to carry out network variation test;
and receiving a network test result sent by the server according to the test information.
In the implementation process, the application terminal can preferentially send a network request to the agent terminal for processing to obtain target request information, and then the agent terminal sends the target request information to the server terminal; meanwhile, the application end detects whether an automatic test request sent by the server end according to the target request information is received or not at any time, and if so, confirmation information aiming at the automatic test request is sent to the server end; then, the application end acquires a variation data volume set for network variation test; sending test information to a server side according to the variation data volume set to carry out network variation test; and finally, receiving a network test result sent by the server according to the test information. Therefore, by implementing the implementation mode, the server and the agent can perform corresponding processing by sending the network request, and return the automatic test request, so that the application can further obtain the variant data set and wait for the network test result fed back by the server, thereby realizing the automatic network variant test, avoiding manual configuration, and improving the test efficiency and the test range.
Further, the sending acknowledgement information for the automated test request to the server includes:
acquiring current actual configuration information of the application terminal;
judging whether to start a network variation test according to the current actual configuration information;
and if so, sending confirmation information aiming at the automatic test request to the server.
In the implementation process, the method can judge whether to start the test according to the actual configuration information of the application end, so that the test is matched with the actual configuration information, and the pertinence of the network variation test is further improved.
Further, after the receiving the network test result sent by the server according to the test information, the method further includes:
judging whether a test operation instruction is received or not;
if so, simulating an operation behavior at the application end according to the test operation instruction to obtain network request information corresponding to the test operation instruction;
generating an operation test request according to the variant data volume set and the network request information;
and sending the operation test request to the server, and receiving an operation test result sent by the server according to the operation test request.
In the implementation process, the method can perform simulation operation according to the input operation instruction, so that after the network test result is obtained, the operation test result corresponding to the operation is obtained again, and then the debugging test of the application terminal is realized.
A second aspect of the present application provides a network variation testing method, applied to a server, including:
judging whether target request information sent by an agent terminal is received or not;
if yes, sending an automatic test request to an application end according to the target request information;
when receiving confirmation information which is sent by the application end and aims at the automatic test request, receiving test information sent by the application end;
responding the test information to obtain a network test result;
and sending the network test result to the application terminal.
In the implementation process, the server side can process and judge according to the network request sent by the application side, so that interactive relay between the application side and the agent side can be carried out according to actual conditions, and further network variation test is realized.
A third aspect of the embodiments of the present application provides a network variation testing method, applied to a proxy side, including:
receiving a network request sent by an application terminal, and acquiring network address information in the network request;
acquiring filtering configuration information for network variation test;
judging whether the network address information needs to be forwarded according to the filtering configuration information;
if yes, target request information including the network address information is sent to a server.
In the implementation process, the agent terminal in the method may generate the target request information after receiving the network address information sent by the application terminal, and send the target request information to the server terminal, so that the method automatically performs the subsequent network mutation test.
A fourth aspect of the embodiments of the present application provides a network mutation testing apparatus, including:
the first sending unit is used for sending a network request to an agent end so that the agent end processes the network request to obtain target request information and sends the target request information to a server end;
the second sending unit is used for sending confirmation information aiming at the automatic test request to the server side when the automatic test request sent by the server side according to the target request information is received;
the acquiring unit is used for acquiring a variation data volume set used for network variation test;
the test unit is used for sending test information to the server side according to the variation data volume set to carry out network variation test;
and the result receiving unit is used for receiving the network test result sent by the server according to the test information.
In the implementation process, the server and the agent can be triggered to perform corresponding processing by the method of sending the network request, and an automatic test request is returned, so that the application can further obtain a variation data set and wait for a network test result fed back by the server, thereby realizing automatic network variation test, avoiding manual configuration and improving test efficiency and test range.
A fifth aspect of the embodiments of the present application provides a network mutation testing system, which includes an application end, a server end and an agent end, wherein,
the application terminal is used for sending a network request to the agent terminal;
the agent end is used for receiving the network request and acquiring network address information in the network request; judging whether forwarding processing needs to be carried out on the network address information according to preset filtering configuration information; if yes, sending target request information including the network address information to the server;
the server is used for receiving the target request information and sending a network variation test request to the application terminal according to the target request information;
the application terminal is further configured to receive the network variation test request and send confirmation information for the network variation test request to the server terminal;
the application terminal is further used for acquiring a variation data volume set for network variation testing; sending test information to the server side according to the variation data volume set to carry out network variation test;
the server is also used for receiving the test information and responding to the test information to obtain a network test result; sending the network test result to the application end;
the application end is further used for receiving the network test result.
In the implementation process, the automatic network mutation test can be carried out through the application terminal, the server terminal and the agent terminal together, so that manual configuration is avoided, and the test efficiency and the test range of the network mutation test are improved.
Further, the network variation testing system further comprises:
the application terminal is further used for judging whether a test operation instruction input by a user is received or not after receiving the network test result, if so, simulating an operation behavior at the application terminal according to the test operation instruction to obtain network request information corresponding to the test operation instruction;
the application terminal is further used for generating an operation test request according to the variant data volume set and the network request information;
the application terminal is further configured to send the operation test request to the server terminal, and receive an operation test result sent by the server terminal according to the operation test request.
In the implementation process, the network mutation test system can operate again to generate an operation test result after acquiring the network test result, so that the system can achieve novel and real-time network test and debugging, and the applicability of the network mutation system is improved.
A sixth aspect of embodiments of the present application provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the electronic device execute the network variation testing method described in any one of the first aspect of embodiments of the present application.
A seventh aspect of the embodiments of the present application provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are read and executed by a processor, the method for testing network variation according to any one of the first aspect of the embodiments of the present application is performed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a network variation testing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another network variation testing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another network variation testing method according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of another network variation testing method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a network variation testing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a network variation testing system according to an embodiment of the present disclosure;
fig. 7 is a schematic system interaction flow diagram of a network variation testing system according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of another network variation testing system provided in this embodiment.
The figure is as follows: 610-application side, 620-service side, 630-proxy side.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a network variation testing method according to an embodiment of the present disclosure. The network variation testing method is applied to an application end and comprises the following steps:
s101, sending a network request to an agent end so that the agent end processes the network request to obtain target request information and sends the target request information to a server end.
In this embodiment, the network request may specifically be a URL (Uniform Resource Locator) request, that is, a network request including URL information.
In the embodiment of the application, the method can collect the network request through the sdk/lib collection module, and then send the collected network request to the agent end.
In this embodiment, the application terminal may be a computer, a smart phone, a tablet computer, or other terminal devices, and is not limited in this embodiment.
In the embodiment of the application, the application terminal sends the network request to the agent terminal, and the network request can be intercepted by the acquisition module of the application terminal and transmitted to the agent terminal.
In the embodiment of the application, after receiving the target request information, the server may send an automated test request to the application according to the target request information.
S102, when receiving an automatic test request sent by the server according to the target request information, sending confirmation information aiming at the automatic test request to the server.
S103, acquiring a variation data volume set for the network variation test.
In the embodiment of the application, after the acquisition module of the application terminal confirms that the automatic network variation test is started, the acquisition of the variation data volume set is initiated.
In an embodiment of the present application, the variant data entity set includes at least one variant data request entity, which may be generated by a variant data entity server and configured in the storage module. The variant data body server can be configured at an application end, an agent end, a server end or independently set; the storage module may be configured at an application side, an agent side, a server side, a variant data body server side, a cloud side, or other positions, which is not limited in any way.
In the embodiment of the application, the acquisition module of the application executes step S104 to start triggering the automated network mutation test according to the acquired mutation data volume set, and sends test information corresponding to the rule to the simulation service.
And S104, sending test information to the server side according to the variation data volume set to carry out network variation test.
In an embodiment of the present application, the test information includes test URL information generated according to the variant data volume set.
And S105, receiving the network test result sent by the server according to the test information.
In the embodiment of the application, when the server receives the test information, the server can simulate the corresponding URL request result, attach subsequent operation, respond to the variation test, obtain the single test result, and simultaneously store the single test result (namely the actual test result of the current time) to the storage module.
In the embodiment of the application, after the variant data volume set is executed, the server side collects all the single test results to obtain the network test result.
In the embodiment of the application, the method can improve the efficiency of variation tests of testers, realize the real-time loading of variation factors and variation data bodies, automatically execute the network variation tests, record the execution result of each time, perform statistics and feed back the statistics to the variation data rule service, and realize the effective simulation of the variation data bodies and the improvement of the coverage of the variation data bodies.
It can be seen that, by implementing the network variation testing method described in fig. 1, the server and the agent can perform corresponding processing by sending the network request, and return the automatic testing request, so that the application can further obtain the variation data set and wait for the network testing result fed back by the server, thereby implementing the automatic network variation testing, avoiding manual configuration, and improving the testing efficiency and the testing range.
Please refer to fig. 2, fig. 2 is a flowchart illustrating a network variation testing method according to an embodiment of the present disclosure. As shown in fig. 2, the network variation testing method includes:
s201, sending the network request to the agent end so that the agent end processes the network request to obtain target request information and sends the target request information to the server end.
In the embodiment of the application, the application end is provided with the SDK acquisition module, so that the network request can be intercepted through the SDK acquisition module, and the automatic cycle test of the network request is realized through the SDK simulation request operation.
S202, when receiving an automatic test request sent by the server according to the target request information, acquiring the current actual configuration information of the application terminal.
S203, judging whether to start a network variation test according to the current actual configuration information, and if so, executing the steps S204-S208; if not, the flow is ended.
In the embodiment of the application, after receiving the automatic test request, the acquisition module of the application performs automatic confirmation according to the current actual configuration information of the current application, and determines whether to start the automatic mutation test, if not, the whole mutation test process is stopped, and if so, the network mutation test is started.
And S204, sending confirmation information aiming at the automatic test request to the server.
And S205, acquiring a variation data volume set for the network variation test.
In the embodiment of the application, a new URL network request for one mutation test is assembled according to the data set of the mutation data volume and the network request information, and the whole mutation test is automatically completed until all data in the mutation data volume set are used, and the server side does not return to the subsequent operation.
And S206, sending test information to the server side according to the variation data volume set to perform network variation test.
And S207, receiving a network test result sent by the server according to the test information.
S208, judging whether a test operation instruction is received, if so, executing steps S209-S211; if not, the flow is ended.
In the embodiment of the application, the application end receives the network test result of the current mutation test, judges whether the subsequent operation exists, if not, the automatic network mutation test is finished, and the current test is considered to be finished.
S209, simulating an operation behavior at the application end according to the test operation instruction to obtain network request information corresponding to the test operation instruction.
In the embodiment of the application, the operation behavior can be simulated at the application terminal according to the test operation instruction, for example: and querying, clicking and other events, and triggering the corresponding network request comprising the URL again.
And S210, generating an operation test request according to the variant data body set and the network request information.
S211, sending an operation test request to the server, and receiving an operation test result sent by the server according to the operation test request.
In the embodiment of the application, the method can perform playback test of the variation factor and the variation data body on the network request (namely, the request including the URL) needing variation test, and simulate data response, logic coverage and the like of the request.
In the embodiment of the application, an initial data set can be generated through the variant data body server, and through a corresponding algorithm, the variant data body set of the corresponding test case can be optimized and increased through the subsequent analysis of the operation test result, and the range and the accuracy of the URL playback recording test can be calibrated and corrected in time.
In the embodiment of the application, the implementation of the method can realize the automatic variation test of a certain network request, improve the product network test coverage rate under the internet environment, improve the test efficiency of testers, improve the test accuracy of the testers in the software test through the optimization of the variation data body and the real-time configuration of the corresponding rule, and better ensure the delivery quality and stability of internet products.
As an optional implementation manner, the following steps may be further included:
acquiring a variant data volume set;
and optimizing the variant data volume set according to the network test result to obtain a new variant data volume set and store the new variant data volume set.
In the above embodiments, the execution subject may be a service side or a variant data volume service side, and this embodiment of the present application is not limited thereto.
In the embodiment of the application, the variation data body set is obtained when the variation test is carried out, the hot loading of the variation test can be realized, the configuration data takes effect in real time to improve the coverage rate of the network variation test, the variation data bodies are corrected and optimized according to the test response content fed back by the simulation service, and the accuracy of the test case is improved.
It can be seen that, by implementing the network variation testing method described in this embodiment, the server and the agent can perform corresponding processing by sending the network request, and return the automatic testing request, so that the application can further obtain the variation data set and wait for the network testing result fed back by the server, thereby implementing the automatic network variation testing, avoiding manual configuration, and improving the testing efficiency and the testing range.
Please refer to fig. 3, fig. 3 is a flowchart illustrating a network variation testing method according to an embodiment of the present disclosure. As shown in fig. 3, the network variation testing method is applied to a server, and the method includes:
s301, judging whether target request information sent by an agent terminal is received or not, and if so, executing steps S302-S305; if not, the flow is ended.
S302, the target request information sends an automatic test request to the application terminal.
And S303, receiving the test information sent by the application terminal when receiving the confirmation information aiming at the automatic test request sent by the application terminal.
And S304, responding the test information to obtain a network test result.
S305, sending the network test result to an application end.
It can be seen that, by implementing the network variation testing method described in fig. 3, processing and judgment can be performed according to the network request sent by the application terminal, so that interactive relay between the application terminal and the agent terminal can be performed according to actual conditions, and further, testing of network variation is realized.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a network variation testing method according to an embodiment of the present disclosure. As shown in fig. 4, the network mutation testing method is applied to an agent, and the method includes:
s401, receiving a network request sent by an application terminal, and acquiring network address information in the network request.
In the embodiment of the present application, the network address information may be URL information, and the like, which is not limited in this embodiment of the present application.
S402, obtaining filtering configuration information for network mutation test.
In the embodiment of the present application, the proxy side includes a proxy service Nginx module, and can obtain, in real time, a network mutation test filtering rule configuration (i.e., filtering configuration information) in a built-in cache storage (Redis).
In the embodiment of the application, the filtering rules which need to be subjected to variation requests can be synchronized to the agent end in real time by modifying the configuration library, so that hot loading of configuration is realized, and coverage of URL test rules is improved.
S403, judging whether forwarding processing needs to be carried out on the network address information according to the filtering configuration information, if so, executing a step S404; if not, the flow is ended.
In the embodiment of the application, the agent terminal can perform matching comparison on the network address information according to the filtering configuration information, and if the matching is successful, the agent terminal indicates that forwarding processing needs to be performed on the network address information, and then performs URL request forwarding, that is, sends target request information to the server terminal.
In the embodiment of the application, when the network address information is not matched, the network address information does not need to be forwarded, and the network address information is directly redirected to the server side to return the normal service request.
As an optional implementation manner, determining whether forwarding processing needs to be performed on the network address information according to the filtering configuration information includes:
acquiring preset filtering configuration information for network variation test;
matching and comparing the network address information with preset filtering configuration information to obtain a matching result;
and judging whether the network address information needs to be forwarded according to the matching result.
S404, sending target request information including the network address information to a server.
In an embodiment of the present application, the target request information includes a matching mutation test URL.
In the embodiment of the application, after the agent side sends the target request information including the network address information to the server side, the server side can send the automatic test request to the SDK acquisition module of the application side according to the target request information.
It can be seen that, by implementing the network mutation testing method described in fig. 4, the target request information can be generated after the network address information sent by the application terminal is received, and the target request information is sent to the server terminal, so that the method automatically performs the subsequent network mutation test.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a network variation testing apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the network variation testing apparatus includes:
a first sending unit 510, configured to send a network request to an agent, so that the agent processes the network request to obtain target request information and sends the target request information to a server;
a second sending unit 520, configured to send, when receiving an automation test request sent by the server according to the target request information, acknowledgement information for the automation test request to the server;
an obtaining unit 530, configured to obtain a variant data volume set for network variant testing;
a testing unit 540, configured to send test information to the server according to the variant data volume set to perform a network variant test;
and a result receiving unit 550, configured to receive a network test result sent by the server according to the test information.
As an optional implementation manner, the second sending unit 520 includes:
the first subunit is used for acquiring the current actual configuration information of the application terminal;
the second subunit is used for judging whether to start a network variation test according to the current actual configuration information;
and the third subunit is used for sending confirmation information aiming at the automatic test request to the server side if the network mutation test is started.
As an optional implementation manner, the network variation testing apparatus further includes:
a judging unit 560, configured to judge whether a test operation instruction is received;
the operation unit 570 is configured to, when receiving the test operation instruction, simulate an operation behavior at the application end according to the test operation instruction to obtain network request information corresponding to the test operation instruction;
a generating unit 580, configured to generate an operation test request according to the variant data volume set and the network request information;
the third sending unit 590 is configured to send the operation test request to the server, and receive an operation test result sent by the server according to the operation test request.
It can be seen that, with the network mutation testing apparatus described in this embodiment, the server and the agent can perform corresponding processing by sending the network request, and return the automatic testing request, so that the application can further obtain the mutation data set and wait for the network testing result fed back by the server, thereby implementing the automatic network mutation testing, avoiding manual configuration, and improving the testing efficiency and the testing range.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a network variation testing system according to an embodiment of the present disclosure. As shown in fig. 6, the network mutation testing system includes an application terminal 610, a service terminal 620 and a proxy terminal 630, wherein the application terminal 610 is configured to send a network request to the proxy terminal 630.
In the embodiment of the present application, the application terminal 610 includes an acquisition module, and has a main function of acquiring the network request sent by the filtering application and forwarding the network request to the agent terminal 630; in the mutation test process, an operation instruction fed back by the server 620 is received, an application request behavior is simulated, and a cyclic mutation test request is triggered, please refer to fig. 8 together, where fig. 8 is a schematic structural diagram of another network mutation test system provided in this embodiment.
The agent terminal 630 is configured to receive a network request, acquire network address information in the network request, and determine whether forwarding processing needs to be performed on the network address information according to preset filtering configuration information; if so, the target request message including the network address information is sent to the server 620.
In the embodiment of the present application, the proxy 630 has a cache configuration component built therein, and can perform matching filtering according to the URL (i.e., network address information) in the network request and the variant test rule URL in the cache configuration, and forward the network request URL to the simulation test service background if matching is successful. The built-in cache component is associated with an actual database, and the network variation test filtering rules can be automatically updated and added by dynamically adding the variation test rules in the data storage module.
The server 620 is further configured to receive the target request information, and send a network variation test request to the application 610 according to the target request information.
In the embodiment of the present application, the server 620 is configured to receive the target request information, and return a response to the request, add a subsequent test operation rule in the response return, perform subsequent automated mutation test interaction with the SDK (i.e., the application 610), and store a result of each mutation test in the server 620.
As an optional implementation, the server 620 may further be configured to store a basic rule of the mutation test, a mutation test mutation data body, a mutation test result, and the like.
As an optional implementation manner, the server 620 may further be configured to generate a basic variant data volume set for the variant test, and perform optimization and adjustment on the variant data volume through a result after each automated test, so as to continuously update the variant data volume data set under the corresponding test case.
The application 610 is further configured to receive the network mutation test request and send a confirmation message for the network mutation test request to the server 620.
The application terminal 610 is further configured to obtain a variant data volume set for network variant testing; and sending test information to the server 620 for network mutation test according to the mutation data set.
The server 620 is further configured to receive the test information, and obtain a network test result in response to the test information; and sends the network test results to the application 610.
The application terminal 610 is further configured to receive a network test result.
As an optional implementation manner, in the network mutation testing system, the application terminal 610 is further configured to determine whether a test operation instruction input by a user is received after receiving a network test result, and if so, simulate an operation behavior at the application terminal 610 according to the test operation instruction to obtain network request information corresponding to the test operation instruction.
The application terminal 610 is further configured to generate an operation test request according to the variant data volume set and the network request information.
The application 610 is further configured to send an operation test request to the server 620, and receive an operation test result sent by the server 620 according to the operation test request.
It can be seen that, when the network mutation testing system described in fig. 6 is implemented, the network mutation test can be automatically performed by the application terminal 610, the server terminal 620, and the agent terminal 630, so as to avoid manual configuration, and further improve the testing efficiency and the testing range of the network mutation test.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a system interaction flow of a network mutation testing system according to an embodiment of the present disclosure. As shown in fig. 7, the network mutation testing system includes an application terminal 610, a service terminal 620 and a proxy terminal 630.
S701, the application terminal 610 sends a network request to the agent terminal 630.
S702, the proxy 630 receives the network request and obtains the network address information in the network request.
S703, the agent 630 obtains filtering configuration information for network mutation test.
S704, the agent end 630 judges whether the forwarding processing of the network address information is needed according to the filtering configuration information, if so, step S705 is executed, and if not, the flow is ended;
s705, the agent 630 sends the target request information including the network address information to the server 620.
S706, the server 620 receives the target request information.
S707, the server 620 sends a network variation test request to the application 610 according to the target request information.
S708, the application 610 receives the network mutation test request.
S709, the application 610 sends a confirmation message for the network mutation test request to the server 620.
S710, the application 610 obtains a variant data set for network variant testing.
S711, the application 610 sends the test information to the server 620 for performing the network mutation test according to the mutation data set.
And S712, the server 620 receives the test information and responds to the test information to obtain a network test result.
S713, the server 620 sends the network test result to the application 610.
S714, the application 610 receives the network test result.
S715, the application terminal 610 judges whether a test operation instruction input by a user is received, and if so, executes the step S716; if not, the flow is ended.
S716, the application terminal 610 simulates operation behaviors at the application terminal 610 according to the test operation instruction to obtain network request information corresponding to the test operation instruction, and generates an operation test request according to the variant data volume set and the network request information;
s717, the application terminal 610 sends an operation test request to the server terminal 620;
s718, the server 620 receives the operation test request;
s719, the server 620 responds to the operation test request to obtain an operation test result;
s720, the server 620 sends the operation test result to the application 610;
s721, the application 610 receives the operation test result.
It can be seen that, when the network mutation testing system described in fig. 7 is implemented, the network mutation test can be automatically performed by the application terminal 610, the server terminal 620, and the agent terminal 630, so as to avoid manual configuration, and further improve the testing efficiency and the testing range of the network mutation test.
An embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the network mutation testing method in any one of embodiment 1 or embodiment 2 of the present application.
An embodiment of the present application provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are read and executed by a processor, the computer program instructions execute the network variation testing method according to any one of embodiment 1 or embodiment 2 of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A network variation testing method is applied to an application end, and is characterized by comprising the following steps:
sending a network request to an agent end so that the agent end processes the network request according to filtering configuration information to obtain target request information and sends the target request information to a server end; the network request is collected through an sdk/lib collection module; the network request is a URL request;
when receiving an automatic test request sent by the server according to the target request information, sending confirmation information aiming at the automatic test request to the server;
acquiring a variation data volume set for network variation test;
sending test information to the server side according to the variation data volume set to carry out network variation test; the test information comprises test URL information generated according to the variant data volume set;
receiving a network test result sent by the server according to the test information;
after the receiving of the network test result sent by the server according to the test information, the method further includes:
judging whether a test operation instruction is received or not;
if so, simulating an operation behavior at the application end according to the test operation instruction to obtain network request information corresponding to the test operation instruction;
generating an operation test request according to the variant data body set and the network request information;
and sending the operation test request to the server, and receiving an operation test result sent by the server according to the operation test request.
2. The method of claim 1, wherein the sending acknowledgement information for the automated test request to the server comprises:
acquiring current actual configuration information of the application terminal;
judging whether to start a network variation test according to the current actual configuration information;
and if so, sending confirmation information aiming at the automatic test request to the server.
3. A network variation testing method is applied to a server side and is characterized by comprising the following steps:
judging whether target request information sent by an agent terminal is received or not;
if yes, sending an automatic test request to an application end according to the target request information;
when receiving confirmation information which is sent by the application end and aims at the automatic test request, receiving test information sent by the application end; the test information comprises test URL information generated according to the variant data volume set;
responding the test information to obtain a network test result;
and sending the network test result to the application terminal.
4. A network variation testing method is applied to a proxy end and is characterized by comprising the following steps:
receiving a network request sent by an application terminal, and acquiring network address information in the network request; the network request is collected through an sdk/lib collection module; the network request is a URL request;
acquiring filtering configuration information for network variation test;
judging whether the network address information needs to be forwarded according to the filtering configuration information;
if yes, target request information including the network address information is sent to a server.
5. A network mutation testing device applied to an application end is characterized by comprising:
the first sending unit is used for sending a network request to an agent end so that the agent end processes the network request according to the filtering configuration information to obtain target request information and sends the target request information to a server end; the network request is collected through an sdk/lib collection module; the network request is a URL request;
the second sending unit is used for sending confirmation information aiming at the automatic test request to the server side when the automatic test request sent by the server side according to the target request information is received;
the acquiring unit is used for acquiring a variation data volume set used for network variation test;
the test unit is used for sending test information to the server side according to the variation data volume set to carry out network variation test; the test information comprises test URL information generated according to the variant data volume set;
the result receiving unit is used for receiving the network test result sent by the server according to the test information;
the judging unit is used for judging whether a test operation instruction is received or not;
the operation unit is used for simulating operation behaviors at the application end according to the test operation instruction when the test operation instruction is received, and obtaining network request information corresponding to the test operation instruction;
the generating unit is used for generating an operation test request according to the variant data volume set and the network request information;
and the third sending unit is used for sending the operation test request to the server and receiving an operation test result sent by the server according to the operation test request.
6. A network mutation test system is characterized in that the network mutation test system comprises an application terminal, a service terminal and an agent terminal, wherein,
the application terminal is used for sending a network request to the agent terminal; the network request is collected through an sdk/lib collection module; the network request is a URL request;
the agent end is used for receiving the network request and acquiring the network address information in the network request; judging whether forwarding processing needs to be carried out on the network address information according to preset filtering configuration information; if yes, sending target request information including the network address information to the server;
the server is used for receiving the target request information and sending a network variation test request to the application terminal according to the target request information;
the application terminal is further configured to receive the network variation test request and send confirmation information for the network variation test request to the server terminal;
the application terminal is further used for acquiring a variation data volume set for network variation testing; sending test information to the server side according to the variation data volume set to carry out network variation test; the test information comprises test URL information generated according to the variant data volume set;
the server is also used for receiving the test information and responding to the test information to obtain a network test result; sending the network test result to the application end;
the application end is also used for receiving the network test result;
the network variation testing system further comprises:
the application terminal is further used for judging whether a test operation instruction input by a user is received or not after receiving the network test result, if so, simulating an operation behavior at the application terminal according to the test operation instruction to obtain network request information corresponding to the test operation instruction;
the application terminal is further used for generating an operation test request according to the variant data volume set and the network request information;
the application terminal is further configured to send the operation test request to the server terminal, and receive an operation test result sent by the server terminal according to the operation test request.
7. An electronic device, comprising a memory for storing a computer program and a processor for executing the computer program to cause the electronic device to perform the network mutation testing method of any of claims 1-2.
8. A readable storage medium having stored thereon computer program instructions which, when read and executed by a processor, perform the network variation testing method of any of claims 1-2.
CN202110232373.1A 2021-03-02 2021-03-02 Network variation testing method, device and system Active CN112769655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110232373.1A CN112769655B (en) 2021-03-02 2021-03-02 Network variation testing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110232373.1A CN112769655B (en) 2021-03-02 2021-03-02 Network variation testing method, device and system

Publications (2)

Publication Number Publication Date
CN112769655A CN112769655A (en) 2021-05-07
CN112769655B true CN112769655B (en) 2022-08-12

Family

ID=75690756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110232373.1A Active CN112769655B (en) 2021-03-02 2021-03-02 Network variation testing method, device and system

Country Status (1)

Country Link
CN (1) CN112769655B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856373A (en) * 2014-03-20 2014-06-11 西北工业大学 Web system robustness testing method based on HTTP mutation
CN108875368A (en) * 2017-05-10 2018-11-23 北京金山云网络技术有限公司 A kind of safety detection method, apparatus and system
CN109743222A (en) * 2018-12-25 2019-05-10 瑞庭网络技术(上海)有限公司 A kind of data test method and relevant device
CN110765000A (en) * 2019-09-06 2020-02-07 深圳开源互联网安全技术有限公司 Program testing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932205B (en) * 2012-11-19 2016-01-20 深圳市亚特尔科技有限公司 A kind of automated testing method of network service end interface
US10235278B2 (en) * 2013-03-07 2019-03-19 International Business Machines Corporation Software testing using statistical error injection
CN111858381B (en) * 2020-07-31 2023-05-16 抖音视界有限公司 Application fault tolerance capability test method, electronic device and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856373A (en) * 2014-03-20 2014-06-11 西北工业大学 Web system robustness testing method based on HTTP mutation
CN108875368A (en) * 2017-05-10 2018-11-23 北京金山云网络技术有限公司 A kind of safety detection method, apparatus and system
CN109743222A (en) * 2018-12-25 2019-05-10 瑞庭网络技术(上海)有限公司 A kind of data test method and relevant device
CN110765000A (en) * 2019-09-06 2020-02-07 深圳开源互联网安全技术有限公司 Program testing method and device

Also Published As

Publication number Publication date
CN112769655A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN107402880B (en) Test method and electronic equipment
CN106936441B (en) Data compression method and device
CN107015991B (en) Self-checking method, device and system for data consistency and service device
CN109309596B (en) Pressure testing method and device and server
CN110569159A (en) Baffle generation method, device, equipment and computer storage medium
CN110784374A (en) Method, device, equipment and system for monitoring operation state of service system
CN111124911A (en) Automatic testing method, device, equipment and readable storage medium
CN112965912B (en) Interface test case generation method and device and electronic equipment
CN114168429A (en) Error reporting analysis method and device, computer equipment and storage medium
CN112769655B (en) Network variation testing method, device and system
CN110597794A (en) Data processing method and device and electronic equipment
CN113031995B (en) Rule updating method and device, storage medium and electronic equipment
CN114218011A (en) Test simulation method and device, terminal equipment and storage medium
CN113849388A (en) Test method and device, electronic equipment and storage medium
CN110362464B (en) Software analysis method and equipment
CN111143644B (en) Identification method and device of Internet of things equipment
CN115437903A (en) Interface test method, device, apparatus, storage medium, and program
CN112860509A (en) Dial testing alarm method and device
CN116893977B (en) Automatic deployment method, device, equipment and medium for distributed simulation test environment
CN113973064B (en) Stability testing method and system based on block chain
CN117234949B (en) Test data noise reduction method and device, storage medium and computer equipment
CN113326408B (en) Data processing system based on time aggregation and position aggregation
CN115145830A (en) Interface test case generation method, device and equipment
CN115145816A (en) Data reporting test method, device, storage medium and equipment
CN114091963A (en) State processing method and device of Internet of things equipment and computer 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
GR01 Patent grant
GR01 Patent grant