CN115237813A - Script generation and test method, electronic device and computer storage medium - Google Patents

Script generation and test method, electronic device and computer storage medium Download PDF

Info

Publication number
CN115237813A
CN115237813A CN202211138691.2A CN202211138691A CN115237813A CN 115237813 A CN115237813 A CN 115237813A CN 202211138691 A CN202211138691 A CN 202211138691A CN 115237813 A CN115237813 A CN 115237813A
Authority
CN
China
Prior art keywords
user
script
playback
case
instruction
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
CN202211138691.2A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211138691.2A priority Critical patent/CN115237813A/en
Publication of CN115237813A publication Critical patent/CN115237813A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour

Abstract

The application discloses a script generating and testing method, an electronic device and a computer storage medium, wherein the method comprises the following steps: responding to a recording instruction of a user, and starting to identify and record user operation; wherein, the identifying and recording user operations comprises: in response to a user insertion checkpoint instruction at an operational node, inserting a checkpoint command at the operational node to insert a checkpoint at the operational node upon subsequent playback of the user operation; and saving the user operation set as a script case. When a user records a script case, a check point instruction can be actively inserted between two user operations, so that the operation corresponding to the check point instruction can be executed between the two user operations each time the script case is played back, and corresponding check point data is generated at the same time, so that the user can intuitively compare and observe the check point data to obtain the difference of operable pages among multiple times of playback or different versions during playback and recording.

Description

