CN110362498A - Test method, device and the server of page hot spot - Google Patents
Test method, device and the server of page hot spot Download PDFInfo
- Publication number
- CN110362498A CN110362498A CN201910673990.8A CN201910673990A CN110362498A CN 110362498 A CN110362498 A CN 110362498A CN 201910673990 A CN201910673990 A CN 201910673990A CN 110362498 A CN110362498 A CN 110362498A
- Authority
- CN
- China
- Prior art keywords
- test
- test data
- page
- hot spot
- tested
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides test method, device and the servers of a kind of page hot spot, this method comprises: receiving test data packet, and obtain corresponding first test data of the test data packet;Position the page to be tested;The hot spot element in the page to be tested is extracted by crawler operation, and obtains corresponding second test data of the hot spot element;Wherein, the hot spot element is related to the test data packet;First test data and second test data are compared, test result is obtained.The present invention can effectively improve the testing efficiency of page hot spot.
Description
Technical field
The present invention relates to Internet technical fields, more particularly, to test method, device and the service of a kind of page hot spot
Device.
Background technique
Currently, the hot spot data in the page can embody the assets distribution of network and threaten the information such as distribution, in order to mention
The accuracy that high fever point data is shown can carry out check test by hot spot of the automation means to page presentation.Existing skill
In art, automated test tool selenium is generallyd use when testing page hot spot to extract the hot spot number in the page
According to, but since selenium needs to repeat hot spot positioning operation, the data being examined successively in the page are just able to achieve hot spot
The acquisition of data needs to expend longer time for acquiring hot spot data, and the testing efficiency so as to cause page hot spot is lower.
Summary of the invention
It, can be in view of this, the purpose of the present invention is to provide test method, device and the server of a kind of page hot spot
Time needed for effectively reducing hot spot data acquisition, and then can effectively improve the testing efficiency of page hot spot.
In a first aspect, the embodiment of the invention provides a kind of test methods of page hot spot, comprising: receive test data
Packet, and obtain corresponding first test data of the test data packet;Position the page to be tested;Described in being extracted by crawler operation
Hot spot element in the page to be tested, and obtain corresponding second test data of the hot spot element;Wherein, the hot spot element
It is related to the test data packet;First test data and second test data are compared, test result is obtained.
With reference to first aspect, the embodiment of the invention provides the first possible embodiments of first aspect, wherein institute
State the step of receiving test data packet, comprising: test data packet is received by default port;Wherein, the default port includes
User Datagram Protocol port or hypertext transfer protocol port.
The possible embodiment of with reference to first aspect the first, the embodiment of the invention provides second of first aspect
Possible embodiment, wherein the test data packet includes a plurality of string data;The default port is the number of users
According to datagram protocol port, described the step of obtaining the test data packet corresponding first test data, comprising: by it is preset just
Then Matching Model matches corresponding field data for each string data, using each field data as the first test
Data.
With reference to first aspect, the embodiment of the invention provides the third possible embodiments of first aspect, wherein institute
State the step of positioning the page to be tested, comprising: the test script that preset language is obtained by automated test tool, based on described
Test script positions the page to be tested.
With reference to first aspect, the embodiment of the invention provides the 4th kind of possible embodiments of first aspect, wherein institute
State the step of hot spot element in the page to be tested is extracted by crawler operation, comprising: extract the page to be tested
Html (HyperText Markup Language, hypertext markup language) code, carries out parsing behaviour to the html code
Make, obtains the hot spot element in the page to be tested.
With reference to first aspect, the embodiment of the invention provides the 5th kind of possible embodiments of first aspect, wherein institute
It states the first test data and second test data carries longitude and latitude data;The method also includes: if the survey
Test result is abnormal, and the Error Location of the page to be tested is determined based on the longitude and latitude data.
With reference to first aspect, the embodiment of the invention provides the 6th kind of possible embodiments of first aspect, wherein institute
Stating the page to be tested is the page to be tested in Situation Awareness System;Wherein, the Situation Awareness System is for monitoring data
The system of safety.
Second aspect, the embodiment of the present invention also provide a kind of test device of page hot spot, comprising: the first test data obtains
Modulus block for receiving test data packet, and obtains corresponding first test data of the test data packet;Locating module is used
In the positioning page to be tested;Second test data obtains module, for being extracted in the page to be tested by crawler operation
Hot spot element, and obtain corresponding second test data of the hot spot element;Wherein, the hot spot element and the test data
Packet is related;Comparison module obtains test result for comparing first test data and second test data.
The third aspect, the embodiment of the present invention also provide a kind of server, including processor and memory;On the memory
It is stored with computer program, the computer program is executed when being run by the processor such as first aspect to first aspect
The 6th kind of possible described in any item methods of embodiment.
Fourth aspect, the embodiment of the present invention also provide a kind of computer storage medium, for being stored as first aspect to
Computer software instructions used in any one of 6th kind of possible embodiment of one side the method.
The embodiment of the present invention bring it is following the utility model has the advantages that
Test method, device and the server of page hot spot provided in an embodiment of the present invention, first reception test data packet
And corresponding first test data of the test data packet is obtained, the page to be tested is then positioned, extracting by crawler operation should be to
Hot spot element relevant to test data packet in test page, and then corresponding second test data of hot spot element is obtained, pass through
The first test data and the second test data are compared, test result can be obtained.The embodiment of the present invention is extracted by crawler operation
Hot spot element in the page to be tested, compared to the prior art in by selenium repeat hot spot positioning operation according to
Secondary extraction hot spot element, the present invention more can easily extract hot spot element, the time needed for reducing acquisition hot spot element, into
And effectively improve the testing efficiency of page hot spot.
Other features and advantages of the present invention will illustrate in the following description, also, partly become from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention are in specification, claims
And specifically noted structure is achieved and obtained in attached drawing.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is that a kind of test method of page hot spot provided in an embodiment of the present invention describes in detail;
Fig. 2 is the flow diagram of the test method of another page elements provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the test method of another page elements provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of the test device of page hot spot provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with embodiment to this hair
Bright technical solution is clearly and completely described, it is clear that and described embodiments are some of the embodiments of the present invention, without
It is whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
In view of the testing efficiency that will lead to page hot spot by selenium acquisition hot spot element in the prior art is lower,
Based on this, the present invention implements test method, device and the server of a kind of page hot spot provided, can effectively improve page heat
The testing efficiency of point.
For the test convenient for understanding the present embodiment, first to a kind of page hot spot disclosed in the embodiment of the present invention
Method describes in detail, and this method is executed by testing service device, a kind of test method of page hot spot shown in Figure 1
Flow diagram, this method may comprise steps of:
Step S102 receives test data packet, and obtains corresponding first test data of test data packet.
Test data packet can be understood as test data source.In one embodiment, testing service device can directly connect
The test data packet that user sends is received, in another embodiment, testing service device can be received by system under test (SUT) and be tested
Data packet;Wherein, system under test (SUT) is the system that the page to be tested is presented, and testing service device is mainly for the to be tested of system under test (SUT)
The page carries out hot spot test.
Step S104 positions the page to be tested.
Wherein, the page to be tested is the page to be tested in system under test (SUT), it is contemplated that if there are multiple pages in system under test (SUT)
Face, and system under test (SUT) only may show test data packet by one of page (namely page to be tested), therefore in order to subtract
Workload needed for extracting the corresponding hot spot element of test data packet less needs to treat test page and carries out positioning operation.
Step S106 extracts the hot spot element in the page to be tested by crawler operation, and it is corresponding to obtain hot spot element
Second test data.
Wherein, hot spot element is related to test data packet, and hot spot element characterizes the corresponding assets distribution of test data packet
With threaten the information such as distribution, hot spot element in the page to be tested can be obtained by crawler operation automatically and hot spot element is corresponding
The second test data.
Step S108 compares the first test data and the second test data, obtains test result.
Wherein, test result includes the comparison result of the first test data and the second test data, which is used for
Reflect whether the first test data and the second test data are identical.Under normal conditions, the first test data and the second test data
Should be consistent, if but system under test (SUT) there is faults itself or situations such as by malicious attack, will lead to system under test (SUT) to survey
Examination data packet carries out mistake occur when analysis is shown, the second test data difference will occur with the first test data at this time, therefore
System under test (SUT) can be learnt with the presence or absence of abnormal in time by comparing the first test data and the second test data.
The test method of above-mentioned page hot spot provided in an embodiment of the present invention, first reception test data packet simultaneously obtain the survey
Corresponding first test data of data packet is tried, the page to be tested is then positioned, is extracted in the page to be tested by crawler operation
Hot spot element relevant to test data packet, and then corresponding second test data of hot spot element is obtained, it is surveyed by comparing first
Data and the second test data are tried, test result can be obtained.The embodiment of the present invention extracts the page to be tested by crawler operation
In hot spot element, compared to the prior art in hot spot positioning operation repeated by selenium successively extract hot spot
Element, the present invention more can easily extract hot spot element, the time needed for reducing acquisition hot spot element, and then effectively improve
The testing efficiency of page hot spot.
To understand that the embodiment of the present invention also provides convenient for the test method to page hot spot provided by the above embodiment
Another test method of page elements, the flow diagram of the test method of another page elements shown in Figure 2,
This method may comprise steps of:
Step S202 receives test data packet by default port.
Default port includes that the User Datagram Protocol port (UDP, User Datagram Protocol) or hypertext pass
Send the port agreement (HTTP, Hyper Text Transport Protocol), wherein UDP interface is imitated with higher transmission
Rate.
In addition, above-mentioned test data packet includes a plurality of string data, in the specific implementation, need according to preset format to
Default port sends test data packet, such as, it is specified that character string format are as follows: source ip:1.1.1.1, target ip:1.1.1.1, source
Port: 80, target port: 80, source position: the city a-, the province area b- c, target position: the city A-, the province area B- C, source longitude and latitude: 111,222,
Target longitude and latitude: 111,222.
Step S204 matches corresponding field data by preset canonical Matching Model for each string data, will be each
Field data is as the first test data.
If default port is udp port, it is contemplated that UDP interface is likely to occur data in the case where network environment is poor and loses
The case where mistake, therefore canonical matching treatment is carried out to by the received test data packet of udp port, it is corresponding to obtain test data packet
The first test data, to guarantee the integrality of test data packet.
In the specific implementation, preset canonical Matching Model is when detecting first aim character, by first aim
Character string before character is as field name, using the character string before second target character as first character segment value, and so on.
For example, a string data in test data packet is " url&http: // 192.1.1.1&time&2019-09-09 ", and
The target character of canonical Matching Model be character " & ", then in above-mentioned string data " url " be field name, " http: //
It 192.1.1.1 " is first character segment value, " time " is second field value, and " 2019-09-09 " is third field value.
Step S206, by automated test tool obtain preset language test script, based on test script positioning to
Test page.
Wherein, automated test tool can be selenium, and preset language can be python, C++ or other designs
Language, test script can be UI (User Interface, user interface) test script, can be in quilt using the test script
The page to be tested is navigated in examining system.
Step S208, extracts the html code of the page to be tested, carries out parsing operation to html code, obtains page to be tested
Hot spot element in face.
In one embodiment, it can use the library requests and extract the html code of the page to be tested, then pass through
The library Beautifulsoup carries out parsing operation to html code, and the hot spot element in the page to be tested can be obtained.
Step S210 obtains corresponding second test data of hot spot element.
Wherein, the second test data may include asset data or hidden danger class data, for assets class data, to be measured
When trying page progress crawler operation, the data such as Asset Type, longitude and latitude data and the data bulk in the page to be tested should be extracted;
The attack IP in the page to be tested should be extracted when treating test page progress crawler operation for hidden danger class data
The data such as (Internet Protocol, network protocol), longitude and latitude data or number of times of attack.
In the specific implementation, with real-time reception test data packet and corresponding first test data can be obtained, and crawler is grasped
Make only to execute in the preset testing time, wherein the first test data obtained in real time can be saved to system under test (SUT) pair
The second test data obtained in the ES (ElastciSearch, distributed data base) answered by crawler operation and this crawler
Operating corresponding first test data can save into MySQL (Relational DBMS) database, for subsequent
It compares.For example, default test interval is 5 minutes, corresponding first test data of test data packet is obtained in real time, and the
The hot spot element in the page to be tested is extracted by crawler operation at 5 minutes, to obtain the second test data;This time crawler operation
After, continue to obtain corresponding first test data of test data packet in real time, and grasped at next 5th minute by crawler
Make to extract the hot spot element in the page to be tested, to obtain the second test data at this time.
Step S212 compares the first test data and the second test data, obtains test result.
In one embodiment, dynamic authentication can also be carried out to the test result repeatedly obtained, for example, first time ratio
To test result M is obtained, the test result N of second of comparison is obtained after default test interval, by tying to test
Fruit M and test result N are verified, the difference of available page hot spot test twice within a preset time interval.
In addition, if test result to show that system under test (SUT) occurs abnormal, for the ease of being positioned to abnormal position, above-mentioned the
One test data and the second test data carry longitude and latitude data.Specifically, being based on longitude and latitude if test result is abnormal
Data determine the Error Location of the page to be tested.For example, traversing the first test stored in default test interval into ES
Data, and the first test data and the second test data under same longitude and latitude data are compared, if under same longitude and latitude data
First test data and the second test data are different, then it is abnormal to illustrate that the corresponding position of the longitude and latitude data occurs, and then can be with
The Error Location of the page to be tested is determined based on longitude and latitude data.
In one embodiment, the page to be tested can in Situation Awareness System (that is, aforementioned system under test (SUT)) to
The page of test.Wherein, Situation Awareness System is the system for safety of monitoring data, based on safe big data, in turn
It is promoted from global visual angle and discovery identification is carried out to the security threat of data, processing is analyzed and response is disposed.
The embodiment of the invention also provides the test method of another page hot spot, another page shown in Figure 3
The test method of hot spot, this method may comprise steps of:
Step 302, the test data packet of character string type is received by the udp port batch of testing service device.Wherein, it tests
The format of data packet is preset format, and preset format includes data type, data format and data sorting etc..
Step 304, canonical Matching Model is established, number data packet corresponding first is surveyed based on canonical Matching Model matching and is surveyed
Data are tried, the first test data is stored in ES.Wherein, the first test data can carry data type, longitude and latitude data, test
Time and data alteration, matching process are to match the test data packet of character string type for corresponding field data,
The field data is the first test data, and the first obtained test data is saved the ES to Situation Awareness System to reference
In.In addition, for convenient for subsequent comparison, MySQL data needed for deposit test after can also being counted to the first test data
In library.
In one embodiment, continuously and uninterruptedly pass through the UDP interface of testing service device according to test scene
Test data packet obtains the dynamic test scene of linear increase.Wherein, test scene is the parameter of acceptance test data packet, is moved
State test scene is with the parameter of a variety of reception test data packets of time change, for example, receiving within one minute 500 tests
5000 test data packets of data packet or reception in one minute.
Step 306, page operation is carried out to Situation Awareness System by selenium browser automatic operation control.Its
In, page operation is to treat test page to be positioned.It is tested specifically, obtaining the automation UI write by selenium
Script positions the specific page to be tested to be tested based on UI test script.Above-mentioned UI test script use with regard to machine word
Speech is python.
Step 308, after navigating to the page to be tested, crawler obtains the second test number of hot spot element on the Situation Awareness page
According to.When it is implemented, extracting the html code of the page to be tested by the library requests, and pass through the library pair Beautifulsoup
Html code carries out parsing operation, to obtain the hot spot element of the page to be tested, and then obtains hot spot element corresponding second and surveys
Try data.In addition, the time for carrying out crawler operation can be customized based on actual conditions progress, for example, between the time of crawler operation
It is divided into 10 minutes or 20 minutes.
Step 310, the second test data is stored to MySQL database.When it is implemented, needing for different data
Type storage is as in different data forms.For example, saving producing data to asset table, hidden danger class data are saved to hidden danger table,
Event data is saved to event table.In another embodiment, it is tested for the ease of comparing first under the same testing time
Data and the second test data, can testing time to the first test data and the second test data and field data unite
Meter, the newest value successively taken at static fields indicate the full dose value of current test result, newest primary test result
The incremental value for this time testing section is indicated with the difference of last test result.In addition, current test result can directly be covered
Cover primary test result.
Step 312, data verification is carried out to the first test data and the second test data.
In conclusion compared to the first test data is received and obtained using http port, the embodiment of the present invention is utilized and is mentioned
Test data packet is received for the port UPD, canonical Matching Model is recycled to obtain corresponding first test data of test data packet, it can
To effectively improve the efficiency of data transfer phase;In addition the embodiment of the present invention is grasped by selenium positioning webpage and by crawler
Make to obtain corresponding second data of hot spot element, compared to the prior art in only pass through selenium positioning heat point element, this hair
Time needed for bright embodiment can effectively reduce positioning heat point element on the one hand, work needed for reducing positioning hot spot
Amount, on the other hand, crawler operation also have the characteristics that covering surface is complete, make the hot spot element extracted more fully, more accurate.
For the test method for the page hot spot that previous embodiment provides, the embodiment of the invention also provides a kind of page heat
Point test device, a kind of structural schematic diagram of the test device of page hot spot shown in Figure 4, the apparatus may include with
Lower part:
First test data obtains module 402, for receiving test data packet, and obtains test data packet corresponding first
Test data.
Locating module 404, for positioning the page to be tested.
Second test data obtains module 406, for extracting the hot spot element in the page to be tested by crawler operation, and
Obtain corresponding second test data of hot spot element;Wherein, hot spot element is related to test data packet.
Comparison module 408 obtains test result for comparing the first test data and the second test data.
The test device of page hot spot provided in an embodiment of the present invention, first the first test data obtain module and receive test
Data packet simultaneously obtains corresponding first test data of the test data packet, and then locating module positions the page to be tested, and second surveys
It tries data acquisition module and hot spot element relevant to test data packet in the page to be tested is extracted by crawler operation, and then obtain
Corresponding second test data of hot spot element is taken, comparison module is by comparing the first test data and the second test data
Obtain test result.The embodiment of the present invention extracts the hot spot element in the page to be tested by crawler operation, compared to existing skill
Hot spot positioning operation is repeated by selenium in art and successively extracts hot spot element, the present invention can more easily
Hot spot element is extracted, the time needed for reducing acquisition hot spot element, and then effectively improve the testing efficiency of page hot spot.
In one embodiment, above-mentioned first test data obtains module 402 and is also used to: being received and is surveyed by default port
Try data packet;Wherein, default port includes User Datagram Protocol port or hypertext transfer protocol port.
In one embodiment, above-mentioned test data packet includes a plurality of string data.Default port is user data
Datagram protocol port, above-mentioned first test data obtain module 402 and are also used to: being each character by preset canonical Matching Model
String data matches corresponding field data, using each field data as the first test data.
In one embodiment, above-mentioned locating module 404 is also used to: obtaining preset language by automated test tool
Test script, the page to be tested is positioned based on test script.
In one embodiment, above-mentioned second test data obtains module 406 and is also used to: extracting the page to be tested
Html code carries out parsing operation to html code, obtains the hot spot element in the page to be tested.
In one embodiment, above-mentioned first test data and the second test data carry longitude and latitude data, this
The test device for the page hot spot that inventive embodiments provide further includes Error Location determining module, if different for test result
Often, the Error Location of the page to be tested is determined based on longitude and latitude data.
The technical effect and preceding method embodiment phase of device provided by the embodiment of the present invention, realization principle and generation
Together, to briefly describe, Installation practice part does not refer to place, can refer to corresponding contents in preceding method embodiment.
The equipment is a kind of server, specifically, the server includes processor and storage device;It is stored on storage device
There is computer program, computer program executes the described in any item of embodiment as described above when being run by the processor
Method.
Fig. 5 is a kind of structural schematic diagram of server provided in an embodiment of the present invention, which includes: processor
50, memory 51, bus 52 and communication interface 53, the processor 50, communication interface 53 and memory 51 are connected by bus 52
It connects;Processor 50 is for executing the executable module stored in memory 51, such as computer program.
Wherein, memory 51 may include high-speed random access memory (RAM, Random Access Memory),
It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.By extremely
A few communication interface 53 (can be wired or wireless) is realized logical between the system network element and at least one other network element
Letter connection, can be used internet, wide area network, local network, Metropolitan Area Network (MAN) etc..
Bus 52 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, data
Bus, control bus etc..Only to be indicated with a four-headed arrow convenient for indicating, in Fig. 5, it is not intended that an only bus or
A type of bus.
Wherein, memory 51 is for storing program, and the processor 50 executes the journey after receiving and executing instruction
Sequence, method performed by the device that the stream process that aforementioned any embodiment of the embodiment of the present invention discloses defines can be applied to handle
In device 50, or realized by processor 50.
Processor 50 may be a kind of IC chip, the processing capacity with signal.During realization, above-mentioned side
Each step of method can be completed by the integrated logic circuit of the hardware in processor 50 or the instruction of software form.Above-mentioned
Processor 50 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network
Processor (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal
Processing, abbreviation DSP), specific integrated circuit (Application Specific Integrated Circuit, referred to as
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, abbreviation FPGA) or other are programmable
Logical device, discrete gate or transistor logic, discrete hardware components.It may be implemented or execute in the embodiment of the present invention
Disclosed each method, step and logic diagram.General processor can be microprocessor or the processor is also possible to appoint
What conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware decoding processing
Device executes completion, or in decoding processor hardware and software module combination execute completion.Software module can be located at
Machine memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register etc. are originally
In the storage medium of field maturation.The storage medium is located at memory 51, and processor 50 reads the information in memory 51, in conjunction with
Its hardware completes the step of above method.
The computer program product of readable storage medium storing program for executing provided by the embodiment of the present invention, including storing program code
Computer readable storage medium, the instruction that said program code includes can be used for executing previous methods side as described in the examples
Method, specific implementation can be found in preceding method embodiment, and details are not described herein.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention
Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair
It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art
In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light
It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make
The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention, should all cover in protection of the invention
Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. a kind of test method of page hot spot characterized by comprising
Test data packet is received, and obtains corresponding first test data of the test data packet;
Position the page to be tested;
The hot spot element in the page to be tested is extracted by crawler operation, and obtains the hot spot element corresponding second and surveys
Try data;Wherein, the hot spot element is related to the test data packet;
First test data and second test data are compared, test result is obtained.
2. the method according to claim 1, wherein the step of reception test data packet, comprising:
Test data packet is received by default port;Wherein, the default port includes User Datagram Protocol port or super literary
This transportation protocol port.
3. according to the method described in claim 2, it is characterized in that, the test data packet includes a plurality of string data;
The default port is the User Datagram Protocol port, described to obtain corresponding first test of the test data packet
The step of data, comprising:
By preset canonical Matching Model, corresponding field data is matched for each string data, by each field
Data are as the first test data.
4. the method according to claim 1, wherein the step of positioning page to be tested, comprising:
The test script that preset language is obtained by automated test tool positions the page to be tested based on the test script.
5. the method according to claim 1, wherein described extracted in the page to be tested by crawler operation
Hot spot element the step of, comprising:
The html code for extracting the page to be tested carries out parsing operation to the html code, obtains the page to be tested
Hot spot element in face.
6. the method according to claim 1, wherein first test data and second test data are equal
Carry longitude and latitude data;
The method also includes:
If the test result is abnormal, the Error Location of the page to be tested is determined based on the longitude and latitude data.
7. the method according to claim 1, wherein the page to be tested is to be tested in Situation Awareness System
The page;Wherein, the Situation Awareness System is the system for safety of monitoring data.
8. a kind of test device of page hot spot characterized by comprising
First test data obtains module, for receiving test data packet, and obtains the test data packet corresponding first and surveys
Try data;
Locating module, for positioning the page to be tested;
Second test data obtains module, for extracting the hot spot element in the page to be tested by crawler operation, and obtains
Take corresponding second test data of the hot spot element;Wherein, the hot spot element is related to the test data packet;
Comparison module obtains test result for comparing first test data and second test data.
9. a kind of server, which is characterized in that including processor and memory;
Computer program is stored on the memory, the computer program executes such as right when being run by the processor
It is required that 1 to 7 described in any item methods.
10. a kind of computer storage medium, which is characterized in that for being stored as used in any one of claim 1 to 7 the method
Computer software instructions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910673990.8A CN110362498B (en) | 2019-07-24 | 2019-07-24 | Page hot spot testing method and device and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910673990.8A CN110362498B (en) | 2019-07-24 | 2019-07-24 | Page hot spot testing method and device and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110362498A true CN110362498A (en) | 2019-10-22 |
CN110362498B CN110362498B (en) | 2023-08-15 |
Family
ID=68220944
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910673990.8A Active CN110362498B (en) | 2019-07-24 | 2019-07-24 | Page hot spot testing method and device and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110362498B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111563051A (en) * | 2020-07-16 | 2020-08-21 | 平安国际智慧城市科技股份有限公司 | Crawler-based data verification method and device, computer equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104820634A (en) * | 2014-12-25 | 2015-08-05 | 平安科技(深圳)有限公司 | Method and device for detecting page test track |
GB201511705D0 (en) * | 2015-07-03 | 2015-08-19 | Fujitsu Ltd | Code hotspot encapsulation |
US20150378876A1 (en) * | 2014-06-25 | 2015-12-31 | Vmware, Inc. | Visual graphical user interface verification |
US20160198045A1 (en) * | 2015-01-06 | 2016-07-07 | Cyara Solutions Pty Ltd | Interactive voice response system crawler |
CN106294101A (en) * | 2015-05-19 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The page gets method of testing and device ready |
US20180173606A1 (en) * | 2016-12-15 | 2018-06-21 | Syntel, Inc. | Hybrid testing automation engine |
US10079738B1 (en) * | 2015-11-19 | 2018-09-18 | Amazon Technologies, Inc. | Using a network crawler to test objects of a network document |
CN109522217A (en) * | 2018-10-16 | 2019-03-26 | 深圳壹账通智能科技有限公司 | The internal storage testing method and terminal device of application program |
CN109828899A (en) * | 2018-12-13 | 2019-05-31 | 深圳壹账通智能科技有限公司 | Acquisition method, device and the computer equipment of test data |
-
2019
- 2019-07-24 CN CN201910673990.8A patent/CN110362498B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150378876A1 (en) * | 2014-06-25 | 2015-12-31 | Vmware, Inc. | Visual graphical user interface verification |
CN104820634A (en) * | 2014-12-25 | 2015-08-05 | 平安科技(深圳)有限公司 | Method and device for detecting page test track |
US20160198045A1 (en) * | 2015-01-06 | 2016-07-07 | Cyara Solutions Pty Ltd | Interactive voice response system crawler |
CN106294101A (en) * | 2015-05-19 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The page gets method of testing and device ready |
GB201511705D0 (en) * | 2015-07-03 | 2015-08-19 | Fujitsu Ltd | Code hotspot encapsulation |
US10079738B1 (en) * | 2015-11-19 | 2018-09-18 | Amazon Technologies, Inc. | Using a network crawler to test objects of a network document |
US20180173606A1 (en) * | 2016-12-15 | 2018-06-21 | Syntel, Inc. | Hybrid testing automation engine |
CN109522217A (en) * | 2018-10-16 | 2019-03-26 | 深圳壹账通智能科技有限公司 | The internal storage testing method and terminal device of application program |
CN109828899A (en) * | 2018-12-13 | 2019-05-31 | 深圳壹账通智能科技有限公司 | Acquisition method, device and the computer equipment of test data |
Non-Patent Citations (1)
Title |
---|
MR_YDK: "UI自动化测试常用页面元素定位方法", Retrieved from the Internet <URL:https://blog.csdn.net/ydk888888/article/details/82849387> * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111563051A (en) * | 2020-07-16 | 2020-08-21 | 平安国际智慧城市科技股份有限公司 | Crawler-based data verification method and device, computer equipment and storage medium |
CN111563051B (en) * | 2020-07-16 | 2020-10-20 | 平安国际智慧城市科技股份有限公司 | Crawler-based data verification method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110362498B (en) | 2023-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110275958B (en) | Website information identification method and device and electronic equipment | |
CN108665297B (en) | Method and device for detecting abnormal access behavior, electronic equipment and storage medium | |
CN108763928A (en) | A kind of open source software leak analysis method, apparatus and storage medium | |
CN109167797A (en) | Analysis of Network Attack method and apparatus | |
WO2017113677A1 (en) | User behavior data processing method and system | |
CN106201886B (en) | A kind of Proxy Method and device of the verifying of real time data task | |
US10621255B2 (en) | Identifying equivalent links on a page | |
CN104158828B (en) | The method and system of suspicious fishing webpage are identified based on cloud content rule base | |
CN103617213B (en) | Method and system for identifying newspage attributive characters | |
CN110602029A (en) | Method and system for identifying network attack | |
CN101894134A (en) | Spatial layout-based fishing webpage detection and implementation method | |
US20170337568A1 (en) | Data processing method, system and computer device based on electronic payment behaviors | |
US10057155B2 (en) | Method and apparatus for determining automatic scanning action | |
CN106326485A (en) | Method for detecting web link and device thereof | |
CN107577944A (en) | Website malicious code detecting method and device based on code syntax analyzer | |
CN108694325A (en) | The condition discriminating apparatus of the discriminating conduct and specified type website of specified type website | |
CN104050257A (en) | Detection method and device for phishing webpage | |
CN110020161B (en) | Data processing method, log processing method and terminal | |
GB2537934A (en) | Computer-implemented methods of website analysis | |
CN110362498A (en) | Test method, device and the server of page hot spot | |
CN109194627A (en) | Cheat detection method, device, equipment and medium | |
CN110874475A (en) | Vulnerability mining method, vulnerability mining platform and computer readable storage medium | |
CN109409091B (en) | Method, device and equipment for detecting Web page and computer storage medium | |
US9749352B2 (en) | Apparatus and method for collecting harmful website information | |
CN103581321B (en) | A kind of creation method of refer chains, device and safety detection method and client |
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 |