CN107979820A - A kind of method and device, equipment for testing PUSH message - Google Patents
A kind of method and device, equipment for testing PUSH message Download PDFInfo
- Publication number
- CN107979820A CN107979820A CN201610941592.6A CN201610941592A CN107979820A CN 107979820 A CN107979820 A CN 107979820A CN 201610941592 A CN201610941592 A CN 201610941592A CN 107979820 A CN107979820 A CN 107979820A
- Authority
- CN
- China
- Prior art keywords
- message
- push message
- push
- heartbeat
- information
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/08—Testing, supervising or monitoring using real traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/10—Scheduling measurement reports ; Arrangements for measurement reports
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a kind of method for testing PUSH message, wherein, the described method includes:Whether detection terminal receives PUSH message;If detect that terminal receives PUSH message, parse the PUSH message, the attribute information of the PUSH message is obtained, the attribute information of the PUSH message includes at least identification information, message header and the message content of the corresponding tested application of the PUSH message;Identification information, message header and the message content of the tested application are packed according to default form, obtain heartbeat message;The heartbeat message is sent to server;Judge whether the heartbeat message sends success;If the heartbeat message is not sent successfully, the heartbeat message is stored in local.The present invention also discloses a kind of device for testing PUSH message, equipment.
Description
Technical field
The present invention relates to the measuring technology to terminal, more particularly to a kind of method and device, equipment for testing PUSH message.
Background technology
Most important operation means are runed as mobile terminal application program (APP, Application, are referred to as applied) product,
Message push (Message Push) is paid attention to by more and more application vendors.Message push is following to having using operation
Material impact, 1) product liveness can be improved, active users are using the basic of existence, have user to be brought to product
Value;Message push is to obtain user to pay special attention to, and opens the excellent approach that application activating uses.2) user's viscosity is increased;
" viscosity " is to weigh the important indicator of consumer loyalty degree, and message push can improve subscriber usage, consumer loyalty degree;3) doing
During user's operation, wake-up is sunk into sleep user, is kept and is lost in user, message push for improve user's retention ratio be all have it is important
Meaning, suitable message push can effectively wake up the user that this part is sunk into sleep.
From the above, it can be seen that message push is using the top quality channel of operation, using properly can help product to transport
Battalion personnel more efficiently realize operation target, and blindly push will also bring reaction certainly;Such as blindly push can make user
Into bothering, so as to cause unloading;If push is excessive, user can be caused to become numb to PUSH message, end user can be to production
Product confidence losing.
Using in operation or before operation, Test Engineer needs the message push to application to test, in the prior art,
For the bag of daily record of the PUSH message test compiling with PUSH message, tester obtains to push in test equipment to disappear developer
The daily record of breath and the interface data of PUSH message in background application server, then carry out automation pair by daily record and interface data
Than so that the test of completion message push.The shortcomings that prior art is, 1) tester is needed from each test equipment
Daily record is transferred, in general the quantity of test equipment is fewer, and a certain number of test equipments could represent common situation, i.e., one
Platform test equipment can not represent overall condition;Further, since it is artificial acquisition daily record in the prior art, then test equipment can not
Too many quantity can be set;2) test environment has certain gap with actual operating environment, and the method for the prior art is only used for surveying
Test ring border and be not used to actual operating environment;3), it is necessary to which developer's recompility band push disappears after application more new version
The bag of the daily record of breath;4) either in background server in software upgrading or daily record after protocol data change, contrast algorithm needs
Again to be adapted to;If 5) test equipment is in offline, leakage hair message can not determine basic reason.
The content of the invention
In view of this, the embodiment of the present invention is solves the problems, such as existing in the prior art at least one to provide a kind of test
Method and device, the equipment of PUSH message, PUSH message can be parsed by real-time triggering mode and is reported to parsing data
Test server, monitors so as to fulfill to the various dimensions of PUSH message.
What the technical solution of the embodiment of the present invention was realized in:
In a first aspect, the embodiment of the present invention provides a kind of method for testing PUSH message, the described method includes:
Whether detection terminal receives PUSH message, described to promote message as the tested application in the terminal
The message for being used to be shown in notification bar that is sent to the tested application of server;
If detecting that terminal receives PUSH message, the PUSH message is parsed, obtains the attribute of the PUSH message
Information, the attribute information of the PUSH message include at least the identification information of the corresponding tested application of the PUSH message, disappear
Cease title and message content;
Identification information, message header and the message content of the tested application are packed according to default form, obtained
Heartbeat message;
The heartbeat message is sent to server;
Judge whether the heartbeat message sends success;
If the heartbeat message is not sent successfully, the heartbeat message is stored in local.
Second aspect, the embodiment of the present invention provide a kind of method for testing PUSH message, the described method includes:
The heartbeat message that receiving terminal is sent;
The heartbeat message is parsed, obtains the attribute information of the corresponding PUSH message of the heartbeat message, it is described to push away
The attribute information of message is sent to include at least identification information, message header and the message of the corresponding tested application of the PUSH message
Content;
The quilt is obtained from the server of the corresponding tested application according to the identification information of the tested application
The daily record for the PUSH message that the server of test application is sent;
The daily record is inquired about according to the message header of the PUSH message and message content, obtains the second query result;
The reception state of the PUSH message is determined according to second query result.
The third aspect, the embodiment of the present invention provide a kind of device for testing PUSH message, and described device includes:First detection
Unit, the first resolution unit, packaged unit, the first transmitting element, the first judging unit and storage unit, wherein:
Whether the first detection unit, PUSH message is received for detection terminal, the promotion message be installed in
The message for being used to be shown in notification bar that the server of tested application in the terminal is sent to the tested application;
The packaged unit, if for detecting that terminal receives PUSH message, parses the PUSH message, obtains institute
The attribute information of PUSH message is stated, the attribute information of the PUSH message includes at least corresponding be tested of the PUSH message should
Identification information, message header and message content;
The packaged unit, for by identification information, message header and the message content of the tested application according to pre-
If form packing, obtain heartbeat message;
First transmitting element, for the heartbeat message to be sent to server;
First judging unit, for judging whether the heartbeat message sends success;
The storage unit, if do not sent successfully for the heartbeat message, this is stored in by the heartbeat message
Ground.
Fourth aspect, the embodiment of the present invention provide a kind of device for testing PUSH message, and described device includes:First receives
Unit, the second resolution unit, first acquisition unit, the first query unit and the second determination unit, wherein
First receiving unit, the heartbeat message sent for receiving terminal;
Second resolution unit, for parsing the heartbeat message, obtains the corresponding push of the heartbeat message
The attribute information of message, the attribute information of the PUSH message include at least the mark of the corresponding tested application of the PUSH message
Know information, message header and message content;
The first acquisition unit, should from corresponding described be tested for the identification information according to the tested application
The daily record for the PUSH message that the server that server obtains the tested application is sent;
First query unit, the day is inquired about for the message header according to the PUSH message and message content
Will, obtains the second query result;
Second determination unit, for determining the reception state of the PUSH message according to second query result.
5th aspect, the embodiment of the present invention provide a kind of terminal, and the terminal includes first processor and the first outside is logical
Interface is believed, wherein the first processor is used for:
Whether detection terminal receives PUSH message, described to promote message as the tested application in the terminal
The message for being used to be shown in notification bar that is sent to the tested application of server;
If detecting that terminal receives PUSH message, the PUSH message is parsed, obtains the attribute of the PUSH message
Information, the attribute information of the PUSH message include at least the identification information of the corresponding tested application of the PUSH message, disappear
Cease title and message content;
Identification information, message header and the message content of the tested application are packed according to default form, obtained
Heartbeat message;
The heartbeat message is sent to by server by first external communication interface;
Judge whether the heartbeat message sends success;
If the heartbeat message is not sent successfully, the heartbeat message is stored in local.
6th aspect, the embodiment of the present invention provide a kind of server, and the server is included outside second processor and second
Portion's communication interface, wherein the second processor is used for:
The heartbeat message sent by the second external communication interface receiving terminal;
The heartbeat message is parsed, obtains the attribute information of the corresponding PUSH message of the heartbeat message, it is described to push away
The attribute information of message is sent to include at least identification information, message header and the message of the corresponding tested application of the PUSH message
Content;
The quilt is obtained from the server of the corresponding tested application according to the identification information of the tested application
The daily record for the PUSH message that the server of test application is sent;
The daily record is inquired about according to the message header of the PUSH message and message content, obtains the second query result;
The reception state of the PUSH message is determined according to second query result.
The embodiment of the present invention provides a kind of method and device, equipment for testing PUSH message, wherein, whether detection terminal connects
Receive PUSH message;If detecting that terminal receives PUSH message, the PUSH message is parsed, obtains the PUSH message
Attribute information, the attribute information of the PUSH message include at least the mark letter of the corresponding tested application of the PUSH message
Breath, message header and message content;By identification information, message header and the message content of the tested application according to default
Form is packed, and obtains heartbeat message;The heartbeat message is sent to server;Judge whether the heartbeat message sends into
Work(;If the heartbeat message is not sent successfully, the heartbeat message is stored in local;It so, it is possible by touching in real time
Originating party formula parses PUSH message and parsing data is reported to test server, is supervised so as to fulfill to the various dimensions of PUSH message.
Brief description of the drawings
Fig. 1 realizes flow diagram one for the method for test PUSH message of the embodiment of the present invention;
Fig. 2 realizes flow diagram two for the method for test PUSH message of the embodiment of the present invention;
Fig. 3-1 is the system architecture schematic diagram of the embodiment of the present invention;
Fig. 3-2 realizes schematic diagram three for the method for test PUSH message of the embodiment of the present invention;
Fig. 3-3 intercepts to apply for the embodiment of the present invention realizes flow diagram in end side;
Fig. 3-4 realizes flow diagram for the long connecting detection of the embodiment of the present invention;
Fig. 4 realizes flow diagram for test device of the embodiment of the present invention;
Fig. 5 is the composition structure diagram that the embodiment of the present invention tests system;
Fig. 6 is the composition structure diagram of computing device of the embodiment of the present invention.
Embodiment
Embodiment for a better understanding of the present invention, first introduces two technical terms below:
PUSH message (Push Message):The background server of application is sent to mobile terminal, and in the notice of mobile terminal
A kind of message that column is shown;In general, the PUSH message of application has the characteristics that following:1) amount is big;2) precisely, push disappears
The audient of breath has been the user for downloading installation and using application, is the targeted customer that message push is most wanted to influence, compares
Under other media channel then need layering to get to targeted customer;3rd, free, the initiative of message push rests in
In manufacturer oneself hand, as long as according to operating system such as (Android operation system (Android), Apple Macintosh operating system (iOS))
Protocol rule goes push without spending any expense.
Precision is tested:Technical solution provided in an embodiment of the present invention, (can be user by monitoring multiple mobile terminals
Terminal can also be test terminal) PUSH message obtain daily record, then by daily record and the note of the PUSH message of server background
Record is compared, and quantifies test index according to comparative result, such as number, message leakage receipts/delay/weight are received in equipment on-line/disconnection/leakage
Plural and long connection status;And by quantifying test index quick positioning question.
The technical solution of the present invention is further elaborated with specific embodiment below in conjunction with the accompanying drawings.
In order to solve the technical problem in aforementioned background art, the embodiment of the present invention provides a kind of side for testing PUSH message
Method, this method are applied to terminal, and the function that this method is realized can be by the processor caller code in terminal come real
Existing, certain program code can be stored in computer-readable storage medium, it is seen then that the terminal includes at least processor and storage is situated between
Matter.Wherein, the terminal can be that various types of electronics with information processing capability are set during specific embodiment
It is standby, for example, the electronic equipment can include mobile phone, tablet computer, desktop computer, personal digital assistant, navigator, digital telephone,
Visual telephone, television set etc..
Fig. 1 realizes flow diagram for the method for test PUSH message of the embodiment of the present invention, as shown in Figure 1, this method
Including:
Whether step S101, detection terminal receive PUSH message;
Here, it is described to promote message to described be tested for the server of the tested application in the terminal
With the message for being used to be shown in notification bar of transmission;
Step S102, if detecting that terminal receives PUSH message, parses the PUSH message, obtains the push and disappears
The attribute information of breath;
Here, the attribute information of the PUSH message includes at least the mark of the corresponding tested application of the PUSH message
Information, message header and message content;
Step S103, by identification information, message header and the message content of the tested application according to default form
Packing, obtains heartbeat message;
Here, the default form is the receptible server of server institute that heartbeat message can be received by backstage.
Step S104, test server is sent to by the heartbeat message;
Step S105, judges whether the heartbeat message sends success;
Step S106, if the heartbeat message is not sent successfully, local is stored in by the heartbeat message.
In other embodiments of the invention, the method further includes:
If the heartbeat message is sent successfully, by the first flag information of the corresponding PUSH message of the heartbeat message
Described in write-in in transmission list.
In other embodiments of the invention, the described method includes:Whether the network connection for detecting the terminal is normal;Such as
The network connection of terminal described in fruit is normal, sends periodically or aperiodically and is stored in local heartbeat message.
In other embodiments of the invention, the method further includes:After the starting up of terminal, control itself to be in and open
Dynamic state;If the network connection of the terminal is normal, the status information of the terminal is determined, the status information of terminal includes should
With version, network type, unit type, the identification information of equipment, the media access control address of equipment, network connection state;
The status information of the terminal is sent to server.
In the embodiment of the present invention, whether detection terminal receives PUSH message;If detect that terminal receives push and disappears
Breath, parses the PUSH message, obtains the attribute information of the PUSH message, the attribute information of the PUSH message includes at least
Identification information, message header and the message content of the corresponding tested application of the PUSH message;By the tested application
Identification information, message header and message content are packed according to default form, obtain heartbeat message;The heartbeat message is sent
To server;Judge whether the heartbeat message sends success;If the heartbeat message is not sent successfully, by the heartbeat
Message is stored in local;It so, it is possible to parse PUSH message by real-time triggering mode and be reported to test to take parsing data
Business device, is supervised so as to fulfill to the various dimensions of PUSH message.
Based on foregoing embodiment, the embodiment of the present invention provides a kind of method for testing PUSH message, and this method is applied to
Test system, which includes the server of terminal, test server and tested application, it is necessary to which explanation, foregoing
Embodiment shown in Fig. 1 can be installed in terminal in the form of application, it is assumed that the application is referred to as intercepting application.Fig. 2 is
The method of test PUSH message of the embodiment of the present invention realizes flow diagram two, as shown in Fig. 2, this method includes:
Step S200, the server for being tested application send PUSH message to terminal;
Step S201, intercepting using whether detection terminal receives PUSH message in terminal;
Here, it is described to promote message to described be tested for the server of the tested application in the terminal
With the message for being used to be shown in notification bar of transmission;
Step S202, if detecting that terminal receives PUSH message, intercepts PUSH message described in analytic application, obtains institute
State the attribute information of PUSH message;
Here, the attribute information of the PUSH message includes at least the mark of the corresponding tested application of the PUSH message
Information, message header and message content;
Step S203, intercepts and judges that the PUSH message is corresponding using according to the first flag information of the PUSH message
Whether heartbeat message is transmitted across;When being, S201 is entered step;Conversely, enter step S204;
Here, the first flag information is the identification information that the operating system of terminal is the mark of the PUSH message;
If the heartbeat message is transmitted across, whether detection terminal receives PUSH message again;If the heartbeat message is not
It is transmitted across, enters step S204.
Here, the first flag information according to the PUSH message judges the corresponding heartbeat message of the PUSH message
Whether it is transmitted across, including:According to the default transmission list of the first flag information inquiry of the PUSH message, first is obtained
Query result;The transmission list includes the first flag information of the PUSH message sent;If the first inquiry knot
Fruit shows the first flag information of the PUSH message in the transmission list, it is determined that the corresponding heart of the PUSH message
Message is jumped to be transmitted across;If first query result shows that the first flag information of the PUSH message has not been sent out described
Send in list, it is determined that the corresponding heartbeat message of the PUSH message is not transmitted across.
Step S204, intercepts and applies identification information, message header and the message content of the tested application according to pre-
If form packing, obtain heartbeat message;
Here, the default form is the receptible server of server institute that heartbeat message can be received by backstage.
Step S205, intercepts and is sent to test server using by the heartbeat message;
Step S206, intercepts application and judges whether the heartbeat message sends success;
Step S207, if the heartbeat message is not sent successfully, local is stored in by the heartbeat message.
Step S208, the heartbeat message that test server receiving terminal is sent;
Step S209, test server parse the heartbeat message, obtain the corresponding push of the heartbeat message and disappear
The attribute information of breath;
Here, the attribute information of the PUSH message includes at least the mark of the corresponding tested application of the PUSH message
Information, message header and message content;
Step S210, test server is according to the identification information of the tested application from the corresponding tested application
Server obtain the daily record of the PUSH message that the server of the tested application is sent;
Step S211, test server inquire about the daily record according to the message header and message content of the PUSH message,
Obtain the second query result;
Step S212, test server determine the reception state of the PUSH message according to second query result.
A kind of mode how realized heartbeat message and be retransmitted is provided in foregoing step, the repeating transmission of heartbeat message can also
Realized in test server side, such as the first flag information or second of the PUSH message is further included in the heartbeat message
Identification information, the first flag information are the identification information that the operating system of terminal is the mark of the PUSH message;It is described
Second identifier information is the identification information that the server of the tested application is the PUSH message mark;The method is also wrapped
Include:
Step S213, judges the PUSH message according to the first flag information of the PUSH message or second identifier information
Whether corresponding heartbeat message was received;
Step S214, if the heartbeat message was received, abandons the heartbeat message again;
Step S215, if the heartbeat message was not received, enters step S210.
During realization, the first flag information or second identifier information according to the PUSH message judges institute
State whether the corresponding heartbeat message of PUSH message was received, including:According to the first flag information of the PUSH message or
Two identification information-enquiries are default to have received list, obtains the 3rd query result;It is described received list include received push away
Send the first flag information or second identifier information of message;If the 3rd query result shows the first of the PUSH message
Identification information or second identifier information have received list described, it is determined that the corresponding heartbeat message of the PUSH message is connect
Received;If the 3rd query result show the PUSH message first flag information or second identifier information not described
Receive in list, it is determined that the corresponding heartbeat message of the PUSH message was not received.
Here, the reception state include being properly received, wrong sending, omission sending, repeating transmission and the delay index such as duration, wherein right
In being properly received (normal) and mistaking using following determination mode, i.e., described test server is according to second query result
Determine the reception state of the PUSH message, including:
Step S131A, if second query result shows record in the daily record and the message header and disappears
Content matching is ceased, it is normal that test server determines that the PUSH message receives;
Step S132A, if second query result shows the message header and the message content not described
In record in daily record, test server determines the PUSH message to mistake.
Delay duration can be realized by the way of following wherein in the present embodiment, the attribute information of the PUSH message
The first time stamp and second identifier information for receiving the PUSH message are further included, the first time stamp, which is used to characterize, receives institute
The timestamp of PUSH message is stated, the second identifier information is that the server of the tested application is the PUSH message mark
Identification information;The test server determines the reception state of the PUSH message according to second query result, also wraps
Include:
The attribute information write-in of the PUSH message has been received list by step S131B, test server;
Step S132B, test server obtain and have received list, and described received at least further includes what is received in list
The first time stamp and second identifier information of PUSH message,;
Step S133B, test server obtain the daily record, and the second of the PUSH message is included at least in the daily record
Timestamp and second identifier information, second timestamp are the timestamp for sending the PUSH message;
Step S134B, test server according to the second identifier information it is more described received in list first when
Between stamp and the second timestamp, obtain the delay duration of the PUSH message.
Leakage hair can realize that the method further includes by the way of following wherein in the present embodiment:
Step S131C, obtains the reception list in the range of default first time;
Step S132C, the second time range is determined according to the first time scope and preset rules;
Step S133C, obtains the daily record in second time range;
Step S134C, compares the list of reception in the range of the first time and in second time range
Daily record, determine PUSH message set, the PUSH message collection is combined into the daily record in second time range not by institute
State the set of the PUSH message for having received list covering in the range of first time;
Step S135C, determines corresponding 3rd time range of the PUSH message set, the 3rd time range is institute
The first time for stating the PUSH message in PUSH message set stabs formed time range;
Step S136C, determines the network connection state of the terminal in the 3rd time range;
Step S137C, if the network connection state is normal, it is determined that the push in the PUSH message set disappears
The reception state of breath is sent out for leakage.
Tester can not deeply quantify test, it is necessary to one for the PUSH message testing requirement of mobile terminal in the prior art
Kind of simulation manually receives PUSH message, and then whether tester detects the function of PUSH message by the instrument of test.In addition,
Investigate for PUSH message quality monitoring problem on line, only push away from reporting platform big data can not analyze terminal and do not receive from the background
The concrete reason of message is sent, it is necessary to a kind of monitoring analysis instrument using terminal PUSH message as starting point.Based on this, the present invention is real
A kind of application of intercepting as monitoring analysis instrument will be provided by applying example, will be with Android operation system (Android) in the present embodiment
Exemplified by illustrate, will be to the NotificationListenerService of Android operation system (notices referring to shown in Fig. 3-1
Intercept business, NLService) transformed, so as to fulfill an independent application (intercepting application assuming that being named as), this is intercepted
Using can be installed in the terminal of user or in test equipment;After installation is complete, this, which intercepts application, can intercept installation
Associated application in terminal, for example, one is intercepted to apply and can intercept more than one application at the same time (assuming that being named as
Tested application);Tested application is received when being provided with the terminal 13 (including test equipment and terminal of user) of intercepting application
The PUSH message that pushes of server 12 after, intercept analytic application PUSH message in terminal 13, and by trigger in real time with it is fixed
When device combination with heartbeat message be reported to backstage test server 11 (be used for realization the computing device of the present embodiment, can
Be tested application server or with the computing device of the server independence of tested application), then test clothes
Business device 11 is real-time by heartbeat message and the interface data on backstage (server 12 of tested application sends the record of PUSH message)
Contrast is rolled, generates comparing result;Then PUSH message delay, leakage receipts and repetition etc. are calculated according to comparing result, in addition, dimension
Hold the heartbeat of test server and all terminals, care testing device online whether and the process of tested application, long connection
State.
Global design and the realization principle of the embodiment of the present invention are first introduced, is mainly included the following steps that:Step a) is detectd
Listen and intercepted using by intercepting improved notice in application in business using after monitoring that notification bar receives PUSH message, intercepting
Monitoring data are reported to test server;Step b) test servers from the server of tested application it is asynchronous pull to have sent push away
Send the interface data (can be regarded as daily record) of message;Step c) test servers in real time/periodically by monitoring data and number of ports
According to being contrasted, comparing result is obtained;According to the PUSH message of comparing result calculating equipment under test collection is correct, leakage is received, repeats, mistake
The indexs such as hair, delay duration, so as to generate the test report of quantization, and then complete PUSH message contrast test.Fig. 3-2 is this hair
The method of bright embodiment test PUSH message realizes schematic diagram three, and as shown in figure 3-2, this method includes:
Step S321, the notification bar of terminal receive PUSH message;
Here, the terminal for being provided with tested application receives the PUSH message that the background server of tested application is sent,
Then, PUSH message is included the notification bar in terminal by terminal.
Step S322, notice intercept business and carry out adaptation checking treatment to PUSH message;
Here, due to intercepting using the PUSH message that can intercept multiple tested applications in terminal at the same time,
The form of the PUSH message of different tested applications is different, such as in general, the PUSH message of tested application includes disappearing
Title and content are ceased, wherein message content is varied, such as has plenty of word, has plenty of chained address, has plenty of picture;That
In order to enable the test server on backstage to identify, so needing to pre-process the PUSH message listened to, that is, it is adapted to
Checking treatment;This pretreatment includes the mark letter that the corresponding tested application of PUSH message is extracted from PUSH message first
Breath, the overall identification information (ID) of PUSH message, check information (such as MD5 (Message Digest Algorithm, message
Digest algorithm the 5th edition)), message header and message content, then will be from PUSH message in extraction according to predetermined form
Above- mentioned information is packaged as heartbeat message;
Step S323, judges whether reported before the PUSH messageIf so, enter step S324;If not,
Enter step S325;
Here, how to judge whether reported before PUSH message, be that comparison is crucial, because, if one pushed
Information reporting even repeatedly gives test server twice, and test server will be caused to will be considered that is the weight of tested application server
Recurrence is sent;So how to carry out judging whether to be transmitted across, generate extraction operation system for PUSH message in the present embodiment
Identification information (the first ID, i.e. Global ID), judges whether the PUSH message is reported according to the first flag information of PUSH message
Cross, specifically, record (i.e. transmission list) is reported before can inquiring about, this, which is reported, includes at least PUSH message in record
First flag information, or the first flag information of PUSH message with whether the correspondence relationship information of the label information reported,
The label information wherein whether reported includes the label information reported and the label information not reported, in the process of implementation
In, it can be represented using 0 and 1, Y and N represent, or yes/no etc. represents, the label that reported is represented for example with 0
Information, the label information not reported using 1 expression;For another example use 1 label information for representing to report, represented using 0 on not
The label information reported;The label information that and for example represents to report using Y, using N represent label information for not reporting etc..
Step S324, stops;
Here, if reported before, stop this report flow and return to step S321;
Step S325, reports;Subsequently into step S326;
Here, if do not reported before, the step S322 heartbeat messages generated are sent to test server side.
Here, before heartbeat message is sent, intercept using also need to judge the PUSH message whether before
Here, after above-mentioned step S321 to step S325 shows that intercepting application monitors that notification bar receives PUSH message,
Intercept and intercept business using by intercepting improved notice in application and report monitoring data to test server.
Step S326, judges whether to report success, if entering step S327, conversely, entering step S328;
Step S327, storage;
Here, if reporting unsuccessful, intercept using heartbeat message being stored;It should be noted that report not
The reason for success have it is very much, such as caused by end side suspension or clogged with messages or terminal hardware or software reason
Report failure.
Step S328, if reporting success, the test server (Python HupServer) on backstage receives heartbeat and disappears
Breath;
Here, the heartbeat message that test server receives includes two parts, and a part is that above-mentioned step S321 is extremely walked
What rapid S326 was reported, as soon as being to be pre-processed after receiving PUSH message the characteristics of this part, then it is reported to testing service
Device, it can be seen that, S321 to the step S326 heartbeat message reported is a real-time process (i.e. real-time report).In step S327
Real-time heart beat message can be stored when reporting unsuccessful, then in the case of conditions permit, intercept using can also be after
It is continuous to report heartbeat message to test server, in addition, end side can also shut down, suspension etc., then user starts shooting or joins again
During net, terminal may proceed to receive PUSH message, then intercepts and applies and can be located the PUSH message during shutdown, suspension in advance
Reason, then packing generates heartbeat message, by the description above it is recognised that the heartbeat message of this part is actually not real-time
, it is this in the present embodiment it is non real-time report process to be referred to as timing to report, and the heartbeat message that reports of timing includes
Step S327 is stored and terminal is in suspension, the heartbeat message of shutdown period.
Step S329, test server store the heartbeat message received to database;
Step S330, test server is asynchronous from the server of tested application to pull the interface for having pushed PUSH message
Data (can be regarded as daily record);
Step S331;Test server in real time/periodically monitoring data and interface data are contrasted, obtain contrast tie
Fruit;
Step S332;According to comparing result calculate equipment under test collection PUSH message it is correct, leakage is received, repeat, mistake, be delayed
The indexs such as duration, so as to generate the test report of quantization, and then complete PUSH message contrast test.
The transformation for intercepting business (NLService) in the present embodiment to notice, Android operation system is described below
(Android) (i.e. (Application Programming Interface, application programming connect API in 4.3 version
Mouthful) 18) add notice and intercept business, according to retouching for Software Development Kit (SDK, Software Development Kit)
State software developer (Android Developer) it is recognised that when system receive new notice or notice be deleted when, meeting
Trigger notice intercepts the callback method of business;Extra lead to is increased newly in the edition 4 .4 of Android operation system Android at the same time
Know (Notification.extras) field, that is to say, that business can be intercepted using notice and obtains notifications specifying information.
For notifications, third-party application (the tested application i.e. in the present embodiment) using notice intercept business main purpose be for
The relevant information of notifications is obtained, wherein mainly include:The newly-increased and deletion of notice, obtain current notifications quantity, notice
Content correlated information etc.;In addition, it will be understood by those of skill in the art that the information of these notifications can be detectd by notice
The method and status bar for listening service class offer notify (StatusBarNotification) class object to obtain.
Why need to intercept business to the notice in Android operation system in the present embodiment and transformReason include with
Under several aspects:1) notice of Android operation system intercepts business and only passively triggers one message object of generation, but network is trembled
The dynamic, particularity of manufacturer's read-only storage (ROM), mobile phone dormancy etc. cause to notify that intercepting business is reported to pushing away for test server
Send message data can not ensure that 100% is correct.2) notice of Android operation system intercepts business without unified messaging protocol, can not
Docked with background protocol data seamless and complete contrast test.3) notice only according to Android operation system is intercepted business and can not be managed
Offline/online and long connection status of reason test terminal device, can not investigate problem.
Fig. 3-3 intercepts to apply for the embodiment of the present invention realizes flow diagram in end side, as shown in Fig. 3-3, the stream
Journey includes:
Step S341, notice intercept the long connection status and heartbeat message of the tested application of business detection;
Here, notice intercepts push process existing state and long connecting detection of the business to tested application, the present embodiment
In long connecting detection may refer to Fig. 3-4;Maintain notice to intercept the heartbeat message of business itself at the same time, periodically report tested set
Standby status information:Wherein, the status information of terminal includes application version, network type, unit type, the identification information of equipment
(ID), media access control (MAC, Media Access Control) address of equipment etc..
Here, long connection is precisely to create and keep between a client and a server reliable and stable connection.Reach
To this effect, it is necessary to which the program of client and server coordinates to complete jointly.Common practice is, in the program of server
One endless loop of middle addition, the in the circulating cycle variation of monitoring data.When finding new data, browser is outputed it to immediately simultaneously
Disconnect, browser initiates request so that into next cycle, here it is the long poll often said again after data are received
(long-polling) mode.
Step S342, notice intercept business and wake up lock (WakeLock) and Wireless Fidelity lock (WifiLock) by holding,
So as to ensure terminal will not screen locking NLService, with into dormancy.
Here, it is necessary to which explanation, due to needing to monitor PUSH message, is in so must ensure to intercept in end side to apply
Operating status, wherein operating status include front stage operation (being active) and running background, and not so intercepting application will not
Meeting work, if work will be kept by intercepting application, then this, which is intercepted, applies and cannot be killed by terminal (kill).In the present embodiment
In, intercept and do not killed using by holding wake-up lock and Wireless Fidelity lock to ensure to intercept to apply by terminal.
Step S343, after PUSH message enters notification bar, passes through the improved message parser solution for notifying to intercept business
Analyse and triggering is reported to test server (real-time task) in real time, ensure to report accuracy in combination with timed task compensation mechanism
(timed task);
Here, the PUSH message that will be received for different tested applications, different vendor's rom version, message parser
Adaptation processing is carried out according to backstage log protocol interface.
Step S344, intercepts the real-time task in application and timed task passes through business and broadcast recipients (Service+
BroadCastReceiver test server) is uploaded to.
The technical solution provided from above example can be seen that the present embodiment and notify that intercepting business carries based on improved
For suitable for multiple push function test scenes:Such as the optimization to backstage PUSH message, the present embodiment push away the message of terminal
Pass through journey and done the reconstruct improved so as to terminal message push frame, technical method provided in an embodiment of the present invention can continue
Property test PUSH message with realize it is round-the-clock monitoring etc., so greatly reduce by hand contrast PUSH message human cost;
This programme provides various dimensions index:Equipment on-line rate, information receiving and transmitting rate, long connection on-line/off-line/reconnection rate etc., can be quick
Assist developer's positioning, solve the problems, such as and help to test classmate accurately to complete regression test.The present embodiment can perform more at the same time
The push test of application, without specific environment, can by Universal Serial Bus (Universal Serial Bus, USB), refer to
Determine the modes such as installation kit and quickly access terminal, real-time testing data display.
Based on foregoing embodiment, the embodiment of the present invention provides a kind of test system, and Fig. 4 is test dress of the embodiment of the present invention
That puts realizes flow diagram, as shown in figure 4, the test device includes the device (first device) of the first test PUSH message
410 and second test PUSH message device (second device) 420, it is described first test PUSH message device 410 include:The
One detection unit 411, the first resolution unit 412, packaged unit 413, the first transmitting element 414, the first judging unit 415 and deposit
Storage unit 416, wherein the device 420 of the second test PUSH message includes:First receiving unit 421, the second resolution unit 422,
First acquisition unit 423, the first query unit 424 and the second determination unit 425, wherein:
Whether the first detection unit 411, receive PUSH message, the promotion message is installation for detection terminal
The message for being used to be shown in notification bar that the server of tested application in the terminal is sent to the tested application;
The packaged unit 412, if for detecting that terminal receives PUSH message, parses the PUSH message, obtains
It is corresponding tested including at least the PUSH message to the attribute information of the PUSH message, the attribute information of the PUSH message
Try identification information, message header and the message content of application;
The packaged unit 413, for by identification information, message header and the message content of the tested application according to
Default form packing, obtains heartbeat message;
First transmitting element 414, for the heartbeat message to be sent to server;
First judging unit 415, for judging whether the heartbeat message sends success;
The storage unit 416, if do not sent successfully for the heartbeat message, the heartbeat message is stored in
It is local.
First receiving unit 421, the heartbeat message sent for receiving terminal;
Second resolution unit 422, for parsing the heartbeat message, obtains that the heartbeat message is corresponding described to be pushed away
The attribute information of message is sent, the attribute information of the PUSH message includes at least the corresponding tested application of the PUSH message
Identification information, message header and message content;
The first acquisition unit 423, for the identification information according to the tested application from corresponding described tested
The daily record for the PUSH message that the server that the server of examination application obtains the tested application is sent;
First query unit 424, for described in the message header according to the PUSH message and message content inquiry
Daily record, obtains the second query result;
Second determination unit 425, for determining the reception shape of the PUSH message according to second query result
State.
In other embodiments of the invention, the attribute information of the PUSH message further includes the first of the PUSH message
Identification information, the first device further include:Second judging unit, sentences for the first flag information according to the PUSH message
Whether the corresponding heartbeat message of the PUSH message that breaks is transmitted across;The first flag information is that the operating system of terminal is institute
State the identification information of the mark of PUSH message;If the heartbeat message is transmitted across, the first detection unit inspection is triggered
Survey whether terminal receives PUSH message;If the heartbeat message is not transmitted across, the packaged unit is triggered by the quilt
Identification information, message header and the message content of test application are packed according to default form, obtain heartbeat message.
In other embodiments of the invention, second judging unit, is used for:According to the first of the PUSH message the mark
Know the default transmission list of information inquiry, obtain the first query result;The push that the transmission list includes having sent disappears
The first flag information of breath;If first query result shows that the first flag information of the PUSH message has been sent out described
Send in list, it is determined that the corresponding heartbeat message of the PUSH message is transmitted across;If first query result shows institute
The first flag information of PUSH message is stated not in the transmission list, it is determined that the corresponding heartbeat message of the PUSH message
It is not transmitted across.
In other embodiments of the invention, the first device further includes the first writing unit, if for the heart
Jump message is sent successfully, by the first flag information of the corresponding PUSH message of the heartbeat message write described in transmission list
In.
In other embodiments of the invention, the first device includes second detection unit and the second transmitting element, its
In
Whether the second detection unit, the network connection for detecting the terminal are normal;
Second transmitting element, if the network connection for the terminal is normal, periodically or aperiodically
Transmission is stored in local heartbeat message.
In other embodiments of the invention, the first device further includes:Control unit, the first determination unit and the 3rd
Transmitting element, wherein
Described control unit, for when the starting up of terminal after, controlling and itself being in starting state;
First determination unit, if the network connection for the terminal is normal, determines the state letter of the terminal
Breath, the status information of terminal include the media interviews of application version, network type, unit type, the identification information of equipment, equipment
Control address, network connection state;
3rd transmitting element, for sending the status information of the terminal to server.
In other embodiments of the invention, second determination unit includes the first determining module and the second definite mould
Block, wherein:
First determining module, if showing that the record in the daily record disappears with described for second query result
Title and message content matching are ceased, it is normal to determine that the PUSH message receives;
Second determining module, if shown for second query result in the message header and the message
Hold in the not record in the daily record, determine the PUSH message to mistake.
In other embodiments of the invention, the first flag information of the PUSH message is further included in the heartbeat message
Or second identifier information, the first flag information are the identification letter that the operating system of terminal is the mark of the PUSH message
Breath;The second identifier information is the identification information that the server of the tested application is the PUSH message mark;It is described
Second device further includes the 3rd judging unit, discarding unit and second acquisition unit, wherein:
3rd judging unit, judges for the first flag information according to the PUSH message or second identifier information
Whether the corresponding heartbeat message of the PUSH message was received;
The discarding unit, if be received for the heartbeat message, abandons the heartbeat message again;
The second acquisition unit, if be not received for the heartbeat message, according to the tested application
The push that identification information obtains the server transmission of the tested application from the server of the corresponding tested application disappears
The daily record of breath.
Here, the 3rd judging unit, for being believed according to the first flag information or second identifier of the PUSH message
Breath inquiry is default to have received list, obtains the 3rd query result;The PUSH message for having received list and having included having received
First flag information or second identifier information;If the 3rd query result shows the first flag information of the PUSH message
Or second identifier information has received list described, it is determined that the corresponding heartbeat message of the PUSH message was received;Such as
3rd query result described in fruit shows that the first flag information of the PUSH message or second identifier information have not been received described
In list, it is determined that the corresponding heartbeat message of the PUSH message was not received.
In other embodiments of the invention, the attribute information of the PUSH message, which further includes, receives the PUSH message
Stamp and second identifier information at the first time, the first time stamp is used to characterize the timestamp for receiving the PUSH message, described
Second identifier information is the identification information that the server of the tested application is the PUSH message mark;The second device
The second writing unit, the 3rd acquiring unit, the 4th acquiring unit and the first comparing unit are further included, wherein
Second writing unit, for the attribute information write-in of the PUSH message have been received list;
3rd acquiring unit, list has been received for obtaining, it is described received at least to further include in list received
PUSH message first time stamp and second identifier information,;
4th acquiring unit, for obtaining the daily record, including at least the of the PUSH message in the daily record
Two timestamps and second identifier information, second timestamp are the timestamp for sending the PUSH message;
First comparing unit, for according to the second identifier information it is more described received in list first when
Between stamp and the second timestamp, obtain the delay duration of the PUSH message.
In other embodiments of the invention, the second device further includes the 5th acquiring unit, the 3rd determination unit,
Six acquiring units, the second comparing unit, the 4th determination unit, the 5th determination unit and the 6th determination unit, wherein:
5th acquiring unit, for obtaining the reception list in the range of default first time;
3rd determination unit, for determining the second time range according to the first time scope and preset rules;
6th acquiring unit, for obtaining the daily record in second time range;
Second comparing unit, for comparing the list of reception in the range of the first time and described second
Daily record in time range, determines PUSH message set, and the PUSH message collection is combined into the day in second time range
Not by the set of the PUSH message for having received list covering in the range of the first time in will;
4th determination unit, for determining corresponding 3rd time range of the PUSH message set, the described 3rd
The time range that time range is made of the first time stamp of the PUSH message in the PUSH message set;
5th determination unit, for determining the network connection state of the terminal in the 3rd time range;
6th determination unit, if being normal for the network connection state, it is determined that the PUSH message collection
The reception state of PUSH message in conjunction is sent out for leakage.
Each module included by each unit and each unit in first device provided in an embodiment of the present invention can be whole
First processor in end realizes that each module included by each unit and each unit in second device can test clothes
Second processor in business device is realized;Certainly can also be realized by specific logic circuit;During implementation, processor
Can be central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array
(FPGA) etc..
It need to be noted that be:The description of apparatus above embodiment, the description with above method embodiment be it is similar,
With the similar beneficial effect of same embodiment of the method, therefore do not repeat.For the skill not disclosed in apparatus of the present invention embodiment
Art details, refer to the description of the method for the present invention embodiment and understands, to save length, therefore repeat no more.
Based on foregoing embodiment, the embodiment of the present invention provides a kind of test system again, and Fig. 5 tests for the embodiment of the present invention
The composition structure diagram of system, as shown in figure 5, the test system includes terminal 510 and test server 520, wherein described
Terminal 510 includes 511 and first external communication interface 512 of first processor, wherein the first processor 511 is used for:Detection
Whether terminal receives PUSH message, and the server for promoting message as the tested application in the terminal is to institute
State the message for being used to be shown in notification bar that tested application is sent;If detecting that terminal receives PUSH message, institute is parsed
PUSH message is stated, obtains the attribute information of the PUSH message, the attribute information of the PUSH message includes at least the push
Identification information, message header and the message content of the corresponding tested application of message;By the identification information of the tested application,
Message header and message content are packed according to default form, obtain heartbeat message;Pass through first external communication interface 512
The heartbeat message is sent to server;Judge whether the heartbeat message sends success;If the heartbeat message not by
Send successfully, the heartbeat message is stored in local.
The server 520 includes 521 and second external communication interface 522 of second processor, wherein the second processing
Device 521 is used for:The heartbeat message sent by the second external communication interface receiving terminal;The heartbeat message is parsed, is obtained
To the attribute information of the corresponding PUSH message of the heartbeat message, the attribute information of the PUSH message is including at least described
Identification information, message header and the message content of the corresponding tested application of PUSH message;According to the mark of the tested application
Know the PUSH message that information obtains the server transmission of the tested application from the server of the corresponding tested application
Daily record;The daily record is inquired about according to the message header of the PUSH message and message content, obtains the second query result;According to
Second query result determines the reception state of the PUSH message.
During realization, test server and terminal can be realized by computing device, and Fig. 6 is real for the present invention
The composition structure diagram of a computing device is applied, as shown in fig. 6, the computing device 600 can include:At least one processor
601st, at least one communication bus 602, user interface 603, at least one external communication interface 604 and memory 605.Wherein,
Communication bus 602 is used for realization the connection communication between these components.Wherein, user interface 603 can include display screen and key
Disk.External communication interface 604 can optionally include the wireline interface and wave point of standard.
It need to be noted that be:The description of above apparatus embodiments item, is similar with above method description, is had same
The identical beneficial effect of embodiment of the method, therefore do not repeat.For the ins and outs not disclosed in present device embodiment,
Those skilled in the art refer to the description of the method for the present invention embodiment and understand, to save length, which is not described herein again.
It should be noted that in the embodiment of the present invention, if realized in the form of software function module in above-mentioned terminal
Or test PUSH message in test server method, and as independent production marketing or in use, can also store
In a computer read/write memory medium.Based on such understanding, the technical solution of the embodiment of the present invention substantially or
Say that the part to contribute to the prior art can be embodied in the form of software product, which is stored in
In one storage medium, including some instructions are used so that computer equipment (can be personal computer, server or
Person's network equipment etc.) perform all or part of each embodiment the method for the present invention.And foregoing storage medium includes:U
Disk, mobile hard disk, read-only storage (ROM, Read Only Memory), magnetic disc or CD etc. are various can be with storage program generation
The medium of code.Combined in this way, the embodiment of the present invention is not restricted to any specific hardware and software.
Correspondingly, the embodiment of the present invention provides a kind of computer-readable storage medium again, is stored in the computer-readable storage medium
There are computer executable instructions, which is used to perform in the embodiment of the present invention in terminal or testing service
The method of test PUSH message in device.
It is to be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text mean it is related with embodiment
A particular feature, structure, or characteristic is included at least one embodiment of the present invention.Therefore, occur everywhere in entire disclosure
" in one embodiment " or " in one embodiment " identical embodiment is not necessarily referred to.In addition, these specific feature, knots
Structure or characteristic can combine in one or more embodiments in any suitable manner.It is to be understood that in the various implementations of the present invention
In example, the size of the sequence number of above-mentioned each process is not meant to the priority of execution sequence, and the execution sequence of each process should be with its work(
It can be determined with internal logic, the implementation process without tackling the embodiment of the present invention forms any restriction.The embodiments of the present invention
Sequence number is for illustration only, does not represent the quality of embodiment.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements not only include those key elements, and
And other elements that are not explicitly listed are further included, or further include as this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Also there are other identical element in the process of key element, method, article or device.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can pass through it
Its mode is realized.Apparatus embodiments described above are only schematical, for example, the division of the unit, is only
A kind of division of logic function, can have other dividing mode, such as when actually realizing:Multiple units or component can combine, or
Another system is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed each composition portion
Point mutual coupling or direct-coupling or communication connection can be the INDIRECT COUPLINGs by some interfaces, equipment or unit
Or communication connection, can be electrical, mechanical or other forms.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, be shown as unit
The component shown can be or may not be physical location;Both a place can be located at, multiple network lists can also be distributed to
In member;Partly or entirely unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated into a processing unit, also may be used
To be each unit individually as a unit, can also two or more units integrate in a unit;It is above-mentioned
Integrated unit can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
The relevant hardware of programmed instruction is completed, and foregoing program can be stored in computer read/write memory medium, which exists
During execution, execution the step of including above method embodiment;And foregoing storage medium includes:Movable storage device, read-only deposit
Reservoir (Read Only Memory, ROM), magnetic disc or CD etc. are various can be with the medium of store program codes.
If alternatively, the above-mentioned integrated unit of the present invention is realized in the form of software function module and is used as independent product
Sale in use, can also be stored in a computer read/write memory medium.Based on such understanding, the present invention is implemented
The part that the technical solution of example substantially in other words contributes the prior art can be embodied in the form of software product,
The computer software product is stored in a storage medium, including some instructions are used so that computer equipment (can be with
It is personal computer, server or network equipment etc.) perform all or part of each embodiment the method for the present invention.
And foregoing storage medium includes:Movable storage device, ROM, magnetic disc or CD etc. are various can be with Jie of store program codes
Matter.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (17)
- A kind of 1. method for testing PUSH message, it is characterised in that the described method includes:Whether detection terminal receives PUSH message, the clothes for promoting message as the tested application in the terminal The message for being used to be shown in notification bar that business device is sent to the tested application;If detecting that terminal receives PUSH message, the PUSH message is parsed, obtains the attribute information of the PUSH message, The attribute information of the PUSH message includes at least identification information, the message header of the corresponding tested application of the PUSH message And message content;Identification information, message header and the message content of the tested application are packed according to default form, obtain heartbeat Message;The heartbeat message is sent to server;Judge whether the heartbeat message sends success;If the heartbeat message is not sent successfully, the heartbeat message is stored in local.
- 2. according to the method described in claim 1, it is characterized in that, the attribute information of the PUSH message further includes the push The first flag information of message, the method further include:Judge whether the corresponding heartbeat message of the PUSH message is transmitted across according to the first flag information of the PUSH message; The first flag information is the identification information that the operating system of terminal is the mark of the PUSH message;If the heartbeat message is transmitted across, whether detection terminal receives PUSH message again;If the heartbeat message is not transmitted across, by identification information, message header and the message content of the tested application Pack according to default form, obtain heartbeat message.
- 3. according to the method described in claim 2, it is characterized in that, the first flag information according to the PUSH message is sentenced Whether the corresponding heartbeat message of the PUSH message that breaks is transmitted across, including:According to the default transmission list of the first flag information inquiry of the PUSH message, the first query result is obtained;It is described Transmission list includes the first flag information of the PUSH message sent;If first query result shows the first flag information of the PUSH message in the transmission list, really Determine the corresponding heartbeat message of the PUSH message to be transmitted across;If first query result shows the of the PUSH message One identification information is not in the transmission list, it is determined that the corresponding heartbeat message of the PUSH message is not transmitted across.
- 4. method according to any one of claims 1 to 3, it is characterised in that the method further includes:If the heartbeat message is sent successfully, the first flag information of the corresponding PUSH message of the heartbeat message is write In the transmission list.
- 5. method according to any one of claims 1 to 3, it is characterised in that the described method includes:Whether the network connection for detecting the terminal is normal;If the network connection of the terminal is normal, sends periodically or aperiodically and be stored in local heartbeat message.
- 6. according to the method described in claim 5, it is characterized in that, the method further includes:After the starting up of terminal, control and itself be in starting state;If the network connection of the terminal is normal, the status information of the terminal is determined, the status information of terminal includes application Version, network type, unit type, the identification information of equipment, the media access control address of equipment, network connection state;The status information of the terminal is sent to server.
- A kind of 7. method for testing PUSH message, it is characterised in that the described method includes:The heartbeat message that receiving terminal is sent;The heartbeat message is parsed, obtains the attribute information of the corresponding PUSH message of the heartbeat message, the push disappears The attribute information of breath is included at least in the identification information, message header and message of the corresponding tested application of the PUSH message Hold;Described be tested is obtained from the server of the corresponding tested application according to the identification information of the tested application The daily record for the PUSH message that the server of application is sent;The daily record is inquired about according to the message header of the PUSH message and message content, obtains the second query result;The reception state of the PUSH message is determined according to second query result.
- 8. the method according to the description of claim 7 is characterized in that described determine the push according to second query result The reception state of message, including:If second query result shows that the record in the daily record is matched with the message header and message content, determine The PUSH message receives normal;If second query result shows the message header and the message content not in institute State in the record in daily record, determine the PUSH message to mistake.
- 9. the method according to claim 7 or 8, it is characterised in that the PUSH message is further included in the heartbeat message First flag information or second identifier information, the first flag information is that the operating system of terminal is the PUSH message The identification information of mark;The second identifier information is the knowledge that the server of the tested application is the PUSH message mark Other information;The method further includes:Judge that the corresponding heartbeat of the PUSH message disappears according to the first flag information of the PUSH message or second identifier information Whether breath was received;If the heartbeat message was received, the heartbeat message is abandoned again;If the heartbeat message was not received, according to the identification information of the tested application from corresponding described tested The daily record for the PUSH message that the server that the server of application obtains the tested application is sent.
- 10. according to the method described in claim 9, it is characterized in that, the attribute information of the PUSH message, which further includes, receives institute The first time stamp and second identifier information of PUSH message are stated, the first time stamp, which is used to characterize, receives the PUSH message Timestamp, the second identifier information are the identification information that the server of the tested application is the PUSH message mark; The method further includes:The attribute information write-in of the PUSH message list has been received into;Acquisition has received list, described to have received first time stamp that the PUSH message received is at least further included in list and the Two identification informations,;The daily record is obtained, the second timestamp and second identifier information of the PUSH message, institute are included at least in the daily record The second timestamp is stated to send the timestamp of the PUSH message;According to the second identifier information first time stamp and the second timestamp received in list, obtain described The delay duration of PUSH message.
- 11. according to the method described in claim 1, it is characterized in that, the method further includes:Obtain the reception list in the range of default first time;Second time range is determined according to the first time scope and preset rules;Obtain the daily record in second time range;Compare and received list and the daily record in second time range in the range of the first time, determine push Massage set, the PUSH message collection are combined into the daily record in second time range not by the range of the first time Received list covering PUSH message set;Determine corresponding 3rd time range of the PUSH message set, the 3rd time range is the PUSH message set The first time of interior PUSH message stabs formed time range;Determine the network connection state of the terminal in the 3rd time range;If the network connection state is normal, it is determined that the reception state of the PUSH message in the PUSH message set is Leakage hair.
- 12. a kind of device for testing PUSH message, it is characterised in that described device includes:First detection unit, the first parsing are single Member, packaged unit, the first transmitting element, the first judging unit and storage unit, wherein:Whether the first detection unit, receive PUSH message, the promotion message is installed in described for detection terminal The message for being used to be shown in notification bar that the server of tested application in terminal is sent to the tested application;The packaged unit, if for detecting that terminal receives PUSH message, parses the PUSH message, obtains described push away The attribute information of message is sent, the attribute information of the PUSH message includes at least the corresponding tested application of the PUSH message Identification information, message header and message content;The packaged unit, for by identification information, message header and the message content of the tested application according to default Form is packed, and obtains heartbeat message;First transmitting element, for the heartbeat message to be sent to server;First judging unit, for judging whether the heartbeat message sends success;The storage unit, if do not sent successfully for the heartbeat message, local is stored in by the heartbeat message.
- 13. a kind of device for testing PUSH message, it is characterised in that described device includes:First receiving unit, the second parsing are single Member, first acquisition unit, the first query unit and the second determination unit, whereinFirst receiving unit, the heartbeat message sent for receiving terminal;Second resolution unit, for parsing the heartbeat message, obtains the corresponding PUSH message of the heartbeat message Attribute information, the mark that the attribute information of the PUSH message includes at least the corresponding tested application of the PUSH message believes Breath, message header and message content;The first acquisition unit, for the identification information according to the tested application from the corresponding tested application The daily record for the PUSH message that the server that server obtains the tested application is sent;First query unit, inquires about the daily record for the message header according to the PUSH message and message content, obtains To the second query result;Second determination unit, for determining the reception state of the PUSH message according to second query result.
- 14. device according to claim 13, it is characterised in that the attribute information of the PUSH message, which further includes, receives institute The first time stamp and second identifier information of PUSH message are stated, the first time stamp, which is used to characterize, receives the PUSH message Timestamp, the second identifier information are the identification information that the server of the tested application is the PUSH message mark; Described device further includes the second writing unit, the 3rd acquiring unit, the 4th acquiring unit and the first comparing unit, whereinSecond writing unit, for the attribute information write-in of the PUSH message have been received list;3rd acquiring unit, list has been received for obtaining, and described received at least further includes pushing away of having received in list The first time stamp and second identifier information of message are sent,;4th acquiring unit, when the second of the PUSH message is included at least for obtaining the daily record, in the daily record Between stamp and second identifier information, second timestamp is sends the timestamp of the PUSH message;First comparing unit, for being stabbed according to the second identifier information first time received in list With the second timestamp, the delay duration of the PUSH message is obtained.
- 15. device according to claim 13, it is characterised in that described device further includes the 5th acquiring unit, the 3rd true Order member, the 6th acquiring unit, the second comparing unit, the 4th determination unit, the 5th determination unit and the 6th determination unit, its In:5th acquiring unit, for obtaining the reception list in the range of default first time;3rd determination unit, for determining the second time range according to the first time scope and preset rules;6th acquiring unit, for obtaining the daily record in second time range;Second comparing unit, for comparing the list of reception in the range of the first time and in second time In the range of daily record, determine PUSH message set, the PUSH message collection is combined into the daily record in second time range Not by the set of the PUSH message for having received list covering in the range of the first time;4th determination unit, for determining corresponding 3rd time range of the PUSH message set, the 3rd time The time range that scope is made of the first time stamp of the PUSH message in the PUSH message set;5th determination unit, for determining the network connection state of the terminal in the 3rd time range;6th determination unit, if being normal for the network connection state, it is determined that in the PUSH message set PUSH message reception state for leakage send out.
- 16. a kind of terminal, it is characterised in that the terminal includes first processor and the first external communication interface, wherein described First processor is used for:Whether detection terminal receives PUSH message, the clothes for promoting message as the tested application in the terminal The message for being used to be shown in notification bar that business device is sent to the tested application;If detecting that terminal receives PUSH message, the PUSH message is parsed, obtains the attribute information of the PUSH message, The attribute information of the PUSH message includes at least identification information, the message header of the corresponding tested application of the PUSH message And message content;Identification information, message header and the message content of the tested application are packed according to default form, obtain heartbeat Message;The heartbeat message is sent to by server by first external communication interface;Judge whether the heartbeat message sends success;If the heartbeat message is not sent successfully, the heartbeat message is stored in local.
- A kind of 17. server, it is characterised in that the server includes second processor and the second external communication interface, wherein The second processor is used for:The heartbeat message sent by the second external communication interface receiving terminal;The heartbeat message is parsed, obtains the attribute information of the corresponding PUSH message of the heartbeat message, the push disappears The attribute information of breath is included at least in the identification information, message header and message of the corresponding tested application of the PUSH message Hold;Described be tested is obtained from the server of the corresponding tested application according to the identification information of the tested application The daily record for the PUSH message that the server of application is sent;The daily record is inquired about according to the message header of the PUSH message and message content, obtains the second query result;The reception state of the PUSH message is determined according to second query result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610941592.6A CN107979820B (en) | 2016-10-25 | 2016-10-25 | Method, device and equipment for testing push message |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610941592.6A CN107979820B (en) | 2016-10-25 | 2016-10-25 | Method, device and equipment for testing push message |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107979820A true CN107979820A (en) | 2018-05-01 |
CN107979820B CN107979820B (en) | 2021-05-14 |
Family
ID=62005060
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610941592.6A Active CN107979820B (en) | 2016-10-25 | 2016-10-25 | Method, device and equipment for testing push message |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107979820B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109067864A (en) * | 2018-07-25 | 2018-12-21 | 网易(杭州)网络有限公司 | Notification message method for pushing, device and electronic equipment |
CN109088705A (en) * | 2018-09-29 | 2018-12-25 | 上海东土远景工业科技有限公司 | Repeating method, retransmission device and the gateway of data |
CN109146540A (en) * | 2018-06-29 | 2019-01-04 | 精硕科技(北京)股份有限公司 | Monitoring method, mobile device and the server of the visible exposure of advertisement |
CN110149363A (en) * | 2019-04-15 | 2019-08-20 | 深圳壹账通智能科技有限公司 | A kind of information push method, device and storage medium |
CN110336893A (en) * | 2019-08-22 | 2019-10-15 | 深圳市万普拉斯科技有限公司 | Information push method, device, mobile terminal and computer storage medium |
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 |
CN110659404A (en) * | 2018-06-13 | 2020-01-07 | 腾讯科技(深圳)有限公司 | Information recommendation method and device and storage medium |
CN110971690A (en) * | 2019-11-29 | 2020-04-07 | 支付宝实验室(新加坡)有限公司 | Push message processing method, device and equipment of IOS client |
CN111105276A (en) * | 2019-12-26 | 2020-05-05 | 北京金山安全软件有限公司 | Data reporting method and device, electronic equipment and storage medium |
CN111124795A (en) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | Application start monitoring method, device and equipment |
CN112256561A (en) * | 2020-09-22 | 2021-01-22 | 北京达佳互联信息技术有限公司 | Push information testing method, device, equipment and storage medium |
CN112653769A (en) * | 2021-01-08 | 2021-04-13 | 青岛海尔科技有限公司 | Message pushing method and system |
CN113032223A (en) * | 2021-04-20 | 2021-06-25 | 上海哔哩哔哩科技有限公司 | Server state detection method and device |
CN115174514A (en) * | 2022-05-31 | 2022-10-11 | 青岛海尔科技有限公司 | Message pushing method and device, storage medium and electronic device |
WO2022223035A1 (en) * | 2021-04-23 | 2022-10-27 | 山东英信计算机技术有限公司 | Message pushing method and apparatus, and device and readable medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103096271A (en) * | 2013-03-01 | 2013-05-08 | 畅捷通信息技术股份有限公司 | Information pushing system and information pushing method |
CN105897814A (en) * | 2015-07-08 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Push message detection method and device |
CN106027329A (en) * | 2016-05-16 | 2016-10-12 | 乐视控股(北京)有限公司 | Push service testing method and device |
-
2016
- 2016-10-25 CN CN201610941592.6A patent/CN107979820B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103096271A (en) * | 2013-03-01 | 2013-05-08 | 畅捷通信息技术股份有限公司 | Information pushing system and information pushing method |
CN105897814A (en) * | 2015-07-08 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Push message detection method and device |
CN106027329A (en) * | 2016-05-16 | 2016-10-12 | 乐视控股(北京)有限公司 | Push service testing method and device |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110659404A (en) * | 2018-06-13 | 2020-01-07 | 腾讯科技(深圳)有限公司 | Information recommendation method and device and storage medium |
CN110659404B (en) * | 2018-06-13 | 2024-03-15 | 深圳市雅阅科技有限公司 | Information recommendation method, device and storage medium |
CN109146540A (en) * | 2018-06-29 | 2019-01-04 | 精硕科技(北京)股份有限公司 | Monitoring method, mobile device and the server of the visible exposure of advertisement |
CN109146540B (en) * | 2018-06-29 | 2021-04-06 | 北京明略昭辉科技有限公司 | Monitoring method for advertisement visible exposure, mobile device and server |
CN109067864B (en) * | 2018-07-25 | 2021-03-05 | 网易(杭州)网络有限公司 | Notification message pushing method and device and electronic equipment |
CN109067864A (en) * | 2018-07-25 | 2018-12-21 | 网易(杭州)网络有限公司 | Notification message method for pushing, device and electronic equipment |
CN109088705A (en) * | 2018-09-29 | 2018-12-25 | 上海东土远景工业科技有限公司 | Repeating method, retransmission device and the gateway of data |
CN109088705B (en) * | 2018-09-29 | 2021-09-10 | 上海东土致远智能科技发展有限公司 | Data retransmission method, retransmission equipment and gateway |
CN111124795B (en) * | 2018-11-01 | 2024-03-26 | 百度在线网络技术(北京)有限公司 | Application starting monitoring method, device and equipment |
CN111124795A (en) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | Application start monitoring method, device and equipment |
CN110149363A (en) * | 2019-04-15 | 2019-08-20 | 深圳壹账通智能科技有限公司 | A kind of information push method, device and storage medium |
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 |
CN110336893B (en) * | 2019-08-22 | 2022-03-15 | 深圳市万普拉斯科技有限公司 | Message pushing method and device, mobile terminal and computer storage medium |
CN110336893A (en) * | 2019-08-22 | 2019-10-15 | 深圳市万普拉斯科技有限公司 | Information push method, device, mobile terminal and computer storage medium |
CN110971690B (en) * | 2019-11-29 | 2022-10-04 | 支付宝实验室(新加坡)有限公司 | Push message processing method, device and equipment of IOS client |
CN110971690A (en) * | 2019-11-29 | 2020-04-07 | 支付宝实验室(新加坡)有限公司 | Push message processing method, device and equipment of IOS client |
CN111105276A (en) * | 2019-12-26 | 2020-05-05 | 北京金山安全软件有限公司 | Data reporting method and device, electronic equipment and storage medium |
CN112256561A (en) * | 2020-09-22 | 2021-01-22 | 北京达佳互联信息技术有限公司 | Push information testing method, device, equipment and storage medium |
CN112653769A (en) * | 2021-01-08 | 2021-04-13 | 青岛海尔科技有限公司 | Message pushing method and system |
CN113032223A (en) * | 2021-04-20 | 2021-06-25 | 上海哔哩哔哩科技有限公司 | Server state detection method and device |
CN113032223B (en) * | 2021-04-20 | 2023-04-11 | 上海哔哩哔哩科技有限公司 | Server state detection method and device |
WO2022223035A1 (en) * | 2021-04-23 | 2022-10-27 | 山东英信计算机技术有限公司 | Message pushing method and apparatus, and device and readable medium |
CN115174514A (en) * | 2022-05-31 | 2022-10-11 | 青岛海尔科技有限公司 | Message pushing method and device, storage medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN107979820B (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107979820A (en) | A kind of method and device, equipment for testing PUSH message | |
US9356842B2 (en) | Method and system for browser based, non-intrusive measuring of end-user perceived performance of individual third party resource requests | |
US10303591B1 (en) | Web services comparison tool | |
CN108521353B (en) | Processing method and device for positioning performance bottleneck and readable storage medium | |
CN105447139B (en) | Data acquisition statistical method and system, terminal and service equipment thereof | |
WO2016192488A1 (en) | Rolling release assessment method, device, and system | |
US20130166738A1 (en) | Web Page Download Time Analysis | |
CN111611140B (en) | Report verification method and device for buried point data, electronic equipment and storage medium | |
US20060246889A1 (en) | Wireless Data Device Performance Monitor | |
US9071551B2 (en) | Mobile trouble ticket | |
CN107948120A (en) | leak detection method and device | |
CN105637488A (en) | Tracing source code for end user monitoring | |
CN106598821B (en) | Method and device for testing webpage loading speed | |
US20170220218A1 (en) | Automatic Generation of Regular Expression Based on Log Line Data | |
CN105530137B (en) | Data on flows analysis method and data on flows analysis system | |
CN112948224A (en) | Data processing method, device, terminal and storage medium | |
US20140200041A1 (en) | Evaluation of overall performance of interactive application service | |
US11360745B2 (en) | Code generation for log-based mashups | |
CN103885877B (en) | Method and device for generating simulation browser testing script of HTTP | |
CN109165147A (en) | Log print control program, device, system, back-end server and headend equipment | |
CN112882948A (en) | Stability testing method, device and system for application and storage medium | |
US10616306B2 (en) | System and method for large-scale capture and tracking of web-based application parameters | |
CN109660449A (en) | A kind of system and method for automatic acquisition social category application of multimedia | |
US20160323399A1 (en) | Method of and a system for monitoring web site consistency | |
CN111581079B (en) | Third party advertisement monitoring method and system based on asynchronous verification |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |