CN106649126B - Method and device for testing application program - Google Patents

Method and device for testing application program Download PDF

Info

Publication number
CN106649126B
CN106649126B CN201611243900.4A CN201611243900A CN106649126B CN 106649126 B CN106649126 B CN 106649126B CN 201611243900 A CN201611243900 A CN 201611243900A CN 106649126 B CN106649126 B CN 106649126B
Authority
CN
China
Prior art keywords
request message
content information
information
preset
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611243900.4A
Other languages
Chinese (zh)
Other versions
CN106649126A (en
Inventor
周金剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201611243900.4A priority Critical patent/CN106649126B/en
Publication of CN106649126A publication Critical patent/CN106649126A/en
Application granted granted Critical
Publication of CN106649126B publication Critical patent/CN106649126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for testing an application program, and belongs to the technical field of computers. The method comprises the following steps: acquiring a request message sent by an application program to be tested; and determining whether the content information of the request message is matched with preset reference content information, if so, displaying verification passing prompt information corresponding to the application program to be tested, and if not, displaying verification error prompt information corresponding to the application program to be tested. By adopting the invention, the efficiency of testing the application program can be improved.

Description

Method and device for testing application program
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for testing an application.
Background
The target is that before an application is released, a developer of the application tests the application to determine whether the functions of the application can be used normally. Among them, detecting whether an application to be tested can normally send a request message to a server, such as an http (HyperText Transfer Protocol) request or an https (HyperText Transfer Protocol over Secure Socket Layer) request, is one of common tests.
When testing an application program (which may be called an application program to be tested), a terminal (which may be called a test terminal) provided with the application program to be tested may establish data connection with a terminal (which may be called a monitor terminal) of a tester, an application program (which may be called a capture tool) for capturing a request message may be installed in the monitor terminal, when the test terminal sends the request message, the monitor terminal may intercept the request message sent by the test terminal through the capture tool, and the monitor terminal may display the intercepted request message. The tester can perform an operation on the application program to be tested, such as a login operation or opening a webpage, to trigger the application program to be tested to send a request message to the server, and then can check whether the request message intercepted by the monitoring terminal contains the request message that the testing terminal should send and whether the content of the request message is correct, if the request message is contained and the content of the request message is correct, it indicates that the application program to be tested can normally send the request message to the server, otherwise, it indicates that the application program to be tested has a problem and needs to be modified.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
technical personnel need to manually check whether the application program to be tested sends the specified request message and judge whether the content of the request message is correct, which results in low efficiency of testing the application program.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for testing an application. The technical scheme is as follows:
in a first aspect, a method for testing an application is provided, the method including:
acquiring a request message sent by an application program to be tested;
and determining whether the content information of the request message is matched with preset reference content information, if so, displaying verification passing prompt information corresponding to the application program to be tested, and if not, displaying verification error prompt information corresponding to the application program to be tested.
Optionally, the determining whether the content information of the request message matches preset reference content information includes:
and determining whether the request message contains a preset field, if so, judging that the content information of the request message is matched with the reference content information, and if not, judging that the content information of the request message is not matched with the reference content information.
Optionally, the determining whether the content information of the request message matches preset reference content information includes:
acquiring attribute information of preset attributes contained in the request message, if the attribute information is the same as the reference attribute information, judging that the content information of the request message is matched with the reference content information, and if the attribute information is not the same as the reference attribute information, judging that the content information of the request message is not matched with the reference content information.
Optionally, the preset attribute includes one or more of a url address, a host address, a request path, and a parameter list.
Optionally, the obtaining of the request message sent by the application program to be tested includes:
acquiring domain name information corresponding to a preset application program to be tested;
and acquiring the request message containing the domain name information in the acquired request message.
Optionally, the method further includes:
if the request message containing the domain name information is acquired, displaying verification passing prompt information corresponding to the request message if the content information of the request message meets a preset content condition, and displaying verification error prompt information corresponding to the request message if the content information of the request message does not meet the preset content condition;
and if the request message containing the domain name information is not acquired, displaying check error prompt information corresponding to the application program to be tested.
In a second aspect, there is provided an apparatus for testing an application, the apparatus comprising:
the acquisition module is used for acquiring a request message sent by an application program to be tested;
and the determining module is used for determining whether the content information of the request message is matched with preset reference content information, if so, displaying verification passing prompt information corresponding to the application program to be tested, and if not, displaying verification error prompt information corresponding to the application program to be tested.
Optionally, the determining module is configured to:
and determining whether the request message contains a preset field, if so, judging that the content information of the request message is matched with the reference content information, and if not, judging that the content information of the request message is not matched with the reference content information.
Optionally, the determining module is configured to:
acquiring attribute information of preset attributes contained in the request message, if the attribute information is the same as the reference attribute information, judging that the content information of the request message is matched with the reference content information, and if the attribute information is not the same as the reference attribute information, judging that the content information of the request message is not matched with the reference content information.
Optionally, the preset attribute includes one or more of a url address, a host address, a request path, and a parameter list.
Optionally, the obtaining module includes:
the first obtaining submodule is used for obtaining domain name information corresponding to a preset application program to be tested;
and the second obtaining sub-module is used for obtaining the request message containing the domain name information from the obtained request message.
Optionally, the obtaining module is further configured to:
if the request message containing the domain name information is acquired, displaying verification passing prompt information corresponding to the request message if the content information of the request message meets a preset content condition, and displaying verification error prompt information corresponding to the request message if the content information of the request message does not meet the preset content condition;
and if the request message containing the domain name information is not acquired, displaying check error prompt information corresponding to the application program to be tested.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the request message sent by the application program to be tested is acquired, whether the content information of the request message is matched with the preset reference content information or not is determined, if the content information of the request message is matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is passed is displayed, and if the content information of the request message is not matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is wrong is displayed, so that whether the request message is correct or not can be automatically judged, manual.
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 flowchart of a method for testing an application according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an interface display provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interface display provided by an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for testing an application according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for testing an application according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for testing an application program, wherein an execution main body of the method is a terminal. The terminal may be a terminal installed with an application program for testing the application program. The tester can perform secondary development based on a burpsuit framework in the prior art to obtain a testing tool, the testing tool can be used for capturing the request message, analyzing and checking the captured request message to judge whether the request message is correct or not, so as to determine whether the application program to be tested sends the specified request message or not, if so, the application program to be tested can normally send the request message to the server, and otherwise, the application program to be tested is abnormal and needs to be debugged and modified.
The terminal can comprise a transceiver, a processor and a memory, wherein the transceiver can be used for receiving a request message reported by an application program to be detected; the processor, which may be a Central Processing Unit (CPU), may be configured to determine whether content information of the request message matches preset reference content information, if so, display a verification-passing prompt message corresponding to the application program to be tested, and if not, display a verification-error prompt message corresponding to the application program to be tested; the Memory may be a RAM (Random Access Memory), a Flash (Flash Memory), and the like, and may be configured to store received data, data required by the processing procedure, data generated in the processing procedure, and the like, such as the above-mentioned test tool and preset reference content information. In addition, the terminal may further include an input part, a display part, a power supply, and the like.
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, obtaining a request message sent by an application program to be tested.
In implementation, when a tester tests an application program to be tested, the tester can establish data connection between a test terminal provided with the application program to be tested and a monitoring terminal provided with a test tool. The tester can perform an operation in the application program to be tested, such as a login operation or opening a certain webpage, to trigger the application program to be tested to send a request message to the server, and at this time, the application program to be tested can report the request message to the monitoring terminal. The monitoring terminal can intercept the request message through the test tool, so that the request message sent by the application program to be tested can be acquired. The request message may be an http request or an https request.
Optionally, the monitoring terminal may intercept request messages sent by a plurality of applications, and the monitoring terminal may extract the request message of the application program to be tested from the intercepted request messages, and accordingly, the processing procedure in step 101 may be as follows: acquiring domain name information corresponding to a preset application program to be tested; and acquiring the request message containing the domain name information from the acquired request messages.
In practice, the request message will typically carry domain name information, e.g.,www.qq.comor is orwww.fanxing.comAnd the like. TestingThe person may preset, in the monitoring terminal, domain name information included in the request message to be extracted, where the domain name information may be one or multiple. The monitoring terminal may intercept request messages sent by a plurality of application programs, and the monitoring terminal may perform content analysis on the intercepted request messages to determine a request message containing preset domain name information for subsequent processing.
And step 102, determining whether the content information of the request message is matched with preset reference content information, if so, displaying verification passing prompt information corresponding to the application program to be tested, and if not, displaying verification error prompt information corresponding to the application program to be tested.
In an implementation, the request message may include attribute information of a plurality of attributes, for example, the request message may include a host address, a request path, a parameter list, and the like. The monitoring terminal may be pre-stored with a plurality of pieces of reference content information, and the reference content information may be reference attribute information of each attribute preset by a tester, or may be a certain preset field. The reference content information may be the content information in the correct request message.
The monitoring terminal may further store a plurality of use cases (i.e., programs for test analysis) for performing the application program test, and the use cases may store a preset verification algorithm. Different types of matching detection can be performed based on different use cases. For example, a reference request path is stored in a certain use case, and may be used to detect whether a request path in an acquired request message is the same as the reference request path; a reference parameter list and a reference host address may be stored in a certain use case, and the reference parameter list and the reference host address are used to detect whether the parameter list and the host address in the acquired request message are the same as the reference parameter list and the reference host address.
The monitoring terminal may display reference content information (for example, each reference attribute information) set by the tester and an identifier of each use case, where the identifier of each use case may include a name of each use case and an identifier of a verification type corresponding to each use case. Before testing, a tester can select a use case to be used in the monitoring terminal so as to perform corresponding detection. After the monitoring terminal acquires the request message sent by the application program to be tested, the acquired request message and the reference content information can be matched according to the reference content information set by the tester and the verification algorithm in the selected use case, if the monitoring terminal judges that the request message and the reference content information are matched, verification passing prompt information corresponding to the application program to be tested can be displayed, and if the monitoring terminal judges that the request message and the reference content information are not matched, verification error prompt information corresponding to the application program to be tested can be displayed, as shown in fig. 2. The monitoring terminal may generate corresponding verification error prompt information according to different verification algorithms, for example, if the host address is verified and the obtained host address is not matched with the reference host address, a "host address error" may be displayed, as shown in fig. 3; if the request path is verified and the acquired request path is not matched with the reference request path, a 'request path error' can be displayed, and in addition, when verification error prompt information is displayed, the acquired request message can be displayed so as to be conveniently checked by a tester.
This embodiment provides two ways of checking the request message, which are specifically as follows:
the method comprises the steps of determining whether a preset field is contained in a request message or not, if so, judging that the content information of the request message is matched with the reference content information, and if not, judging that the content information of the request message is not matched with the reference content information.
In implementation, the monitoring terminal may search the acquired request message according to a field preset by a tester, determine whether the request message includes a preset field, if so, determine that the content information of the request message satisfies a preset content condition, and if not, determine that the content information of the request message does not satisfy the preset content condition. For example, if the preset field is "sign", and the obtained request message is http:// mo.fanxing.kutou.com/mfx/mps/cdn/mobileLive/getelectrommendlistist/sign.
And secondly, acquiring attribute information of preset attributes contained in the request message, if the attribute information is the same as the reference attribute information, judging that the content information of the request message is matched with the reference content information, and if the attribute information is not the same as the reference attribute information, judging that the content information of the request message is not matched with the reference content information.
In implementation, after the monitoring terminal acquires the request message, the request message may be analyzed, and then the attribute (i.e., the preset attribute) to be matched may be determined according to the use case selected by the tester. The monitoring terminal may obtain a url (Uniform resource Locator) address of the request message, or may also obtain a host address, a request intersection, a parameter list, or the like of the request message, and then may compare the obtained attribute information with reference attribute information corresponding to a preset attribute, if the obtained attribute information is the same as the reference attribute information, it may be determined that the content information of the request message matches the reference content information, otherwise, it may be determined that the content information of the request message does not match the reference content information. For example, the reference value of version is 6580, and the obtained request message is http:// mo.fanxing.kutou.com/mfx/mps/cdn/mobile live/getrcommendlist/sign.. version 6580, the value of version in the request message may be obtained, and then it is determined whether the obtained value is 6580, and if so, it is determined that the content information of the request message matches the reference content information.
The first mode and the second mode can be realized through different use cases, and testers can select the first mode and the second mode according to own needs. In addition, there may also be a case combining the first mode and the second mode, at this time, if the request message includes a preset field and the attribute information of the preset attribute included in the request message is the same as the reference attribute information of the preset attribute, it is determined that the content information of the request message matches the reference content information, otherwise, it is determined that the content information of the request message does not match the reference content information.
Optionally, it may also be determined whether a request message sent by the application to be tested is received, and the corresponding processing procedure may be as follows: if the request message containing the domain name information is acquired, displaying verification passing prompt information of the corresponding request message if the content information of the request message meets a preset content condition, and displaying verification error prompt information of the corresponding request message if the content information of the request message does not meet the preset content condition; and if the request message containing the domain name information is not acquired, displaying the verification error prompt information corresponding to the application program to be tested.
In implementation, the monitoring terminal may further store a use case for determining whether the request message sent by the application program to be tested is received, and after the test is started, if the monitoring terminal does not detect the request message containing the preset domain name information within a preset time period, it is indicated that the request message sent by the application program to be tested is not received, the application program to be tested has a problem, and a verification error prompt message corresponding to the application program to be tested may be displayed. If the monitoring terminal does not detect the request message containing the preset domain name information within the preset time length, it indicates that the request message sent by the application to be tested is received, and then step 102 may be executed for further verification.
In the embodiment of the invention, the request message sent by the application program to be tested is acquired, whether the content information of the request message is matched with the preset reference content information or not is determined, if the content information of the request message is matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is passed is displayed, and if the content information of the request message is not matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is wrong is displayed, so that whether the request message is correct or not can be automatically judged, manual.
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for testing an application, as shown in fig. 4, the apparatus includes:
an obtaining module 410, configured to obtain a request message sent by an application to be tested;
a determining module 420, configured to determine whether content information of the request message matches preset reference content information, if so, display a verification passing prompt message corresponding to the application program to be tested, and if not, display a verification error prompt message corresponding to the application program to be tested.
Optionally, the determining module 420 is configured to:
and determining whether the request message contains a preset field, if so, judging that the content information of the request message is matched with the reference content information, and if not, judging that the content information of the request message is not matched with the reference content information.
Optionally, the determining module 420 is configured to:
acquiring attribute information of preset attributes contained in the request message, if the attribute information is the same as the reference attribute information, judging that the content information of the request message is matched with the reference content information, and if the attribute information is not the same as the reference attribute information, judging that the content information of the request message is not matched with the reference content information.
Optionally, the preset attribute includes one or more of a url address, a host address, a request path, and a parameter list.
Optionally, as shown in fig. 5, the obtaining module 410 includes:
the first obtaining sub-module 411 is configured to obtain domain name information corresponding to a preset application program to be tested;
the second obtaining sub-module 412 is configured to obtain, from the obtained request message, a request message including the domain name information.
Optionally, the obtaining module 410 is further configured to:
if the request message containing the domain name information is acquired, displaying verification passing prompt information corresponding to the request message if the content information of the request message meets a preset content condition, and displaying verification error prompt information corresponding to the request message if the content information of the request message does not meet the preset content condition;
and if the request message containing the domain name information is not acquired, displaying check error prompt information corresponding to the application program to be tested.
In the embodiment of the invention, the request message sent by the application program to be tested is acquired, whether the content information of the request message is matched with the preset reference content information or not is determined, if the content information of the request message is matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is passed is displayed, and if the content information of the request message is not matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is wrong is displayed, so that whether the request message is correct or not can be automatically judged, manual.
It should be noted that: the apparatus for testing an application provided in the foregoing embodiment is only illustrated by dividing the functional modules when testing the application, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for testing an application provided in the foregoing embodiment and the method embodiment for testing an application belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiment and are not described herein again.
Referring to fig. 6, a schematic structural diagram of a terminal according to an embodiment of the present invention is shown, where the terminal may be used to implement the method for displaying chat information provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the terminal 900 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 WiFi (wireless fidelity) 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. 6 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 devices 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, and the processor 180 executes various functional applications and data processing by operating 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 900, 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, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 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 connection 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 devices 132. In particular, other input devices 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 900, 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. 6, 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 900 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 the backlight when the terminal 900 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 900, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 900. 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 circuitry 160 may also include an earbud jack to provide communication of peripheral headphones with the terminal 900.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 900 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through the WiFi module 170, and it provides wireless broadband internet access for the user. Although fig. 6 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the terminal 900, 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 900, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 900 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 performing overall monitoring of the mobile phone. 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.
Terminal 900 also includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to processor 180 via a power management system that may be used to manage charging, discharging, and power consumption. 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 900 may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the terminal 900 is a touch screen display, the terminal 900 further includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by the one or more processors and include instructions for the terminal to perform the method for testing the application program.
In the embodiment of the invention, the request message sent by the application program to be tested is acquired, whether the content information of the request message is matched with the preset reference content information or not is determined, if the content information of the request message is matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is passed is displayed, and if the content information of the request message is not matched with the preset reference content information, the prompt information that the verification of the corresponding application program to be tested is wrong is displayed, so that whether the request message is correct or not can be automatically judged, manual.
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 (10)

1. A method for testing an application, the method comprising:
acquiring domain name information corresponding to a preset application program to be tested;
acquiring a request message containing the domain name information from the acquired request message;
and determining whether the content information of the request message is matched with preset reference content information according to a verification algorithm stored in the selected use case, if so, displaying verification passing prompt information corresponding to the application program to be tested, and if not, displaying verification error prompt information corresponding to the application program to be tested and the request message, wherein the selected use case is selected according to the identification of each use case in the stored plurality of use cases, and the identification of each use case comprises the name of each use case and the identification of the verification type corresponding to each use case.
2. The method according to claim 1, wherein the determining whether the content information of the request message matches with the preset reference content information according to the verification algorithm stored in the selected use case comprises:
and determining whether the request message contains a preset field, if so, judging that the content information of the request message is matched with the reference content information, and if not, judging that the content information of the request message is not matched with the reference content information.
3. The method according to claim 1 or 2, wherein the determining whether the content information of the request message matches with the preset reference content information according to the verification algorithm stored in the selected use case comprises:
acquiring attribute information of preset attributes contained in the request message, if the attribute information is the same as the reference attribute information, judging that the content information of the request message is matched with the reference content information, and if the attribute information is not the same as the reference attribute information, judging that the content information of the request message is not matched with the reference content information.
4. The method of claim 3, wherein the preset attributes comprise one or more of a Uniform Resource Locator (URL) address, a host address, a request path, and a parameter list.
5. The method of claim 1, further comprising:
if the request message containing the domain name information is acquired, displaying verification passing prompt information corresponding to the request message if the content information of the request message meets a preset content condition, and displaying verification error prompt information corresponding to the request message if the content information of the request message does not meet the preset content condition;
and if the request message containing the domain name information is not acquired, displaying check error prompt information corresponding to the application program to be tested.
6. An apparatus for testing an application, the apparatus comprising:
an acquisition module, comprising:
the first obtaining submodule is used for obtaining domain name information corresponding to a preset application program to be tested;
the second obtaining sub-module is used for obtaining the request message containing the domain name information from the obtained request message;
the determining module is used for determining whether the content information of the request message is matched with preset reference content information according to a verification algorithm stored in the selected use case, if so, displaying verification passing prompt information corresponding to the application program to be tested, and if not, displaying verification error prompt information corresponding to the application program to be tested and the request message, wherein the selected use case is selected through the stored identification of each use case in the plurality of use cases, and the identification of each use case comprises the name of each use case and the identification of the verification type corresponding to each use case.
7. The apparatus of claim 6, wherein the determining module is configured to:
and determining whether the request message contains a preset field, if so, judging that the content information of the request message is matched with the reference content information, and if not, judging that the content information of the request message is not matched with the reference content information.
8. The apparatus of claim 6 or 7, wherein the determining module is configured to:
acquiring attribute information of preset attributes contained in the request message, if the attribute information is the same as the reference attribute information, judging that the content information of the request message is matched with the reference content information, and if the attribute information is not the same as the reference attribute information, judging that the content information of the request message is not matched with the reference content information.
9. The apparatus of claim 8, wherein the preset attributes comprise one or more of a url address, a host address, a request path, and a parameter list.
10. The apparatus of claim 6, wherein the obtaining module is further configured to:
if the request message containing the domain name information is acquired, displaying verification passing prompt information corresponding to the request message if the content information of the request message meets a preset content condition, and displaying verification error prompt information corresponding to the request message if the content information of the request message does not meet the preset content condition;
and if the request message containing the domain name information is not acquired, displaying check error prompt information corresponding to the application program to be tested.
CN201611243900.4A 2016-12-29 2016-12-29 Method and device for testing application program Active CN106649126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611243900.4A CN106649126B (en) 2016-12-29 2016-12-29 Method and device for testing application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611243900.4A CN106649126B (en) 2016-12-29 2016-12-29 Method and device for testing application program

Publications (2)

Publication Number Publication Date
CN106649126A CN106649126A (en) 2017-05-10
CN106649126B true CN106649126B (en) 2020-06-30

Family

ID=58836929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611243900.4A Active CN106649126B (en) 2016-12-29 2016-12-29 Method and device for testing application program

Country Status (1)

Country Link
CN (1) CN106649126B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109428788B (en) * 2017-09-05 2022-07-01 阿里巴巴集团控股有限公司 Function testing method and system
CN107704360B (en) * 2017-09-15 2020-01-07 平安科技(深圳)有限公司 Monitoring data processing method, equipment, server and storage medium
CN107783906A (en) * 2017-09-28 2018-03-09 广州酷狗计算机科技有限公司 Method of testing, device and storage medium
CN107832221A (en) * 2017-11-15 2018-03-23 杭州安恒信息技术有限公司 Platform semi-automation function test method, apparatus and system based on Burpsuit plug-in units
CN110297754A (en) * 2018-03-23 2019-10-01 优信拍(北京)信息科技有限公司 A kind of test information feedback method and system
CN109299002A (en) * 2018-08-24 2019-02-01 平安科技(深圳)有限公司 Generation method, computer readable storage medium and the terminal device of test report
CN110516144A (en) * 2019-07-05 2019-11-29 中国平安财产保险股份有限公司 A kind of method and device, computer equipment and storage medium for preventing message from accidentally sending out

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7236889B2 (en) * 2002-03-06 2007-06-26 Shimadzu Corporation Method of examining foreign matter derived from living body
CN103514092A (en) * 2012-06-29 2014-01-15 日立(中国)研究开发有限公司 Method for automatic testing of software system of ATM
CN105389259A (en) * 2015-12-11 2016-03-09 广州华多网络科技有限公司 Method, apparatus and system for performing application testing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7236889B2 (en) * 2002-03-06 2007-06-26 Shimadzu Corporation Method of examining foreign matter derived from living body
CN103514092A (en) * 2012-06-29 2014-01-15 日立(中国)研究开发有限公司 Method for automatic testing of software system of ATM
CN105389259A (en) * 2015-12-11 2016-03-09 广州华多网络科技有限公司 Method, apparatus and system for performing application testing

Also Published As

Publication number Publication date
CN106649126A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN106649126B (en) Method and device for testing application program
CN108959000B (en) Server pressure testing method, system and terminal
CN107094294B (en) Network connection method and device
CN105320598B (en) Method for testing software and device
CN106708676B (en) Interface test method and device
CN107204964B (en) Authority management method, device and system
CN108268366B (en) Test case execution method and device
CN104852885B (en) Method, device and system for verifying verification code
CN105429775B (en) Method and device for reporting log
CN106371964B (en) Method and device for prompting message
CN107329901B (en) Data packet capturing method, terminal, server and storage medium
CN107465841B (en) Fault information reporting method and terminal
CN105389259B (en) A kind of method, apparatus and system for carrying out Application testing
CN109088844B (en) Information interception method, terminal, server and system
CN109753425B (en) Popup window processing method and device
CN108073495B (en) Method and device for positioning crash reason of application program
CN105610878B (en) Directory uploading method, data publishing method, terminal and server
CN106776301B (en) Subelement testing method and device
CN109451130B (en) Mobile terminal testing method and device, mobile terminal and storage medium
CN112749074B (en) Test case recommending method and device
CN106997425B (en) Method, device and system for displaying physiological state information
CN110069407B (en) Function test method and device for application program
CN115174418A (en) Communication environment safety early warning method and device, electronic equipment and storage medium
CN106709330B (en) Method and device for recording file execution behaviors
CN107341398B (en) Program evaluation 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
CB02 Change of applicant information

Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17

Applicant after: Guangzhou KuGou Networks Co., Ltd.

Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Applicant before: Guangzhou KuGou Networks Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant