CN115705258A - Test method, test device, storage medium and electronic equipment - Google Patents

Test method, test device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115705258A
CN115705258A CN202110892036.5A CN202110892036A CN115705258A CN 115705258 A CN115705258 A CN 115705258A CN 202110892036 A CN202110892036 A CN 202110892036A CN 115705258 A CN115705258 A CN 115705258A
Authority
CN
China
Prior art keywords
data
time
response information
mutation
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110892036.5A
Other languages
Chinese (zh)
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110892036.5A priority Critical patent/CN115705258A/en
Publication of CN115705258A publication Critical patent/CN115705258A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a test method, a test device, a storage medium and an electronic device, which are used for establishing association between abnormal return data and client crash data and quickly and accurately positioning a client crash reason, and the method comprises the following steps: acquiring a data mutation strategy, and taking the acquisition time as consumption starting time; receiving request response information returned by the server; modifying the request response information through the first thread based on the data variation strategy to obtain variation response information, sending the variation response information to the test equipment, setting a completion state identifier for the data variation strategy, operating the second thread according to a preset time interval, taking the operation time of the second thread as consumption success time if the completion state identifier of the data variation strategy is read during the operation of the second thread, and if the test equipment is broken down, establishing an association relationship between the breakdown information and the variation response information according to a comparison result of a timestamp of the breakdown information and consumption start time and consumption success time.

Description

