CN117806977A - Test method, apparatus, device, medium and program product - Google Patents

Test method, apparatus, device, medium and program product Download PDF

Info

Publication number
CN117806977A
CN117806977A CN202410191599.5A CN202410191599A CN117806977A CN 117806977 A CN117806977 A CN 117806977A CN 202410191599 A CN202410191599 A CN 202410191599A CN 117806977 A CN117806977 A CN 117806977A
Authority
CN
China
Prior art keywords
page
target
feedback
time sequence
data
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
CN202410191599.5A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202410191599.5A priority Critical patent/CN117806977A/en
Publication of CN117806977A publication Critical patent/CN117806977A/en
Pending legal-status Critical Current

Links

Abstract

The present disclosure provides a test method, which can be applied to the fields of computer technology, financial technology, and big data technology. The test method comprises the following steps: responding to a plurality of operations executed by a target object for a target page, and acquiring operation time sequence data corresponding to the plurality of operations, page information of the target page and a first service request; processing the operation time sequence data and page information of the target page to generate a target script, wherein the target script is used for synchronously simulating the operation behavior of the target object on the target page; running a target script to generate a second service request; and responding to the received first feedback result sent by the first service end and the received second feedback result sent by the second service end, and generating a target test result according to the first feedback result and the second feedback result. The present disclosure also provides a testing apparatus, a device, a storage medium, and a program product.

Description

