CN117421237A - Data testing method and device, electronic equipment and computer storage medium - Google Patents

Data testing method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN117421237A
CN117421237A CN202311482090.8A CN202311482090A CN117421237A CN 117421237 A CN117421237 A CN 117421237A CN 202311482090 A CN202311482090 A CN 202311482090A CN 117421237 A CN117421237 A CN 117421237A
Authority
CN
China
Prior art keywords
data
test
tested
client
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311482090.8A
Other languages
Chinese (zh)
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.)
Beijing Taoyoutianxia Technology Co ltd
Original Assignee
Beijing Taoyoutianxia Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Taoyoutianxia Technology Co ltd filed Critical Beijing Taoyoutianxia Technology Co ltd
Priority to CN202311482090.8A priority Critical patent/CN117421237A/en
Publication of CN117421237A publication Critical patent/CN117421237A/en
Pending legal-status Critical Current

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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3684Test management for test design, e.g. generating new test cases

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 embodiment of the application provides a data testing method, a data testing device, electronic equipment and a computer storage medium, and relates to the field of data testing. The method comprises the following steps: the agent terminal receives the data to be tested sent by the test terminal and sends the data to be tested to the client terminal; recording test information of a client for data to be tested; if a detection instruction sent by the test end is received, comparing the test information with preset standard test information to obtain a test result. According to the data testing method, the testing end sends the instruction to the client end to conduct testing, the agent end records the testing information in real time, when the testing end indicates to start detecting data, the agent end conducts testing correctness checking on the recorded testing information, a database is not required to be accessed to conduct checking, and the method is convenient in deployment testing and low in cost.

Description