Test method, test device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a testing method, an apparatus, a storage medium, and an electronic device.
Background
The Robustness test (Robustness Testing) is also called a fault tolerance test, and is used for Testing whether a system can automatically recover or ignore faults to continue running when the system fails. In the related technology, the client robustness tool is used for tampering the returned data of the server when the client performs an automation test, and is used for checking the protection processing of the client when the data is abnormally returned. If the client crashes after receiving the tampered abnormal return data, developers are required to manually check the reason of the crash, a large amount of labor and time are consumed, and the reason of the crash of the client cannot be quickly and accurately located.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method of testing, the method comprising:
acquiring a data mutation strategy, and taking the time of acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request;
receiving a first network request sent by a test device, sending the first network request to a server, and receiving request response information returned by the server for the first network request;
modifying the request response information through a first thread based on the data mutation strategy to obtain mutation response information, sending the mutation response information to the test equipment, and setting a completion state identifier for the data mutation strategy;
running a second thread according to a preset time interval, and if the completion state identifier of the data variation strategy is read during the running of the second thread, taking the running time of the second thread as the consumption success time of the data variation strategy, wherein the second thread runs in parallel with the first thread;
if the test equipment is crashed, determining a time stamp of crash information, and establishing an association relationship between the crash information and the variation response information according to a comparison result between the time represented by the time stamp and the time of starting consumption time and the time of successful consumption of the data variation strategy.
In a second aspect, the present disclosure provides a test apparatus, the apparatus comprising:
the acquisition module is used for acquiring a data mutation strategy and taking the time for acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request;
the first receiving module is used for receiving a first network request sent by the testing equipment, sending the first network request to a server, and receiving request response information returned by the server aiming at the first network request;
a first modification module, configured to modify, by a first thread, the request response information based on the data mutation policy to obtain mutation response information, send the mutation response information to the test device, and set a completion state identifier for the data mutation policy;
the determining module is used for operating a second thread according to a preset time interval, and if the completion state identifier of the data mutation strategy is read during the operation of the second thread, the operation time of the second thread is used as the consumption success time of the data mutation strategy, wherein the second thread and the first thread operate in parallel;
and the association module is used for determining a time stamp of the crash information when the test equipment crashes, and establishing an association relationship between the crash information and the variation response information according to a time comparison result between the time represented by the time stamp and the consumption starting time and the consumption success time of the data variation strategy.
In a third aspect, the present disclosure provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processing apparatus, implements the steps of the method described in the first aspect.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of the first aspect.
By the technical scheme, the time for acquiring the data mutation strategy can be used as the consumption starting time of the data mutation strategy, and the consumption success time of the data mutation strategy is determined according to the second thread running according to the preset time interval. Therefore, if the test equipment crashes after the variation response information is sent to the test equipment, the timestamp of the crash information can be compared with the consumption starting time and the consumption success time of the data variation strategy, and the association relationship between the crash information and the variation response information is established according to the time comparison result. By the method, the collapse reason of the test equipment can be quickly and accurately positioned according to the incidence relation, and the time for manually analyzing the collapse reason is shortened, so that the robustness test efficiency of the client can be improved. And moreover, after the crash, the crash information and the variation response information are associated in time, so that the data consumption capacity and the data consumption timeliness of the crash information can be improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow chart illustrating a testing method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an implementation scenario of a testing method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating an implementation scenario of a testing method according to another exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating an implementation scenario of a testing method according to another exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating a test apparatus according to an exemplary embodiment of the present disclosure;
fig. 6 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more complete and thorough understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein is intended to be open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units. It is further noted that references to "a", "an", and "the" modifications in the present disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
As background art, in the related art, a client robustness tool is used to tamper return data of a server when a client performs an automation test, so as to view protection processing of the client when the client returns data abnormally. If the client crashes after receiving the tampered abnormal return data, developers are required to manually check the reason of the crash, a large amount of labor and time are consumed, and the reason of the crash of the client cannot be quickly and accurately located.
In view of this, the present disclosure provides a testing method to establish a correlation between the abnormal return data and the client crash data, so as to more quickly and accurately locate the cause of the client crash and improve the efficiency of the client robustness test.
FIG. 1 is a flow chart illustrating a testing method according to an exemplary embodiment of the present disclosure. The test method can be applied to a proxy server in a test scene, and referring to fig. 1, the test method comprises the following steps:
step 101, acquiring a data mutation strategy, and taking the time of acquiring the data mutation strategy as the consumption starting time of the data mutation strategy. The data mutation policy is used to modify the response information of the network request.
Step 102, receiving a first network request sent by the test device, sending the first network request to a server, and receiving request response information returned by the server for the first network request.
And 103, modifying the request response information through the first thread based on the data mutation strategy to obtain mutation response information, sending the mutation response information to the test equipment, and setting a completion state identifier for the data mutation strategy.
And 104, operating the second thread according to a preset time interval, and if the completion state identifier of the data mutation strategy is read during the operation of the second thread, taking the operation time of the second thread as the consumption success time of the data mutation strategy. Wherein the second thread runs in parallel with the first thread.
And 105, if the test equipment crashes, determining a time stamp of the crash information, and establishing an association relationship between the crash information and the variation response information according to a time comparison result between the time represented by the time stamp and the consumption starting time and the consumption success time of the data variation strategy.
By the method, the time for acquiring the data mutation strategy can be used as the consumption starting time of the data mutation strategy, and the consumption success time of the data mutation strategy is determined according to the second thread running according to the preset time interval. Therefore, if the test equipment crashes after the variation response information is sent to the test equipment, the timestamp of the crash information can be compared with the consumption starting time and the consumption success time of the data variation strategy, and the association relation between the crash information and the variation response information is established according to the time comparison result.
In a possible mode, under the condition that the time represented by the timestamp is between the consumption starting time and the consumption success time, establishing an incidence relation between the crash information and the variation response information; or, in the case that the time represented by the timestamp is not located between the consumption starting time and the consumption success time, determining whether the time represented by the timestamp is located between the consumption starting time of the data mutation policy and the consumption starting time of another data mutation policy acquired next time, and if the time represented by the timestamp is located between the consumption starting time of the data mutation policy and the consumption starting time of another data mutation policy acquired next time, establishing an association relationship between the crash information and the mutation response information.
Illustratively, the second thread runs at a preset time interval, such as the second thread runs at a time interval of 2 seconds, and so on, which is not limited by the embodiment of the present disclosure. After a data mutation strategy is obtained, the request response information is modified through the first thread based on the data mutation strategy to obtain mutation response information, the mutation response information is sent to the test equipment, and a completion state identifier is set for the data mutation strategy, so that when a second thread running in parallel with the first thread runs and reads the completion state identifier, the current running time of the second thread can be used as the successful consumption time of the data mutation strategy.
In one possible case, a crash of the test device may occur at a nearby time before the second thread runs, such as 1 second before the second thread runs, and then the association of the crash information with the variant response information may be established in a case where the time represented by the timestamp is between the consumption start time and the consumption success time. In another possible case, the crash of the test device may occur right at the running time of the second thread, that is, the time represented by the timestamp is not between the consumption start time and the consumption success time, it may be further determined whether the time represented by the timestamp is between the consumption start time of the data mutation policy and the consumption start time of another data mutation policy acquired next time, and if the time represented by the timestamp is between the consumption start time of the data mutation policy and the consumption start time of another data mutation policy acquired next time, the association relationship between the crash information and the mutation response information may be established.
After the incidence relation between the crash information and the variation response information is established in the above manner, the crash reason of the test equipment can be quickly and accurately positioned according to the incidence relation, and the time for manually analyzing the crash reason is reduced, so that the efficiency of the robustness test of the client can be improved. And moreover, after the crash, the crash information and the variation response information are associated in time, so that the data consumption capacity and the data consumption timeliness of the crash information can be improved.
The following is a detailed example of the above steps in order to provide a better understanding of the testing methods provided by the present disclosure to those skilled in the art.
Illustratively, the data mutation policy is used for modifying the response information requested by the network, such as modifying the data in the response information to a preset value. The response information of the network request is usually in a JSON format, that is, includes multiple data composed of key names and corresponding values, so that the data mutation policy may be used to specify that a value corresponding to a certain key name in the modification response information is a preset value. For example, the response message of the network request includes two key names a and B, where a corresponds to a value of 1 and B corresponds to a value of 2. In this case, the data mutation policy may be set as: the value of a is modified to NULL. Therefore, after the data mutation strategy is executed, the value of a in the response message is modified to be NULL, and the value of B remains unchanged.
In a possible manner, the data mutation strategy can be obtained by: receiving a third network request sent by the test equipment, sending the third network request to the server, receiving a path corresponding relation returned by the server, wherein the path corresponding relation is used for representing the corresponding relation between a request path of the third network request and request response information of the third network request, then sending the path corresponding relation to a policy generator, and receiving a data mutation policy sent by the policy generator, wherein the data mutation policy is obtained by associating a preset data modification rule with the request path in the path corresponding relation by the policy generator. Accordingly, modifying the request response information based on the data mutation policy may be: and determining a request path of the first network request, and if the request path of the first network request is the same as the request path in the data mutation strategy, modifying the request response information corresponding to the first network request based on the data mutation strategy.
It should be understood that, in practical applications, each robustness test usually targets one test scenario, that is, each robustness test usually obtains one data mutation policy to tamper response information of a certain specific network request. A client performing an automated test may generate multiple network requests. Therefore, in order to accurately implement the robustness test, it may be determined whether the request path of the network request is the same as the request path corresponding to the data mutation policy. Based on such consideration, in the process of determining the data mutation strategy, the embodiment of the disclosure establishes association between the preset data modification rule and the corresponding request path, so that the obtained data mutation strategy can have the corresponding request path, and therefore, in the subsequent process, the request response information of the corresponding network request can be modified accurately based on the data mutation strategy through comparison of the request paths, and the test accuracy is improved.
For example, the data mutation strategy may be determined based on the implementation scenario illustrated in fig. 2. The control host is used for issuing different test configurations according to the instruction of a user so as to trigger different automatic test tasks, starting the corresponding proxy server and connecting the test equipment to the corresponding proxy server. For example, the control host may be connected to the test equipment via the adb toolkit, so as to control the test equipment to perform the automated test via the control host. The test equipment is used for running an automated test. The third proxy server is configured to forward a third network request sent by the test device, where the third network request may be a network request sent by an application installed on the test device, and this is not limited in this disclosure. Meanwhile, the third proxy server may forward a correspondence between request response information (response) for the third network request, which is returned by the public network server, and a request path (path) of the third network request to the policy generator, and directly return request response data returned by the public network server to the test device. The public network server is an online real server. And the strategy generator is used for generating a variation strategy according to the received request response information and a preset data modification rule and writing the variation strategy into the database.
Referring to fig. 2, in a specific implementation, the control host may start a third proxy server in step 1, and use an adb tool to connect to the test equipment in step 2, to trigger a corresponding automated test task. In step 3, the test device sends a third network request to the third proxy server. In step 4, the third proxy server forwards the request to the public network server. In step 5, the third proxy server receives request response information of the public network server for the third network request. In step 6, the third proxy server sends the request response information requested by the third network and the corresponding relationship between the request paths to the policy generator. In step 7, the third proxy server returns the request response information to the test equipment. In step 8, the policy generator generates a policy according to the preset data modification rule and writes the policy into the database.
The preset data modification rule may be set according to an actual situation, which is not limited in the embodiment of the present disclosure. For example, the preset data modification rule may be data of a certain key name in the request response message for the network request, and modify the data into a preset data type or value. If the data can be found in the request response information fed back by the public network server and aiming at the third network request, the preset data modification rule can be associated with the corresponding request path to obtain a data mutation strategy.
It should be understood that, in a specific implementation, one request path may correspond to one data mutation policy, or may also correspond to multiple data mutation policies.
In a possible manner, the data mutation policy may be written into the database, and accordingly, the data mutation policy is obtained, and the time when the data mutation policy is obtained as the consumption start time of the data mutation policy may be: and reading the data mutation strategy from the database to the memory of the proxy server, and taking the time of reading the data mutation strategy as the consumption starting time of the data mutation strategy.
That is to say, when the testing method provided by the present disclosure is implemented, the data mutation policy may be initialized into the memory of the proxy server from the database, so that the proxy server may directly modify the request response information using the data mutation policy in the memory in the subsequent process, thereby improving the testing efficiency. In this scenario, the time of consumption of the data mutation policy is the time of reading the data mutation policy from the database.
After the data mutation policy is obtained, referring to fig. 3, the control host may start the first proxy server in step 1. It should be understood that the first proxy server may be a consuming type proxy server for correlating crash information and mutation response information for the correlation test process, while the third proxy server mentioned above may be a collecting type proxy server for determining the process of the data mutation policy. In practical application, different types of proxy servers can be centralized on the device platform, and then the proxy server of the corresponding type is called by sending the unique identification information of the proxy server to the device platform. In addition, it should be understood that, in the first test process, the first proxy server may initialize the data mutation policy that needs to be executed this time from the database to the memory, and after the steps 6 and 7 are executed, the data mutation policy that needs to be executed by the first proxy server may be updated to another data mutation policy, that is, before the test, the first proxy server initializes the data mutation policy that needs to be executed this time, so that the test process may directly obtain the data mutation policy from the memory of the first proxy server, thereby improving the test efficiency.
With continued reference to fig. 3, the control host may use the adb tool to connect to the test equipment in step 2, triggering the corresponding automated test task. In step 3, the test device sends a first network request to the first proxy server. In step 4, the first proxy server forwards the request to the public network server. In step 5, the first proxy server receives request response information of the public network server for the first network request. In step 6, the first proxy server requests the database for a policy acquisition request to be executed in the next testing process. In step 7, the database may send the data mutation policy in the next testing process to the first proxy server, that is, the data mutation policy to be executed in the next testing process may be initialized to the memory of the first proxy server through steps 6 and 7, so that the data mutation policy may be directly obtained from the memory in the next testing process, thereby improving the testing efficiency.
It should be understood that, as explained above, the data mutation policy may be obtained by associating the request path with a preset data modification rule, so that the data mutation policy returned by the database may have a corresponding request path. In this case, the first proxy server may determine whether a request path of the first network request is consistent with a request path corresponding to the data mutation policy, and if so, may modify the request response information of the first network request based on the data mutation policy to obtain mutation response information. The mutation response information is then sent to the test equipment in step 8.
In this process, the time for acquiring the data mutation policy may be used as the consumption start time of the data mutation policy, and the consumption success time of the data mutation policy is determined according to the second thread running at the preset time interval. Thus, if the test device crashes after the mutation response information is transmitted to the test device, the control host can report the crash information in step 9. And the time stamp of the crash information can be compared with the consumption starting time and the consumption success time of the data variation strategy, and then the incidence relation between the crash information and the variation response information is established according to the time comparison result, so that the crash reason of the test equipment can be quickly and accurately positioned according to the incidence relation, the time for manually analyzing the crash reason is reduced, and the efficiency of the client robustness test is improved.
In a possible mode, a second network request sent by the test equipment may also be received, the second network request is sent to the server, and request response information returned by the server for the second network request is received. And then, modifying the request response information of the second network request based on the data mutation strategy to obtain recurrence mutation response information, sending the recurrence mutation response information to the test equipment, and taking the current collapse information of the test equipment as recurrence collapse information if the test equipment collapses. Accordingly, the association relationship between the crash information and the mutation response information may be: if the stack information of the crash information is consistent with the stack information of the recurrence crash information, the association relationship between the crash information and the variation response information can be established.
In practical applications, the crash of the testing device after the mutation response information is sent to the testing device may be caused by some accidental reason, not by the problem of the testing device itself. In this case, in order to ensure the test accuracy, a crash recurrence test may be performed.
For example, referring to fig. 4, the control host may turn on the second proxy server in step 1. It should be appreciated that the second proxy server may be a replication type proxy server for the replication test process of crash information. In practical application, different types of proxy servers can be centralized on the device platform, and then the proxy server of the corresponding type is called by sending the unique identification information of the proxy server to the device platform. In addition, it should be understood that, in the first test process, the second proxy server may initialize the data mutation policy that needs to be executed this time from the database to the memory, and the data mutation policy that needs to be executed by the second proxy server after the steps 6 and 7 are executed may be updated to another data mutation policy, that is, the data mutation policy that needs to be executed this time is initialized by the second proxy server before the test, so that the data mutation policy may be directly obtained from the memory of the second proxy server in the test process, and the test efficiency may be further improved.
With continued reference to fig. 4, the control host may use the adb tool to connect to the test equipment in step 2, triggering the corresponding automated test task. In step 3, the test device sends a second network request to the second proxy server. In step 4, the second proxy server forwards the request to the public network server. In step 5, the second proxy server receives request response information of the public network server for the second network request. In step 6, the second proxy server may request from the database a policy acquisition request that needs to be executed in the next testing process. In step 7, the database may send the data mutation policy in the next testing process to the second proxy server, that is, the data mutation policy to be executed in the next testing process may be initialized to the memory of the second proxy server through steps 6 and 7, so that the data mutation policy may be directly obtained from the memory in the next testing process, thereby improving the testing efficiency.
The second proxy server may modify the request response information of the second network request based on the data mutation policy to obtain recurring mutation response information. The recurring variability response message is then sent to the test equipment in step 8. If the test device crashes, then the crash information may be reported in step 9. The current crash information of the test device may be used as the recurring crash information. Then, whether the recurrence crash information is consistent with stack information of the crash information generated after the test equipment receives the variation response information or not can be compared, if so, the crash recurrence is indicated, so that the association relationship between the crash information and the variation response information can be established, the association accuracy between the crash information and the variation response information is improved, and the accuracy of the robustness test is improved.
In a possible manner, the request response information is modified based on the data mutation policy, and the obtained mutation response information may be: the method comprises the steps of firstly determining a data mutation strategy for modifying target data in response information of a network request, wherein the value of the target data comprises at least one subdata consisting of a key name and a corresponding value, then converting the data mutation strategy into a subdata mutation strategy aiming at each subdata, and finally modifying the request response information of the first network request according to the subdata mutation strategy corresponding to each subdata to obtain mutation response information.
In practical applications, the response information of the network request is usually in JSON format, i.e. composed of key names and corresponding values, and the value corresponding to a certain key name may also be data in JSON format composed of key names and corresponding values. For example, the value corresponding to the key name C may include first sub data having a key name of C1 and a value of 1 and second sub data having a key name of C2 and a value of 2. In this case, if the data mutation policy may be for the key name C, for example, the value of the key name C is modified to NULL. Modifying the response request message based on the data mutation policy may be directly modifying a value of the key name C to NULL, but may also be modifying values of the first sub-data and the second sub-data to NULL, respectively. For the latter case, if the test device crashes, it is impossible to accurately locate the crash caused by the modification of the first subdata or the second subdata.
Therefore, in order to more accurately locate the cause of the crash, the data mutation policy may be split, that is, the data mutation policy is converted into a sub-data mutation policy for each sub-data, and then the request response information of the first network request is modified according to the sub-data mutation policy corresponding to each sub-data, so as to obtain the mutation response information. It should be understood that, in this case, a plurality of variation response messages may be obtained, and then the plurality of variation response messages may be sent to the test equipment, respectively, to determine whether the test equipment crashes, and if the test equipment crashes, the corresponding variation response messages may be associated with the crash information. Therefore, the crash information can be positioned to a data layer with finer granularity, so that the crash reason of the test equipment can be positioned more accurately, and the test accuracy is improved.
After the incidence relation between the crash information and the variation response information is established, the crash information and the incidence relation between the crash information and the variation response information can be reported to the target server, so that the crash information and the incidence relation are obtained through a data acquisition interface of the target server to determine the crash reason of the test equipment.
For example, the target server may be an HTTP server specified according to an actual situation, and may report detailed information related to the crash (i.e., crash information) and an association relationship between the crash information and the variation response information to the target server, so that the data acquisition interface of the target server may acquire corresponding information to determine a crash cause of the test equipment. Compared with the mode that only the crash information is reported and then the crash reason is manually analyzed by the developer in the related technology, the mode provided by the embodiment of the disclosure can enable the developer to more quickly locate the crash reason according to the reported incidence relation, so that the test efficiency can be improved.
It should be understood that the testing methods provided by the present disclosure, when embodied, may include three processes of data collection, data consumption, and data replication. For data collection, reference may be made to the implementation process shown in fig. 2, and a test process is performed through the third proxy server and the test device to determine the data mutation policy, where the specific process may refer to the above. The data consumption may be performed through a test process performed by the first proxy server and the test device with reference to the implementation process shown in fig. 3, so as to traverse the data mutation policy determined in the data collection process, and initially establish the association relationship between the crash information and the mutation response information. The data reproduction may refer to an implementation process shown in fig. 4, a test process is performed through the second proxy server and the test device, and if the breakdown generated based on the same data variation policy in the process is consistent with the breakdown generated in the data consumption process, the association relationship between the breakdown information and the variation response information may be reported, so that the analysis of the cause of the breakdown is performed according to the association relationship, and the efficiency of the robustness test is improved.
Based on the same concept, the present disclosure also provides a testing apparatus, which may become part or all of an electronic device through software, hardware or a combination of both. Referring to fig. 5, the test apparatus 500 may include:
an obtaining module 501, configured to obtain a data mutation policy, and use time for obtaining the data mutation policy as consumption start time of the data mutation policy, where the data mutation policy is used to modify response information of a network request;
a first receiving module 502, configured to receive a first network request sent by a test device, send the first network request to a server, and receive request response information returned by the server for the first network request;
a first modifying module 503, configured to modify, by a first thread, the request response information based on the data mutation policy to obtain mutation response information, send the mutation response information to the testing device, and set a completion status flag for the data mutation policy;
a determining module 504, configured to run a second thread according to a preset time interval, and if the completion status identifier of the data mutation policy is read during running of the second thread, take a running time of the second thread as a consumption success time of the data mutation policy, where the second thread runs in parallel with the first thread;
and the association module 505 is configured to determine a timestamp of the crash information when the test device crashes, and establish an association relationship between the crash information and the variation response information according to a comparison result between the time represented by the timestamp and the time when the data variation policy starts to consume and the time when the data variation policy succeeds.
Optionally, the association module 505 is configured to:
under the condition that the time represented by the timestamp is between the consumption starting time and the consumption success time, establishing an incidence relation between the crash information and the variation response information; or
In the event that the time characterized by the timestamp is not between the consumption start time and the consumption success time, determining whether the time characterized by the timestamp is between the consumption start time of the data mutation policy and a consumption start time of another data mutation policy acquired next time;
and under the condition that the time represented by the timestamp is between the consumption starting time of the data mutation strategy and the consumption starting time of another data mutation strategy acquired next time, establishing the association relationship between the crash information and the mutation response information.
Optionally, the apparatus 500 further comprises:
the second receiving module is used for receiving a second network request sent by the test equipment, sending the second network request to a server, and receiving request response information returned by the server for the second network request;
a second modification module, configured to modify, by the first thread, request response information of the second network request based on the data mutation policy to obtain recurrence mutation response information, send, by the first thread, the recurrence mutation response information to the test device, and when the test device crashes, use current crash information of the test device as recurrence crash information;
the association module 505 is configured to:
and when the stack information of the crash information is consistent with the stack information of the recurrent crash information, establishing an association relationship between the crash information and the variation response information.
Optionally, the first modifying module 503 is configured to:
determining that the data mutation strategy is used for modifying target data in response information of a network request, wherein the value of the target data comprises at least one subdata consisting of a key name and a corresponding value;
converting the data mutation strategy into a subdata mutation strategy aiming at each subdata;
and respectively modifying the request response information of the first network request according to the subdata mutation strategy corresponding to each subdata to obtain mutation response information.
Optionally, the apparatus further comprises a data collection module configured to:
receiving a third network request sent by a test device, sending the third network request to the server, and receiving a path corresponding relation returned by the server, wherein the path corresponding relation is used for representing a corresponding relation between a request path of the third network request and request response information of the third network request;
sending the path corresponding relation to a policy generator, and receiving a data mutation policy returned by the policy generator, wherein the data mutation policy is obtained by the policy generator associating a preset data modification rule with a request path in the corresponding relation;
the first modification module 503 is configured to:
and determining a request path of the first network request, and modifying the request response information corresponding to the first network request based on the data mutation policy when the request path of the first network request is the same as the request path corresponding to the data mutation policy.
Optionally, the data mutation policy is written into a database in advance, and the obtaining module 501 is configured to:
and reading the data mutation strategy from a database to a memory of a proxy server, and taking the time for reading the data mutation strategy as the consumption starting time of the data mutation strategy.
Optionally, the apparatus 500 further comprises:
and the reporting module is used for reporting the crash information and the association relationship between the crash information and the variation response information to a target server so as to acquire the crash information and the association relationship through a data acquisition interface of the target server to determine the crash reason of the test equipment.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Based on the same concept, embodiments of the present disclosure also provide a non-transitory computer-readable storage medium, on which a computer program is stored, and the program, when executed by a processing device, implements the steps of any of the above-mentioned test methods.
Based on the same concept, an embodiment of the present disclosure further provides an electronic device, including:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of any of the above-described test methods.
Referring now to FIG. 6, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, or the like; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the communication may be performed using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a data mutation strategy, and taking the time of acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request; receiving a first network request sent by a test device, sending the first network request to a server, and receiving request response information returned by the server for the first network request; modifying the request response information through a first thread based on the data mutation strategy to obtain mutation response information, sending the mutation response information to the test equipment, and setting a completion state identifier for the data mutation strategy; running a second thread according to a preset time interval, and if the completion state identifier of the data variation strategy is read during the running of the second thread, taking the running time of the second thread as the consumption success time of the data variation strategy, wherein the second thread runs in parallel with the first thread; if the test equipment is broken down, determining a time stamp of the broken down information, comparing the time represented by the time stamp with the time of the consumption starting time and the consumption success time of the data variation strategy, and establishing an association relationship between the broken down information and the variation response information.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. 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 which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides, in accordance with one or more embodiments of the present disclosure, a testing method, comprising:
acquiring a data mutation strategy, and taking the time of acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request;
receiving a first network request sent by a test device, sending the first network request to a server, and receiving request response information returned by the server for the first network request;
modifying the request response information through a first thread based on the data mutation strategy to obtain mutation response information, sending the mutation response information to the test equipment, and setting a completion state identifier for the data mutation strategy;
running a second thread according to a preset time interval, and if the completion state identifier of the data mutation strategy is read during the running of the second thread, taking the running time of the second thread as the consumption success time of the data mutation strategy, wherein the second thread and the first thread run in parallel;
if the test equipment is crashed, determining a time stamp of crash information, and establishing an association relationship between the crash information and the variation response information according to a comparison result between the time represented by the time stamp and the time of starting consumption time and the time of successful consumption of the data variation strategy.
Example 2 provides the method of example 1, and the establishing an association relationship between the crash information and the mutation response information according to a comparison result between the time represented by the timestamp and a time of starting consumption time and a time of success consumption time of the data mutation policy includes:
establishing an association relationship between the crash information and the variant response information under the condition that the time represented by the timestamp is between the consumption starting time and the consumption success time; or
In the event that the time characterized by the timestamp is not between the consumption start time and the consumption success time, determining whether the time characterized by the timestamp is between the consumption start time of the data mutation policy and a consumption start time of another data mutation policy acquired next time;
and if the time represented by the timestamp is between the consumption starting time of the data mutation strategy and the consumption starting time of another acquired data mutation strategy, establishing the association relationship between the crash information and the mutation response information.
Example 3 provides the method of example 1 or 2, further comprising, in accordance with one or more embodiments of the present disclosure:
receiving a second network request sent by the test equipment, sending the second network request to the server, and receiving request response information returned by the server for the second network request;
modifying request response information of the second network request through the first thread based on the data mutation strategy to obtain recurrence mutation response information, sending the recurrence mutation response information to the test equipment through the first thread, and taking current crash information of the test equipment as recurrence crash information if the test equipment crashes;
the establishing of the incidence relation between the crash information and the variation response information comprises:
and if the stack information of the crash information is consistent with the stack information of the recurrence crash information, establishing an association relationship between the crash information and the variation response information.
Example 4 provides the method of example 1 or 2, wherein modifying the request response information based on the data mutation policy to obtain mutated response information, includes:
determining that the data mutation strategy is used for modifying target data in response information of a network request, wherein the value of the target data comprises at least one subdata consisting of a key name and a corresponding value;
converting the data mutation strategy into a subdata mutation strategy aiming at each subdata;
and respectively modifying the request response information of the first network request according to the subdata mutation strategy corresponding to each subdata to obtain mutation response information.
Example 5 provides the method of example 1 or 2, the data mutation policy is derived by:
receiving a third network request sent by a test device, sending the third network request to the server, and receiving a path corresponding relation returned by the server, wherein the path corresponding relation is used for representing a corresponding relation between a request path of the third network request and request response information of the third network request;
sending the path corresponding relation to a policy generator, and receiving a data mutation policy returned by the policy generator, wherein the data mutation policy is obtained by the policy generator associating a preset data modification rule with a request path in the corresponding relation; (ii) a
The modifying the request response information based on the data mutation policy includes:
and determining a request path of the first network request, and if the request path of the first network request is the same as the request path corresponding to the data mutation policy, modifying the request response information corresponding to the first network request based on the data mutation policy.
Example 6 provides the method of example 1 or 2, the data mutation policy being written in a database in advance, the obtaining the data mutation policy, and taking a time at which the data mutation policy is obtained as a consumption start time of the data mutation policy, including:
and reading the data mutation strategy from a database to a memory of a proxy server, and taking the time for reading the data mutation strategy as the consumption starting time of the data mutation strategy.
Example 7 provides the method of example 1 or 2, further comprising, in accordance with one or more embodiments of the present disclosure:
and reporting the crash information and the incidence relation between the crash information and the variation response information to a target server, so as to obtain the crash information and the incidence relation through a data acquisition interface of the target server to determine a crash reason of the test equipment.
Example 8 provides, in accordance with one or more embodiments of the present disclosure, a test apparatus, the apparatus comprising:
the acquisition module is used for acquiring a data mutation strategy and taking the time for acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request;
the first receiving module is used for receiving a first network request sent by the testing equipment, sending the first network request to the server and receiving request response information returned by the server aiming at the first network request;
a first modification module, configured to modify, by a first thread, the request response information based on the data mutation policy to obtain mutation response information, send the mutation response information to the test device, and set a completion state identifier for the data mutation policy;
the determining module is used for operating a second thread according to a preset time interval, and if the completion state identifier of the data mutation strategy is read during the operation of the second thread, the operation time of the second thread is used as the consumption success time of the data mutation strategy, wherein the second thread and the first thread operate in parallel;
and the association module is used for determining a time stamp of the crash information when the test equipment crashes, and establishing an association relationship between the crash information and the variation response information according to a time comparison result between the time represented by the time stamp and the consumption starting time and the consumption success time of the data variation strategy.
Example 9 provides a non-transitory computer-readable storage medium having stored thereon, a computer program that, when executed by a processing device, implements the steps of the method of any of examples 1-7, in accordance with one or more embodiments of the present disclosure.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of any of examples 1-7.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.