Test method, apparatus, device, medium and program product
Technical Field
The present disclosure relates to the fields of computer technology, financial technology, big data technology, and more particularly to a test method, apparatus, device, medium, and program product.
Background
Traffic playback is a test performed on a server in a test environment by crawling operational data in the generation environment to determine whether the server has the ability to process real data generated in the generation environment.
In the prior art, by capturing the network data packet from the HTTP layer, since the identifier of the operational service data is randomly generated, when the traffic playback is performed, it is difficult to compare whether the processing result of the server on the same service request in the test environment based on the randomly generated identifier is the same as that in the production environment, which results in inaccurate test results.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a test method, apparatus, device, medium, and program product.
According to a first aspect of the present disclosure, there is provided a test method comprising: responding to a plurality of operations executed by a target object for a target page, and acquiring operation time sequence data corresponding to the plurality of operations, page information of the target page and a first service request; processing the operation time sequence data and page information of the target page to generate a target script, wherein the target script is used for synchronously simulating the operation behavior of the target object on the target page; running a target script to generate a second service request; responding to the received first feedback result sent by the first service end and the received second feedback result sent by the second service end, and generating a target test result according to the first feedback result and the second feedback result; the first feedback result is obtained by processing a first service request by a first service end, the second feedback result is obtained by processing a second service request by a second service end, the first service end is applied to a production environment, and the second service end is applied to a test environment.
According to an embodiment of the present disclosure, the operation timing data includes a target page element to be operated on, and an operation time and an operation type at which an operation is performed on the target page element.
According to an embodiment of the present disclosure, processing operation timing data and page information of a target page to generate a target script includes: constructing a simulation page according to page information of the target page, wherein page elements of the simulation page correspond to page elements of the target page one by one; determining a target simulation page element from the simulation page according to the operated target page element; determining the logic time when the target simulation page element is triggered to simulate operation according to the operation time, wherein the operation type of the simulation operation corresponding to the target simulation page element is the same as the operation type of the real operation corresponding to the target page element; and compiling the simulation page according to the logic moment to generate the target script.
According to an embodiment of the present disclosure, constructing a simulated page according to page information of a target page includes: obtaining attribute information of a plurality of page nodes and association relations among the plurality of page nodes according to page information of a target page; generating a document object page tree according to the association relation among the plurality of page nodes and the attribute information of the plurality of page nodes; and generating a simulation page according to the document object page tree.
According to an embodiment of the present disclosure, a simulated page includes a mirror region of page elements of the simulated page and an edit region for editing page elements within the mirror region.
According to an embodiment of the present disclosure, a simulated page is constructed according to page information of a target page, and further includes: in response to a change in a page element of the target page, the page element within the mirror region is edited in the editing region so that the page element of the mirror region is updated in synchronization with the page element of the target page.
According to an embodiment of the present disclosure, the first feedback result includes a time sequence of the first feedback data, and the second feedback result includes a time sequence of the second feedback data.
According to an embodiment of the present disclosure, generating a target test result according to a first feedback result and a second feedback result includes: sequentially comparing the time sequence of the first feedback data with the time sequence of the second feedback data according to the time sequence of the receiving moment of the feedback data to obtain a comparison result; determining that the target test result is that the second server side has the data processing capability applied to the production environment in response to the comparison result being the same as the feedback data; and determining that the target test result is that the second server does not have the data processing capability applied to the production environment in response to the comparison result being that the feedback data are different.
According to an embodiment of the present disclosure, the time-series sequence of the first feedback data includes a first random identification corresponding to each piece of the first feedback data; the time-ordered sequence of second feedback data includes a second random identification corresponding to each of the second feedback data.
According to an embodiment of the present disclosure, comparing a time sequence of first feedback data and a time sequence of second feedback data in sequence to obtain a comparison result, including: deleting a first random identifier from the time sequence of the first feedback data to obtain a first target time sequence; deleting the second random identifier from the time sequence of the second feedback data to obtain a second target time sequence; and comparing the first target time sequence with the second target time sequence to obtain a comparison result.
A second aspect of the present disclosure provides a test apparatus comprising: the acquisition module is used for responding to a plurality of operations executed by the target object on the target page and acquiring operation time sequence data corresponding to the plurality of operations, page information of the target page and a first service request; the processing module is used for processing the operation time sequence data and the page information of the target page to generate a target script, wherein the target script is used for synchronously simulating the operation behavior of the target object on the target page; the first generation module is used for running the target script and generating a second service request; the second generation module is used for responding to the received first feedback result sent by the first service end and the received second feedback result sent by the second service end, and generating a target test result according to the first feedback result and the second feedback result; the first feedback result is obtained by processing a first service request by a first service end, the second feedback result is obtained by processing a second service request by a second service end, the first service end is applied to a production environment, and the second service end is applied to a test environment.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the test method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described test method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described test method.
According to the embodiment of the disclosure, through simulating the operation behavior of a user on a target page in a production environment in real time, synchronously generating service requests corresponding to the production environment one by one and sending the service requests to a server; thereby ensuring that the time sequence of the result of the server feedback in the production environment is consistent with the time sequence of the result of the server feedback in the test environment; therefore, feedback results can be compared one by one according to time sequence without the identification based on service data, and the accuracy of the test results is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a test method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a test method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow diagram for generating a target script in accordance with an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram for building a simulated page according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a block diagram of a test apparatus according to an embodiment of the present disclosure; and
fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a test method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical solution of the present disclosure, the related user information (including, but not limited to, user personal information, user image information, user equipment information, such as location information, etc.) and data (including, but not limited to, data for analysis, stored data, displayed data, etc.) are information and data authorized by the user or sufficiently authorized by each party, and the related data is collected, stored, used, processed, transmitted, provided, disclosed, applied, etc. in compliance with relevant laws and regulations and standards, necessary security measures are taken, no prejudice to the public order colloquia is provided, and corresponding operation entries are provided for the user to select authorization or rejection.
In the scenario of using personal information to make an automated decision, the method, the device and the system provided by the embodiment of the disclosure provide corresponding operation inlets for users, so that the users can choose to agree or reject the automated decision result; if the user selects refusal, the expert decision flow is entered. The expression "automated decision" here refers to an activity of automatically analyzing, assessing the behavioral habits, hobbies or economic, health, credit status of an individual, etc. by means of a computer program, and making a decision. The expression "expert decision" here refers to an activity of making a decision by a person who is specializing in a certain field of work, has specialized experience, knowledge and skills and reaches a certain level of expertise.
Traffic playback is a test performed on a server in a test environment by crawling operational data in the generation environment to determine whether the server has the ability to process real data generated in the generation environment.
In the related art, by capturing the network data packet from the HTTP layer, since the identifier of the operational service data is randomly generated, when the traffic playback is performed, it is difficult to compare whether the processing result of the server on the same service request in the test environment based on the randomly generated identifier is the same as that in the production environment, which results in inaccurate test results.
In view of the foregoing, embodiments of the present disclosure provide a test method, including: responding to a plurality of operations executed by a target object for a target page, and acquiring operation time sequence data corresponding to the plurality of operations, page information of the target page and a first service request; processing the operation time sequence data and page information of the target page to generate a target script, wherein the target script is used for synchronously simulating the operation behavior of the target object on the target page; running a target script to generate a second service request; responding to the received first feedback result sent by the first service end and the received second feedback result sent by the second service end, and generating a target test result according to the first feedback result and the second feedback result; the first feedback result is obtained by processing a first service request by a first service end, the second feedback result is obtained by processing a second service request by a second service end, the first service end is applied to a production environment, and the second service end is applied to a test environment.
Fig. 1 schematically illustrates an application scenario diagram of a test method, apparatus, device, medium and program product according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the test method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the testing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The test method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the test apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The test method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 4 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a test method according to an embodiment of the disclosure.
As shown in fig. 2, the test method 200 of this embodiment includes operations S210 to S240.
In operation S210, operation timing data corresponding to a plurality of operations, page information of a target page, and a first service request are acquired in response to the plurality of operations performed by a target object for the target page.
In operation S220, the operation timing data and page information of the target page are processed to generate a target script, where the target script is used to synchronously simulate the operation behavior of the target object on the target page.
In operation S230, a target script is run, generating a second service request.
In operation S240, in response to the received first feedback result sent by the first server and the received second feedback result sent by the second server, a target test result is generated according to the first feedback result and the second feedback result.
According to embodiments of the present disclosure, the target object may be any user performing a business operation. For example, the target user may be a financial institution staff, a borrower, or the like.
According to embodiments of the present disclosure, a target page may be a page of any target object performing business operations. For example, it may be a loan approval page or the like.
According to embodiments of the present disclosure, the plurality of operations may include any operation performed by the target object for the target page, e.g., may include filling out, rechecking, approving, etc.
According to an embodiment of the present disclosure, the first service request may be a service request generated after any target object performs a plurality of operations with respect to the target page. For example, the loan issuing request may be generated after a financial institution worker performs approval for a loan approval page.
According to the embodiment of the disclosure, the synchronous simulation of the operation behavior of the target object on the target page is realized by running the target script so as to generate the second service request.
According to the embodiment of the disclosure, a first service end applied to a production environment processes a first service request to obtain a first feedback result, a second service end applied to a test environment processes a second service request to obtain a second feedback result, and then a target test result is generated by comparing the first feedback result and the second feedback result.
According to the embodiment of the disclosure, through simulating the operation behavior of a user on a target page in a production environment in real time, synchronously generating service requests corresponding to the production environment one by one and sending the service requests to a server; thereby ensuring that the time sequence of the result of the server feedback in the production environment is consistent with the time sequence of the result of the server feedback in the test environment; therefore, feedback results can be compared one by one according to time sequence without the identification based on service data, and the accuracy of the test results is improved.
According to an embodiment of the present disclosure, the operation timing data includes a target page element to be operated on, and an operation time and an operation type at which an operation is performed on the target page element.
According to embodiments of the present disclosure, the operation type may be any operation type that performs an operation on a target page element. For example, it may be a clear, enter, click, modify, etc.
FIG. 3 schematically illustrates a flow diagram for generating a target script in accordance with an embodiment of the present disclosure.
As shown in fig. 3, the method of generating a target script of this embodiment includes operations S310 to S340.
In operation S310, a simulated page is constructed according to page information of the target page, wherein page elements of the simulated page correspond to page elements of the target page one by one.
In operation S320, a target simulation page element is determined from the simulation page according to the operated target page element.
In operation S330, according to the operation time, determining the logic time when the target simulation page element is triggered to perform the simulation operation, where the operation type of the simulation operation corresponding to the target simulation page element is the same as the operation type of the real operation corresponding to the target page element.
In operation S340, the simulation page is compiled according to the logic time, and the target script is generated.
According to embodiments of the present disclosure, the page information may include any information of the target page, for example, may include page title information, header information, navigation bar information, body content region information, footer information, and the like.
According to the embodiment of the disclosure, according to the one-to-one correspondence between the page elements of the simulated page and the page elements of the target page, the target simulated page elements can be determined from the simulated page according to the operated target page elements.
According to the embodiment of the disclosure, according to the operation time of executing the operation on the target page element, the logic time of triggering the simulation operation on the target simulation page element is determined, so that the time sequence of executing the operation on the target page element is consistent with the time sequence of triggering the simulation operation on the target simulation page element.
According to the embodiment of the disclosure, by making the operation type of the simulation operation corresponding to the target simulation page element the same as the operation type of the real operation corresponding to the target page element, the operation behavior of the user on the target page in the production environment can be simulated in real time.
According to the embodiment of the disclosure, the operation behavior of a user on a target page in a production environment is simulated in real time by constructing simulated pages corresponding to page elements of the target page one by one; the target script generated on the basis of the method can ensure that the time sequence of the result fed back by the server in the subsequent test environment is consistent with the time sequence of the result fed back by the server in the production environment.
FIG. 4 schematically illustrates a flow diagram for building a simulated page according to an embodiment of the disclosure.
As shown in fig. 4, the method of constructing a simulation page of this embodiment includes operations S410 to S430.
In operation S410, according to the page information of the target page, the attribute information of the plurality of page nodes and the association relationship between the plurality of page nodes are obtained.
In operation S420, a document object page tree is generated according to the association relationship between the plurality of page nodes and the attribute information of the plurality of page nodes.
In operation S430, a simulated page is generated from the document object page tree.
According to embodiments of the present disclosure, a page node may be any content in a page. For example, a page node may be a document node, a document type node, an element node, an attribute node, a text node, an annotation node, a document snippet node, and so forth of a page.
According to embodiments of the present disclosure, the attribute information of the page node may include a node type. Node name, node value, etc.
According to embodiments of the present disclosure, the association relationship between page nodes may be a parent node relationship, a child node relationship, a peer node relationship, and the like.
According to the embodiment of the disclosure, the document object page tree is constructed according to the association relation among the plurality of page nodes of the target page and the attribute information of the plurality of page nodes, and then the document object page tree is used as the basic framework to generate the simulation page, so that better operability and flexibility are provided for constructing the simulation page.
According to an embodiment of the present disclosure, a simulated page includes a mirror region of page elements of the simulated page and an edit region for editing page elements within the mirror region.
According to an embodiment of the present disclosure, a simulated page is constructed according to page information of a target page, and further includes: in response to a change in a page element of the target page, the page element within the mirror region is edited in the editing region so that the page element of the mirror region is updated in synchronization with the page element of the target page.
According to the embodiment of the disclosure, the mirror image area and the editing area of the simulation page are utilized, so that page elements of the mirror image area and page elements of the target page can be synchronously updated, and the operation behavior of a user on the simulation page in a test environment can be simulated in real time.
According to an embodiment of the present disclosure, the first feedback result includes a time sequence of the first feedback data, and the second feedback result includes a time sequence of the second feedback data.
According to an embodiment of the present disclosure, the time sequence of the first feedback data may be a series of the first feedback data arranged in chronological order of occurrence thereof. The time sequence of the second feedback result may be a sequence of arranging the first feedback data according to the time sequence of the occurrence of the first feedback data.
According to an embodiment of the present disclosure, generating a target test result according to a first feedback result and a second feedback result includes: sequentially comparing the time sequence of the first feedback data with the time sequence of the second feedback data according to the time sequence of the receiving moment of the feedback data to obtain a comparison result; determining that the target test result is that the second server side has the data processing capability applied to the production environment in response to the comparison result being the same as the feedback data; and determining that the target test result is that the second server does not have the data processing capability applied to the production environment in response to the comparison result being that the feedback data are different.
According to the embodiment of the disclosure, since the user operation is synchronously simulated, the timing of the feedback data generated by the source server and the server in the test environment are in one-to-one correspondence, and whether the server in the test environment has the data processing capability of the server in the production environment can be determined by comparing whether the feedback data are identical one by one.
According to an embodiment of the present disclosure, the time-series sequence of the first feedback data includes a first random identification corresponding to each piece of the first feedback data; the time-ordered sequence of second feedback data includes a second random identification corresponding to each of the second feedback data.
According to an embodiment of the disclosure, the feedback data includes a random identifier generated by the server when processing the service request, the first random identifier is obtained by the first server processing the first service request randomly, and the second random identifier is obtained by the second server processing the second service request randomly. The logic of generating random identifications by different servers is different, but whether the random identifications are identical does not affect the data processing capacity of the servers, so that the random identification data does not need to be compared.
According to an embodiment of the present disclosure, comparing a time sequence of first feedback data and a time sequence of second feedback data in sequence to obtain a comparison result, including: deleting a first random identifier from the time sequence of the first feedback data to obtain a first target time sequence; deleting the second random identifier from the time sequence of the second feedback data to obtain a second target time sequence; and comparing the first target time sequence with the second target time sequence to obtain a comparison result.
According to an embodiment of the present disclosure, comparing the first target timing sequence and the second target timing sequence, the obtaining a comparison result includes: sequentially comparing the first target time sequence with the second target time sequence according to the time sequence of the receiving moment of the feedback data to obtain a comparison result; in response to the comparison result being the same as the first target time sequence and the second target time sequence, determining that the target test result is that the second server has the data processing capability applied to the production environment; and determining that the target test result is that the second server does not have the data processing capability applied to the production environment in response to the comparison result being that the first target time sequence and the second target time sequence are different.
According to the embodiment of the disclosure, the first target time sequence and the second target time sequence can be directly compared by deleting the first random identifier and the second random identifier, so that the operation is simpler, more convenient and more accurate.
Based on the testing method, the disclosure also provides a testing device. The device will be described in detail below in connection with fig. 5.
Fig. 5 schematically shows a block diagram of a test apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the test apparatus 500 of this embodiment includes an acquisition module 510, a processing module 520, a first generation module 530, and a second generation module 540.
The acquiring module 510 is configured to, in response to a plurality of operations performed by a target object for a target page, acquire operation timing data corresponding to the plurality of operations, page information of the target page, and a first service request. In an embodiment, the obtaining module 510 may be configured to perform the operation S210 described above, which is not described herein.
The processing module 520 is configured to process the operation timing data and page information of the target page, and generate a target script, where the target script is configured to synchronously simulate an operation behavior of the target object on the target page. In an embodiment, the processing module 520 may be configured to perform the operation S220 described above, which is not described herein.
The first generation module 530 is configured to run a target script and generate a second service request. In an embodiment, the first generating module 530 may be used to perform the operation S230 described above, which is not described herein.
The second generating module 540 is configured to generate a target test result according to the first feedback result and the second feedback result in response to the received first feedback result sent by the first service end and the received second feedback result sent by the second service end; the first feedback result is obtained by processing a first service request by a first service end, the second feedback result is obtained by processing a second service request by a second service end, the first service end is applied to a production environment, and the second service end is applied to a test environment. In an embodiment, the second generating module 540 may be used to perform the operation S240 described above, which is not described herein.
According to an embodiment of the present disclosure, the processing module 520 includes a build sub-module, a first determination sub-module, a second determination sub-module, and a compilation sub-module. The construction submodule is used for constructing a simulation page according to page information of the target page, wherein page elements of the simulation page correspond to page elements of the target page one by one; the first determination submodule is used for determining target simulation page elements from the simulation page according to the operated target page elements; the second determining submodule is used for determining the logic time when the target simulation page element is triggered to simulate operation according to the operation time, wherein the operation type of the simulation operation corresponding to the target simulation page element is the same as the operation type of the real operation corresponding to the target page element; and the compiling submodule is used for compiling the simulation page according to the logic moment to generate the target script.
According to an embodiment of the present disclosure, a building sub-module includes an obtaining unit, a first generating unit, and a second generating unit. The obtaining unit is used for obtaining attribute information of a plurality of page nodes and association relations among the plurality of page nodes according to page information of the target page; the first generation unit is used for generating a document object page tree according to the association relation among the plurality of page nodes and the attribute information of the plurality of page nodes; the second generating unit is used for generating a simulation page according to the document object page tree.
According to an embodiment of the disclosure, the building sub-module further comprises an editing unit. The editing unit is used for responding to the change of the page element of the target page, and editing the page element in the mirror image area in the editing area so that the page element in the mirror image area is synchronously updated with the page element of the target page.
According to an embodiment of the present disclosure, the second generation module 540 includes a comparison sub-module, a third determination sub-module, and a fourth determination sub-module. The comparison sub-module is used for sequentially comparing the time sequence of the first feedback data with the time sequence of the second feedback data according to the time sequence of the receiving moment of the feedback data to obtain a comparison result; the third determining submodule is used for determining that the target test result is that the second server side has the data processing capability applied to the production environment in response to the fact that the comparison result is the same as the feedback data; and the fourth determining submodule is used for determining that the target test result is that the second server does not have the data processing capability applied to the production environment in response to the fact that the comparison result is that the feedback data are different.
According to an embodiment of the present disclosure, the comparison sub-module includes a first deletion unit, a second deletion unit, and a comparison unit. The first deleting unit is used for deleting the first random identifier from the time sequence of the first feedback data to obtain a first target time sequence; the second deleting unit is used for deleting the second random identifier from the time sequence of the second feedback data to obtain a second target time sequence; and the comparison unit is used for comparing the first target time sequence with the second target time sequence to obtain a comparison result.
According to an embodiment of the present disclosure, any of the acquisition module 510, the processing module 520, the first generation module 530, and the second generation module 540 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the acquisition module 510, the processing module 520, the first generation module 530, and the second generation module 540 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the acquisition module 510, the processing module 520, the first generation module 530, and the second generation module 540 may be at least partially implemented as computer program modules that, when executed, perform the corresponding functions.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a test method according to an embodiment of the disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the test methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (10)

1. A method of testing, the method comprising:
responding to a plurality of operations executed by a target object on a target page, and acquiring operation time sequence data corresponding to the plurality of operations, page information of the target page and a first service request;
Processing the operation time sequence data and the page information of the target page to generate a target script, wherein the target script is used for synchronously simulating the operation behavior of the target object on the target page;
running the target script to generate a second service request; and
responding to a received first feedback result sent by a first service end and a received second feedback result sent by a second service end, and generating a target test result according to the first feedback result and the second feedback result;
the first feedback result is obtained by processing the first service request by the first server, the second feedback result is obtained by processing the second service request by the second server, the first server is applied to a production environment, and the second server is applied to a test environment.
2. The method of claim 1, wherein the operation timing data includes a target page element to be operated on and an operation time and an operation type of performing an operation on the target page element;
the processing the operation time sequence data and the page information of the target page to generate a target script comprises the following steps:
Constructing a simulation page according to the page information of the target page, wherein page elements of the simulation page correspond to the page elements of the target page one by one;
determining a target simulation page element from the simulation page according to the operated target page element;
determining the logic time when the target simulation page element is triggered to simulate operation according to the operation time, wherein the operation type of the simulation operation corresponding to the target simulation page element is the same as the operation type of the real operation corresponding to the target page element; and
and compiling the simulation page according to the logic moment to generate the target script.
3. The method according to claim 2, wherein constructing a simulated page from page information of the target page comprises:
obtaining attribute information of a plurality of page nodes and association relations among the plurality of page nodes according to the page information of the target page;
generating a document object page tree according to the association relation among the plurality of page nodes and the attribute information of the plurality of page nodes;
and generating the simulation page according to the document object page tree.
4. A method according to claim 3, wherein the simulated page comprises a mirror region of page elements of the simulated page and an edit region for editing page elements within the mirror region;
the method further comprises the steps of:
and responding to the change of the page element of the target page, and editing the page element in the mirror image area in the editing area so that the page element of the mirror image area and the page element of the target page are synchronously updated.
5. The method of claim 1, wherein the first feedback result comprises a time-series sequence of first feedback data and the second feedback result comprises a time-series sequence of second feedback data;
the generating a target test result according to the first feedback result and the second feedback result includes:
sequentially comparing the time sequence of the first feedback data with the time sequence of the second feedback data according to the time sequence of the receiving moment of the feedback data to obtain a comparison result;
determining that the target test result is that the second server side has the data processing capability applied to the production environment according to the fact that the comparison result is the same as feedback data; and
And determining that the target test result is that the second server does not have the data processing capability applied to the production environment in response to the comparison result being that the feedback data are different.
6. The method of claim 5, wherein the time-ordered sequence of first feedback data includes a first random identification corresponding to each piece of first feedback data; the time sequence of the second feedback data comprises a second random identifier corresponding to each piece of second feedback data;
the step of sequentially comparing the time sequence of the first feedback data with the time sequence of the second feedback data to obtain a comparison result comprises the following steps:
deleting the first random identifier from the time sequence of the first feedback data to obtain a first target time sequence;
deleting the second random identifier from the time sequence of the second feedback data to obtain a second target time sequence; and
and comparing the first target time sequence with the second target time sequence to obtain the comparison result.
7. A test apparatus, the apparatus comprising:
the acquisition module is used for responding to a plurality of operations executed by a target object on a target page and acquiring operation time sequence data corresponding to the operations, page information of the target page and a first service request;
The processing module is used for processing the operation time sequence data and the page information of the target page to generate a target script, wherein the target script is used for synchronously simulating the operation behavior of the target object on the target page;
the first generation module is used for running the target script and generating a second service request;
the second generation module is used for responding to the received first feedback result sent by the first service end and the received second feedback result sent by the second service end, and generating a target test result according to the first feedback result and the second feedback result;
the first feedback result is obtained by processing the first service request by the first server, the second feedback result is obtained by processing the second service request by the second server, the first server is applied to a production environment, and the second server is applied to a test environment.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more computer programs,
characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, realizes the steps of the method according to any one of claims 1-6.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs, when executed by a processor, implement the steps of the method according to any of claims 1-6.
CN202410191599.5A 2024-02-21 2024-02-21 Test method, apparatus, device, medium and program product Pending CN117806977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410191599.5A CN117806977A (en) 2024-02-21 2024-02-21 Test method, apparatus, device, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410191599.5A CN117806977A (en) 2024-02-21 2024-02-21 Test method, apparatus, device, medium and program product

Publications (1)

Publication Number Publication Date
CN117806977A true CN117806977A (en) 2024-04-02

Family

ID=90433455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410191599.5A Pending CN117806977A (en) 2024-02-21 2024-02-21 Test method, apparatus, device, medium and program product

Country Status (1)

Country Link
CN (1) CN117806977A (en)

Similar Documents

Publication Publication Date Title
CN109344170B (en) Stream data processing method, system, electronic device and readable storage medium
US9269076B2 (en) Techniques to facilitate collaborative social coding
CN111061956A (en) Method and apparatus for generating information
US20130332861A1 (en) Internet based platform for acquisition, management, integration, collaboration, and dissemination of information
Di Francescomarino et al. Cluster‐based modularization of processes recovered from web applications
Bustard et al. Linking soft systems and use-case modelling through scenarios
CN113535577A (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
Guana et al. End-to-end model-transformation comprehension through fine-grained traceability information
CN117806977A (en) Test method, apparatus, device, medium and program product
Shrivastava Learning Salesforce Einstein
CN114219601A (en) Information processing method, device, equipment and storage medium
Manouselis et al. Designing a web-based testing tool for multi-criteria recommender systems
CN112860259B (en) Interface processing method, device, electronic equipment and storage medium
CN111367517B (en) Information generation method and device
Moradi et al. A Comprehensive Method for Improving the Quality of Open Government Data and Increasing Citizens’ Willingness to Use Data by Analyzing the Complex System of Citizens and Organizations
Volk et al. Towards an Automatized Way for Modeling Big Data System Architectures
Misner ON MODELING Building support for use-based design into hardware products
CN117194250A (en) Test case generation method, device, equipment, medium and program product
Sohan Automated example oriented REST API documentation
CN117743274A (en) Information processing method, information processing device, electronic equipment and storage medium
CN113505147A (en) Data processing method and device, electronic equipment and readable storage medium
CN118013506A (en) Test user switching method, device, equipment, storage medium and program product
CN115098391A (en) Page detection method, device, equipment and medium
CN114140091A (en) Operation record display method, device, equipment and 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