Script generation and test method, electronic device and computer storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a script generation and testing method, an electronic device, and a computer storage medium.
Background
The Selenium Ide, as a part of the Selenium suite, is mainly responsible for recording the operation behavior of the user on the user operation interface and generating scripts, and can provide playback functions. However, the Selenium Ide cannot actively insert a checkpoint instruction by a user when recording the user operation behavior, so that the user cannot intuitively and quickly compare the difference between the operable interface before updating and the operable interface after updating through the check data generated at the checkpoint during the playback of the Selenium Ide.
Disclosure of Invention
The application at least provides a script generation and test method, electronic equipment and a computer storage medium which can be applied to the related fields of financial science and technology and the like, and a user can actively insert a check point during recording to generate check data at the check point during playback, so that the user can visually and quickly compare to obtain the difference between an operable interface before updating and an operable interface after updating.
The application provides a script generation and test method in a first aspect, which includes:
responding to a recording instruction of a user, and starting to identify and record user operation; wherein the identifying and recording user operations comprises: in response to a user checkpoint insertion instruction at an operational node, inserting a checkpoint command at the operational node to insert a checkpoint at the operational node upon subsequent playback of the user operation, and/or, upon execution of the user operation;
and responding to an instruction of finishing recording by the user, and saving the user operation set as a script case.
A second aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, where the processor is configured to execute program instructions stored in the memory to implement the script generation and testing method described above.
A third aspect of the present application provides a computer-readable storage medium, on which program instructions are stored, which when executed by a processor, implement the script generation and testing method described above.
According to the scheme, when the user records the script case, the checkpoint instruction can be actively inserted between two steps of user operation, so that the operation corresponding to the checkpoint instruction can be executed between the two steps of user operation each time the script case is played back, and corresponding checkpoint data is generated at the same time, and therefore the user can intuitively compare and observe the checkpoint data to obtain the difference of the operable pages among multiple times of playback or different versions during playback and recording. The method and the device are used in the field of financial science and technology, can accelerate the updating efficiency of financial software pages, and improve competitiveness.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a script generation and testing method according to the present application;
FIG. 2 is a schematic flowchart of another embodiment of a script generation and testing method of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a script generation and testing method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a playback report generated by the script generation and testing method of the present application;
FIG. 5 is a schematic diagram of an operation interface and an operation log generated by the script generation and testing method of the present application;
FIG. 6 is a block diagram of an embodiment of an electronic device of the present application;
fig. 7 is a block diagram of an embodiment of a computer-readable storage medium 70 of the present application.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The term "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship. Further, "plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of a, B, C, and may mean including any one or more elements selected from the group consisting of a, B, and C.
Generally, for the development of user operable pages, the final available version is often released after undergoing a test of multiple versions, and for some version tests with fast iteration, existing scripts generated by using an automation tool cannot actively insert screenshots and the like to set check points during script recording so as to generate check data at the check points in the subsequent playback and execution processes, so that a developer can compare differences of the past test versions, and thus the test efficiency is low. According to the method and the device, the efficiency of script testing is improved, the progress of page publishing is accelerated, and the competitiveness in the financial science and technology field is improved.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a script generating and testing method according to an embodiment of the present disclosure. Specifically, the method may include the steps of:
s1: responding to a recording instruction of a user, and starting to identify and record user operation; wherein identifying and recording user operations comprises:
s11: responding to a user's checkpoint insertion instruction, inserting a checkpoint; specifically, in response to a user's insertion checkpoint instruction at an operational node, a checkpoint command is inserted at the operational node to insert a checkpoint at the operational node upon subsequent playback of the user operation, and/or, while running the user operation;
s3: responding to an instruction of finishing recording by a user, and saving the script case; specifically, the collection of user operations is saved as a script case. The set of user operations is a set of operations performed by a user in sequence, specifically, taking a user login page as an example, if the user clicks an input account, clicks an input password, and clicks login in sequence, the set of user operations is: clicking to input the station, clicking to input the password, and clicking to log in.
Specifically, the execution main body of the script generation and test method can be a Selenium IDE, and a user clicks a recording start button to issue a recording instruction to start recording the next operation of the user; in the recording process, the Selenium IDE creates a checkpoint insertion button on a user operation page, and a user can insert a checkpoint at a corresponding operation node by clicking the checkpoint insertion button, wherein one-step operation of the user is recorded in each operation node; after entering one operation node, recording the operation of the user, namely entering the next operation node, and after recognizing that the user executes a certain operation, storing the operation record to the operation node; the execution process of the user checkpointing operation may specifically be as follows: for example, when testing a user login interface, a user operable page is provided with buttons for inputting an account, inputting a password, logging in, registering, and the like, and a check point insertion button generated by the Selenium IDE is also displayed on the user operable page, and when the user records, the first step of user operation is that: clicking an account number input button, wherein the operation executed at the first operation node is to click an input account number; after the operation of the user at the first operation node is identified and recorded, the user enters the second operation node, the user hopes to insert the check point after inputting the account number, and then clicks the check point inserting button, namely, a check point instruction can be inserted at the second operation node behind the first operation node, so that the script case generates check data at the check point at the second operation node during playback and execution. The checking data generated by the checking points actively inserted by the user can be used for conveniently comparing the differences among the user operation pages of a plurality of versions during testing, so that the testing efficiency is improved.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another embodiment of the script testing and generating method according to the present application, after responding to an instruction for ending recording by a user and saving a user operation set as a script case, the method further includes:
s4: responding to a playback instruction of a user, and playing back the script case;
s5: generating a playback report in response to an end of the playback script case; wherein the playback report includes data generated at checkpoints at the respective operational nodes when the script case is played back.
Because the user inserts the check point when recording the script, when replaying the script case, the user can automatically execute the check point instruction and generate the check point data, and after the replay of the script case is finished, the replay report is automatically generated, and the check point data is attached in the replay report, so that the user can check the replay report and compare the check point data, thereby more intuitively observing the difference of the past generation versions, the node of the replay failure and the failure reason. The script recording, playback, storage, report generation and other processes are all executed by the Selenium IDE, so that the robustness and the portability of the script are improved, the labor and the time are saved, and the testing efficiency is further improved.
In some possible embodiments, inserting a checkpoint instruction includes inserting a screenshot instruction, in response to a user inserting a checkpoint instruction at an operation node, inserting a checkpoint command at the operation node to insert a checkpoint at the operation node upon subsequent playback of a user operation, and/or, running a user operation, inserting a checkpoint at the operation node includes: responding to a screenshot inserting instruction of a user at a certain operation node, inserting a click event at the certain operation node, calling a screenshot command to perform screenshot, and calling the screenshot command to perform screenshot at the operation node during subsequent playback and/or running a script case; the step of calling the screenshot command to perform screenshot comprises the following steps: calling an external application programming interface, moving a current display area to the edge of a current page according to the distance from the edge of the current display area to the edge of the current page, and performing rolling screenshot on the current page;
the current page is a page pointed by the last operation node for executing the screenshot command, and the current display area is an area displayed on the display of the current page.
Specifically, the checkpoint instruction may be an instruction for inserting a screenshot, or may be another instruction for facilitating the user to view the execution process, such as a screen recording instruction, a recording instruction, and the like, which is not limited herein; after the execution of the Selenium IDE at one operation node is finished, if a user inserts a screenshot command at the moment, a click event is generated at the next operation node, the target command of the click event is a screenshot command, and the tag value of the target command of the click event is the tag value of the screenshot command; in order to enable the click event to successfully trigger the screenshot command, mapping between the screenshot command and the tag value of the screenshot command needs to be established first, so that after the tag value of the click event target command is monitored to be the same as the tag value of the screenshot command during playback, a screenshot program corresponding to the tag value can be called according to the tag value, and the screenshot program is executed. For example, the label value of the screenshot command is screen shot div, and a mapping between the label value and an external application programming interface with a screenshot function is established, taking a user login interface as an example, when recording, after a user clicks a password input button, an inserted screenshot button is clicked, and the label value of a target command of a generated click event is screen shot div; and during subsequent script case playback, when the operation node is executed, the tag value of the target instruction of the click event is recognized to be the screen shot div, and the program pointed by the tag value is the programming interface of the external application program, so that the program is called to perform screenshot, and the instruction of the next operation node is continuously executed after the execution is finished.
For example, taking the test of the user login interface as an example, after recording is started, the user performs the following operations in sequence: clicking an input account, clicking an input password, clicking an insertion screenshot and clicking login, and then the user operation of each operation node under the generated script case record is as follows: clicking an input account, clicking an input password, clicking an insertion screenshot and clicking login, namely calling a screenshot program to screenshot the current page after a simulation user clicks an input password button on a user login page when the script case is played back.
In order to prevent incomplete screenshot caused by the mismatch between the display screen size and the page size, the current page needs to be fully screenshot: for example, if the current page is a square page with 8 × 8, and the current display area is a rectangle with 4 × 6, the current display area is only a part of the current page, and the current display area needs to be adjusted in order to perform a full screenshot on the current page. Taking a user login interface as an example, after a user inputs an account and a password and clicks a login button, a new page is pointed, the new page is a current page, and assuming that the content displayed on the new page includes a password error and a request to re-input, the content is displayed in the top area of the page, but the current display area, namely the area displayed on the display of the current page, is the bottom area of the current page, the content of the password error and the request to re-input cannot be displayed in the current display area, so that a screenshot cannot be directly performed. In order to perform a full screenshot on a current page, a distance from an edge of a current display area to the edge of the current page may be calculated, for example, the current display area is a rectangle, the current page is a square, and distances from a left side of the rectangle to a left side of the square are respectively calculated and recorded as a first distance; and the distance from the upper side of the rectangle to the upper side of the square is recorded as a second distance; and moving the current display area to the left by a first distance and moving the current display area to the upper left corner of the current page by a second distance. The current display area can be moved to other positions of the current page without limitation; after the current display area is adjusted to the edge, the screenshot can be started to be rolled until the rolling screenshot covers all the content of the current page; the scrolling screenshot can be a distance that the length of the side parallel to the scrolling direction of the current display area is the same during each scrolling, for example, the screenshot is scrolled transversely, and the length of the scrolling distance is the same as the length of the upper side of the current display area during each scrolling; the distance of each rolling can be customized; the current page is subjected to rolling screenshot after the current display area is moved to the edge of the current page, so that the screenshot efficiency can be improved, the repeated area of screenshot is reduced, and all contents of the current page are reserved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a script generation and testing method according to another embodiment of the present application, and in some possible implementations, the identifying and recording user operations further includes: s12: inserting a wait time in response to an insert wait time instruction of a user; specifically, in response to an insertion waiting time instruction of a user at a certain operation node, a click event is inserted at the certain operation node in the script case, and a tag value of a target command of the click event is a tag value of the waiting command, so that the waiting command is called at the operation node during subsequent playback and/or the script case is executed, and a next operation is executed after the waiting time is delayed.
Taking a user login interface as an example, during recording, the Selenium IDE creates an insert wait time button on the user login interface, and in response to a user clicking the insert wait time button after clicking the login button, inserts a click event, where a tag value of a target command of the click event is the same as a tag value of a wait command, for example, the tag value of the wait command is vandaWaiteDiv, and establishes a mapping between the tag value and the wait command, and the tag value of the target command of the click event is vandaWaiteDiv, and when playing back a script case, monitors that the tag value of the target command of the click event is vandaWaiteDiv, and calls the wait command according to the mapping, where the wait command may be a countdown command or a timing command, and when the time reaches a preset value, ends waiting and executes a user operation of a next operation node. The default waiting time for the wait command is 3000 ms, and the waiting time for the wait command can be changed according to the actual situation.
In some possible embodiments, in response to a playback instruction of the user, the playback script case includes: in response to a user selecting one or more cases and a user's playback instruction, one or more cases are added to the playback sequence, which in turn plays back the script cases.
When a plurality of script cases need to be played back, the user can respond to the user to select a plurality of script cases and a playback instruction of the user, the user selected plurality of script cases are added into a playback sequence, and the playback of the next script case is automatically carried out when the playback of the previous script case is finished; the playback sequence can be an array, data of a plurality of script cases needing to be played back are added into the array, and the data of the first script case in the array is assigned to the current playing case, so that the first script case can be played back; after the playback of the first script case is finished, assigning the data of the second script case in the array to the current playing case, namely, playing back the second script case, and after the playback of the second script case is finished, continuing playing back the third script case according to the method until the array is traversed; after the playback of the first script case is finished, the data of the first script case in the array can also be deleted, whether the length of the array is greater than 0 or not is judged, and if the length of the array is greater than 0, the data of the first script case in the array at the moment is assigned to the current playing case until the length of the array is 0. Through the automatic playback of the multi-selection script case, the labor capacity of a user can be reduced.
In some possible embodiments, the method further comprises: in response to a user's instruction to create a case set, storing the case set to a storage unit, the storage unit having an address different from storage units of other case sets, the storage unit for storing script cases in the case set; in response to a user instruction to end recording the scripted case, saving the scripted case comprises: storing one or a plurality of cases to the address of a storage unit corresponding to the case set specified by the user; in response to a playback instruction of the user, playing back the script case includes: in response to a user selecting one or several case sets and a user's playback instruction, adding the one or several case sets to a playback sequence, and sequentially playing back the script cases in the case sets.
The case set is created in response to a case set creating instruction of a user, which is equivalent to creating a folder for storing script cases, the script cases for testing the same function modules can be stored in the same case set, one or a plurality of case sets are selected when the script cases are played back, all the script cases in the selected case set can be played back, and the method for playing back a plurality of case embodiments is the same as the embodiment and is not described again.
In some possible embodiments, when the script case is played back, an operation log of each operation node is generated, wherein the operation log comprises user operations currently played back by the script case and operation objects of the played-back user operations; generating a playback report in response to an end of the playback script case; wherein the data generated at the checkpoint at the corresponding operation node when the script case is played back is included in the playback report comprises: responding to the end of the playback of the last script case in one or a plurality of script cases, and generating a playback report according to the operation log; and the playback report comprises screenshots at the corresponding operation nodes when the script case is played back.
Referring to fig. 4 and 5, fig. 4 is a schematic diagram of a playback report generated by the script generation and test method of the present application, fig. 5 is a schematic diagram of an operation interface generated by the script generation and test method of the present application and an operation log generated by the script generation and test method of the present application, specifically, taking a user login interface as an example, if a password input button is clicked, an operation log for executing the operation is generated, and the operation log includes: the execution operation is a click operation, and the target of the click operation is a password input button; when a script case is played back, an operation log is generated during playback; after the playback is finished, a playback report is generated, the playback report includes the operation executed at each operation node and the target of the operation, whether the operation passes the contents of the playback, the waiting time length and the like, if the screenshot instruction is executed during the playback, and the screenshot data of the screenshot instruction is stored in the memory, the address of the screenshot data in the memory can be inserted into the playback report, and the screenshot data in the memory can be called out in response to the instruction of clicking the address. Specifically, a "view screenshot" button may be displayed in the playback report, and a user may extract a corresponding screenshot from a corresponding address of the memory by clicking the view screenshot button. In addition, when a plurality of scenario cases are played back, after the playback of the last scenario case in the scenario cases is finished, the operation logs of all scenario cases are combined according to the playback sequence, and are added with the contents of whether the scenario cases pass the playback, the waiting time length and the like, and then the scenario cases are rendered into an HTML file to be exported in an HTML format, so that a playback report is formed. By combining the playback reports of the multiple script cases into one during the playback of the multiple script cases, the functions of the multiple script cases can be more integrally shown.
In some possible embodiments, in response to a user selecting one or several instances of the scenario and a user's deletion instruction, deleting the selected one or several instances of the scenario in the playback sequence; and/or, in response to a user selecting one or more instances of the foot and a user's add instruction, adding the selected one or more instances of the foot into the playback sequence. That is, the user updates the data in the playback sequence in real-time as script cases are deleted and added.
Referring to fig. 6, fig. 6 is a schematic diagram of a frame of an embodiment of an electronic device 60 according to the present application. The electronic device 60 comprises a memory 61 and a processor 62 coupled to each other, and the processor 62 is configured to execute program instructions stored in the memory 61 to implement the steps in the above-described embodiment of the script generating and testing method. In one particular implementation scenario, electronic device 60 may include, but is not limited to: a microcomputer, a server, and in addition, the electronic device 60 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein.
In particular, the processor 62 is configured to control itself and the memory 61 to implement the steps in the above-described script generation and testing method embodiments. The processor 62 may also be referred to as a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip having signal processing capabilities. The Processor 62 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 62 may be collectively implemented by an integrated circuit chip.
Referring to fig. 7, fig. 7 is a block diagram illustrating an embodiment of a computer readable storage medium 70 according to the present application. The computer readable storage medium 70 stores program instructions 701 executable by the processor, where the program instructions 701 are used to implement the steps of any one of the above-described embodiments of the image detection model training method, or to implement the steps of the above-described embodiments of the script generation and testing method.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to each other, and for brevity, will not be described again herein.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is only one type of logical division, and other divisions may be implemented in practice, for example, the unit or component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
If the technical scheme of the application relates to personal information, a product applying the technical scheme of the application clearly informs personal information processing rules before processing the personal information, and obtains personal independent consent. If the technical scheme of the application relates to sensitive personal information, before the sensitive personal information is processed, a product applying the technical scheme of the application obtains individual consent and simultaneously meets the requirement of 'explicit consent'. For example, at a personal information collection device such as a camera, a clear and significant identifier is set to inform that the personal information collection range is entered, the personal information is collected, and if the person voluntarily enters the collection range, the person is regarded as agreeing to collect the personal information; or on the device for processing the personal information, under the condition of informing the personal information processing rule by using obvious identification/information, obtaining personal authorization in the modes of pop-up window information or asking the person to upload personal information thereof and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing method, and a type of personal information to be processed.

Claims (11)

1. A script generation and test method is characterized by comprising the following steps:
responding to a recording instruction of a user, and starting to identify and record user operation; wherein the identifying and recording user operations comprises: in response to a user insertion checkpoint instruction at an operational node, inserting a checkpoint command at the operational node to insert a checkpoint at the operational node upon subsequent playback of the user operation and/or, while running the user operation;
and responding to an instruction of finishing recording of the user, and saving the set of user operations as a script case.
2. The method of claim 1, wherein after saving the set of user actions as a script case in response to the instruction to end recording by the user, the method further comprises:
responding to a playback instruction of a user, and playing back the script case;
generating a playback report in response to an end of playing back the script case; wherein the playback report includes data generated at a checkpoint at the corresponding operation node when the script case is played back.
3. The method of claim 1 or 2, wherein the inserting a checkpoint instruction comprises inserting a screenshot instruction, wherein inserting a checkpoint command at an operation node to insert a checkpoint at a subsequent playback of the user operation in response to a user inserting a checkpoint instruction at the operation node and/or inserting a checkpoint at the operation node while running the user operation comprises:
responding to a screenshot inserting instruction of a user at a certain operation node, inserting a click event at the certain operation node, calling the screenshot command to perform screenshot, and calling the screenshot command to perform screenshot at the certain operation node when a subsequent playback and/or running the script case.
4. The method of claim 3, wherein invoking the screenshot command to make a screenshot comprises: calling an external application programming interface, moving a current display area to the edge of a current page according to the distance from the edge of the current display area to the edge of the current page, and performing rolling screenshot on the current page;
the current page is a page pointed after the last operation node of the screenshot command is executed, and the current display area is an area displayed on a display of the current page.
5. The method of claim 1 or 2, wherein the identifying and recording user actions further comprises: and responding to an insertion waiting time instruction of a user at an operation node, inserting a click event at the operation node in the script case, wherein the tag value of a target command of the click event is the tag value of a waiting command, so that the waiting command is called at the operation node during subsequent playback and/or the script case is run, and the next operation is executed after the waiting time is delayed.
6. The method of claim 2, wherein the playing back the script case in response to a playback instruction by a user comprises: responding to one or a plurality of script cases selected by a user and a playback instruction of the user, adding the one or a plurality of script cases to a playback sequence, and sequentially playing back the script cases.
7. The method of claim 2, further comprising: in response to a user's create case set instruction, storing the case set to a storage unit, the storage unit having an address different from storage units of other case sets, the storage unit being used for storing script cases in the case set;
the step of responding to the instruction of the user for finishing recording the script case, wherein the step of saving the script case comprises the following steps: storing one or a plurality of script cases to the address of a storage unit corresponding to a case set specified by a user;
the playing back the script case in response to a playback instruction of the user comprises: and responding to one or a plurality of case sets selected by a user and a playback instruction of the user, adding the one or a plurality of case sets to a playback sequence, and sequentially playing back the script cases in the case sets.
8. The method according to claim 2, 6 or 7, characterized in that, when the script case is played back, an operation log of each operation node is generated, and the operation log comprises the user operation currently played back by the script case and the operation object of the played back user operation; generating a playback report in response to the end of the playback script case; wherein the data generated at the checkpoint at the corresponding operational node when the playback script case is included in the playback report includes: responding to the end of the playback of the last script case in one or a plurality of script cases, and generating a playback report according to the operation log; and the playback report comprises screenshots at the corresponding operation nodes when the script case is played back.
9. The method of claim 6 or 7, further comprising: in response to a user selecting one or more of the script cases and a user's delete instruction, deleting the selected one or more script cases in the playback sequence;
and/or the presence of a gas in the gas,
in response to a user selecting one or several of the script cases and a user's add instruction, adding the selected one or several script cases to the playback sequence.
10. An electronic device comprising a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the script generation and testing method of any one of claims 1 to 9.
11. A computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the script generation and testing method of any of claims 1 to 9.
CN202211138691.2A 2022-09-19 2022-09-19 Script generation and test method, electronic device and computer storage medium Pending CN115237813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211138691.2A CN115237813A (en) 2022-09-19 2022-09-19 Script generation and test method, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211138691.2A CN115237813A (en) 2022-09-19 2022-09-19 Script generation and test method, electronic device and computer storage medium

Publications (1)

Publication Number Publication Date
CN115237813A true CN115237813A (en) 2022-10-25

Family

ID=83682279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211138691.2A Pending CN115237813A (en) 2022-09-19 2022-09-19 Script generation and test method, electronic device and computer storage medium

Country Status (1)

Country Link
CN (1) CN115237813A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078684A1 (en) * 2000-10-27 2004-04-22 Friedman George E. Enterprise test system having run time test object generation
CN101620564A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method for automatically testing recording playback mode of terminal system
CN103365779A (en) * 2013-07-09 2013-10-23 广东欧珀移动通信有限公司 Software test method and system
CN103685389A (en) * 2012-09-13 2014-03-26 卓望数码技术(深圳)有限公司 System and method for realizing user interface interaction through remotely controlling data terminal
CN107943683A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of test script generation method, device, electronic equipment and storage medium
CN112231206A (en) * 2020-09-30 2021-01-15 广州掌动智能科技有限公司 Script editing method for application program test, computer readable storage medium and test platform
CN112506388A (en) * 2020-12-04 2021-03-16 中信银行股份有限公司 Operation recording method, device, equipment and storage medium
CN112988605A (en) * 2021-05-10 2021-06-18 云账户技术(天津)有限公司 Method and device for realizing WEB application automatic test
US20210385245A1 (en) * 2020-06-08 2021-12-09 Target Brands, Inc. Security system for detecting malicious actor's observation
CN114416516A (en) * 2021-11-25 2022-04-29 浪潮软件集团有限公司 Test case and test script generation method, system and medium based on screenshot

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078684A1 (en) * 2000-10-27 2004-04-22 Friedman George E. Enterprise test system having run time test object generation
CN101620564A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method for automatically testing recording playback mode of terminal system
CN103685389A (en) * 2012-09-13 2014-03-26 卓望数码技术(深圳)有限公司 System and method for realizing user interface interaction through remotely controlling data terminal
CN103365779A (en) * 2013-07-09 2013-10-23 广东欧珀移动通信有限公司 Software test method and system
CN107943683A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of test script generation method, device, electronic equipment and storage medium
US20210385245A1 (en) * 2020-06-08 2021-12-09 Target Brands, Inc. Security system for detecting malicious actor's observation
CN112231206A (en) * 2020-09-30 2021-01-15 广州掌动智能科技有限公司 Script editing method for application program test, computer readable storage medium and test platform
CN112506388A (en) * 2020-12-04 2021-03-16 中信银行股份有限公司 Operation recording method, device, equipment and storage medium
CN112988605A (en) * 2021-05-10 2021-06-18 云账户技术(天津)有限公司 Method and device for realizing WEB application automatic test
CN114416516A (en) * 2021-11-25 2022-04-29 浪潮软件集团有限公司 Test case and test script generation method, system and medium based on screenshot

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
佚名: "自动化测试之Selenium IDE(二)", 《HTTPS://BLOG.CSDN.NET/WEIXIN_38843247/ARTICLE/DETAILS/105695576》 *
张灿等: "一种基于Android平台GUI录制回放工具的设计与实现", 《计算机应用与软件》 *
邹长青: "基于交互图的GUI测试用例生成与自动测试技术研究与应用", 《万方》 *
陈文捷: "基于IaaS的云测试服务平台设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Similar Documents