Claims (10)

1. A method of testing, the method comprising:
acquiring a data mutation strategy, and taking the time of acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request;
receiving a first network request sent by a test device, sending the first network request to a server, and receiving request response information returned by the server for the first network request;
modifying the request response information through a first thread based on the data mutation strategy to obtain mutation response information, sending the mutation response information to the test equipment, and setting a completion state identifier for the data mutation strategy;
running a second thread according to a preset time interval, and if the completion state identifier of the data variation strategy is read during the running of the second thread, taking the running time of the second thread as the consumption success time of the data variation strategy, wherein the second thread runs in parallel with the first thread;
if the test equipment is crashed, determining a time stamp of crash information, and establishing an association relationship between the crash information and the variation response information according to a comparison result between the time represented by the time stamp and the time of starting consumption time and the time of successful consumption of the data variation strategy.
2. The method of claim 1, wherein the establishing the association relationship between the crash information and the mutation response information according to the comparison result between the time represented by the timestamp and the time of the beginning consumption time and the time of the success consumption time of the data mutation policy comprises:
under the condition that the time represented by the timestamp is between the consumption starting time and the consumption success time, establishing an incidence relation between the crash information and the variation response information; or
In the event that the time characterized by the timestamp is not between the consumption start time and the consumption success time, determining whether the time characterized by the timestamp is between the consumption start time of the data mutation policy and a consumption start time of another data mutation policy acquired next time;
and if the time represented by the timestamp is between the consumption starting time of the data mutation strategy and the consumption starting time of another data mutation strategy acquired next time, establishing the association relationship between the crash information and the mutation response information.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a second network request sent by the test equipment, sending the second network request to the server, and receiving request response information returned by the server for the second network request;
modifying request response information of the second network request through the first thread based on the data mutation strategy to obtain recurrence mutation response information, sending the recurrence mutation response information to the test equipment through the first thread, and taking current crash information of the test equipment as recurrence crash information if the test equipment crashes;
the establishing of the incidence relation between the crash information and the variation response information includes:
and if the stack information of the crash information is consistent with the stack information of the recurrent crash information, establishing an association relationship between the crash information and the variation response information.
4. The method of claim 1 or 2, wherein the data mutation policy is used to modify target data in response information of a network request, wherein a value of the target data comprises at least one subdata consisting of a key name and a corresponding value, and wherein modifying the request response information based on the data mutation policy comprises:
converting the data mutation strategy into a subdata mutation strategy for each subdata;
and respectively modifying the request response information of the first network request according to each subdata mutation strategy.
5. The method of claim 1 or 2, wherein the data mutation strategy is obtained by:
receiving a third network request sent by a test device, sending the third network request to the server, and receiving a path corresponding relation returned by the server, wherein the path corresponding relation is used for representing a corresponding relation between a request path of the third network request and request response information of the third network request;
sending the path corresponding relation to a policy generator, and receiving a data mutation policy sent by the policy generator, wherein the data mutation policy is obtained by the policy generator associating a preset data modification rule with a request path in the path corresponding relation;
the modifying the request response information based on the data mutation policy includes:
and determining a request path of the first network request, and if the request path of the first network request is the same as the request path corresponding to the data mutation policy, modifying the request response information corresponding to the first network request based on the data mutation policy.
6. The method according to claim 1 or 2, wherein the obtaining the data mutation policy and taking the time of obtaining the data mutation policy as the time of starting consumption of the data mutation policy comprises:
and reading the data mutation strategy from a database to a memory of a proxy server, and taking the time for reading the data mutation strategy as the consumption starting time of the data mutation strategy.
7. The method of claim 1 or 2, further comprising:
and reporting the crash information and the incidence relation between the crash information and the variation response information to a target server, so as to obtain the crash information and the incidence relation through a data acquisition interface of the target server to determine a crash reason of the test equipment.
8. A test apparatus, the apparatus comprising:
the acquisition module is used for acquiring a data mutation strategy and taking the time for acquiring the data mutation strategy as the consumption starting time of the data mutation strategy, wherein the data mutation strategy is used for modifying response information of a network request;
the first receiving module is used for receiving a first network request sent by the testing equipment, sending the first network request to the server and receiving request response information returned by the server aiming at the first network request;
a first modification module, configured to modify, by a first thread, the request response information based on the data mutation policy to obtain mutation response information, send the mutation response information to the test device, and set a completion state identifier for the data mutation policy;
the determining module is used for running a second thread according to a preset time interval, and if the completion state identifier of the data variation strategy is read during the running of the second thread, the running time of the second thread is used as the consumption success time of the data variation strategy, wherein the second thread runs in parallel with the first thread;
and the association module is used for determining a time stamp of the crash information when the test equipment crashes, and establishing an association relationship between the crash information and the variation response information according to a time comparison result between the time represented by the time stamp and the consumption starting time and the consumption success time of the data variation strategy.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processing device, performs the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 7.
CN202110892036.5A 2021-08-04 2021-08-04 Test method, test device, storage medium and electronic equipment Pending CN115705258A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110892036.5A CN115705258A (en) 2021-08-04 2021-08-04 Test method, test device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110892036.5A CN115705258A (en) 2021-08-04 2021-08-04 Test method, test device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115705258A true CN115705258A (en) 2023-02-17