Data testing method and device, electronic equipment and computer storage medium
Technical Field
The present application relates to the field of data testing, and in particular, to a data testing method, a data testing device, an electronic device, and a computer storage medium.
Background
In the field of page testing technology of the internet, there is a need to intercept page dotting requests and collect various browsing and operating behaviors of users on web pages using a dotting manner. The 'dotting' refers to that for an internet product of a network page type, when a user accesses a page, the page dotting request is intercepted by a data server, and data of the network request including user behaviors and page display effects are collected, so that the page dotting request can be intercepted and interesting dotting data can be collected according to different focuses of the product. The data server intercepts the page dotting request and acquires the detection result in a certain mode after collecting the dotting data.
The existing test scheme needs to have a designated position for storing test information, generally a database at a server side, after the client side collects the test information, the test information is stored in the designated database through an agent, and when the test information is inquired, the database is required to be accessed for checking the test correctness, so that the test scheme is more troublesome in deployment of test and higher in cost compared with the method relying on a third party to store service.
Disclosure of Invention
The embodiment of the application aims to solve the problems that the existing test scheme depends on a third-party storage intermediary, the cost for executing the test is high, and the deployment test is troublesome. The technical scheme is as follows:
In a first aspect, the present application provides a data testing method, applied to an agent, including:
receiving data to be tested sent by a test terminal, and sending the data to be tested to a client;
recording test information of the client for the data to be tested;
and if a detection instruction sent by the test end is received, comparing the test information with preset standard test information to obtain a test result.
In an optional embodiment of the first aspect, before the recording the test information of the client for the data to be tested, the method further includes:
receiving a page display success notification of the client for the data to be tested;
sending the page display success notification to the test terminal, receiving a start test notification sent by the test terminal in response to the page display success notification, and sending the start test notification to the client terminal so that the client terminal can respond to the start test notification to perform a test to generate test information;
the recording the test information of the client for the data to be tested includes:
and responding to the start test notification, and starting to record the test information of the client.
In an optional embodiment of the first aspect, the receiving the data to be tested sent by the testing end, before sending the data to be tested to the client, further includes:
receiving a test request uploaded by the client;
the receiving the data to be tested sent by the testing end, and sending the data to be tested to the client end includes:
receiving data to be tested sent by a test terminal;
determining interface data from the data to be tested according to the test request, and sending the interface data to the client; the interface data is used for displaying a corresponding test page on the client.
In an optional embodiment of the first aspect, the recording test information of the client for the data to be tested includes:
responding to dotting operation performed on the test page at a position to be tested, and recording dotting information corresponding to the dotting operation;
the step of comparing the test information with preset standard test information, and before obtaining the test result, further comprises the steps of:
recording dotting information of the client for the data to be tested;
and taking the dotting information as the test information.
In a second aspect, the present application provides a data testing method, applied to a testing end, including:
Generating data to be tested and sending the data to be tested to an agent end; the proxy end is used for sending the data to be tested to the client end and recording the test information of the client end for the data to be tested;
sending a detection instruction to the proxy end; the detection instruction is used for indicating the proxy end to compare the test information with preset standard test information, and a test result is obtained.
In an optional embodiment of the second aspect, the sending a detection instruction to the proxy end includes:
if the recorded test information meets the preset condition, sending a detection instruction to the proxy end; wherein the preset condition includes that the number of the recorded test information is equal to a preset test frequency, and/or the data volume of the recorded test information is equal to a preset threshold.
In a third aspect, the present application provides a data testing method, applied to a client, including:
receiving data to be tested sent by a proxy terminal; the data to be tested is sent to the proxy end by the test end;
generating test information based on the data to be tested; the agent end is used for recording the test information, and if a detection instruction sent by the test end is received, the test information is compared with preset standard test information, and a test result is obtained.
In a fourth aspect, there is provided a data testing apparatus, the apparatus comprising:
the first receiving module is used for receiving data to be tested sent by the testing end and sending the data to be tested to the client;
the recording module is used for recording the test information of the client for the data to be tested;
and the comparison module is used for comparing the test information with preset standard test information if a detection instruction sent by the test end is received, and obtaining a test result.
In a fifth aspect, there is provided a data testing apparatus, the apparatus comprising:
the generation module is used for generating data to be tested and sending the data to be tested to the proxy end; the agent end is used for sending data to be tested to the client end and recording test information of the client end aiming at the data to be tested;
the sending module is used for sending a detection instruction to the proxy end; the detection instruction is used for indicating the proxy end to compare the test information with preset standard test information, and a test result is obtained.
In a sixth aspect, there is provided a data testing apparatus, the apparatus comprising:
the second receiving module is used for receiving the data to be tested sent by the proxy end; the data to be tested is sent to the proxy end by the test end;
The test module is used for generating test information based on the data to be tested; the agent end is used for recording the test information, and if a detection instruction sent by the test end is received, the test information is compared with preset standard test information, and a test result is obtained.
In a seventh aspect, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the steps of the method according to any of the first, second or third aspects of the present application.
In an eighth aspect, there is provided a computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the data testing method of any of the first, second or third aspects of the present application.
The beneficial effects that technical scheme that this application embodiment provided brought are:
according to the data testing method, the testing end sends the instruction to the client end to conduct testing, the agent end records the testing information in real time, the testing information can be stored in a local designated position, when the testing end indicates the agent end to start detecting data, the agent end conducts correctness checking on the locally recorded testing information and standard testing information, the testing information and the standard testing information do not need to be stored in a third-party database to conduct data query and checking, the cost of executing testing is low, and the method is convenient in deploying testing.
Further, the testing end generates data to be tested according to the testing requirement of the user, the data to be tested is transmitted to the client through the proxy end, the client displays a page corresponding to the test according to the data to be tested, and tests the testing page, so that the user can enter the page appointed by the user requirement, and user experience is improved.
In addition, the test terminal instructs the proxy terminal to record the test information of the client terminal through the signal, the test terminal instructs the proxy terminal to start recording the test information of the client terminal aiming at the test operation through starting the test notification, instructs the proxy terminal to stop recording the test information when the test information meets the preset condition, instructs the proxy terminal to start or stop recording the test information, records the test information meeting the requirement, can reduce the storage of invalid information, and improves the test efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is an application scenario schematic diagram of a data testing method provided in an embodiment of the present application;
fig. 2 is a flow chart of a data testing method applied to a proxy end according to an embodiment of the present application;
Fig. 3 is a flow chart of a data testing method applied to a testing end according to an embodiment of the present application;
fig. 4 is a flow chart of a testing method applied to client data according to an embodiment of the present application;
fig. 5 is a flowchart illustrating an example of a data testing method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data testing device applied to a proxy end according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data testing device applied to a testing end according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data testing device applied to a client according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device suitable for the data testing method provided in the embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this application, specify the presence of stated features, information, data, steps, operations, and components, but do not preclude the presence or addition of other features, information, data, steps, operations, components, and/or groups thereof, that may be included in the present application. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For a better description and understanding of the solutions provided by the embodiments of the present application, some related technical terms involved in the embodiments of the present application will be first described:
proxy (Proxy): is a computer network technology for acting as an intermediary between clients and target servers. The proxy receives requests from the client and forwards the requests to the target server, and then returns the server's response to the client.
Dotting operation: refers to the addition of code in a software development or application to record, track and analyze specific events, behaviors or data. By inserting tracking code at strategic locations, user interaction, execution paths of applications, and other important data can be captured.
Dotting information: refers to data and information collected by adding a dotting operation in a software development or application. Dotting information records specific events, behaviors, or data, and is commonly used for the purposes of functional verification, behavior analysis, performance monitoring, error debugging, data statistics, and the like.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the prior art, after the client collects the test information, the test information is stored in a designated database through the proxy, and when the test information is queried, the database is required to be accessed to check the test correctness, so that the client is more troublesome in deploying the test and higher in cost compared with the client which relies on a third party to store the service.
Aiming at least one technical problem or the place needing improvement in the related art, the application provides a data testing method, a device, electronic equipment and a computer storage medium.
Further, the testing end generates data to be tested according to the testing requirement of the user, the data to be tested is transmitted to the client through the proxy end, the client displays a page corresponding to the test according to the data to be tested, and tests the testing page, so that the user can enter the page appointed by the user requirement, and user experience is improved.
In addition, the test terminal instructs the proxy terminal to record the test information of the client terminal through the signal, the test terminal instructs the proxy terminal to start recording the test information of the client terminal aiming at the test operation through starting the test notification, instructs the proxy terminal to stop recording the test information when the test information meets the preset condition, instructs the proxy terminal to start or stop recording the test information, records the test information meeting the requirement, can reduce the storage of invalid information, and improves the test efficiency.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
Fig. 1 is a schematic application scenario diagram of a data testing method provided in the embodiment of the present application, where an application environment may include a testing end 101, a client 102, and a proxy end 103 that may be installed on the client 102; the client 102 may be provided with an application to be tested, and data transmission between the test terminal 101 and the client 102 is to be implemented through the proxy 103, where the test terminal 101 and the proxy 103 may be connected through a network.
Specifically, the test end 101 generates data to be tested and sends the data to be tested to the proxy end 103, the proxy end 103 sends the data to be tested to the client end 102, the client end 102 performs testing of a designated page according to the data to be tested, the test end 101 sends a signal to the proxy end 103 to start recording test information of the client end 102, after the required test information is obtained, the test end 101 sends an end signal to the proxy end 103, after the required test information is recorded, the test end 101 sends a detection instruction to the proxy end 103, so that the proxy end 103 performs comparison test of the test information, and a test result of the time is obtained.
In the application scenario, the test end 101 instructs the client 102 to perform a test through the proxy end 103 to obtain test information, and instructs the proxy end 103 to record the test information and perform detection of the test information, so as to obtain a detection result without using a third party storage tool; the proxy 103 may be deployed on another terminal or server different from the test terminal 101 and the client 102, where the proxy 103, the test terminal 101 and the client 102 may be connected through a network. The application scenario described above is only an example, and is not limited to the application scenario of the data testing method of the present application.
It will be appreciated by those skilled in the art that the terminal may be a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a notebook computer, a digital broadcast receiver, a MID (Mobile Internet Devices, a mobile internet device), a PDA (personal digital assistant), a desktop computer, a smart home appliance, a vehicle-mounted terminal (e.g., a vehicle-mounted navigation terminal, a vehicle-mounted computer, etc.), a smart speaker, a smart watch, etc., and the terminal and the server may be directly or indirectly connected by wired or wireless communication, but are not limited thereto.
The server may include a server installed with a capability to handle database operations. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server or a server cluster for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligent platforms, and the like. The embodiment of the invention can be applied to various scenes, including but not limited to cloud technology, artificial intelligence, intelligent transportation, auxiliary driving and the like. And in particular, the method can be determined based on actual application scene requirements, and is not limited herein.
In some possible embodiments, taking an executing body as an agent end capable of applying a data testing method as an example, the embodiment of the present application provides a data testing method, as shown in fig. 2, may include the following steps:
s201, receiving data to be tested sent by a test end, and sending the data to be tested to a client.
The data to be tested can be test data which is generated by the test end and is used for simulating the starting of the application program of the client.
Specifically, a pipeline signal mechanism can be used between the proxy end and the testing end, data is transmitted through a pipeline, the proxy end can receive the data to be tested sent by the testing end through the pipeline, and the data to be tested is sent to the client end, so that the client end displays a corresponding page to be tested according to the data to be tested.
In a specific implementation process, the proxy end may include WDA (WebDriverAgent), where WDA is a tool for providing support for an application program, and may implement automatic testing and UI testing through it, and help to improve quality and stability of the application program.
S202, recording test information of the client for the data to be tested.
Wherein the test information may include dotting information, which may include specific events, behaviors, or data.
In the specific implementation process, after the client receives data to be tested and starts testing, the proxy records the testing information of the client and stores the recorded testing information in a preset storage position; the agent end can be installed on the client end, and the preset storage position can comprise a preset storage position on the client end; and the test information is stored in the position appointed by the client, and the data storage on the third party platform is not needed.
And S203, if a detection instruction sent by the test end is received, comparing the test information with preset standard test information to obtain a test result.
Specifically, if a detection instruction transmitted by the test end through a pipeline is received, the proxy end acquires test information from a preset storage position, and compares the test information with preset standard test information to acquire a test result; test information is stored in a preset position, the correctness detection of data is supported locally, the third party is low in storage and service dependence, the familiarity cost and use case debugging cost of scene automation can be reduced, and the popularization difficulty of the scene automation can be reduced.
In the specific implementation process, if the ratio of the same information as the preset standard test information to the total information is larger than or equal to the preset ratio, the test result is that the test information is correct, and if the ratio of the same information to the total information is smaller than the preset ratio, the test result is that the test information is incorrect.
In some possible embodiments, before recording the test information of the client for the data to be tested in S202, the method further includes:
(1) Receiving a page display success notification of the client for the data to be tested;
(2) Sending the page display success notification to the test terminal, receiving a start test notification sent by the test terminal in response to the page display success notification, and sending the start test notification to the client terminal so that the client terminal can respond to the start test notification to perform a test to generate test information;
the recording the test information of the client for the data to be tested includes:
(3) And responding to the start test notification, and starting to record the test information of the client.
Specifically, after receiving the data to be tested, the client displays a corresponding test page, generates a page display success notification, sends the page display success notification to the proxy, sends the notification to the test terminal, the test terminal receives the notification to determine that the page is displayed, can start testing, generates a start test notification, sends the start test notification to the proxy, sends the start test notification to the client to start testing, and intercepts and records test information generated by the client.
In some possible embodiments, the step S201 of receiving the data to be tested sent by the testing end, and before sending the data to be tested to the client, further includes:
(1) Receiving a test request uploaded by the client;
the receiving the data to be tested sent by the testing end, and sending the data to be tested to the client end includes:
(2) Receiving data to be tested sent by a test terminal;
(3) Determining interface data from the data to be tested according to the test request, and sending the interface data to the client; the interface data is used for displaying a corresponding test page on the client.
The test request may include a page requesting a test, data requesting a test, and an associated interface.
Specifically, a test request of a client and data to be tested of the test end are received, interface data are determined from the data to be tested according to the test request, the interface data are sent to the client, and a corresponding interface is triggered, so that a corresponding test page is displayed on the client for subsequent testing; the data to be tested contains page information preset by a user, and after the interface information is extracted from the data to be tested according to the request, the client displays a test page required by the user, so that user experience can be improved.
In some possible embodiments, the recording the test information of the client for the data to be tested in S202 includes:
(1) Responding to dotting operation performed on the test page at a position to be tested, and recording dotting information corresponding to the dotting operation;
the step of comparing the test information with preset standard test information, and before obtaining the test result, further comprises the steps of:
(2) Recording dotting information of the client for the data to be tested;
(3) And taking the dotting information as the test information.
The dotting operation can comprise accessing the attribute of the object, calling a method, accessing array elements, nesting operation and the like; the dotting information is data and information collected based on the dotting operation.
Specifically, the dotting information can be used as test information, the client performs dotting operation on the position to be tested of the test page, the dotting information is generated, and the proxy records the dotting information generated for the dotting operation.
In the specific implementation process, the position to be tested can be determined through a buried point, wherein the buried point is a technology for inserting codes into key events or interaction points of an application program to track, record and collect user behavior data; one to-be-tested position may correspond to one piece of dotting information, and a plurality of to-be-tested positions may correspond to a plurality of pieces of dotting information.
In some possible embodiments, taking an execution body as an example of a test end capable of applying a data testing method, the embodiment of the present application provides a data testing method, as shown in fig. 3, may include the following steps:
s301, generating data to be tested and sending the data to be tested to an agent end; the proxy end is used for sending the data to be tested to the client end and recording the test information of the client end for the data to be tested.
The data to be tested may include test object information, client information where the test object is located, and specific test data.
Specifically, data to be tested is generated according to test requirements, the data to be tested is sent to the proxy end through the pipeline, the proxy end sends the data to be tested to the client end, the client end displays a test page according to the data to be tested, test information is generated based on the test page, and the proxy end records the test information.
S302, sending a detection instruction to the proxy end; the detection instruction is used for indicating the proxy end to compare the test information with preset standard test information, and a test result is obtained.
In the specific implementation process, after the proxy end is instructed to finish recording the test information, the correctness of the test information can be verified, a detection instruction is sent to the proxy end, and the proxy end compares the recorded test information with preset standard test information, so that a test result is obtained.
In some possible embodiments, the sending the detection instruction to the proxy in step S302 includes:
(1) And if the recorded test information meets the preset condition, sending a detection instruction to the proxy end.
Wherein the preset condition includes that the number of the recorded test information is equal to a preset test frequency, and/or the data volume of the recorded test information is equal to a preset threshold.
In the specific implementation process, the agent end records test information, whether the recorded test information meets preset conditions is determined, whether the test information is stopped is determined, if the recorded test information meets the preset conditions, the test end sends a stop test notification to the agent end, the agent end is instructed to stop recording the test information, and then the test end sends a detection instruction to the agent end through a channel to perform subsequent detection operation; after the page is successfully displayed, the test end instructs the client to start testing and the proxy end to start recording test information, and when the recorded test information meets preset conditions, instructs the proxy end to stop recording the test information and instructs the client end to stop the test process, and instructs to start and end recording of the test information according to actual conditions, so that the recording and storage of invalid information can be reduced, the test efficiency can be improved, and the resource waste is reduced.
In some possible embodiments, taking an execution body as an example of a client capable of applying a data testing method, the embodiment of the present application provides a data testing method, as shown in fig. 4, may include the following steps:
s401, receiving data to be tested sent by an agent terminal; the data to be tested is sent to the proxy end by the test end.
Specifically, after receiving data to be tested, the client can extract relevant information about the test page from the data, trigger a corresponding interface according to the relevant information, and display the corresponding test page; the transmission process of the data to be tested is that the data is sent from the test end to the proxy end and then sent from the proxy end to the client end, and the test end does not directly transfer the data with the client end.
S402, generating test information based on the data to be tested; the agent end is used for recording the test information, and if a detection instruction sent by the test end is received, the test information is compared with preset standard test information, and a test result is obtained.
Specifically, a corresponding test page is generated based on data to be tested, and test operation is performed on the test page according to the data to be tested, so that test information for the test operation is obtained, the generated test information is recorded to a preset position by an agent end, when a detection instruction sent by the test end through a pipeline is received, the test information is compared with preset standard test information, the correctness of the test information is determined, and a test result is obtained.
In the embodiment, the test terminal sends the instruction to the client terminal for testing through the proxy terminal, the proxy terminal records the test information in real time, the test information can be stored in a local designated position, when the test terminal indicates the proxy terminal to start detecting data, the proxy terminal checks the correctness of the locally recorded test information and standard test information, the data is not required to be queried and checked after being stored in the third party database, the cost for executing the test is low, and the test is convenient when the test is deployed.
Further, the testing end generates data to be tested according to the testing requirement of the user, the data to be tested is transmitted to the client through the proxy end, the client displays a page corresponding to the test according to the data to be tested, and tests the testing page, so that the user can enter the page appointed by the user requirement, and user experience is improved.
In addition, the test terminal instructs the proxy terminal to record the test information of the client terminal through the signal, the test terminal instructs the proxy terminal to start recording the test information of the client terminal aiming at the test operation through starting the test notification, instructs the proxy terminal to stop recording the test information when the test information meets the preset condition, instructs the proxy terminal to start or stop recording the test information, records the test information meeting the requirement, can reduce the storage of invalid information, and improves the test efficiency.
For a clearer understanding of the data testing methods described in the embodiments of the present application, further details are set forth below in connection with examples.
In one example, the data testing method of the present application, as shown in fig. 5, may include:
the test terminal generates data to be tested and sends the data to be tested to the proxy terminal (namely, the notification proxy simulation application program shown in the figure starts related test data), the proxy terminal can also be called local proxy service, the proxy terminal receives the data to be tested sent by the test terminal and sends the data to be tested to the client terminal, the client terminal installs the application program to be tested on the client terminal, the client terminal displays a test page (namely, the starting application shown in the figure enters a scene) according to the data to be tested, generates a page display success notification and sends the page display success notification to the proxy terminal, the proxy terminal receives the page display success notification and sends the page display success notification to the test terminal, the test terminal sends a start test notification to the proxy terminal (namely, the notification proxy terminal starts recording dotting information shown in the figure), and sends the start test notification to the client terminal, the client terminal performs dotting operation (namely, the notification application shown in the figure) at the test position to be tested, the proxy terminal records dotting information corresponding to the dotting operation and stores the dotting operation in a preset storage position (namely, the data is stored in the figure), namely, the test information is tested, if the recorded test information meets a preset condition, the test information stops sending the test stop instruction through a pipeline to the proxy terminal stops sending the test terminal to the test stop instruction (namely, the test stop instruction is recorded in the test terminal stops sending the test result to the test information according to the preset test instruction).
Optionally, a shortcut access mode of the target page can be preset in the client, so that simulation operation access of the page affected by different strategies of the client is reduced, a dotting data acquisition interface is also required to be preset in the client, and the automation framework can conveniently access and acquire data directly; and the formal package and the test package of the client are required to be processed in a distinguishing way, so that the test entry is prevented from appearing on the formal version.
According to the data testing method, the testing end sends the instruction to the client end to conduct testing, the agent end records the testing information in real time, the testing information can be stored in the local designated position, when the testing end indicates the agent end to start detecting data, the agent end conducts correctness checking on the locally recorded testing information and standard testing information, the agent end does not need to store the testing information and the standard testing information into a third-party database to conduct data query and checking, the cost of executing testing is low, and the method is convenient in deploying testing.
Further, the testing end generates data to be tested according to the testing requirements of the user, the data to be tested is transmitted to the client through the proxy end, the client displays a page corresponding to the test according to the data to be tested, and tests the testing page, so that the user can enter the page appointed by the user requirements, the user experience is improved, the data can be timely adjusted according to the requirements, and the scene page which the user wants can be simulated.
In addition, the test terminal instructs the proxy terminal to record the test information of the client terminal through the signal, the test terminal instructs the proxy terminal to start recording the test information of the client terminal aiming at the test operation through starting the test notification, instructs the proxy terminal to stop recording the test information when the test information meets the preset condition, instructs the proxy terminal to start or stop recording the test information, records the test information meeting the requirement, can reduce the storage of invalid information, and improves the test efficiency.
An embodiment of the present application provides a data testing apparatus, as shown in fig. 6, the apparatus 60 may include: a first acceptance module 601, a recording module 602, and a comparison module 603, wherein,
the first receiving module 601 is configured to receive data to be tested sent by a testing end, and send the data to be tested to a client;
a recording module 602, configured to record test information of the client for the data to be tested;
and the comparison module 603 is configured to compare the test information with preset standard test information if a detection instruction sent by the test end is received, and obtain a test result.
An embodiment of the present application provides a data testing apparatus, as shown in fig. 7, the apparatus 70 may include: a generation module 701 and a transmission module 702, wherein,
The generating module 701 is configured to generate data to be tested and send the data to be tested to an agent end; the agent end is used for sending data to be tested to the client end and recording test information of the client end aiming at the data to be tested;
a sending module 702, configured to send a detection instruction to the proxy end; the detection instruction is used for indicating the proxy end to compare the test information with preset standard test information, and a test result is obtained.
An embodiment of the present application provides a data testing apparatus, as shown in fig. 8, the apparatus 80 may include: a second receiving module 801 and a testing module 802, wherein,
a second receiving module 801, configured to receive data to be tested sent by the proxy end; the data to be tested is sent to the proxy end by the test end;
a test module 802, configured to generate test information based on the data to be tested; the agent end is used for recording the test information, and if a detection instruction sent by the test end is received, the test information is compared with preset standard test information, and a test result is obtained.
In the data testing device provided by the application, the testing end sends the instruction to the client for testing through the proxy end, the proxy end records the testing information in real time, the testing information can be stored in a local designated position, when the testing end indicates the proxy end to start detecting data, the proxy end checks the correctness of the locally recorded testing information and standard testing information, the data is not required to be queried and checked again after being stored in the third party database, the cost for executing the testing is low, and the data testing device is convenient to deploy the testing.
Further, the testing end generates data to be tested according to the testing requirement of the user, the data to be tested is transmitted to the client through the proxy end, the client displays a page corresponding to the test according to the data to be tested, and tests the testing page, so that the user can enter the page appointed by the user requirement, and user experience is improved.
In addition, the test terminal instructs the proxy terminal to record the test information of the client terminal through the signal, the test terminal instructs the proxy terminal to start recording the test information of the client terminal aiming at the test operation through starting the test notification, instructs the proxy terminal to stop recording the test information when the test information meets the preset condition, instructs the proxy terminal to start or stop recording the test information, records the test information meeting the requirement, can reduce the storage of invalid information, and improves the test efficiency.
The embodiment of the application provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to realize the steps of a data testing method, and compared with the related art, the method can realize the steps of the data testing method: the data correctness can be checked by directly using the locally stored information without the aid of a third party.
In an alternative embodiment, an electronic device is provided, as shown in fig. 9, the electronic device 9000 shown in fig. 9 includes: a processor 9001 and a memory 9003. Wherein the processor 9001 is coupled to a memory 9003, such as via a bus 9002. Optionally, the electronic device 9000 may further comprise a transceiver 9004, the transceiver 9004 being operable for data interactions between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. Note that, in practical applications, the transceiver 9004 is not limited to one, and the structure of the electronic device 9000 is not limited to the embodiment of the present application.
The processor 9001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. The processor 9001 may also be a combination implementing computing functions, e.g. comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 9002 may include a pathway to transfer information between the components. The bus 9002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 9002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 9, but not only one bus or one type of bus.
The Memory 9003 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory ), a CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer, without limitation.
The memory 9003 is used to store a computer program that executes an embodiment of the present application, and is controlled to be executed by the processor 9001. The processor 9001 is configured to execute a computer program stored in the memory 9003 to implement the steps shown in the foregoing method embodiments.
Among them, electronic devices include, but are not limited to: the terminal and the server can apply the data testing method.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, may implement the steps and corresponding content of the foregoing method embodiments.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although the flowcharts of the embodiments of the present application indicate the respective operation steps by arrows, the order of implementation of these steps is not limited to the order indicated by the arrows. In some implementations of embodiments of the present application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages may be flexibly configured according to the requirement, which is not limited in the embodiment of the present application.
The foregoing is merely an optional implementation manner of the implementation scenario of the application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the application are adopted without departing from the technical ideas of the application, and also belong to the protection scope of the embodiments of the application.

