CN107783906A - Method of testing, device and storage medium - Google Patents

Method of testing, device and storage medium Download PDF

Info

Publication number
CN107783906A
CN107783906A CN201710897042.3A CN201710897042A CN107783906A CN 107783906 A CN107783906 A CN 107783906A CN 201710897042 A CN201710897042 A CN 201710897042A CN 107783906 A CN107783906 A CN 107783906A
Authority
CN
China
Prior art keywords
test
request message
theoretical
server
function
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
CN201710897042.3A
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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201710897042.3A priority Critical patent/CN107783906A/en
Publication of CN107783906A publication Critical patent/CN107783906A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of method of testing, device and storage medium, belong to field of computer technology.Method includes:Obtain the test case for function setting to be tested, the theoretical response result that the theoretical request message that should be sent when test case includes input information, application function is handled input information to server, application function should obtain when handling input information;During applications client application function is handled input information, crawl applications client is sent to the test request message of server;According to theoretical request message, test request message is verified, obtains the first test result;The test response results that the reception server returns according to test request message, according to theoretical response result, test response results are verified, obtain the second test result, realize the test of the request message sent to application user end to server, test scope is expanded, ensure that test is comprehensive, improve flexibility.

Description

Test method, test device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a testing method, a testing device and a storage medium.
Background
With the rapid development of computer technology and the increasing demand of users, how to develop a reliable application client becomes a great challenge for application developers. The test is a crucial link in the development process, and the product quality of the application client can be improved and the reliability of the application client can be ensured only by fully testing the application client.
In the related art, a tester usually writes a test case according to a function to be tested, where the test case includes input information and a theoretical response result that should be obtained when the input information is processed by applying the function. The application client side obtains the input information in the test case, the input information is processed by the function to obtain an actual response result, the actual response result is verified according to the theoretical response result, and the test result of the application client side can be determined.
In the process of implementing the embodiment of the present invention, the inventor finds that the related art has at least the following problems: in the test process, the application client may need to send a request message to the server, and the test method only tests the response result, but does not test the request message sent by the application client to the server, so that the test range is not comprehensive enough, and the test method has limitation.
Disclosure of Invention
The embodiment of the invention provides a test method, a test device and a storage medium, which can solve the problems in the related art. The technical scheme is as follows:
in a first aspect, a testing method is provided, the method comprising:
acquiring a test case set for a function to be tested, wherein the test case comprises input information, a theoretical request message which is to be sent to a server when the function is applied to process the input information, and a theoretical response result which is to be obtained when the function is applied to process the input information;
capturing a test request message sent to the server by an application client in the process of processing the input information by applying the function by the application client;
verifying the test request message according to the theoretical request message to obtain a first test result;
and receiving a test response result returned by the server according to the test request message, and verifying the test response result according to the theoretical response result to obtain a second test result.
Optionally, the test case further includes a target format of a theoretical request message, and the capturing the test request message sent by the application client to the server includes:
capturing a request message sent to the server by a local terminal;
and extracting the request message with the format matched with the target format from the grabbed request message to be used as the test request message.
Optionally, the extracting, from the fetched request messages, the request message with a format matching the target format as the test request message includes:
extracting a request message containing a target application identifier from the captured request message to serve as the test request message, wherein the target application identifier is used for indicating the application client; or,
extracting a request message containing a target function identifier from the captured request message, wherein the target function identifier is used for indicating the function and is used as the test request message; or,
and extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as the test request message.
Optionally, verifying the test request message according to the theoretical request message to obtain a first test result, including:
and judging whether the contents of the test request message and the theoretical request message are consistent or not to obtain a content test result.
Optionally, verifying the test request message according to the theoretical request message to obtain a first test result, including:
acquiring the quantity of the theoretical request messages according to the test cases, and counting the quantity of the test request messages;
and judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages or not to obtain a quantity test result.
In a second aspect, there is provided a test apparatus, the apparatus comprising:
the system comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring a test case set aiming at a function to be tested, and the test case comprises input information, a theoretical request message which is to be sent to a server when the input information is processed by applying the function, and a theoretical response result which is to be obtained when the input information is processed by applying the function;
the capturing module is used for capturing a test request message sent to the server by the application client in the process that the application client applies the function to process the input information;
the verification module is used for verifying the test request message according to the theoretical request message to obtain a first test result;
the receiving module is used for receiving a test response result returned by the server according to the test request message;
and the verification module is further used for verifying the test response result according to the theoretical response result to obtain a second test result.
Optionally, the test case further includes a target format of a theoretical request message, and the crawling module includes:
the capturing unit is used for capturing a request message sent to the server by a local terminal;
and the extracting unit is used for extracting the request message with the format matched with the target format from the grabbed request message as the test request message.
Optionally, the extracting unit is configured to:
extracting a request message containing a target application identifier from the captured request message to serve as the test request message, wherein the target application identifier is used for indicating the application client; or,
extracting a request message containing a target function identifier from the captured request message, wherein the target function identifier is used for indicating the function and is used as the test request message; or,
and extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as the test request message.
Optionally, the verification module includes:
and the content verification unit is used for judging whether the content of the test request message is consistent with that of the theoretical request message or not to obtain a content test result.
Optionally, the verification module includes:
the quantity counting unit is used for acquiring the quantity of the theoretical request messages according to the test cases and counting the quantity of the test request messages;
and the quantity verification unit is used for judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages or not to obtain a quantity test result.
In a third aspect, there is provided a test apparatus comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the operations performed in the test method according to the first aspect.
In a fourth aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to carry out the operations performed in the test method according to the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
according to the method, the device and the storage medium provided by the embodiment of the invention, the test request message sent to the server by the application client is captured in the process of processing the input information by applying the function to be tested by the application client, the test response result returned by the server according to the test request message is received, and the test request message and the test response result can be verified respectively according to the theoretical request message and the theoretical response result to obtain the first test result and the second test result, so that the test of the request message sent to the server by the application client is realized, the test range is expanded, the test completeness is ensured, and the flexibility is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the invention;
FIG. 2 is a flow chart of a testing method provided by an embodiment of the invention;
FIG. 3 is a flow chart of a testing method provided by an embodiment of the invention;
FIG. 4 is a schematic structural diagram of a testing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention, and referring to fig. 1, the implementation environment includes a test terminal 101 and a server 102, an application client 1011 is installed on the test terminal 101, the application client 1011 is associated with the server 102, and the test terminal 101 interacts with the server 102 through the application client 1011. The test terminal 101 may be a mobile phone, a computer, a tablet computer, or the like, the application client 1011 may be a payment client, an instant messaging client, or the like, and correspondingly, the server 102 may be a payment server, an instant messaging server, or the like.
The embodiment of the invention is applied to a scene of testing the function of the application client 1011, and can control the application client 1011 to process the input information in the test case by setting the test case. In the processing process, the application client 1011 sends a test request message to the server, and the server returns a test response result after processing according to the test request message.
Therefore, the test terminal 101 may capture the test request message sent by the application client 1011 to the server and receive the test response result sent by the server in the above processing process, and may obtain the test result by verifying the test request message and the test response result.
In the related art, the response result obtained by the application client is usually tested, and the request message sent by the application client to the server is not tested. The embodiment of the invention can expand the test range by testing the response result and the request message. The specific process is described in detail in the following examples.
Fig. 2 is a flowchart of a testing method provided in an embodiment of the present invention, where an execution subject of the testing method is the testing terminal 101 shown in fig. 1, and referring to fig. 2, the method includes:
201. the method comprises the steps of obtaining a test case set aiming at a function to be tested, wherein the test case comprises input information, theoretical request information which is sent to a server when the application function processes the input information, and a theoretical response result which is obtained when the application function processes the input information.
202. And capturing a test request message sent to the server by the application client in the process of processing the input information by the application client application function.
203. And verifying the test request message according to the theoretical request message to obtain a first test result.
204. And the receiving server verifies the test response result according to the test response result returned by the test request message and the theoretical response result to obtain a second test result.
According to the method provided by the embodiment of the invention, the test request message sent to the server by the application client is captured in the process of processing the input information by applying the function to be tested by the application client, the test response result returned by the server according to the test request message is received, and the test request message and the test response result can be verified respectively according to the theoretical request message and the theoretical response result to obtain the first test result and the second test result, so that the test of the request message sent to the server by the application client is realized, the test range is expanded, the test completeness is ensured, and the flexibility is improved.
In a possible implementation manner, the test case further includes a target format of a theoretical request message, and the capturing of the test request message sent by the application client to the server includes:
capturing a request message sent to a server by an application client;
and extracting the request message with the format matched with the target format from the grabbed request messages to be used as a test request message.
In another possible implementation manner, extracting a request message with a format matching the target format from the fetched request messages as a test request message includes:
extracting a request message containing a target application identifier from the captured request message to serve as a test request message, wherein the target application identifier is used for indicating an application client side which sends the request message; or,
extracting a request message containing a target function identifier from the captured request message to serve as a test request message, wherein the target function identifier is used for indicating a function; or,
and extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as a test request message.
In another possible implementation manner, verifying the test request message according to the theoretical request message to obtain a first test result includes:
and judging whether the contents of the test request message and the theoretical request message are consistent or not to obtain a content test result.
In another possible implementation manner, verifying the test request message according to the theoretical request message to obtain a first test result includes:
acquiring the number of theoretical request messages according to the test cases, and counting the number of the test request messages;
and judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages or not to obtain a quantity test result.
Fig. 3 is a flowchart of a testing method provided in an embodiment of the present invention, where an execution subject of the testing method is the testing terminal 101 shown in fig. 1, and referring to fig. 3, the method includes:
301. and acquiring a test case set for the function to be tested through the application client.
The function to be tested may be any function in the application client, such as a login function, a page display function, a payment function, and the like. The function implementation process involves a server, and an application client is required to send a request message to the server.
The test case comprises input information, theoretical request information which is sent to a server when the application function processes the input information, and a theoretical response result which is obtained when the application function processes the input information. The input information may be input by the tester on the test terminal, or set by the tester in a test case in advance, or may be randomly determined by the application client. And because the application client already sets the specific processing mode of the function during development, after the input information is determined, the theoretical request message which the application client needs to send to the server during processing can be determined, and the theoretical response result corresponding to the input information can also be determined.
The types of the input information, the theoretical request message and the theoretical response result are all matched with the function. For example, the function is a login function, correspondingly, the input information is a user name and a password, the theoretical request message is a login request carrying the user name and the password, and the theoretical response result is a login success message or a login failure message returned by the server; or the function is a payment function, correspondingly, the input information is a payment password, the theoretical request message is a payment request carrying the payment password, and the theoretical response result is a payment success message or a payment failure message returned by the server. Or the function is a function of displaying a page, correspondingly, the input information is operation information of a link address of a clicked page, the theoretical request message is a display request carrying the link address, and the theoretical response result is the page returned by the server.
302. In the process of processing the input information by the application function of the application client, the test terminal captures a request message sent to the server by the local terminal.
After the application client acquires the input information, the function can be applied to process the input information. In the processing process, the application client sends a corresponding request message to the server, and the server returns a corresponding response result to the application client after processing according to the request message.
In the processing process, in order to test the request message, the test terminal captures the request message sent by the test terminal to the server so as to extract the test request message sent by the application client to the server, and the test request message can be tested by comparing the test request message with the theoretical request message in the test case.
303. And the test terminal extracts the request message with the format matched with the target format from the captured request message to be used as a test request message.
Considering that the application client is provided with a plurality of functions, the functions may all send request messages to the server in the implementation process, and the test terminal may be installed with other application clients besides the application client, and the application clients or the operating system of the test terminal may also send request messages to some servers, therefore, in the actual application process, the test terminal may send a plurality of request messages to one or more servers, and accordingly grab a plurality of request messages, where the plurality of request messages include the request message sent by the application client to the server in the process of applying the function, and also include the request message sent by the application client to the server in the process of applying other functions, and also include the request messages sent by other application clients or operating systems.
Therefore, after the test terminal captures a plurality of request messages, the test terminal needs to filter and screen the request messages to obtain the test request messages, and then the test can be accurately and efficiently performed.
In this embodiment of the present invention, the step 303 may include any one of the following steps 3031-3033:
3031. and extracting the request message containing the target application identification from the grabbed request message to be used as a test request message.
Each application client may be assigned an application identifier, where the application identifier is used to determine a unique corresponding application client, and may be an application number, an application name, and the like, and the target application identifier is used to indicate the application client that needs to be tested.
When each application client sends a request message to a corresponding server, the request message contains the application identifier of the application client, so that the request message containing the target application identifier can be extracted from the request messages sent by a plurality of application clients, namely the test request message sent to the server by the application client needing to be tested.
3032. And extracting the request message containing the target function identifier from the grabbed request message to be used as a test request message, wherein the target function identifier is used for indicating the function.
The application client side is provided with a plurality of functions, each function can be assigned with a function identifier, the function identifier is used for determining the only corresponding function, and can be a function name and the like, and the target function identifier is used for indicating the function needing to be tested.
When the application client sends a request message to the server, the request message will contain a corresponding function identifier to indicate which function the request message is related to, so that the request message containing the target function identifier can be extracted from the request message sent to the server, that is, the test request message corresponding to the function to be tested.
3033. And extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as a test request message.
The request message containing the target application identifier and the target function identifier is the request message which is sent to the server by the application client and is related to the function, so that the request message containing the target application identifier and the target function identifier is extracted from the sent request message, and the required test request message can be accurately extracted.
In step 3011-3033, by extracting the test request message, the request message that does not need to be tested can be removed, so as to reduce the number of request messages and facilitate efficient performance of the test process.
304. And the test terminal verifies the test request message according to the theoretical request message to obtain a first test result.
The theoretical request message and the test request message are compared to obtain a first test result, and whether the function of the application client is normal or not can be tested from the perspective of the transmitted request message.
The sent request message may be determined from the content or the quantity, and accordingly, the first test result may include a content test result or a quantity test result. That is, the step 304 may include at least one of the following steps 3041 and 3042:
3041. and judging whether the contents of the test request message and the theoretical request message are consistent or not to obtain a content test result.
The specific content of the theoretical request message has been described in the test case, and if the application client operates normally, the content of the test request message sent by the application client to the server should be consistent with the content of the theoretical request message.
Therefore, whether the content of the test request message is consistent with that of the theoretical request message is judged, a content test result is obtained, if the content test result shows that the content of the test request message is consistent with that of the theoretical request message, the content of the request message sent by the application client is normal, and if the content test result shows that the content of the test request message is inconsistent with that of the theoretical request message, the content of the request message sent by the application client is in a problem and needs to be corrected.
When the theoretical request message and the test request message both comprise a plurality of messages, the plurality of test request messages can be traversed, whether the plurality of theoretical request messages comprise the theoretical request message with the content consistent with the content of the test request message is judged aiming at the currently traversed test request message, when each test request message in the plurality of test request messages is determined to have the theoretical request message with the consistent content, the content test result is determined to be the consistent content, and when any test request message does not have the theoretical request message with the consistent content, the content test result is determined to be the inconsistent content.
3042. And acquiring the quantity of the theoretical request messages according to the test cases, counting the quantity of the test request messages, and judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages to obtain a quantity test result.
The test case may include one or more theoretical request messages, and the test terminal may also capture one or more test request messages. By comparing the number of test request messages with the number of theoretical request messages, it can be determined whether the application client functions normally.
Therefore, the test terminal can count the number of the theoretical request messages and the number of the test request messages, judge whether the number of the theoretical request messages is consistent with that of the test request messages, determine that the number test result is that the test request messages are sent more, and indicate that the application client side sends extra unnecessary request messages, when the number of the test request messages is smaller than that of the theoretical request messages, determine that the number test result is that the test request messages are missing, and indicate that the application client side sends less request messages.
In the related art, only the response result is tested, but a little is ignored, that is, the interaction process with the server in the function implementation process of the application client may not be greatly related to the response result, and the response result is not affected but may be affected by the wrong execution. Then, only the response result is tested, and it cannot be guaranteed whether the interaction processes are normally executed, and it cannot be guaranteed that the function of the application client is normally operated. In the embodiment of the invention, the defect can be made up by testing the interactive request message between the application client and the server.
For example, when the application client performs a payment operation, the payment request sent by the application client needs to carry payment time, and the server needs to count the payment record of the user according to the payment time in the received payment request. The statistical process has no influence on the success of payment, and the payment request sent by the application client can not be verified whether the payment request carries the payment time or not only according to the payment response result, but also can be verified by verifying the request message.
305. And the test terminal receives a test response result returned by the server according to the test request message, and verifies the test response result according to a theoretical response result to obtain a second test result.
After the application client sends the test request message to the server, when the server receives the test request message, the corresponding processing operation is executed according to the test request message, and a corresponding test response result is returned. And comparing the test response result with the theoretical response result to obtain a second test result, so that whether the function of the application client is normal or not can be tested from the perspective of processing the result.
Therefore, the test terminal can judge whether the content of the test response result is consistent with that of the theoretical response result or not, or whether the number of the test response result is consistent with that of the theoretical response result or not when the theoretical response result and the content response result both include a plurality of pieces. Of course, the test response result can be verified according to the theoretical response result in other aspects.
In the related art, a response result is tested, but a request message between an application client and a server is not tested, a closed-loop automatic test for forming a data stream from the application client to the server is lacked, and the situation that the local operation of the application client is normal, but the interaction between the application client and the server has a problem easily occurs.
According to the method provided by the embodiment of the invention, the test request message sent to the server by the application client is captured in the process of processing the input information by applying the function to be tested by the application client, the test response result returned by the server according to the test request message is received, and the test request message and the test response result can be verified respectively according to the theoretical request message and the theoretical response result to obtain the first test result and the second test result, so that the test of the request message sent to the server by the application client is realized, the test range is expanded, the test completeness is ensured, and the flexibility is improved.
Furthermore, the captured request messages are filtered, so that the request messages which do not need to be tested are removed, the number of the request messages can be reduced, and the testing efficiency is improved.
Furthermore, the request message and the response result are tested from the aspects of content, quantity and the like, and the comprehensive and accurate test result is ensured.
Fig. 4 is a schematic structural diagram of a testing apparatus according to an embodiment of the present invention. Referring to fig. 4, the apparatus includes:
an obtaining module 401, configured to obtain a test case set for a function to be tested, where the test case includes input information, a theoretical request message that should be sent to a server when an application function processes the input information, and a theoretical response result that should be obtained when the application function processes the input information;
a capturing module 402, configured to capture a test request message sent by an application client to a server in a process of processing input information by an application client application function;
the verification module 403 is configured to verify the test request message according to the theoretical request message to obtain a first test result;
a receiving module 404, configured to receive a test response result returned by the server according to the test request message;
the verification module 403 is further configured to verify the test response result according to the theoretical response result to obtain a second test result.
Optionally, the test case further includes an object format of the theoretical request message, and the crawling module 402 includes:
the capturing unit is used for capturing a request message sent to the server by the local terminal;
and the extracting unit is used for extracting the request message with the format matched with the target format from the grabbed request message as a test request message.
Optionally, an extraction unit, configured to:
extracting a request message containing a target application identifier from the captured request message to serve as a test request message, wherein the target application identifier is used for indicating an application client; or,
extracting a request message containing a target function identifier from the captured request message to serve as a test request message, wherein the target function identifier is used for indicating a function; or,
and extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as a test request message.
Optionally, the verification module 403 includes:
and the content verification unit is used for judging whether the content of the test request message is consistent with that of the theoretical request message or not to obtain a content test result.
Optionally, the verification module 403 includes:
the quantity counting unit is used for acquiring the quantity of the theoretical request messages according to the test cases and counting the quantity of the test request messages;
and the quantity verification unit is used for judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages or not to obtain a quantity test result.
It should be noted that: in the test apparatus provided in the above embodiment, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the terminal or the server is divided into different functional modules to complete all or part of the functions described above. In addition, the test apparatus and the test method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal may be used to implement the functions performed by the test terminal in the test methods shown in the above embodiments. Specifically, the method comprises the following steps:
the terminal 500 may include RF (Radio Frequency) circuitry 110, memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, audio circuitry 160, a transmission module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal structure shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other terminals via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (short messaging Service), etc.
The memory 120 may be used to store software programs and modules, such as the software programs and modules corresponding to the terminal shown in the above exemplary embodiment, and the processor 180 executes various functional applications and data processing, such as implementing video-based interaction, by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 500, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input unit 130 may include a touch-sensitive surface 131 as well as other input terminals 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding link device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input terminals 132. In particular, other input terminals 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 500, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 5, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal 500 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or a backlight when the terminal 500 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 500, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 500. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of peripheral headphones with the terminal 500.
The terminal 500 may assist the user in e-mail, web browsing, streaming media access, etc. through the transmission module 170, which provides the user with wireless or wired broadband internet access. Although fig. 5 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the terminal 500 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal 500, links various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 500 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the handset. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal 500 further includes a power supply 190 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 180 via a power management system, such that functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 500 may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in the present embodiment, the display unit of the terminal 500 is a touch screen display, and the terminal 500 further includes a memory and at least one instruction, at least one program, a code set, or an instruction set, where the at least one instruction, the at least one program, the code set, or the instruction set is stored in the memory and configured to be loaded and executed by one or more processors to implement the operations executed in the test method in the foregoing embodiments.
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 600 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 622 (e.g., one or more processors) and a memory 632, and one or more storage media 630 (e.g., one or more mass storage devices) for storing applications 642 or data 644. Memory 632 and storage medium 630 may be, among other things, transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Further, the central processor 622 may be configured to communicate with the storage medium 630, load a series of instruction operations in the storage medium 630, and execute the above-described test method on the server 600.
The Server 600 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input-output interfaces 658, one or more keyboards 658, and/or one or more operating systems 641, such as Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMAnd so on.
The embodiment of the present invention further provides a testing apparatus, where the testing apparatus includes a processor and a memory, where the memory stores at least one instruction, at least one section of a program, a code set, or an instruction set, and the instruction, the program, the code set, or the instruction set is loaded and executed by the processor to implement the operations executed in the testing method of the foregoing embodiment.
An embodiment of the present invention further provides a computer-readable storage medium, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the computer-readable storage medium, and the instruction, the program, the code set, or the set of instructions is loaded and executed by a processor to implement the operations performed in the test method of the foregoing embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1. A method of testing, the method comprising:
acquiring a test case set for a function to be tested, wherein the test case comprises input information, a theoretical request message which is to be sent to a server when the function is applied to process the input information, and a theoretical response result which is to be obtained when the function is applied to process the input information;
capturing a test request message sent to the server by an application client in the process of processing the input information by applying the function by the application client;
verifying the test request message according to the theoretical request message to obtain a first test result;
and receiving a test response result returned by the server according to the test request message, and verifying the test response result according to the theoretical response result to obtain a second test result.
2. The method according to claim 1, wherein the test case further includes a target format of a theoretical request message, and the crawling the test request message sent by the application client to the server includes:
capturing a request message sent to the server by a local terminal;
and extracting the request message with the format matched with the target format from the grabbed request message to be used as the test request message.
3. The method according to claim 2, wherein the extracting, from the grabbed request message, the request message with the format matching the target format as the test request message comprises:
extracting a request message containing a target application identifier from the captured request message to serve as the test request message, wherein the target application identifier is used for indicating the application client; or,
extracting a request message containing a target function identifier from the captured request message, wherein the target function identifier is used for indicating the function and is used as the test request message; or,
and extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as the test request message.
4. The method according to any one of claims 1 to 3, wherein verifying the test request message according to the theoretical request message to obtain a first test result comprises:
and judging whether the contents of the test request message and the theoretical request message are consistent or not to obtain a content test result.
5. The method according to any one of claims 1 to 3, wherein verifying the test request message according to the theoretical request message to obtain a first test result comprises:
acquiring the quantity of the theoretical request messages according to the test cases, and counting the quantity of the test request messages;
and judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages or not to obtain a quantity test result.
6. A test apparatus, the apparatus comprising:
the system comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring a test case set aiming at a function to be tested, and the test case comprises input information, a theoretical request message which is to be sent to a server when the input information is processed by applying the function, and a theoretical response result which is to be obtained when the input information is processed by applying the function;
the capturing module is used for capturing a test request message sent to the server by the application client in the process that the application client applies the function to process the input information;
the verification module is used for verifying the test request message according to the theoretical request message to obtain a first test result;
the receiving module is used for receiving a test response result returned by the server according to the test request message;
and the verification module is further used for verifying the test response result according to the theoretical response result to obtain a second test result.
7. The apparatus of claim 6, wherein the test case further includes an object format of a theoretical request message, and wherein the crawling module includes:
the capturing unit is used for capturing a request message sent to the server by a local terminal;
and the extracting unit is used for extracting the request message with the format matched with the target format from the grabbed request message as the test request message.
8. The apparatus of claim 7, wherein the extraction unit is configured to:
extracting a request message containing a target application identifier from the captured request message to serve as the test request message, wherein the target application identifier is used for indicating the application client; or,
extracting a request message containing a target function identifier from the captured request message, wherein the target function identifier is used for indicating the function and is used as the test request message; or,
and extracting the request message containing the target application identifier and the target function identifier from the grabbed request message to be used as the test request message.
9. The apparatus of any of claims 6-8, wherein the validation module comprises:
and the content verification unit is used for judging whether the content of the test request message is consistent with that of the theoretical request message or not to obtain a content test result.
10. The apparatus of any of claims 6-8, wherein the validation module comprises:
the quantity counting unit is used for acquiring the quantity of the theoretical request messages according to the test cases and counting the quantity of the test request messages;
and the quantity verification unit is used for judging whether the quantity of the test request messages is consistent with the quantity of the theoretical request messages or not to obtain a quantity test result.
11. A test apparatus comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, the instruction, the program, the set of codes, or the set of instructions being loaded and executed by the processor to carry out the operations performed in the test method according to any one of claims 1 to 5.
12. A computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to carry out the operations performed in the test method according to any one of claims 1 to 5.
CN201710897042.3A 2017-09-28 2017-09-28 Method of testing, device and storage medium Pending CN107783906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710897042.3A CN107783906A (en) 2017-09-28 2017-09-28 Method of testing, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710897042.3A CN107783906A (en) 2017-09-28 2017-09-28 Method of testing, device and storage medium

Publications (1)

Publication Number Publication Date
CN107783906A true CN107783906A (en) 2018-03-09

Family

ID=61433521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710897042.3A Pending CN107783906A (en) 2017-09-28 2017-09-28 Method of testing, device and storage medium

Country Status (1)

Country Link
CN (1) CN107783906A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399114A (en) * 2018-03-21 2018-08-14 财付通支付科技有限公司 A kind of system performance testing method, apparatus and storage medium
CN109299002A (en) * 2018-08-24 2019-02-01 平安科技(深圳)有限公司 Generation method, computer readable storage medium and the terminal device of test report
CN110321287A (en) * 2019-06-20 2019-10-11 北京奇艺世纪科技有限公司 A kind of detection method of server capability, device and electronic equipment
CN110399305A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 The test method and device of BTT module
CN110502444A (en) * 2019-08-28 2019-11-26 北京达佳互联信息技术有限公司 A kind of test method and test device of image processing algorithm
CN110737579A (en) * 2018-07-20 2020-01-31 北京奇虎科技有限公司 Test method, proxy server, device and system based on code instrumentation
CN114861146A (en) * 2022-05-13 2022-08-05 中国银行股份有限公司 Test scheme verification processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7441036B2 (en) * 2003-04-01 2008-10-21 International Business Machines Corporation Method and system for a debugging utility based on a TCP tunnel
CN103312551A (en) * 2012-03-12 2013-09-18 腾讯科技(深圳)有限公司 Test method and test device of common gateway interface
CN105553996A (en) * 2015-12-23 2016-05-04 北京奇虎科技有限公司 Method and device for processing data access request
CN106649126A (en) * 2016-12-29 2017-05-10 广州酷狗计算机科技有限公司 Method and apparatus for testing application program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7441036B2 (en) * 2003-04-01 2008-10-21 International Business Machines Corporation Method and system for a debugging utility based on a TCP tunnel
CN103312551A (en) * 2012-03-12 2013-09-18 腾讯科技(深圳)有限公司 Test method and test device of common gateway interface
CN105553996A (en) * 2015-12-23 2016-05-04 北京奇虎科技有限公司 Method and device for processing data access request
CN106649126A (en) * 2016-12-29 2017-05-10 广州酷狗计算机科技有限公司 Method and apparatus for testing application program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399114A (en) * 2018-03-21 2018-08-14 财付通支付科技有限公司 A kind of system performance testing method, apparatus and storage medium
CN108399114B (en) * 2018-03-21 2021-02-02 财付通支付科技有限公司 System performance testing method and device and storage medium
CN110737579A (en) * 2018-07-20 2020-01-31 北京奇虎科技有限公司 Test method, proxy server, device and system based on code instrumentation
CN109299002A (en) * 2018-08-24 2019-02-01 平安科技(深圳)有限公司 Generation method, computer readable storage medium and the terminal device of test report
CN110321287A (en) * 2019-06-20 2019-10-11 北京奇艺世纪科技有限公司 A kind of detection method of server capability, device and electronic equipment
CN110399305A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 The test method and device of BTT module
CN110399305B (en) * 2019-07-31 2023-12-08 中国工商银行股份有限公司 BTT module testing method and device
CN110502444A (en) * 2019-08-28 2019-11-26 北京达佳互联信息技术有限公司 A kind of test method and test device of image processing algorithm
CN110502444B (en) * 2019-08-28 2023-08-18 北京达佳互联信息技术有限公司 Testing method and testing device for image processing algorithm
CN114861146A (en) * 2022-05-13 2022-08-05 中国银行股份有限公司 Test scheme verification processing method and device

