CN110008118B - Page data testing method and device, computer equipment and storage medium - Google Patents

Page data testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110008118B
CN110008118B CN201910188972.0A CN201910188972A CN110008118B CN 110008118 B CN110008118 B CN 110008118B CN 201910188972 A CN201910188972 A CN 201910188972A CN 110008118 B CN110008118 B CN 110008118B
Authority
CN
China
Prior art keywords
data
crawling
page
tested terminal
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
CN201910188972.0A
Other languages
Chinese (zh)
Other versions
CN110008118A (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910188972.0A priority Critical patent/CN110008118B/en
Publication of CN110008118A publication Critical patent/CN110008118A/en
Priority to PCT/CN2019/122569 priority patent/WO2020181839A1/en
Application granted granted Critical
Publication of CN110008118B publication Critical patent/CN110008118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Landscapes

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

Abstract

The application relates to a page data testing method, a page data testing device, computer equipment and a storage medium. The method comprises the following steps: asynchronously acquiring data crawling requests sent by a tested terminal to corresponding business process nodes; extracting a service flow node identifier in the data crawling request; acquiring a test configuration file corresponding to the service process node identification; generating simulated crawling data corresponding to the business process node identification according to the test configuration file; asynchronously sending the simulated crawling data corresponding to the generated service flow node identifiers to the tested terminal; and after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page testing report. By adopting the method, the time consumed by crawling data through the server can be saved, so that the page testing efficiency is improved.

Description

Page data testing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of test technologies, and in particular, to a method and an apparatus for testing page data, a computer device, and a storage medium.
Background
With the development of computer technology and the development of the internet, more and more companies develop corresponding business application software for their companies, and with the processing of various businesses, the businesses can be processed by the business application software, and in the business processing process, each function module of the mobile phone needs to be called as required.
However, during the development process of the business application software, the developed business application software needs to be tested. The service application software often includes a plurality of pages, in order to ensure that the service application software can normally operate, each page needs to be tested, and the service application software often triggers a data crawling request through each page. The data are crawled through the server according to the data crawling request, the page is updated according to the crawled data, the crawling data need to consume a certain time, and the page testing efficiency is low.
Disclosure of Invention
In view of the above, it is necessary to provide a page data testing method, an apparatus, a computer device and a storage medium capable of improving page testing efficiency.
A method of testing page data, the method comprising:
asynchronously acquiring data crawling requests sent by a tested terminal to corresponding business process nodes;
extracting a service flow node identifier in the data crawling request;
acquiring a test configuration file corresponding to the service flow node identification;
generating simulated crawling data corresponding to the business process node identification according to the test configuration file;
asynchronously sending the simulated crawling data corresponding to each generated service flow node identifier to a tested terminal;
and after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page test report.
A page data testing apparatus, the apparatus comprising:
the system comprises a crawling request acquisition module, a crawling request acquisition module and a crawling request sending module, wherein the crawling request acquisition module is used for asynchronously acquiring data crawling requests sent by a tested terminal to corresponding business process nodes;
the node identification extraction module is used for extracting the service flow node identification in the data crawling request;
the test file acquisition module is used for acquiring a test configuration file corresponding to the service process node identification;
the simulation data generation module is used for generating simulation crawling data corresponding to the business process node identification according to the test configuration file;
the simulated data sending module is used for asynchronously sending the simulated crawling data corresponding to the generated service flow node identifiers to the tested terminal;
and the test report obtaining module is used for recording the page updating state of the tested terminal after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, so as to obtain a page test report.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
asynchronously acquiring data crawling requests sent by a tested terminal to corresponding business process nodes;
extracting a service flow node identifier in the data crawling request;
acquiring a test configuration file corresponding to the service flow node identification;
generating simulated crawling data corresponding to the business process node identification according to the test configuration file;
asynchronously sending the simulated crawling data corresponding to the generated service flow node identifiers to the tested terminal;
and after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page test report.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
asynchronously acquiring data crawling requests sent by a tested terminal corresponding to each business process node;
extracting a service flow node identifier in the data crawling request;
acquiring a test configuration file corresponding to the service process node identification;
generating simulated crawling data corresponding to the business process node identification according to the test configuration file;
asynchronously sending the simulated crawling data corresponding to the generated service flow node identifiers to the tested terminal;
and after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page testing report.
According to the page data testing method, the page data testing device, the computer equipment and the storage medium, after the data crawling request sent by the tested terminal corresponding to each business process node is asynchronously obtained, simulated crawling data corresponding to the data crawling request are generated according to the test configuration file corresponding to each business process node identification, and the data crawling through a server is not required according to the data crawling request. And the generated simulated crawling data corresponding to each service process node identification is asynchronously sent to the tested terminal, so that the tested terminal updates the page according to the asynchronously received simulated crawling data, and generates a page test report according to the page updating state, thereby saving the time consumed by crawling data through the server and improving the page test efficiency.
Drawings
FIG. 1 is a diagram of an application scenario of a page data testing method in one embodiment;
FIG. 2 is a flowchart illustrating a method for testing page data according to one embodiment;
FIG. 3 is a schematic flow diagram that illustrates the steps of intercepting a data crawling request in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating the steps for generating simulated crawling data in one embodiment;
FIG. 5 is a flowchart illustrating the steps of obtaining crawl data in one embodiment;
FIG. 6 is a flowchart illustrating the steps in generating a page test report in one embodiment;
FIG. 7 is a block diagram showing the structure of a page data test apparatus according to an embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The page data testing method provided by the application can be applied to the application environment shown in fig. 1. The application environment of fig. 1 includes a test terminal 102, a terminal under test 104, and a server 106. The test terminal 102 and the terminal under test communicate with the server 106 through a network, and the test terminal 102 and the terminal under test 104 may be connected through a network or may be connected through a data line. The test terminal 102 and the terminal 104 under test may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 106 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a page data testing method is provided, which is described by taking the application of the method to the testing terminal in fig. 1 as an example, and includes the following steps:
s202, asynchronously acquiring data crawling requests sent by the tested terminal corresponding to the business process nodes.
The tested terminal is provided with the service application, and the page in the service application can be displayed in the tested terminal. And the pages in the service application correspond to the service flow nodes respectively. The data crawling request is a request instructing a server to crawl data.
Specifically, the tested terminal displays a page corresponding to the business process node, when a crawling data identifier is detected to be input into the page, the input crawling data identifier is obtained, the business process node identifier corresponding to the current page is extracted, a data crawling request is generated according to the crawling data identifier and the business process node identifier, and the data crawling request is sent to the testing terminal. The test terminal asynchronously receives a plurality of data crawling requests sent by the tested terminal.
In one embodiment, the tested terminal asynchronously generates a plurality of data crawling requests according to the obtained crawling data identifiers when obtaining the crawling data identifiers input in the plurality of asynchronously obtained pages.
For example, a tested terminal generates a first data crawling request according to a crawling data identifier input in a first page, sends the generated first data crawling request to a testing terminal, and the testing terminal receives the first data crawling request; the tested terminal is switched to a second page from the first page, a second data crawling request is generated according to a crawling data identifier input in the second page, the generated second data crawling request is sent to the testing terminal, and the testing terminal receives the second data crawling request; and the test terminal asynchronously receives the first data crawling request and the second data crawling request.
And S204, extracting the service process node identification in the data crawling request.
Specifically, after asynchronously receiving a plurality of data crawling requests, the test terminal analyzes each data crawling request, and extracts a service flow node identifier in the data crawling request through analysis. The service flow node identifier is a unique identifier of a node constituting the service flow.
S206, acquiring a test configuration file corresponding to the service process node identification.
Specifically, the test terminal stores test configuration files corresponding to the service flow node identifiers respectively. The test configuration file comprises test parameters to be configured in the test process. And the test terminal inquires the test configuration file corresponding to the service process node identification in the stored test configuration files and extracts the inquired test configuration file.
And S208, generating simulated crawling data corresponding to the service process node identification according to the test configuration file.
Specifically, after the test terminal acquires the test configuration file, the test configuration file is analyzed, the configuration crawling data of the test configuration file is extracted, and the extracted configuration crawling data is used as simulated crawling data corresponding to the service process node identification.
In one embodiment, the test terminal extracts a storage address of the simulated crawling data in the test configuration file, accesses a storage space according to the extracted storage address, extracts the simulated crawling data in the accessed storage space, and takes the extracted simulated crawling data as simulated crawling data corresponding to the business process node identifier.
And S210, asynchronously sending the simulated crawling data corresponding to the generated service process node identifications to the tested terminal.
Specifically, after generating a plurality of simulated crawling data corresponding to each service flow node identifier, the test terminal asynchronously sends the generated simulated crawling data to the tested terminal.
For example, after generating the simulated crawling data corresponding to the first business process node identifier, the test terminal sends the simulated crawling data to the tested terminal without receiving response information of the tested terminal, and then the test terminal sends the simulated crawling data corresponding to the second business process node identifier to the terminal, and the test terminal asynchronously sends the simulated crawling data corresponding to the first business process node identifier and the simulated crawling data corresponding to the second business process node identifier to the tested terminal.
And S212, after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page test report.
Specifically, after asynchronously receiving the simulated crawling data corresponding to each service process node identifier, the tested terminal performs service approval according to the simulated crawling data to obtain a service approval result, obtains page data corresponding to the service approval result, performs page updating according to the obtained page data, records a page updating state, and sends the recorded page updating state to the test terminal. And the test terminal receives the page updating state sent by the tested terminal and generates a page test report according to the page updating state.
In this embodiment, after the data crawling request sent by the tested terminal corresponding to each service flow node is asynchronously obtained, the simulated crawling data corresponding to the data crawling request is generated according to the test configuration file corresponding to each service flow node identifier, and it is not necessary to crawl the data through a server according to the data crawling request. And the generated simulated crawling data corresponding to each service process node identification is asynchronously sent to the tested terminal, so that the tested terminal updates the page according to the asynchronously received simulated crawling data, and generates a page test report according to the page updating state, thereby saving the time consumed by crawling data through the server and improving the page test efficiency.
As shown in fig. 3, in an embodiment, S202 further includes a step of intercepting the data crawling request, where the step includes the following steps:
s302, an authority verification request is sent to the tested terminal.
Specifically, after the connection between the test terminal and the tested terminal is established, the test terminal acquires preset verification information, generates an authority verification request according to the preset verification information, and sends the authority verification request to the tested terminal through the established connection. The established connection may be a wireless connection or a wired connection.
In one embodiment, S302 specifically includes: acquiring a test instruction carrying a service flow node identifier; inquiring a test case corresponding to the service flow node identification carried in the test instruction; and sending an authority verification request to the tested terminal according to the test case.
Specifically, a test page is displayed in the test terminal, when a test button in the test page is detected to be clicked, a service flow node identifier recorded in the test page is acquired, and a test instruction is generated according to the service flow node identifier. The test terminal queries a test case corresponding to the service flow node identification carried in the test instruction in the test case library, extracts preset verification information from the queried test case, and generates an authority verification request according to the extracted preset verification information. The test case library stores test cases corresponding to the business process nodes respectively. The test case is a file written for testing the page of the tested terminal.
S304, acquiring the verification passing notice triggered by the tested terminal on the permission verification page according to the permission verification request.
Specifically, the tested terminal receives the permission verification request sent by the test terminal, analyzes the permission verification request, extracts the preset verification information in the permission verification request through analysis, and displays the preset verification information in a permission verification page. And when the tested terminal detects that the verification pass button in the authority verification page is clicked, generating a verification pass notification.
And S306, monitoring the data crawling request sent by the tested terminal according to the verification passing notification.
Specifically, after receiving the verification passing notification, the test terminal monitors a data crawling request sent by the tested terminal to identify the monitored data crawling request and identify whether the data crawling request is the data crawling request sent by the tested terminal to the server.
And S308, intercepting the data crawling request sent by the tested terminal when the tested terminal is monitored to send the data crawling request to the server.
Specifically, when a data crawling request sent by a tested terminal is monitored and identified as the data crawling request sent by the tested terminal to a server, the data crawling request sent by the tested terminal is intercepted so as to prevent the tested terminal from sending the data crawling request to the server.
In this embodiment, the monitoring authority of the terminal to be tested is obtained by sending the authority verification request to the terminal to be tested and verifying the authority verification request by the terminal to be tested. And after the monitoring authority is acquired, the data crawling request sent by the tested terminal is monitored, so that the intercepting accuracy of the data crawling request sent to the server is improved.
As shown in fig. 4, in an embodiment, the step S208 further includes a step of generating simulated crawling data, which includes the following steps:
s402, inquiring the historical crawling data corresponding to the business process node identification in the stored historical crawling data.
Specifically, the test terminal intercepts the crawling data sent by the server to the tested terminal, extracts the service flow node identification in the intercepted crawling data, uses the intercepted crawling data as historical crawling data, and stores the corresponding extracted service flow node identification in the database. And the test terminal inquires the historical crawling data corresponding to the business process node identification in the stored historical crawling data.
S404, extracting parameter identification and scene configuration parameters in the test configuration file.
Specifically, the test terminal analyzes the test configuration file, and extracts the parameter identifier and the scene configuration parameter in the test configuration file through analysis. The scene configuration parameters are parameters for configuring different scenes. The parameter identifier is an identifier of a parameter to be configured.
And S406, configuring parameters corresponding to the parameter identifiers in the inquired historical crawling data according to the scene configuration parameters, and generating simulated crawling data.
Specifically, the test terminal determines parameters corresponding to the parameter identifiers in the inquired historical crawling data, modifies the determined parameters according to the scene configuration parameters to obtain modified parameters, and takes the modified parameters as simulated crawling data.
In one embodiment, the test terminal determines parameters corresponding to the parameter identifiers in the queried historical crawling data, replaces the determined parameters with scene configuration parameters, and generates simulated crawling data.
In this embodiment, the historical crawling data corresponding to the service flow node identifier is queried in the stored historical crawling data, the historical crawling data is modified according to the test configuration file corresponding to the service flow node identifier, and the simulated crawling data corresponding to the service flow node identifier is generated, so that the generation efficiency of the simulated crawling data is improved.
As shown in fig. 5, in an embodiment, the page data testing method further includes a step of obtaining the crawl data, where the step specifically includes the following steps:
and S502, when historical crawling data corresponding to the business process node identification is not inquired, extracting a server address from the data crawling request corresponding to the business process node identification.
Specifically, when the historical crawling data corresponding to the business process node identifier is not queried by the test terminal, the data crawling request corresponding to the business process node identifier is analyzed, and the server address in the data crawling request is extracted through analysis.
In one embodiment, when historical crawling data corresponding to the business process node identification is queried, the parameter identification and the scene configuration parameter in the test configuration file are extracted.
S504, the data crawling request is sent to a server corresponding to the server address.
Specifically, the test terminal encapsulates the data crawling request again according to the extracted server address, and sends the encapsulated data crawling request to a server corresponding to the server address. And the server receives the encapsulated data crawling request sent by the test terminal.
And S506, intercepting the crawling data returned to the tested terminal by the server according to the data crawling request.
Specifically, after the server receives the data crawling request, the data crawling request is analyzed, the crawling data identification in the data crawling request is analyzed, data crawling is carried out according to the crawling data identification, the crawling data corresponding to the crawling data identification is obtained, and the crawling data is returned to the tested terminal. The testing terminal monitors crawling data sent by the server to the tested terminal and intercepts the monitored crawling data.
And S508, storing the intercepted crawling data as historical crawling data, and sending the intercepted crawling data serving as simulated crawling data to the tested terminal.
Specifically, the test terminal uses the intercepted crawling data as historical crawling data from the service flow node identifier in the intercepted crawling data, stores the historical crawling data corresponding to the service flow node identifier, and sends the intercepted crawling data serving as simulated crawling data to the tested terminal.
In one embodiment, the test terminal extracts the crawling data identification in the intercepted crawling data, and stores the intercepted crawling data as historical crawling data corresponding to the extracted crawling data identification.
In the embodiment, when historical crawling data corresponding to the business process node identification is not inquired, the data crawling request is directly sent to the server, the server conducts data crawling according to the data crawling request, the obtained crawling data is sent to the tested terminal as the simulated crawling data, the success rate of obtaining the simulated crawling data is improved, the obtained crawling data is stored as the historical crawling data, the simulated crawling data is quickly generated according to the historical crawling data next time, and therefore the efficiency and the accuracy of generating the simulated crawling data are improved.
As shown in fig. 6, in an embodiment, the S212 specifically includes a step of generating a page test report, where the step specifically includes the following steps:
and S602, after the tested terminal updates the page according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal.
Specifically, after the tested terminal asynchronously receives the simulated crawling data corresponding to each data crawling request, the current page is updated according to the simulated crawling data, and the page updating state is recorded. And the test terminal acquires the page updating state recorded by the tested terminal. The page update state comprises at least one of a page identifier, page content and page display parameters.
S604, obtaining the expected updating state of the page corresponding to the asynchronously received simulated crawling data.
Specifically, the test terminal obtains a test configuration file, and extracts an expected page update state from the test configuration file, where the expected page update state includes at least one of an expected page identifier, expected page content, and expected page display parameters.
S606, comparing the page updating state with the expected page updating state, and generating a page test report.
Specifically, the test terminal extracts the page updating state and the expected page updating state, compares the extracted page updating state with the expected page updating state, verifies the consistency of the page updating state and the expected page updating state to obtain a verification result, and generates a page test report according to the verification result.
In the embodiment, after the tested terminal updates the page according to the data processing result, the page updating state is recorded, the recorded page updating state and the expected page updating state are verified, and the page test report is generated according to the verification result, so that the accuracy of the page test report is improved.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided a page data testing apparatus 700 including: a crawling request obtaining module 702, a node identification extracting module 704, a test file obtaining module 706, a simulation data generating module 708, a simulation data sending module 710, and a test report obtaining module 712, wherein:
a crawling request obtaining module 702, configured to asynchronously obtain data crawling requests sent by the measured terminal to corresponding business process nodes.
And a node identifier extracting module 704, configured to extract the service flow node identifier in the data crawling request.
A test file obtaining module 706, configured to obtain a test configuration file corresponding to the service flow node identifier.
And the simulation data generation module 708 is configured to generate simulation crawling data corresponding to the service flow node identifier according to the test configuration file.
And the simulated data sending module 710 is configured to asynchronously send the simulated crawling data corresponding to each generated service flow node identifier to the terminal to be tested.
The test report obtaining module 712 is configured to record a page update state of the terminal to be tested after the terminal to be tested performs page update according to the asynchronously received simulated crawling data, so as to obtain a page test report.
In one embodiment, the crawling request obtaining module 702 is further configured to send an authority verification request to the terminal to be tested; acquiring a verification passing notice triggered by the tested terminal on a permission verification page according to the permission verification request; monitoring a data crawling request sent by the tested terminal according to the verification passing notification; and when the monitored terminal sends a data crawling request to the server, intercepting the data crawling request sent by the monitored terminal.
In one embodiment, the crawling request obtaining module 702 is further configured to obtain a test instruction carrying the service flow node identifier; inquiring a test case corresponding to the service flow node identification carried in the test instruction; and sending an authority verification request to the tested terminal according to the test case.
In one embodiment, the simulation data generation module 708 is further configured to query, from the stored historical crawl data, historical crawl data corresponding to the business process node identifier; extracting parameter identification and scene configuration parameters in the test configuration file; and according to the scene configuration parameters, configuring parameters corresponding to the parameter identifiers in the inquired historical crawling data, and generating simulated crawling data.
In one embodiment, the simulation data generation module 708 is further configured to extract a server address from the data crawling request corresponding to the business process node identifier when the historical crawling data corresponding to the business process node identifier is not queried; sending the data crawling request to a server corresponding to the server address; intercepting the crawling data returned to the tested terminal by the server according to the data crawling request; and storing the intercepted crawling data as historical crawling data, and sending the intercepted crawling data serving as simulated crawling data to the tested terminal.
In one embodiment, the test report obtaining module 712 is further configured to record a page update state of the terminal under test after the terminal under test updates the page according to the simulated crawling data received asynchronously; acquiring a page expected updating state corresponding to the asynchronously received simulated crawling data; and comparing the page updating state with the expected page updating state to generate a page test report.
In this embodiment, after the data crawling request sent by the tested terminal corresponding to each service flow node is asynchronously obtained, the simulated crawling data corresponding to the data crawling request is generated according to the test configuration file corresponding to each service flow node identifier, and it is not necessary to crawl the data through a server according to the data crawling request. And asynchronously sending the simulated crawling data corresponding to each generated service flow node identifier to the tested terminal, so that the tested terminal updates the page according to the asynchronously received simulated crawling data and generates a page test report according to the page updating state, thereby saving the time consumed by crawling data through the server and improving the page test efficiency.
For the specific definition of the page data testing device, reference may be made to the definition of the page data testing method above, and details are not described here. All or part of each module in the page data testing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of testing page data. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: asynchronously acquiring data crawling requests sent by a tested terminal corresponding to each business process node; extracting a service flow node identifier in the data crawling request; acquiring a test configuration file corresponding to the service process node identification; generating simulated crawling data corresponding to the service process node identification according to the test configuration file; asynchronously sending the simulated crawling data corresponding to each generated service flow node identifier to a tested terminal; and after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page testing report.
In one embodiment, asynchronously acquiring data crawling requests sent by a tested terminal corresponding to each business process node includes: sending an authority verification request to a tested terminal; acquiring a verification passing notice triggered by the tested terminal on a permission verification page according to the permission verification request; monitoring a data crawling request sent by the tested terminal according to the verification passing notification; and intercepting the data crawling request sent by the tested terminal when the tested terminal is monitored to send the data crawling request to the server.
In one embodiment, the sending of the permission verification request to the tested terminal includes: acquiring a test instruction carrying a service flow node identifier; inquiring a test case corresponding to the service flow node identification carried in the test instruction; and sending an authority verification request to the tested terminal according to the test case.
In one embodiment, generating simulated crawling data corresponding to the business process node identifier according to the test configuration file includes: inquiring historical crawling data corresponding to the business process node identification in the stored historical crawling data; extracting parameter identification and scene configuration parameters in the test configuration file; and according to the scene configuration parameters, configuring parameters corresponding to the parameter identifiers in the inquired historical crawling data, and generating simulated crawling data.
In one embodiment, after querying the stored historical crawling data corresponding to the business process node identifier, the processor when executing the computer program further implements the following steps: when historical crawling data corresponding to the business process node identification is not inquired, extracting a server address from a data crawling request corresponding to the business process node identification; sending the data crawling request to a server corresponding to the server address; intercepting the crawling data returned to the tested terminal by the server according to the data crawling request; and storing the intercepted crawling data as historical crawling data, and sending the intercepted crawling data serving as simulated crawling data to the tested terminal.
In one embodiment, after the tested terminal performs page update according to the asynchronously received simulated crawling data, the page update state of the tested terminal is recorded, and the obtaining of the page test report includes: after the tested terminal updates the page according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal; acquiring a page expected updating state corresponding to the asynchronously received simulated crawling data; and comparing the page updating state with the expected page updating state to generate a page test report.
In this embodiment, after the data crawling request sent by the tested terminal corresponding to each service flow node is asynchronously obtained, the simulated crawling data corresponding to the data crawling request is generated according to the test configuration file corresponding to each service flow node identifier, and it is not necessary to crawl the data through a server according to the data crawling request. And asynchronously sending the simulated crawling data corresponding to each generated service flow node identifier to the tested terminal, so that the tested terminal updates the page according to the asynchronously received simulated crawling data and generates a page test report according to the page updating state, thereby saving the time consumed by crawling data through the server and improving the page test efficiency.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: asynchronously acquiring data crawling requests sent by a tested terminal to corresponding business process nodes; extracting a service flow node identifier in the data crawling request; acquiring a test configuration file corresponding to the service flow node identification; generating simulated crawling data corresponding to the service process node identification according to the test configuration file; asynchronously sending the simulated crawling data corresponding to each generated service flow node identifier to a tested terminal; and after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page testing report.
In one embodiment, asynchronously acquiring data crawling requests sent by a tested terminal corresponding to each business process node includes: sending a permission verification request to a tested terminal; acquiring a verification passing notice triggered by a tested terminal on a permission verification page according to the permission verification request; monitoring a data crawling request sent by the tested terminal according to the verification passing notification; and when the monitored terminal sends a data crawling request to the server, intercepting the data crawling request sent by the monitored terminal.
In one embodiment, the sending of the permission verification request to the terminal to be tested includes: acquiring a test instruction carrying a service flow node identifier; inquiring a test case corresponding to the service flow node identification carried in the test instruction; and sending an authority verification request to the tested terminal according to the test case.
In one embodiment, generating simulated crawling data corresponding to the business process node identifier according to the test configuration file includes: inquiring historical crawling data corresponding to the service flow node identification in the stored historical crawling data; extracting parameter identification and scene configuration parameters in the test configuration file; and according to the scene configuration parameters, configuring parameters corresponding to the parameter identifiers in the inquired historical crawling data, and generating simulated crawling data.
In one embodiment, after querying the stored historical crawl data for historical crawl data corresponding to business process node identifications, the computer program when executed by the processor further performs the steps of: when historical crawling data corresponding to the business process node identification is not inquired, extracting a server address from a data crawling request corresponding to the business process node identification; sending the data crawling request to a server corresponding to the server address; intercepting the crawling data returned to the tested terminal by the server according to the data crawling request; and storing the intercepted crawling data as historical crawling data, and sending the intercepted crawling data serving as simulated crawling data to the tested terminal.
In one embodiment, after the tested terminal performs page update according to the asynchronously received simulated crawling data, the page update state of the tested terminal is recorded, and the obtaining of the page test report includes: after the tested terminal updates the page according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal; acquiring a page expected updating state corresponding to the asynchronously received simulated crawling data; and comparing the page updating state with the expected page updating state to generate a page test report.
In this embodiment, after the data crawling request sent by the tested terminal corresponding to each service flow node is asynchronously obtained, the simulated crawling data corresponding to the data crawling request is generated according to the test configuration file corresponding to each service flow node identifier, and it is not necessary to crawl the data through a server according to the data crawling request. And the generated simulated crawling data corresponding to each service process node identification is asynchronously sent to the tested terminal, so that the tested terminal updates the page according to the asynchronously received simulated crawling data, and generates a page test report according to the page updating state, thereby saving the time consumed by crawling data through the server and improving the page test efficiency.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A method of testing page data, the method comprising:
asynchronously acquiring data crawling requests sent by a tested terminal corresponding to each business process node;
extracting a service flow node identifier in the data crawling request;
acquiring a test configuration file corresponding to the service process node identification;
generating simulated crawling data corresponding to the business process node identification according to the test configuration file;
asynchronously sending the simulated crawling data corresponding to the generated service flow node identifiers to the tested terminal;
after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal to obtain a page test report;
the method comprises the following steps that the step of asynchronously acquiring the data crawling request sent by the tested terminal corresponding to each service process node comprises the following steps:
sending an authority verification request to the tested terminal;
acquiring a verification passing notice triggered by the tested terminal on a permission verification page according to the permission verification request;
monitoring a data crawling request sent by the tested terminal according to the verification passing notification;
and intercepting the data crawling request sent by the tested terminal when the data crawling request sent by the tested terminal to a server is monitored.
2. The method according to claim 1, wherein the sending of the permission verification request to the terminal under test comprises:
acquiring a test instruction carrying a service flow node identifier;
inquiring a test case corresponding to the service flow node identification carried in the test instruction;
and sending an authority verification request to the tested terminal according to the test case.
3. The method of claim 1, wherein the generating simulated crawling data corresponding to the business process node identifier according to the test configuration file comprises:
inquiring historical crawling data corresponding to the business process node identification in the stored historical crawling data;
extracting parameter identification and scene configuration parameters in the test configuration file;
and according to the scene configuration parameters, configuring parameters corresponding to the parameter identifiers in the inquired historical crawling data to generate simulated crawling data.
4. The method of claim 3, wherein after querying the stored historical crawl data for historical crawl data corresponding to the business process node identification, further comprising:
when historical crawling data corresponding to the business process node identification is not inquired, extracting a server address from a data crawling request corresponding to the business process node identification;
sending the data crawling request to a server corresponding to the server address;
intercepting the crawling data returned to the tested terminal by the server according to the data crawling request;
and storing the intercepted crawling data as historical crawling data, and sending the intercepted crawling data serving as simulated crawling data to the tested terminal.
5. The method of claim 1, wherein the recording of the page update status of the terminal under test after the terminal under test performs page update according to the asynchronously received simulated crawling data, and obtaining a page test report comprises:
after the tested terminal updates the page according to the asynchronously received simulated crawling data, recording the page updating state of the tested terminal;
acquiring a page expected updating state corresponding to the asynchronously received simulated crawling data;
and comparing the page updating state with the expected page updating state to generate a page test report.
6. A page data testing apparatus, the apparatus comprising:
the system comprises a crawling request acquisition module, a data crawling request sending module and a data crawling request sending module, wherein the crawling request acquisition module is used for asynchronously acquiring data crawling requests sent by a tested terminal corresponding to various business process nodes;
the node identification extraction module is used for extracting the service flow node identification in the data crawling request;
the test file acquisition module is used for acquiring a test configuration file corresponding to the service process node identification;
the simulation data generation module is used for generating simulation crawling data corresponding to the business process node identification according to the test configuration file;
the simulation data sending module is used for asynchronously sending the simulation crawling data corresponding to the generated service process node identifications to the tested terminal;
the test report obtaining module is used for recording the page updating state of the tested terminal after the tested terminal carries out page updating according to the asynchronously received simulated crawling data, so as to obtain a page test report;
the crawling request acquisition module is further used for sending a permission verification request to the tested terminal; acquiring a verification passing notice triggered by the tested terminal on a permission verification page according to the permission verification request; monitoring a data crawling request sent by the tested terminal according to the verification passing notification; and intercepting the data crawling request sent by the tested terminal when the data crawling request sent by the tested terminal to a server is monitored.
7. The apparatus according to claim 6, wherein the crawling request obtaining module is specifically configured to obtain a test instruction carrying a service flow node identifier; inquiring a test case corresponding to the service flow node identification carried in the test instruction; and sending an authority verification request to the tested terminal according to the test case.
8. The apparatus according to claim 6, wherein the simulation data generation module is specifically configured to query historical crawl data corresponding to the business process node identifier from stored historical crawl data; extracting parameter identification and scene configuration parameters in the test configuration file; and according to the scene configuration parameters, configuring parameters corresponding to the parameter identifiers in the inquired historical crawling data to generate simulated crawling data.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201910188972.0A 2019-03-13 2019-03-13 Page data testing method and device, computer equipment and storage medium Active CN110008118B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910188972.0A CN110008118B (en) 2019-03-13 2019-03-13 Page data testing method and device, computer equipment and storage medium
PCT/CN2019/122569 WO2020181839A1 (en) 2019-03-13 2019-12-03 Page data testing method, apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910188972.0A CN110008118B (en) 2019-03-13 2019-03-13 Page data testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110008118A CN110008118A (en) 2019-07-12
CN110008118B true CN110008118B (en) 2023-03-10

Family

ID=67167020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910188972.0A Active CN110008118B (en) 2019-03-13 2019-03-13 Page data testing method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110008118B (en)
WO (1) WO2020181839A1 (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008118B (en) * 2019-03-13 2023-03-10 深圳壹账通智能科技有限公司 Page data testing method and device, computer equipment and storage medium
CN110659517A (en) * 2019-08-30 2020-01-07 深圳壹账通智能科技有限公司 Data verification method and device, computer equipment and storage medium
CN110730107B (en) * 2019-09-02 2022-07-12 深圳壹账通智能科技有限公司 Test data generation method and device, computer equipment and storage medium
CN111176641B (en) * 2019-12-03 2023-06-02 泰康保险集团股份有限公司 Flow node execution method, device, medium and electronic equipment
CN111209187B (en) * 2019-12-26 2024-03-15 深圳市奇迅新游科技股份有限公司 Service request processing method, device, computer equipment and storage medium
CN111177003A (en) * 2019-12-30 2020-05-19 北京同邦卓益科技有限公司 Test method, device, system, electronic equipment and storage medium
CN111324629B (en) * 2020-02-19 2023-08-15 望海康信(北京)科技股份公司 Service data processing method and device, electronic equipment and computer storage medium
CN112269744A (en) * 2020-10-30 2021-01-26 深圳壹账通智能科技有限公司 System abnormity testing method and device, computer equipment and storage medium
CN112433944A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Service testing method, device, computer equipment and storage medium
CN112416350A (en) * 2020-12-14 2021-02-26 深圳壹账通智能科技有限公司 View page construction method and device, computer equipment and storage medium
CN112527654A (en) * 2020-12-16 2021-03-19 康键信息技术(深圳)有限公司 Test case preparation method and device, computer equipment and storage medium
CN112650683B (en) * 2020-12-28 2024-06-14 京东科技控股股份有限公司 Program testing method, device and storage medium
CN114756446A (en) * 2021-01-11 2022-07-15 腾讯科技(深圳)有限公司 Interface debugging method and device
CN112817849B (en) * 2021-01-28 2024-06-04 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium
CN113765735A (en) * 2021-04-19 2021-12-07 北京沃东天骏信息技术有限公司 Application testing method, device, equipment and storage medium
CN113268417B (en) * 2021-05-18 2023-09-22 北京京东振世信息技术有限公司 Task execution method and device
CN113254337A (en) * 2021-05-24 2021-08-13 北京创源微致软件有限公司 Software function testing system, method and server
CN113467855B (en) * 2021-06-24 2024-03-19 北京达佳互联信息技术有限公司 Webpage request processing method and device, electronic equipment and storage medium
CN113434410A (en) * 2021-06-25 2021-09-24 青岛海尔科技有限公司 Data testing method and device, storage medium and electronic device
CN114780432B (en) * 2022-05-11 2024-08-13 平安国际智慧城市科技股份有限公司 Interface testing method, device, equipment and storage medium
CN114780822A (en) * 2022-06-20 2022-07-22 云账户技术(天津)有限公司 Method and device for crawling application program data, electronic equipment and storage medium
CN116010239B (en) * 2022-10-25 2023-12-08 汇通达网络股份有限公司 Automatic test method based on assembly line
CN116527548B (en) * 2023-06-26 2023-09-05 中国电信股份有限公司江西分公司 IPv 6-based dynamic test method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407099A (en) * 2015-07-28 2017-02-15 阿里巴巴集团控股有限公司 Test method and client
CN107102937A (en) * 2016-02-19 2017-08-29 腾讯科技(深圳)有限公司 A kind of ui testing method and apparatus
CN107256195A (en) * 2017-06-08 2017-10-17 武汉斗鱼网络科技有限公司 Webpage front-end method of testing and device
CN107688526A (en) * 2017-08-25 2018-02-13 上海壹账通金融科技有限公司 Performance test methods, device, computer equipment and the storage medium of application program
CN107729352A (en) * 2017-08-30 2018-02-23 上海壹账通金融科技有限公司 page resource loading method and terminal device
CN108268375A (en) * 2018-01-12 2018-07-10 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN108427635A (en) * 2018-01-03 2018-08-21 深圳壹账通智能科技有限公司 Quickly method, server and the computer readable storage medium of test web page
CN108848000A (en) * 2018-05-07 2018-11-20 深圳壹账通智能科技有限公司 Network request test method, device, computer equipment and storage medium
CN109359050A (en) * 2018-11-15 2019-02-19 北京奇虎科技有限公司 Webpage test method, device and system
CN109413153A (en) * 2018-09-26 2019-03-01 深圳壹账通智能科技有限公司 Data crawling method, device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170300402A1 (en) * 2016-04-19 2017-10-19 Sap Se Mock server and extensions for application testing
CN110008118B (en) * 2019-03-13 2023-03-10 深圳壹账通智能科技有限公司 Page data testing method and device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407099A (en) * 2015-07-28 2017-02-15 阿里巴巴集团控股有限公司 Test method and client
CN107102937A (en) * 2016-02-19 2017-08-29 腾讯科技(深圳)有限公司 A kind of ui testing method and apparatus
CN107256195A (en) * 2017-06-08 2017-10-17 武汉斗鱼网络科技有限公司 Webpage front-end method of testing and device
CN107688526A (en) * 2017-08-25 2018-02-13 上海壹账通金融科技有限公司 Performance test methods, device, computer equipment and the storage medium of application program
CN107729352A (en) * 2017-08-30 2018-02-23 上海壹账通金融科技有限公司 page resource loading method and terminal device
CN108427635A (en) * 2018-01-03 2018-08-21 深圳壹账通智能科技有限公司 Quickly method, server and the computer readable storage medium of test web page
CN108268375A (en) * 2018-01-12 2018-07-10 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN108848000A (en) * 2018-05-07 2018-11-20 深圳壹账通智能科技有限公司 Network request test method, device, computer equipment and storage medium
CN109413153A (en) * 2018-09-26 2019-03-01 深圳壹账通智能科技有限公司 Data crawling method, device, computer equipment and storage medium
CN109359050A (en) * 2018-11-15 2019-02-19 北京奇虎科技有限公司 Webpage test method, device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Automock: Automated Mock Backend Generation for Javascript;Neha Singhal et al.;《GLOBAL JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY》;20161231;第1-9页 *
基于监听和过滤器技术的Web服务身份验证;龙鹏飞等;《计算机技术与发展》;20060310(第03期);全文 *

Also Published As

Publication number Publication date
CN110008118A (en) 2019-07-12
WO2020181839A1 (en) 2020-09-17

Similar Documents

Publication Publication Date Title
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN109446068B (en) Interface test method, device, computer equipment and storage medium
CN108920354B (en) Embedded point management method and device, computer equipment and storage medium
CN110008117A (en) Page test method, device, computer equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN109375884B (en) Application log printing method, device, computer equipment and storage medium
CN112637008B (en) Link simulation test method, device, system, computer equipment and storage medium
CN110908778B (en) Task deployment method, system and storage medium
CN108959384B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN111078507A (en) Data monitoring method, system, computer equipment and storage medium
CN111475376A (en) Method and device for processing test data, computer equipment and storage medium
CN108418797B (en) Webpage access method and device, computer equipment and storage medium
CN109542764B (en) Webpage automatic testing method and device, computer equipment and storage medium
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
CN112423281B (en) Wireless module upgrading method, device, computer equipment and storage medium
CN111190609B (en) Service processing method, device, equipment and storage medium
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN109257426B (en) Service line resource loading method and device, computer equipment and storage medium
CN113342767A (en) Log generation method, device, equipment and storage medium
CN112527357A (en) Service hot loading updating method and device, computer equipment and storage medium
CN112783866B (en) Data reading method, device, computer equipment and storage medium
CN115221156A (en) Database cluster capacity expansion method and device, computer equipment and storage medium
CN111328068B (en) Card writing method and device, computer equipment and storage medium
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium

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