Claims (12)

1. The data testing method is characterized by being applied to an agent end and comprising the following steps:
receiving data to be tested sent by a test terminal, and sending the data to be tested to a client;
recording test information of the client for the data to be tested;
and if a detection instruction sent by the test end is received, comparing the test information with preset standard test information to obtain a test result.
2. The method for testing data according to claim 1, wherein before recording the test information of the client for the data to be tested, further comprises:
receiving a page display success notification of the client for the data to be tested;
sending the page display success notification to the test terminal, receiving a start test notification sent by the test terminal in response to the page display success notification, and sending the start test notification to the client terminal so that the client terminal can respond to the start test notification to perform a test to generate test information;
The recording the test information of the client for the data to be tested includes:
and responding to the start test notification, and starting to record the test information of the client.
3. The data testing method according to claim 1, wherein the receiving the data to be tested sent by the testing terminal, before sending the data to be tested to the client, further includes:
receiving a test request uploaded by the client;
the receiving the data to be tested sent by the testing end, and sending the data to be tested to the client end includes:
receiving data to be tested sent by a test terminal;
determining interface data from the data to be tested according to the test request, and sending the interface data to the client; the interface data is used for displaying a corresponding test page on the client.
4. The data testing method according to claim 1, wherein the recording the test information of the client for the data to be tested includes:
responding to dotting operation performed on the test page at a position to be tested, and recording dotting information corresponding to the dotting operation;
the step of comparing the test information with preset standard test information, and before obtaining the test result, further comprises the steps of:
Recording dotting information of the client for the data to be tested;
and taking the dotting information as the test information.
5. The data testing method is characterized by being applied to a testing end and comprising the following steps of:
generating data to be tested and sending the data to be tested to an agent end; the proxy end is used for sending the data to be tested to the client end and recording the test information of the client end for the data to be tested;
sending a detection instruction to the proxy end; the detection instruction is used for indicating the proxy end to compare the test information with preset standard test information, and a test result is obtained.
6. The method of claim 5, wherein the sending the detection command to the proxy includes:
if the recorded test information meets the preset condition, sending a detection instruction to the proxy end; wherein the preset condition includes that the number of the recorded test information is equal to a preset test frequency, and/or the data volume of the recorded test information is equal to a preset threshold.
7. The data testing method is characterized by being applied to a client and comprising the following steps of:
Receiving data to be tested sent by a proxy terminal; the data to be tested is sent to the proxy end by the test end;
generating test information based on the data to be tested; the agent end is used for recording the test information, and if a detection instruction sent by the test end is received, the test information is compared with preset standard test information, and a test result is obtained.
8. A data testing apparatus, comprising:
the first receiving module is used for receiving data to be tested sent by the testing end and sending the data to be tested to the client;
the recording module is used for recording the test information of the client for the data to be tested;
and the comparison module is used for comparing the test information with preset standard test information if a detection instruction sent by the test end is received, and obtaining a test result.
9. A data testing apparatus, comprising:
the generation module is used for generating data to be tested and sending the data to be tested to the proxy end; the agent end is used for sending data to be tested to the client end and recording test information of the client end aiming at the data to be tested;
The sending module is used for sending a detection instruction to the proxy end; the detection instruction is used for indicating the proxy end to compare the test information with preset standard test information, and a test result is obtained.
10. A data testing apparatus, comprising:
the second receiving module is used for receiving the data to be tested sent by the proxy end; the data to be tested is sent to the proxy end by the test end;
the test module is used for generating test information based on the data to be tested; the agent end is used for recording the test information, and if a detection instruction sent by the test end is received, the test information is compared with preset standard test information, and a test result is obtained.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the method according to any one of claims 1 to 7.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the data testing method of any of claims 1 to 7.
CN202311482090.8A 2023-11-08 2023-11-08 Data testing method and device, electronic equipment and computer storage medium Pending CN117421237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311482090.8A CN117421237A (en) 2023-11-08 2023-11-08 Data testing method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311482090.8A CN117421237A (en) 2023-11-08 2023-11-08 Data testing method and device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN117421237A true CN117421237A (en) 2024-01-19

Family

ID=89522768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311482090.8A Pending CN117421237A (en) 2023-11-08 2023-11-08 Data testing method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN117421237A (en)

Similar Documents

Publication Publication Date Title
CN111522922B (en) Log information query method and device, storage medium and computer equipment
CN107122297B (en) Method and equipment for generating request message of test interface
CN105099811A (en) Interface testing method and device
CN107133180B (en) Dynamic page testing method, testing device and storage medium
CN110221982B (en) Performance test method, device and equipment of business system and readable storage medium
CN107122296B (en) Method and apparatus for data assertion for test interface
CN108984389B (en) Application program testing method and terminal equipment
CN111897724B (en) Automatic testing method and device suitable for cloud platform
CN109359237B (en) Method and equipment for searching hosted program
CN106878108B (en) Network flow playback test method and device
CN107092535B (en) Method and apparatus for data storage of test interface
CN107085549B (en) Method and device for generating fault information
CN109558320A (en) System detection method, device, system, equipment and computer readable storage medium
CN106776318A (en) A kind of test script method for recording and system
CN106412975A (en) Content charging vulnerability test methods, and apparatuses
CN112671574B (en) Front-end and back-end joint debugging method and device, proxy equipment and storage medium
CN111190572A (en) Visualization method and device for page buried point data, electronic equipment and storage medium
CN110674023B (en) Interface testing method and device
CN117499287A (en) Web testing method, device, storage medium and proxy server
CN112256984A (en) Method and device for acquiring interface background screenshot corresponding to webpage
CN114531345A (en) Method, device and equipment for storing flow comparison result and storage medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN117421237A (en) Data testing method and device, electronic equipment and computer storage medium
CN114449026B (en) Method for recording online learning duration and related equipment
CN106302002B (en) Test method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination