CN111400175B - Recording and playback system, method and equipment for web operation event - Google Patents

Recording and playback system, method and equipment for web operation event Download PDF

Info

Publication number
CN111400175B
CN111400175B CN202010150683.4A CN202010150683A CN111400175B CN 111400175 B CN111400175 B CN 111400175B CN 202010150683 A CN202010150683 A CN 202010150683A CN 111400175 B CN111400175 B CN 111400175B
Authority
CN
China
Prior art keywords
recording
module
control
locator
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010150683.4A
Other languages
Chinese (zh)
Other versions
CN111400175A (en
Inventor
龙震岳
陈晓江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid 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 Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202010150683.4A priority Critical patent/CN111400175B/en
Publication of CN111400175A publication Critical patent/CN111400175A/en
Application granted granted Critical
Publication of CN111400175B publication Critical patent/CN111400175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • 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/3692Test management for test results analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application discloses a method and equipment for recording and replaying web operation events, comprising the following steps: recording and monitoring the operation event, and calculating and merging the related information of the monitored operation event; verifying the combined related information to obtain a test action sequence with correct verification, converting the test action sequence into a test case script and locally storing the test case script; and reading the test case script stored locally and executing corresponding operation. According to the application, the monitor is inserted into the tested page during recording, the event is processed and recorded after the event is monitored, the recorded test case is read and executed step by step during playback, and the conventional control positioning mode and the control positioning device based on the visual enhancement technology are recorded during recording and playback, so that the test case can be played back through the visual positioning device when the playback of the test case fails through the conventional positioning device, and the success rate of playback is ensured.

Description

Recording and playback system, method and equipment for web operation event
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a system, a method, and an apparatus for recording and playing back web operation events.
Background
The software test is the final review of software requirement analysis, specification design description and coding before the software is put into operation, and is the key step of software quality assurance. The purpose of the test is to find out errors at various stages in the whole period of software design development and various errors and defects in the software with less use cases, time and manpower so as to analyze, diagnose and repair the errors to ensure the quality of the software system.
With the development of computer and network technologies, the scale and number of Web applications based on JavaScript are rapidly increasing, and penetrate into various application fields of society, and become the mainstream of current and future software system development. But due to their highly dynamic and event-driven nature, a variety of problems often occur in their application. Recording/playback techniques have been widely used in the debugging and repair of Web applications, recording various non-deterministic events and related information generated during user operations during an event capture phase, and replaying the events during a replay phase. The purpose of the record playback technique at the initial recording stage is to capture events in the history record in the monitoring application and to record all the data needed to reproduce this history record. In the subsequent replay phase, the application is forced to execute a previously captured history, which allows operations to be manually performed in the browser and saved as a test.
Through researches, the reasons for the failure of the test cases mainly comprise the following two points: complexity of web applications; uncertainty of web application. The complexity of Web applications makes it impossible to reliably capture multiple interaction modes, and some controls in applications, such as applets, flash, etc., may suffer from the problem that control information cannot be captured, so that operations of the controls cannot be replayed. Secondly, due to the anti-crawler processing of the Web page, the problem that the control attribute information is inconsistent in the process of loading the page for many times can occur, and the problem that the playback is unsuccessful due to the fact that recorded information is wrong can occur at the moment. In addition, during the iteration process of the item, as the Web interface is often modified, such as adding links, allowing users to customize, add new functions or change the appearance of the Web page, the path of the element is often changed. At this point, due to the lack of an appropriate test case repair tool, small changes in the user interface often destroy most of the test set, resulting in considerable maintenance costs, and the test cases are not necessarily always reliable after generation, and are likely to fail at playback. The error in the replay process of the test case means that the recorded test case fails, and cannot be reused in the subsequent test, and only the test case can be selected to be re-recorded, so that inconvenience is brought to the test of the whole Web application program, and a lot of unnecessary time cost is increased.
In summary, in the prior art, when the Web application is recorded and replayed, there are technical problems that the test cases that fail during the recording and replaying process are too many.
Disclosure of Invention
The application provides a system, a method and equipment for recording and replaying Web operation events, which are used for solving the technical problem that too many test cases exist in the recording and replaying process when the Web application is recorded and replayed in the prior art.
The application provides a recording and replaying system of web operation events, which comprises a recording module, a checking module, an executing module, a control module and a storage module;
the control module is used for controlling information interaction among the recording module, the checking module, the executing module and the storage module;
the recording module is used for recording and monitoring the operation event, calculating and combining the related information of the monitored operation event, and transmitting the combined related information to the control module;
the verification module is used for receiving the related information sent by the control module and verifying the related information to obtain a test action sequence, and transmitting the test action sequence to the control module;
the execution module is used for receiving the test action sequence sent by the control module and executing the test action sequence;
the storage module is used for storing the test action sequence received by the control module.
Preferably, the recording module comprises a recording agent and a recorder;
the recording agent is used for providing a monitoring module and embedding the monitoring module into the recorder; the monitoring module is used for monitoring operation events;
the recorder is used for recording the operation event.
Preferably, the information related to the event includes an operation event type, a locator, visual enhancement information, and a type of control operated by the locator.
Preferably, the locator includes an id locator, a text locator, an XPath locator, and a CSS locator.
Preferably, the storage module converts the test action sequence into a test case script and stores the test case script.
A method for recording and replaying web operation events, which is based on the above-mentioned recording and replaying system of web operation events, comprising the following steps:
step S1: recording and monitoring the operation event, and calculating and merging the related information of the monitored operation event;
step S2: verifying the combined related information to obtain a test action sequence, converting the test action sequence into a test case script and locally storing the test case script;
step S3: and reading the test case script stored locally and executing corresponding operation.
Preferably, the step S1 specifically includes the following steps:
monitoring and recording operation events;
when the operation event is monitored, the type of the operation event is recorded, the locator of the operation event and the position information of the control operated by the locator are calculated, and the type of the control operated by the locator is recorded;
and combining the type of the operation event, the locator, the position information of the control and the type of the operated control to obtain combined related information.
Preferably, step S2 specifically includes the following steps:
capturing a screen according to the position information of the control, taking the screen as a visual positioner of the control, namely visual enhancement information, and storing the screen;
matching in a website page according to the screenshot, and inquiring whether the visual locator is uniquely matched in the website page; if a plurality of results are matched, a certain proportion is expanded according to the upper left coordinate and the lower right coordinate of the control position information until the vision enhancement information can be uniquely matched;
verifying the locators according to the confidence degrees of the locators, grouping according to whether the controls operated by the locators are the same, reserving the most groups of the same controls, and deleting other locators;
and converting the types of the operation events, the reserved locators, the visual enhancement information and the types of the operated controls into test case scripts and locally storing the test case scripts.
Preferably, the step S3 specifically includes the following steps:
reading a test case script stored locally, and analyzing the test case script into a script statement which can be directly executed;
analyzing the script statement to obtain the type of the operation event and the locator, and acquiring the control according to the type of the operation event and the locator;
judging whether the control can be acquired or not, if not, acquiring the control through visual enhancement information, and executing the operation corresponding to the type of the operation event through calling the interface which is interacted with the interface;
if the control can be obtained, operating the control, and executing the operation corresponding to the type of the operation event.
A recording and playback device for web operational events, the device comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute a method for recording and playing back a web operation event according to instructions in the program code.
From the above technical scheme, the application has the following advantages:
according to the embodiment of the application, the monitor is inserted into the tested page during recording, the event is monitored, then the event is processed and recorded, the recorded test case is read and gradually executed during replay, the traditional recording mode is modified into the recording mode based on real-time verification, whether the operation can be replayed or not is checked in real time during recording, meanwhile, only the replayable positioner is saved, and during recording and replaying, not only the traditional positioning mode but also the control visual positioner based on the visual enhancement technology is recorded, so that the test case can be replayed through the visual positioner when replaying through the traditional positioner fails, the replay success rate is ensured, and the invalid test case in the recording and replaying process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a system configuration diagram of a system, a method and a device for recording and playing back web operation events according to an embodiment of the present application.
Fig. 2 is a flowchart of a method for recording and playing back a web operation event, a method and a device according to an embodiment of the present application.
Fig. 3 is a device structure diagram of a system, a method and a device for recording and playing back web operation events according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a system, a method and equipment for recording and replaying Web operation events, which are used for solving the technical problem that too many test cases exist in the recording and replaying process when the Web application is recorded and replayed in the prior art.
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a system configuration diagram of a recording and playing back system, method and device for web operation event according to an embodiment of the present application.
As shown in fig. 1, the recording and playback system for web operation events provided by the present application includes a recording module 101, a verification module 103, an execution module 104, a control module 102 and a storage module 105;
the control module 102 is used for controlling information interaction among the recording module 101, the checking module 103, the executing module 104 and the storage module 105;
the recording module 101 is configured to record and monitor an operation event, calculate and combine related information of the monitored operation event, and transmit the combined related information to the control module 102;
the verification module 103 is configured to receive and verify the related information sent by the control module 102, obtain a test action sequence, and transmit the obtained test action sequence to the control module 102;
the execution module 104 is configured to receive the obtained test action sequence sent by the control module 102, and execute the obtained test action sequence;
the storage module 105 is configured to convert the obtained test action sequence received by the control module 102 into a test case script and store the test case script.
The recording module 101 includes a recording agent 1011 and a recorder 1012;
the recording agent 1011 is used for providing a monitoring module and embedding the monitoring module into the recorder 1012; the monitoring module is used for monitoring operation events;
the recorder 1012 is used for recording operation events.
The specific working procedure of the recording module 101 is as follows:
the recording module 101 is started, the recording agent 1011 is injected into the recorder 1012 to monitor the event, and the information related to the monitored operation event is processed, and the event processing flow involved in the monitoring process is as follows.
Recording agent 1011 contains monitoring of various operational events, including: the monitor module is inserted into the recorder 1012 through the recording agent 1011 to monitor the operation event.
After the operation event is monitored, the traditional locators of the control operated by the operation event are calculated firstly, wherein the traditional locators comprise an id locator, a text locator, an XPath locator, a CSS locator using a tagname attribute, a name attribute and the like, and a relative locating mode of locating through a father node is provided.
And calculating the position information of the control, and using the position information as visual enhancement information of the extracted control.
The location information of the conventional locator, the control, the operation event type, and the type information of the operated control are combined and then transmitted to the control module 102.
The specific working procedure of the verification module 103 is as follows:
after receiving the combined related information transmitted from the control module 102, the verification module 203 needs to verify the combined related information;
after receiving the combined related information, the verification module 103 performs screenshot according to the position information of the control, and uses the screenshot as a visual locator of the control, namely visual enhancement information, and stores the screenshot;
the method comprises the steps of storing visual enhancement information of a tested web page according to position information of a control transmitted by a recording end before an operation event is executed. After the visual enhancement information is obtained, checking is carried out in the web page once, whether the visual enhancement is uniquely matched in the web page is judged, if the visual enhancement is not uniquely matched, the position information of the control is required to be expanded until the visual information can be uniquely matched in the web page.
According to the credibility sequence of the locators, starting to acquire from the most credible locators, judging whether a control acquired by the subsequent locators is the same as the first one, if more than half of the controls are different, taking most locators as the standard, and removing different locators; otherwise, the first control is used for deleting the acquired locators which are different from the first control from the list.
And processing operation events of the control through an interface which interacts with the interface, and executing recorded operations.
The verified locator information and visual enhancement information are transmitted back to the control module 102.
The execution module 104 receives the test case script read by the storage module 105, and then executes the test case through an actuator of a traditional positioner and a visual enhancement actuator, and the specific process is as follows:
analyzing the test case statement into a keyword and a locator, acquiring the control through the traditional locator, executing the operation indicated by the keyword on the control or the control position, and executing the operation information through an interface interacted with the interface.
If the control is not acquired, attempting to acquire the control in a visual enhancement mode. Firstly, extracting features of pictures of controls to be matched, extracting visual features of the pictures, matching the visual features of the pictures, and matching the visual features of the pictures to the controls identical to the visual features of the pictures. Multiple controls may be acquired here, so the matched controls need to be filtered, leaving only the most similar one. And returning the position information of the control image in the interface, and subsequently operating the position.
The storage module 105 includes storage of test cases at recording and reading of test cases at playback. Relevant information of the receiving control module 102 is converted into a test case script and stored in the recording process. When the control module 102 calls the test case information from the storage module 105 in the execution process, sentences in the test case script are read, analyzed and then transmitted to the execution module 104 for execution.
As shown in fig. 2, a method for recording and playing back web operation events, the method is based on the system and comprises the following steps:
step S1: recording and monitoring the operation event, and calculating and merging the related information of the monitored operation event;
step S2: verifying the combined related information to obtain a test action sequence, converting the test action sequence into a test case script and locally storing the test case script;
step S3: and reading the test case script stored locally and executing corresponding operation.
As a preferred embodiment, step S1 specifically includes the steps of:
monitoring and recording operation events;
when an operation event is monitored, the type of the operation event is recorded, the position information (including the coordinates of the upper left and lower right points) of the locator of the operation event and the control operated by the locator are calculated, the four-corner coordinate information is used as the basis for extracting the vision enhancement information, and the type of the control operated by the locator is recorded;
and combining the type of the operation event, the locator, the control position information and the type of the operated control to obtain combined related information.
As a preferred embodiment, step S2 specifically includes the following procedure:
capturing a screen in the current page according to the control position information in the combined related information, and taking the screen as a visual locator, namely visual enhancement information, of the control;
in order to ensure the uniqueness of the visual enhancement information, checking the visual enhancement information in a website page, and inquiring whether the visual enhancement information is uniquely matched in the website page; if a plurality of results are matched, expanding four-point coordinates of the four-angle coordinate information by a certain proportion until the vision enhancement information can be uniquely matched;
verifying the locators according to the confidence degrees of the locators, grouping according to whether the controls operated by the locators are the same, reserving the most groups of the same controls, and deleting other locators;
and converting the types of the operation events, the reserved locators, the visual enhancement information and the types of the operated controls into test case scripts and locally storing the test case scripts.
As a preferred embodiment, step S3 specifically includes the steps of:
reading a test case script stored locally, and analyzing the test case script into a script statement which can be directly executed;
analyzing the script statement to obtain the type of the operation event and the locator, and acquiring the control according to the type of the operation event and the locator;
judging whether the control can be acquired or not, if not, acquiring the control through visual enhancement information, and executing the operation corresponding to the type of the operation event through calling the interface which is interacted with the interface;
if the control can be obtained, operating the control, and executing the operation corresponding to the type of the operation event.
As shown in fig. 3, a recording and playback device 30 for web operational events, the device comprising a processor 300 and a memory 301;
the memory 301 is used for storing a program code 302 and transmitting the program code 302 to the processor;
the processor 300 is configured to perform the steps of a method of recording and playback of a web operational event as described above in accordance with instructions in the program code 302.
Illustratively, the computer program 302 may be partitioned into one or more modules/units that are stored in the memory 301 and executed by the processor 300 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program 302 in the terminal device 30.
The terminal device 30 may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor 300, a memory 301. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the terminal device 30 and is not meant to be limiting as to the terminal device 30, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the terminal device may also include input and output devices, network access devices, buses, etc.
The processor 300 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 301 may be an internal storage unit of the terminal device 30, such as a hard disk or a memory of the terminal device 30. The memory 301 may also be an external storage device of the terminal device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 30. Further, the memory 301 may also include both an internal storage unit and an external storage device of the terminal device 30. The memory 301 is used for storing the computer program and other programs and data required by the terminal device. The memory 301 may also be used to temporarily store data that has been output or is to be output.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. The recording and replaying system of the web operation event is characterized by comprising a recording module, a checking module, an executing module, a control module and a storage module;
the control module is used for controlling information interaction among the recording module, the checking module, the executing module and the storage module;
the recording module is used for recording and monitoring the operation event, calculating and combining the related information of the monitored operation event, and transmitting the combined related information to the control module;
the verification module is used for receiving the related information sent by the control module and verifying the related information to obtain a test action sequence, and transmitting the test action sequence to the control module;
the execution module is used for receiving and executing the test case script sent by the control module;
the storage module is used for converting the test action sequence received by the control module into a test case script and storing the test case script;
the verification module is specifically used for carrying out screenshot according to the position information of the control, and taking the screenshot as a visual locator, namely visual enhancement information, of the control;
matching in a website page according to the screenshot, and inquiring whether the visual locator is uniquely matched in the website page; if a plurality of results are matched, expanding a certain proportion according to the upper left coordinate and the lower right coordinate of the position information of the control until the vision enhancement information can be uniquely matched;
checking according to the confidence coefficient of the locator, grouping according to whether the controls operated by the locator are the same, reserving the most groups of the same controls, and deleting other locators;
and transmitting the verified locator information and the visual enhancement information back to the control module.
2. The system of claim 1, wherein the recording module comprises a recording agent and a recorder;
the recording agent is used for providing a monitoring module and embedding the monitoring module into the recorder; the monitoring module is used for monitoring operation events;
the recorder is used for recording the operation event.
3. The system of claim 2, wherein the information related to the event includes a type of the operational event, a locator, visual enhancement information, and a type of control operated by the locator.
4. A recording and playback system for web operational events as recited in claim 3, wherein said locators include an id locator, a text locator, an XPath locator, and a CSS locator.
5. The system for recording and playback of web operational events of claim 4, wherein the memory module converts the sequence of test actions into test case scripts and stores the test case scripts.
6. A method of recording and replaying web operational events, said method being based on the system according to any one of the preceding claims 1 to 5, characterized in that it comprises the steps of:
step S1: recording and monitoring the operation event, and calculating and merging the related information of the monitored operation event;
step S2: verifying the combined related information to obtain a test action sequence, converting the test action sequence into a test case script and locally storing the test case script;
step S3: reading the test case script stored locally and executing corresponding operation;
the step S2 is specifically the following process: capturing a screenshot according to the position information of the control, taking the screenshot as a visual positioner of the control, namely visual enhancement information, and storing the screenshot;
matching in a website page according to the screenshot, and inquiring whether the visual locator is uniquely matched in the website page; if a plurality of results are matched, expanding a certain proportion according to the upper left coordinate and the lower right coordinate of the position information of the control until the vision enhancement information can be uniquely matched;
checking according to the confidence coefficient of the locator, grouping according to whether the controls operated by the locator are the same, reserving the most groups of the same controls, and deleting other locators;
and converting the types of the operation events, the reserved locators, the visual enhancement information and the types of the operated controls into test case scripts and locally storing the test case scripts.
7. The method for recording and reproducing web operation event according to claim 6, wherein the step S1 comprises the steps of:
monitoring and recording operation events;
when the operation event is monitored, the type of the operation event is recorded, the locator of the operation event and the position information of the control operated by the locator are calculated, and the type of the control operated by the locator is recorded;
and combining the type of the operation event, the locator, the position information of the control and the type of the operated control to obtain combined related information.
8. The method for recording and reproducing a web operation event according to claim 6, wherein the step S3 comprises the steps of:
reading a test case script stored locally, and analyzing the test case script into a script statement which can be directly executed;
analyzing the script statement to obtain the type of the operation event and the locator, and acquiring the control according to the type of the operation event and the locator;
judging whether the control can be acquired or not, if not, acquiring the control through visual enhancement information, and executing the operation corresponding to the type of the operation event through calling the interface which is interacted with the interface;
if the control can be obtained, operating the control, and executing the operation corresponding to the type of the operation event.
9. A recording and playback device for web operational events, the device comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute a method of recording and replaying a web operation event according to any one of claims 6-8 according to instructions in the program code.
CN202010150683.4A 2020-03-06 2020-03-06 Recording and playback system, method and equipment for web operation event Active CN111400175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010150683.4A CN111400175B (en) 2020-03-06 2020-03-06 Recording and playback system, method and equipment for web operation event

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010150683.4A CN111400175B (en) 2020-03-06 2020-03-06 Recording and playback system, method and equipment for web operation event

Publications (2)

Publication Number Publication Date
CN111400175A CN111400175A (en) 2020-07-10
CN111400175B true CN111400175B (en) 2023-08-18

Family

ID=71432296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010150683.4A Active CN111400175B (en) 2020-03-06 2020-03-06 Recording and playback system, method and equipment for web operation event

Country Status (1)

Country Link
CN (1) CN111400175B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294099A (en) * 2015-05-15 2017-01-04 阿里巴巴集团控股有限公司 A kind of method of testing and equipment
CN106649092A (en) * 2016-10-21 2017-05-10 郑州云海信息技术有限公司 Test script generation method, web page testing method, device and system
US10083159B1 (en) * 2016-07-13 2018-09-25 Screen Share Technology Ltd. Method for recording, editing and reproduction of web browser session
CN110109836A (en) * 2019-05-06 2019-08-09 安然 The operation back method and system of page end
CN110837474A (en) * 2019-11-13 2020-02-25 北京博睿宏远数据科技股份有限公司 Script recording method, device, terminal and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11132287B2 (en) * 2016-05-18 2021-09-28 Dynatrace Llc Synthetic test recorder installed inline with a web portal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294099A (en) * 2015-05-15 2017-01-04 阿里巴巴集团控股有限公司 A kind of method of testing and equipment
US10083159B1 (en) * 2016-07-13 2018-09-25 Screen Share Technology Ltd. Method for recording, editing and reproduction of web browser session
CN106649092A (en) * 2016-10-21 2017-05-10 郑州云海信息技术有限公司 Test script generation method, web page testing method, device and system
CN110109836A (en) * 2019-05-06 2019-08-09 安然 The operation back method and system of page end
CN110837474A (en) * 2019-11-13 2020-02-25 北京博睿宏远数据科技股份有限公司 Script recording method, device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贾丽 ; 许静 ; 金鑫 ; 田禾 ; .Web系统测试用例自动执行系统.计算机工程与应用.2009,(第04期),全文. *

Also Published As

Publication number Publication date
CN111400175A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN108459850B (en) Method, device and system for generating test script
US10552242B2 (en) Runtime failure detection and correction
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
CN109284331B (en) Certificate making information acquisition method based on service data resources, terminal equipment and medium
CN112433948A (en) Simulation test system and method based on network data analysis
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN115629968A (en) Test data recording method and device
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN114020432A (en) Task exception handling method and device and task exception handling system
CN111400175B (en) Recording and playback system, method and equipment for web operation event
CN117421217A (en) Automatic software function test method, system, terminal and medium
CN116738091A (en) Page monitoring method and device, electronic equipment and storage medium
CN112256532A (en) Test interface generation method and device, computer equipment and readable storage medium
CN112115060A (en) Audio test method and system based on terminal
CN115952079A (en) Method and system for recording mobile application automation behaviors and analyzing and positioning defects
CN111786991B (en) Block chain-based platform authentication login method and related device
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN113672514A (en) Test method, test device, server and storage medium
CN111026631B (en) Automatic interface detection method, device and server
CN112433947A (en) Chaos engineering method and system based on network data
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN112363944A (en) Method and equipment for comparing return values of multiple environment interfaces
CN105988917A (en) Method and device for obtaining abnormal information
CN114661609B (en) Artificial intelligence medical automation test integrated system
CN115964260A (en) Software quality inspection method and related product

Legal Events

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