Similar Documents

Publication Publication Date Title
CN108959000B (en) Server pressure testing method, system and terminal
CN107783906A (en) Method of testing, device and storage medium
CN106649126B (en) Method and device for testing application program
US10824449B2 (en) Application running method and device
CN106502906B (en) A kind of method and apparatus of test application program
CN104852885B (en) Method, device and system for verifying verification code
CN108089977B (en) Application program exception handling method and device and mobile terminal
CN105320598A (en) Software testing method and device
CN108039963B (en) Container configuration method and device and storage medium
CN106371964B (en) Method and device for prompting message
CN107465841B (en) Fault information reporting method and terminal
CN106294168B (en) A kind of method and system carrying out Application testing
CN110020293B (en) Multimedia data display method, device and storage medium
CN110213313B (en) File uploading method, related device and system
WO2018161540A1 (en) Fingerprint registration method and related product
CN109067751B (en) ARP spoofing detection method and device under non-Root environment and terminal
CN108052430B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
CN110069407B (en) Function test method and device for application program
CN112199246A (en) Terminal testing method and device, storage medium and mobile terminal
CN106020945B (en) Shortcut item adding method and device
CN112749074A (en) Test case recommendation method and device
CN108829416A (en) A kind of upgrading recommended method, server and terminal
CN109558731B (en) Feature code processing method, device and storage medium
CN112667868B (en) Data detection method and device
CN109783379B (en) Script execution exception determining method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180309