CN110362498B - Page hot spot testing method and device and server - Google Patents

Page hot spot testing method and device and server Download PDF

Info

Publication number
CN110362498B
CN110362498B CN201910673990.8A CN201910673990A CN110362498B CN 110362498 B CN110362498 B CN 110362498B CN 201910673990 A CN201910673990 A CN 201910673990A CN 110362498 B CN110362498 B CN 110362498B
Authority
CN
China
Prior art keywords
test data
page
data
tested
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910673990.8A
Other languages
Chinese (zh)
Other versions
CN110362498A (en
Inventor
鲍彦侠
范渊
黄进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN201910673990.8A priority Critical patent/CN110362498B/en
Publication of CN110362498A publication Critical patent/CN110362498A/en
Application granted granted Critical
Publication of CN110362498B publication Critical patent/CN110362498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Abstract

The invention provides a method, a device and a server for testing page hot spots, wherein the method comprises the following steps: receiving a test data packet and acquiring first test data corresponding to the test data packet; positioning a page to be tested; extracting hot spot elements in the page to be tested through crawler operation, and acquiring second test data corresponding to the hot spot elements; wherein the hotspot element is associated with the test data packet; and comparing the first test data with the second test data to obtain a test result. The invention can effectively improve the testing efficiency of the page hot spot.

Description

Page hot spot testing method and device and server
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, and a server for testing a page hotspot.
Background
At present, the hot spot data in the page can show information such as asset distribution, threat distribution and the like of the network, and in order to improve the accuracy of hot spot data display, the hot spot displayed on the page can be checked and tested through an automatic means. In the prior art, an automatic testing tool selenium is generally adopted to extract hot spot data in a page when testing the hot spot of the page, but because the selenium needs to repeatedly execute hot spot positioning operation, the collection of the hot spot data can be realized by sequentially checking the data in the page, and long time is required for collecting the hot spot data, so that the testing efficiency of the hot spot of the page is lower.
Disclosure of Invention
Accordingly, the invention aims to provide a method, a device and a server for testing a page hot spot, which can effectively reduce the time required by hot spot data acquisition and further can effectively improve the testing efficiency of the page hot spot.
In a first aspect, an embodiment of the present invention provides a method for testing a page hotspot, including: receiving a test data packet and acquiring first test data corresponding to the test data packet; positioning a page to be tested; extracting hot spot elements in the page to be tested through crawler operation, and acquiring second test data corresponding to the hot spot elements; wherein the hotspot element is associated with the test data packet; and comparing the first test data with the second test data to obtain a test result.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the step of receiving a test data packet includes: receiving a test data packet through a preset port; wherein the preset port comprises a user datagram protocol port or a hypertext transfer protocol port.
With reference to the first possible implementation manner of the first aspect, the embodiment of the present invention provides a second possible implementation manner of the first aspect, wherein the test data packet includes a plurality of pieces of character string data; the preset port is the user datagram protocol port, and the step of obtaining the first test data corresponding to the test data packet includes: and matching the corresponding field data for each character string data through a preset regular matching model, and taking each field data as first test data.
With reference to the first aspect, the embodiment of the present invention provides a third possible implementation manner of the first aspect, where the step of locating the page to be tested includes: and acquiring a test script of a preset language through an automatic test tool, and positioning a page to be tested based on the test script.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the step of extracting, by a crawler operation, a hotspot element in the page to be tested includes: extracting an html (HyperText Markup Language ) code of the page to be tested, and analyzing the html code to obtain a hot spot element in the page to be tested.
With reference to the first aspect, the embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the first test data and the second test data both carry longitude and latitude data; the method further comprises the steps of: and if the test result is abnormal, determining the error position of the page to be tested based on the longitude and latitude data.
With reference to the first aspect, the embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the page to be tested is a page to be tested in a situation awareness system; the situation awareness system is a system for monitoring data security.
In a second aspect, an embodiment of the present invention further provides a device for testing a page hotspot, including: the first test data acquisition module is used for receiving the test data packet and acquiring first test data corresponding to the test data packet; the positioning module is used for positioning the page to be tested; the second test data acquisition module is used for extracting hot spot elements in the page to be tested through crawler operation and acquiring second test data corresponding to the hot spot elements; wherein the hotspot element is associated with the test data packet; and the comparison module is used for comparing the first test data with the second test data to obtain a test result.
In a third aspect, an embodiment of the present invention further provides a server, including a processor and a memory; the memory has stored thereon a computer program which, when executed by the processor, performs the method according to any of the sixth possible implementation manners of the first aspect to the first aspect.
In a fourth aspect, embodiments of the present invention further provide a computer storage medium storing computer software instructions for use with the method according to any one of the sixth possible implementation manners of the first aspect to the first aspect.
The embodiment of the invention has the following beneficial effects:
according to the method, the device and the server for testing the page hot spot, the test data packet is received, the first test data corresponding to the test data packet is obtained, then the page to be tested is positioned, hot spot elements related to the test data packet in the page to be tested are extracted through crawler operation, the second test data corresponding to the hot spot elements are obtained, and the test result can be obtained through comparison of the first test data and the second test data. Compared with the prior art that the hot spot positioning operation is repeatedly executed by the selenium to sequentially extract the hot spot elements, the embodiment of the invention can extract the hot spot elements more conveniently, reduce the time required for collecting the hot spot elements, and further effectively improve the testing efficiency of the page hot spot.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a detailed description of a method for testing a page hotspot according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for testing page elements according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for testing page elements according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a testing device for a page hotspot according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Based on the fact that the test efficiency of the page hot spot is low due to the fact that the hot spot elements are collected through the selenium in the prior art, the test method, the device and the server for the page hot spot can effectively improve the test efficiency of the page hot spot.
For the sake of understanding the present embodiment, first, a detailed description will be given of a method for testing a page hotspot disclosed in the present embodiment, where the method is executed by a test server, and referring to a flowchart of a method for testing a page hotspot shown in fig. 1, the method may include the following steps:
step S102, receiving the test data packet and obtaining first test data corresponding to the test data packet.
A test data packet may be understood as a test data source. In one embodiment, the test server may directly receive the test data packet sent by the user, and in another embodiment, the test server may receive the test data packet through the system under test; the tested system is a system for presenting a page to be tested, and the test server mainly performs hot spot test on the page to be tested of the tested system.
Step S104, positioning the page to be tested.
The page to be tested is a page to be tested in the tested system, and considering that if a plurality of pages exist in the tested system, the tested system may only display the test data packet through one of the pages (i.e. the page to be tested), so in order to reduce the workload required for extracting the hot spot elements corresponding to the test data packet, positioning operation needs to be performed on the page to be tested.
Step S106, extracting hot spot elements in the page to be tested through crawler operation, and acquiring second test data corresponding to the hot spot elements.
The hot spot elements are related to the test data packet, the hot spot elements represent information such as asset distribution, threat distribution and the like corresponding to the test data packet, and the hot spot elements in the page to be tested and second test data corresponding to the hot spot elements can be automatically obtained through crawler operation.
Step S108, comparing the first test data with the second test data to obtain a test result.
The test result comprises a comparison result of the first test data and the second test data, and the test result is used for reflecting whether the first test data and the second test data are identical or not. In general, the first test data and the second test data should be consistent, but if the tested system fails or is attacked maliciously, the tested system will cause errors when analyzing and displaying the test data packet, and the second test data will be different from the first test data, so that whether the tested system has an abnormality can be known in time by comparing the first test data with the second test data.
According to the method for testing the page hot spot, which is provided by the embodiment of the invention, firstly, a test data packet is received, first test data corresponding to the test data packet is obtained, then, a page to be tested is positioned, hot spot elements related to the test data packet in the page to be tested are extracted through crawler operation, further, second test data corresponding to the hot spot elements are obtained, and a test result can be obtained through comparison of the first test data and the second test data. Compared with the prior art that the hot spot positioning operation is repeatedly executed by the selenium to sequentially extract the hot spot elements, the embodiment of the invention can extract the hot spot elements more conveniently, reduce the time required for collecting the hot spot elements, and further effectively improve the testing efficiency of the page hot spot.
In order to facilitate understanding the method for testing the page hot spot provided in the foregoing embodiment, another method for testing the page element is further provided in the embodiment of the present invention, and referring to a flow chart of another method for testing the page element shown in fig. 2, the method may include the following steps:
step S202, receiving the test data packet through a preset port.
The preset port includes a user datagram protocol (UDP, user Datagram Protocol) port or a hypertext transfer protocol (HTTP, hyper Text Transport Protocol) port, wherein the UDP interface has higher transmission efficiency.
In addition, the test data packet includes a plurality of character string data, and in a specific implementation, the test data packet needs to be sent to a preset port according to a preset format, for example, the format of the specified character string is: source ip:1.1.1.1, target ip:1.1.1.1, source port: 80, destination port: 80, source position: province a-city b-zone c, target position: province a-city B-zone C, source latitude and longitude: 111 222, target longitude and latitude: 111, 222.
Step S204, matching corresponding field data for each character string data through a preset regular matching model, and taking each field data as first test data.
If the preset port is a UDP port, considering that the UDP interface may have data loss under the condition of poor network environment, performing regular matching processing on the test data packet received through the UDP port to obtain first test data corresponding to the test data packet so as to ensure the integrity of the test data packet.
In specific implementation, when a first target character is detected, the preset regular matching model takes a character string before the first target character as a field name, takes a character string before a second target character as a first field value, and so on. For example, if one piece of string data in the test data packet is "url & http://192.1.1.1& time &2019-09-09", and the target character of the regular matching model is the character "&", then "url" in the string data is a field name, "http://192.1.1.1" is a first field value, "time" is a second field value, and "2019-09-09" is a third field value.
Step S206, acquiring a test script of a preset language through an automatic test tool, and positioning a page to be tested based on the test script.
The automated test tool may be selenium, the preset language may be python, c++ or other design languages, and the test script may be a UI (User Interface) test script, by which a page to be tested may be located in the tested system.
And step S208, extracting html codes of the page to be tested, and analyzing the html codes to obtain hot spot elements in the page to be tested.
In one embodiment, the requests library may be used to extract html codes of the page to be tested, and then the Beau full library may be used to parse the html codes to obtain hot spot elements in the page to be tested.
Step S210, obtaining second test data corresponding to the hot spot elements.
The second test data may include asset data or hidden trouble data, and for the asset data, when the crawler operation is performed on the page to be tested, the data such as asset type, longitude and latitude data, data quantity and the like in the page to be tested should be extracted; when the crawler operation is performed on the page to be tested, the hidden danger data should be extracted from the page to be tested, such as attack IP (Internet Protocol, network protocol), longitude and latitude data or attack times.
In specific implementation, the test data packet may be received in real time and corresponding first test data may be obtained, and the crawler operation may be executed only in a preset test time, where the first test data obtained in real time may be stored in an ES (distributed database) corresponding to the tested system, and the second test data obtained through the crawler operation and the first test data corresponding to the crawler operation may be stored in a MySQL (relational database management system) database for subsequent comparison. For example, the preset test time interval is 5 minutes, first test data corresponding to the test data packet are obtained in real time, and hot spot elements in a page to be tested are extracted through crawler operation at the 5 th minute so as to obtain second test data; after the crawler operation is finished, continuously acquiring first test data corresponding to the test data packet in real time, and extracting hot spot elements in the page to be tested through the crawler operation at the next 5 th minute to obtain second test data at the moment.
Step S212, comparing the first test data with the second test data to obtain a test result.
In one embodiment, the test results obtained multiple times may be dynamically verified, for example, the test result M is obtained by first comparison, the test result N is obtained by second comparison after a preset test time interval, and the difference between the two page hot spot tests in the preset time interval may be obtained by verifying the test result M and the test result N.
In addition, if the test result shows that the tested system is abnormal, in order to conveniently locate the abnormal position, the first test data and the second test data both carry longitude and latitude data. Specifically, if the test result is abnormal, determining the error position of the page to be tested based on the longitude and latitude data. For example, the first test data stored in the ES is traversed through a preset test time interval, the first test data and the second test data under the same longitude and latitude data are compared, if the first test data and the second test data under the same longitude and latitude data are different, it is indicated that the position corresponding to the longitude and latitude data is abnormal, and then the error position of the page to be tested can be determined based on the longitude and latitude data.
In one embodiment, the page to be tested may be a page to be tested in a situational awareness system (i.e., the aforementioned tested system). The situation awareness system is used for monitoring data security, is based on security big data, and further improves security threat of the data from a global view to find, identify, process, analyze and respond to treatment.
The embodiment of the invention also provides another method for testing the page hot spot, referring to another method for testing the page hot spot shown in fig. 3, the method can comprise the following steps:
step 302, test data packets of the character string are received in batches through the UDP port of the test server. The format of the test data packet is a preset format, and the preset format comprises a data type, a data format, a data ordering and the like.
Step 304, a regular matching model is established, and based on the regular matching model, the first test data corresponding to the measured data packet is matched, and the first test data is stored in the ES. The first test data can carry data types, longitude and latitude data, test time and data change conditions, the matching process is to match a character string type test data packet into corresponding field data, the field data is the first test data, and the obtained first test data is stored in an ES (ES) referenced by a situation awareness system. In addition, in order to facilitate subsequent comparison, the first test data can be counted and stored in a MySQL database required by the test.
In one embodiment, test data packets are continuously received through a UDP interface of a test server according to a test scene, so that a dynamic test scene with linear growth is obtained. The test scene is a parameter of a received test data packet, and the dynamic test scene is a parameter of various received test data packets which change with time, for example, 500 test data packets are received in one minute, or 5000 test data packets are received in one minute.
And 306, performing page operation on the situation awareness system through a selenium browser automatic operation control. The page operation is to locate the page to be tested. Specifically, the written automatic UI test script is acquired through the selenium, and a specific page to be tested is positioned based on the UI test script. The computer-based language used by the UI test script described above is python.
Step 308, after locating the page to be tested, the crawler acquires second test data of the hotspot element on the situation awareness page. In the implementation, the html code of the page to be tested is extracted through the requests library, and the html code is analyzed through the Beautifullsource library to obtain the hot point elements of the page to be tested, so that the second test data corresponding to the hot point elements are obtained. In addition, the time for performing the crawler operation can be customized based on the actual situation, for example, the time interval for performing the crawler operation is 10 minutes or 20 minutes.
Step 310, store the second test data to MySQL database. In practice, it is necessary to store, for example, different data tables for different data types. For example, when the production data is saved to the asset table, the hidden danger class data is saved to the hidden danger table, and the event data is saved to the event table. In another embodiment, in order to facilitate comparison of the first test data and the second test data under the same test time, statistics may be performed on the test time and the field data of the first test data and the second test data, the latest sequential value taken at the statistical field represents the total value of the current test result, and the difference between the latest test result and the last test result represents the increment value of the test interval. In addition, the current test result can directly cover the last test result.
Step 312, data verification is performed on the first test data and the second test data.
In summary, compared with the method that the HTTP port is used to receive and acquire the first test data, in the embodiment of the invention, the UPD port is provided to receive the test data packet, and the regular matching model is used to obtain the first test data corresponding to the test data packet, so that the efficiency of the data transmission stage can be effectively improved; in addition, in the embodiment of the invention, the second data corresponding to the hotspot elements is obtained through the selenium positioning page and the crawler operation, compared with the situation that the hotspot elements are positioned only through the selenium in the prior art, the time required for positioning the hotspot elements can be effectively reduced, the workload required for positioning the hotspots is reduced, and on the other hand, the crawler operation also has the characteristic of full coverage, so that the extracted hotspot elements are more comprehensive and more accurate.
For the method for testing the page hotspot provided in the foregoing embodiment, the embodiment of the present invention further provides a device for testing the page hotspot, which is shown in fig. 4 and is a schematic structural diagram of the device for testing the page hotspot, where the device may include the following parts:
the first test data obtaining module 402 is configured to receive a test data packet and obtain first test data corresponding to the test data packet.
A positioning module 404, configured to position the page to be tested.
The second test data obtaining module 406 is configured to extract a hotspot element in the page to be tested through a crawler operation, and obtain second test data corresponding to the hotspot element; wherein the hotspot element is associated with the test data packet.
The comparison module 408 is configured to compare the first test data with the second test data to obtain a test result.
According to the page hot spot testing device provided by the embodiment of the invention, firstly, the first testing data acquisition module receives the testing data packet and acquires the first testing data corresponding to the testing data packet, then the positioning module positions the page to be tested, the second testing data acquisition module extracts hot spot elements related to the testing data packet in the page to be tested through crawler operation, further acquires the second testing data corresponding to the hot spot elements, and the comparison module can obtain a testing result through comparing the first testing data and the second testing data. Compared with the prior art that the hot spot positioning operation is repeatedly executed by the selenium to sequentially extract the hot spot elements, the embodiment of the invention can extract the hot spot elements more conveniently, reduce the time required for collecting the hot spot elements, and further effectively improve the testing efficiency of the page hot spot.
In one embodiment, the first test data acquisition module 402 is further configured to: receiving a test data packet through a preset port; the preset port comprises a user datagram protocol port or a hypertext transfer protocol port.
In one embodiment, the test data packet includes a plurality of character string data. The preset port is a user datagram protocol port, and the first test data obtaining module 402 is further configured to: and matching corresponding field data for each character string data through a preset regular matching model, and taking each field data as first test data.
In one embodiment, the positioning module 404 is further configured to: and acquiring a test script of a preset language through an automatic test tool, and positioning a page to be tested based on the test script.
In one embodiment, the second test data acquisition module 406 is further configured to: and extracting the html code of the page to be tested, and analyzing the html code to obtain the hot spot elements in the page to be tested.
In an implementation manner, the first test data and the second test data both carry longitude and latitude data, and the test device for the page hotspot provided by the embodiment of the invention further includes an error position determining module, configured to determine, if the test result is abnormal, an error position of the page to be tested based on the longitude and latitude data.
The device provided by the embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
The device is a server, and in particular, the server comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the embodiments described above.
Fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 100 includes: a processor 50, a memory 51, a bus 52 and a communication interface 53, the processor 50, the communication interface 53 and the memory 51 being connected by the bus 52; the processor 50 is arranged to execute executable modules, such as computer programs, stored in the memory 51.
The memory 51 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is achieved via at least one communication interface 53 (which may be wired or wireless), and the internet, wide area network, local network, metropolitan area network, etc. may be used.
Bus 52 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 5, but not only one bus or type of bus.
The memory 51 is configured to store a program, and the processor 50 executes the program after receiving an execution instruction, and the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 50 or implemented by the processor 50.
The processor 50 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware in the processor 50 or by instructions in the form of software. The processor 50 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 51 and the processor 50 reads the information in the memory 51 and in combination with its hardware performs the steps of the above method.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and the specific implementation may refer to the foregoing method embodiment and will not be described herein.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. The method for testing the page hot spot is characterized by comprising the following steps of:
receiving a test data packet and acquiring first test data corresponding to the test data packet;
positioning a page to be tested; the page to be tested is a page to be tested in the situation awareness system; the situation awareness system is used for monitoring data security;
extracting hot spot elements in the page to be tested through crawler operation, and acquiring second test data corresponding to the hot spot elements; the hot spot elements are related to the test data packet, the hot spot elements represent asset distribution and threat distribution information corresponding to the test data packet, and the second test data comprise asset data or hidden danger data; for asset data, extracting asset types, longitude and latitude data and data quantity in the page to be tested when the crawler operation is carried out on the page to be tested; extracting attack IP, longitude and latitude data or attack times in the page to be tested when the crawler operation is carried out on the page to be tested for the hidden danger data;
comparing the first test data with the second test data to obtain a test result;
the step of receiving the test data packet includes: receiving a test data packet through a preset port;
the preset port is a user datagram protocol port, and the step of obtaining the first test data corresponding to the test data packet includes: matching corresponding field data for each character string data through a preset regular matching model, and taking each field data as first test data;
the step of matching corresponding field data for each character string data through a preset regular matching model and taking each field data as first test data comprises the following steps: when a first target character is detected, the preset regular matching model takes a character string before the first target character as a field name, takes a character string before a second target character as a first field value, and so on.
2. The method of claim 1, wherein the step of locating the page to be tested comprises:
and acquiring a test script of a preset language through an automatic test tool, and positioning a page to be tested based on the test script.
3. The method of claim 1, wherein the step of extracting the hotspot element in the page to be tested by a crawler operation comprises:
and extracting the html code of the page to be tested, and analyzing the html code to obtain the hot spot element in the page to be tested.
4. The method of claim 1, wherein the first test data and the second test data each carry latitude and longitude data;
the method further comprises the steps of:
and if the test result is abnormal, determining the error position of the page to be tested based on the longitude and latitude data.
5. A device for testing a page hotspot, comprising:
the first test data acquisition module is used for receiving the test data packet and acquiring first test data corresponding to the test data packet;
the positioning module is used for positioning the page to be tested; the page to be tested is a page to be tested in the situation awareness system; the situation awareness system is used for monitoring data security;
the second test data acquisition module is used for extracting hot spot elements in the page to be tested through crawler operation and acquiring second test data corresponding to the hot spot elements; the hot spot elements are related to the test data packet, the hot spot elements represent asset distribution and threat distribution information corresponding to the test data packet, and the second test data comprise asset data or hidden danger data; for asset data, extracting asset types, longitude and latitude data and data quantity in the page to be tested when the crawler operation is carried out on the page to be tested; extracting attack IP, longitude and latitude data or attack times in the page to be tested when the crawler operation is carried out on the page to be tested for the hidden danger data;
the comparison module is used for comparing the first test data with the second test data to obtain a test result;
the first test data acquisition module is further configured to: receiving a test data packet through a preset port;
the preset port is a user datagram protocol port, and the first test data acquisition module is further configured to: matching corresponding field data for each character string data through a preset regular matching model, and taking each field data as first test data;
the first test data acquisition module is further configured to: when a first target character is detected, the preset regular matching model takes a character string before the first target character as a field name, takes a character string before a second target character as a first field value, and so on.
6. A server comprising a processor and a memory;
the memory has stored thereon a computer program which, when executed by the processor, performs the method of any of claims 1 to 4.
7. A computer storage medium storing computer software instructions for use with the method of any one of claims 1 to 4.
CN201910673990.8A 2019-07-24 2019-07-24 Page hot spot testing method and device and server Active CN110362498B (en)

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 CN110362498A (en) 2019-10-22
CN110362498B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563051B (en) * 2020-07-16 2020-10-20 平安国际智慧城市科技股份有限公司 Crawler-based data verification method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
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
CN106294101A (en) * 2015-05-19 2017-01-04 阿里巴巴集团控股有限公司 The page gets method of testing and device ready
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846634B2 (en) * 2014-06-25 2017-12-19 Vmware, Inc. Visual graphical user interface verification
US10091356B2 (en) * 2015-01-06 2018-10-02 Cyara Solutions Pty Ltd Interactive voice response system crawler
US10565095B2 (en) * 2016-12-15 2020-02-18 Syntel, Inc. Hybrid testing automation engine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820634A (en) * 2014-12-25 2015-08-05 平安科技(深圳)有限公司 Method and device for detecting page test track
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
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

Also Published As

Publication number Publication date
CN110362498A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN111221743B (en) Automatic test method and system
CN110275958B (en) Website information identification method and device and electronic equipment
CN112235326B (en) Internet of things equipment data analysis method and device and electronic equipment
CN105446706B (en) Method and device for evaluating form page use effect and providing original data
CN109710508A (en) Test method, test device, test equipment and computer readable storage medium
CN106776901B (en) Data extraction method, device and system
CN106201886A (en) The Proxy Method of the checking of a kind of real time data task and device
CN111190807B (en) Buried point testing method and equipment
CN109002391A (en) The method of automatic detection embedded software interface testing data
CN110704304A (en) Application program testing method and device, storage medium and server
CN110866259A (en) Method and system for calculating potential safety hazard score based on multi-dimensional data
CN110362498B (en) Page hot spot testing method and device and server
CN116346456A (en) Business logic vulnerability attack detection model training method and device
CN109995706B (en) Security audit method and device, electronic equipment and storage medium
US9749352B2 (en) Apparatus and method for collecting harmful website information
CN110413500B (en) Fault analysis method and device based on big data fusion
CN110798481A (en) Malicious domain name detection method and device based on deep learning
CN115987549A (en) Abnormal behavior detection method and device of mobile terminal and storage medium
CN108063811B (en) Intelligent equipment network access tracking method and component
EP2937801A1 (en) Harmful site collection device and method
CN110769076A (en) DNS (Domain name System) testing method and system
CN114416596A (en) Application testing method and device, computer equipment and storage medium
CN114385514A (en) Method, equipment and storage medium for detecting webpage elements
CN112187708B (en) Automatic supplementing method and equipment for certificate chain of digital certificate
CN111131351B (en) Method and device for confirming model of Internet of things equipment

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