Family

ID=85179836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110892036.5A Pending CN115705258A (en) 2021-08-04 2021-08-04 Test method, test device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115705258A (en)

Similar Documents

Publication Publication Date Title
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN112650685B (en) Automatic test method, device, electronic equipment and computer storage medium
CN111597065B (en) Method and device for collecting equipment information
CN111209202A (en) Terminal application testing method and device
CN113485918A (en) Test method, test device, electronic equipment and storage medium
CN112714042B (en) Pressure testing method and device, electronic equipment and storage medium
CN111639086A (en) Data reconciliation method, device, equipment and storage medium
CN109542743B (en) Log checking method and device, electronic equipment and computer readable storage medium
CN116662193A (en) Page testing method and device
CN111198853B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN114579416B (en) Index determination method, device, server and medium
CN115705258A (en) Test method, test device, storage medium and electronic equipment
CN112379967B (en) Simulator detection method, device, equipment and medium
CN110750424B (en) Resource inspection method and device
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN114443480A (en) Test method, test system, readable medium and electronic device
CN115941432A (en) Domain name alarm information sending method and device, electronic equipment and computer readable storage medium
CN112084114A (en) Method and apparatus for testing an interface
US20240152504A1 (en) Data interaction method, apparatus, and electronic device
CN115086408B (en) Data processing method, system, device, electronic equipment and storage medium
CN113191849A (en) System, method, storage medium and electronic device for transferring remote clues
CN115392682A (en) Attribute collection method, device, equipment and medium
CN117424896A (en) Information display method, device, equipment and medium of Internet of things equipment
CN117762797A (en) Method, device, medium and equipment for testing function switch release

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