Publication Publication Date Title
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
WO2020233053A1 (en) Method, apparatus, device, and storage medium for making test page script
US9846634B2 (en) Visual graphical user interface verification
US9448908B2 (en) System and method for model based session management
CN110362480A (en) Client buries a test method, device, equipment and storage medium
US9904517B2 (en) System and method for automatic modeling of an application
CN107102947B (en) ATM transaction flow testing device and method
US20150370694A1 (en) Automatic updating of graphical user interface element locators based on image comparison
US10162742B2 (en) System and method for end to end performance response time measurement based on graphic recognition
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN113342685A (en) Precise test method and device, computer equipment and storage medium
CN115658529A (en) Automatic testing method for user page and related equipment
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
JP2000112784A (en) Program test support device and storage medium recording program test support program
CN111414309B (en) Automatic test method of application program, computer equipment and storage medium
CN114020432A (en) Task exception handling method and device and task exception handling system
US11403209B2 (en) Rendering GUI test object of application under test to reflect test information
US11106571B2 (en) Identification of input object in a graphical user interface
CN112882933A (en) Script recording method, device, equipment and storage medium
CN108595332A (en) Method for testing software and device
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN115237813A (en) Script generation and test method, electronic device and computer storage medium
CN113485689A (en) Buried point processing method and device
CN110221952B (en) Service data processing method and device and service data processing system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20221025