CN115145464B - Page testing method and device, electronic equipment and storage medium - Google Patents

Page testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115145464B
CN115145464B CN202210901156.1A CN202210901156A CN115145464B CN 115145464 B CN115145464 B CN 115145464B CN 202210901156 A CN202210901156 A CN 202210901156A CN 115145464 B CN115145464 B CN 115145464B
Authority
CN
China
Prior art keywords
gesture
test
page
instruction
tested
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
CN202210901156.1A
Other languages
Chinese (zh)
Other versions
CN115145464A (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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210901156.1A priority Critical patent/CN115145464B/en
Publication of CN115145464A publication Critical patent/CN115145464A/en
Application granted granted Critical
Publication of CN115145464B publication Critical patent/CN115145464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • 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
    • 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)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention relates to a page test method, a device, electronic equipment and a storage medium, wherein the method comprises the steps of firstly determining a page to be tested according to the address of the page to be tested and connecting the page to be tested to a preset test frame to generate an operation page to be tested, then matching gesture operation instructions with mapping relation with the gesture type information in a preset gesture instruction library, generating test circulation instructions with the test circulation information, generating page test instructions based on the instructions, and inputting the page test instructions into the operation page to be tested to test and obtaining test results; the method for testing the gesture operation of the mobile terminal is realized by calling the gesture instruction in the preset gesture instruction library to simulate the gesture operation of the mobile terminal on a page of the computer terminal, and the method for testing the gesture operation of the mobile terminal can be effectively supported.

Description

Page testing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a page testing method, a page testing device, an electronic device, and a storage medium.
Background
With the development of computer technology, software automated testing is increasingly used in enterprises. Particularly in recent years, with the development of web page technology, various kinds of automated test frameworks such as puppeter automated test frameworks have emerged. The web page is generally divided into a computer end and a mobile end, and codes are needed to simulate the behaviors of people to operate each element of the page in the process of automatic testing of the web page.
However, in the existing test frame, the operation of a mouse is simulated on a webpage at a computer end, but for a webpage at a mobile phone end, the operation of the mouse is simulated only, so that the use effect cannot be completely achieved, and the gesture operation of a person is simulated.
Disclosure of Invention
The invention aims to provide a page testing method, a page testing device, electronic equipment and a storage medium, which are used for solving the problem that a testing method of gesture operation of a mobile terminal cannot be effectively supported.
The invention provides a page testing method, which comprises the following steps: acquiring address information of a page to be tested, start and stop position coordinate information of a test gesture, test gesture type information and test cycle information; determining a page to be tested according to the address of the page to be tested, and connecting the page to be tested to a preset test frame to generate an operation page to be tested; matching gesture operation instructions with mapping relation with the test gesture type information in a preset gesture instruction library, and generating test cycle instructions according to the test cycle information; generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture; and inputting the page test instruction into the operation page to be tested for testing, and obtaining a test result of the page to be tested.
In an embodiment of the present invention, matching gesture operation instructions having a mapping relationship with the test gesture type information in a preset gesture instruction library includes: sending an instruction calling request to a preset gesture instruction library based on the test gesture type information; and the preset gesture instruction library calls gesture operation instructions according to the instruction call request to obtain gesture operation instructions with mapping relation with the test gesture type information.
In an embodiment of the present invention, the gesture types in the test gesture type information at least include: a point touch gesture, which refers to gesture operation with consistent starting point coordinates and ending coordinates and without stop action, including a single click gesture and a double click gesture; a press gesture, wherein the press gesture refers to gesture operation with consistent starting point coordinates and ending coordinates and stay action, and the press gesture comprises a long press gesture; the sliding gesture refers to gesture operation with inconsistent starting point coordinates and end point coordinates and a movement track, and comprises an up-down sliding gesture, a left-right sliding gesture and a tilting sliding gesture; the multi-finger gesture refers to simultaneous gesture operations of a multi-contact point touch gesture, a pressing gesture and a sliding gesture, and comprises a multi-finger sliding gesture, a multi-finger single-click gesture, a multi-finger double-click gesture, a zooming-in gesture and a zooming-out gesture.
In an embodiment of the present invention, inputting the page test instruction into the operation page to be tested for testing includes: running gesture operation on the operation page to be tested based on the gesture operation instruction and the start-stop position coordinate information of the test gesture; performing cyclic testing on the operation page to be tested based on the test cyclic instruction; recording an actual response result of each gesture operation, and comparing the actual response result with a preset response result to obtain a current test result.
In an embodiment of the present invention, comparing the actual response result with a preset response result to obtain the current test result includes: if the actual response result is consistent with the preset response result, judging that the test is normal, and outputting the actual response result as a test result; if the actual response result is inconsistent with the preset response result, judging that the test is abnormal, comparing the inconsistent actual response result with the preset response result, generating comparison information, and outputting the comparison information as a test result.
In an embodiment of the present invention, obtaining start-stop position coordinate information of a test gesture includes: establishing a coordinate system on a page to be tested; determining starting and ending target positions of a test gesture for executing a test in a page to be tested according to a preset test task; and determining the coordinate information of the start and stop positions of the test gesture according to the start target position and the stop target position.
In an embodiment of the present invention, determining a page to be tested according to the page address to be tested, and connecting the page address to be tested to a preset test frame to generate an operation page to be tested includes: opening a page to be tested in a browser according to the page address to be tested; acquiring a preset test frame interface and a built-in user terminal object of the page to be tested; and constructing and connecting the preset test frame interface with the built-in user terminal object to generate the target operation page.
The embodiment of the invention also provides a page testing device, which comprises: an information acquisition module: the method comprises the steps of acquiring address information of a page to be tested, start and stop position coordinate information of a test gesture, test gesture type information and test cycle information; and a page generation module: the method comprises the steps of determining a page to be tested according to the page address to be tested, and connecting the page address to be tested to a preset test framework to generate an operation page to be tested; gesture calling module: the gesture training module is used for determining a test simulation gesture instruction according to the simulation gesture calling instruction and a preset gesture training model; the instruction generation module: the gesture operation instruction is used for matching gesture operation instructions with mapping relation with the test gesture type information in a preset gesture instruction library, and a test cycle instruction is generated according to the test cycle information; generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture; and a page test module: and the page test instruction is used for inputting the page test instruction into the operation page to be tested for testing, so as to obtain a test result of the page to be tested.
The embodiment of the invention also provides electronic equipment, which comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement a page testing method as in any of the embodiments above.
An embodiment of the present invention also provides a computer readable storage medium, which is characterized in that computer readable instructions are stored thereon, which when executed by a processor of a computer, cause the computer to perform the page test method according to any of the embodiments above.
According to the page testing method, the device, the electronic equipment and the storage medium, address information of a page to be tested, start-stop position coordinate information of a test gesture, test gesture type information and test cycle information are obtained; determining a page to be tested according to the address of the page to be tested, and connecting the page to be tested to a preset test frame to generate an operation page to be tested; matching gesture operation instructions with mapping relation with the test gesture type information in a preset gesture instruction library, and generating test cycle instructions according to the test cycle information; generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture; inputting a page test instruction into the operation page to be tested to test so as to obtain a test result; the method for testing the gesture operation of the mobile terminal is realized by calling the gesture instruction in the preset gesture instruction library to simulate the gesture operation of the mobile terminal on a page of the computer terminal, and the method for testing the gesture operation of the mobile terminal can be effectively supported.
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 application and together with the description, serve to explain the principles of the application. It is apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 is a schematic diagram of an exemplary system architecture shown in an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a page test method shown in an exemplary embodiment of the present application;
FIG. 3 is a block diagram illustrating a page test operation flow according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of a test result determination flow shown in an exemplary embodiment of the present application;
FIG. 5 is a flow chart illustrating an implementation of a page test method according to an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a page testing apparatus according to an exemplary embodiment of the present application;
fig. 7 is a schematic diagram of a computer system of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Further advantages and effects of the present invention will become readily apparent to those skilled in the art from the present disclosure, by referring to the following drawings and specific embodiments. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be understood that the preferred embodiments are presented by way of illustration only and not by way of limitation.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present invention by way of illustration, and only the components related to the present invention are shown in the illustrations, not according to the number, shape and size of the components in actual implementation, and the form, number and proportion of each component in actual implementation may be arbitrarily changed, and the layout of the components may be more complex.
In the following description, numerous details are set forth in order to provide a more thorough explanation of embodiments of the present invention, it will be apparent, however, to one skilled in the art that embodiments of the present invention may be practiced without these specific details, in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the embodiments of the present invention.
Reference to "and/or" in this application describing an association relationship of associated objects means that there may be three relationships, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
It should be noted that the open debugging tools (DevTools) are a set of Web development and debugging tools built into google browsers, and can use developer tools to replay, debug and parse websites.
Puppeterer is a node script application programming interface that controls a headless browser, which provides a high-level application programming interface to control a headless browser through the open debug tool protocol. It may also be configured to use a complete browser environment.
The method has the advantages that the content of the testing method is expansion of the Puppeterer testing framework, the defect that the existing Puppeterer testing framework cannot perform gesture sliding operation on the mobile phone webpage is overcome, the method is benign expansion of the existing testing framework, original code logic of the Puppeterer is not modified, and the use of the existing Puppeterer functions is not affected.
FIG. 1 is a schematic diagram of an exemplary system architecture shown in an exemplary embodiment of the present application.
Referring to FIG. 1, a system architecture may include a page to be tested 101 and a computer device 102. The page to be tested 101 is used for generating an operation page to be tested, and providing the operation page to the computer device 102 for processing. The computer device 102 may be at least one of a microcomputer, an embedded computer, a network computer, etc. The related technician can implement, in the computer device 102, a gesture instruction required to be used in a preset gesture instruction library for invoking a preset test task performed on the operation page to be tested, and perform a simulated gesture test on the target operation page.
Illustratively, after obtaining address information of a page 101 to be tested, start and stop position coordinate information of a test gesture, test gesture type information and test cycle information, the computer device 102 determines the page to be tested according to the address of the page to be tested, and connects the address of the page to be tested to a preset test frame to generate an operation page to be tested; matching gesture operation instructions with mapping relation with the test gesture type information in a preset gesture instruction library, and generating test cycle instructions according to the test cycle information; generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture; inputting a page test instruction into the operation page to be tested for testing, and obtaining a test result of the page to be tested; the method for testing the gesture operation of the mobile terminal is provided by calling the gesture instruction used for testing in the preset gesture instruction library to realize the test of the gesture operation of the simulated mobile terminal on the page of the computer terminal.
Fig. 2 is a flow chart of a page testing method, which is illustrated in an exemplary embodiment of the present application, and which may be performed with a computing processing device, which may be the computer device 102 illustrated in fig. 1. Referring to fig. 2, the flow chart of the page testing method at least includes steps S210 to S250, which are described in detail as follows:
in step S210, address information of the page to be tested, start-stop position coordinate information of the test gesture, test gesture type information and test cycle information are obtained.
In one embodiment of the present application, address information of a page to be tested, that is, a uniform resource locator of the page to be tested, is given by a technician or a test demander, and the address information can be used to locate a position of the page; the start and stop position information of the test gesture comprises start coordinate information and end coordinate information of the test gesture, and the coordinate information is convenient for determining the gesture operation position in the page test; the test gesture type information is the gesture type required by the gesture test in the test; the test cycle information is test times in the page test and test period information.
In one embodiment of the present application, the acquiring of the coordinate information of the start and stop positions of the test gesture needs to first establish a coordinate system on the page to be tested, then determine the start and stop target positions of the test gesture for executing the test on the page to be tested according to the preset test task, and finally determine the coordinate information of the start and stop positions of the test gesture according to the target positions, where establishing the coordinate system on the page to be tested may be completed by a technician or may be automatically generated by a coordinate establishing tool, and the selection of the origin of the coordinate system is determined according to practical applications, for example, the lower left vertex of the page may be selected as the origin of the coordinate system, which is only taken as an exemplary example herein, and the coordinate system establishing part is not limited.
In one embodiment of the application, the gesture types in the test gesture type information at least comprise a point touch gesture, a press gesture, a slide gesture and a multi-finger gesture, wherein the point touch gesture refers to gesture operation with consistent starting point coordinates and ending coordinates and no stay action, and the point touch gesture comprises a single click gesture and a double click gesture; the pressing gesture refers to gesture operation with consistent starting point coordinates and ending coordinates and stay action, and comprises a long pressing gesture; the sliding gesture refers to gesture operation with inconsistent starting point coordinates and ending point coordinates and a movement track, and comprises an up-down sliding gesture, a left-right sliding gesture and a tilting sliding gesture; the multi-finger gesture refers to gesture operations performed by a multi-contact point touch gesture, a pressing gesture and a sliding gesture simultaneously, and comprises a multi-finger sliding gesture, a multi-finger single-click gesture, a multi-finger double-click gesture, a zooming-in gesture and a zooming-out gesture.
It should be noted that the above-listed gesture types do not include all gesture types used in practical applications, but are merely exemplary examples for supporting the present example, and are not limited thereto.
In step S220, a page to be tested is determined according to the address of the page to be tested, and the page to be tested is connected to a preset test frame to generate an operation page to be tested.
In one embodiment of the application, firstly, a page to be tested is opened in a browser according to a page address to be tested, then a preset test frame interface and a built-in user terminal object of the page to be tested are obtained, then the preset test frame interface and the built-in user terminal object are constructed and connected to generate a target operation page, wherein the preset test frame puppeter test frame can enter the puppeter test frame after being constructed and connected with an open debugging tool (Devtools) of the browser after the built-in user terminal object of the page to be tested is obtained, and the target operation page is generated.
In step S230, a gesture operation instruction having a mapping relation with the test gesture type information is matched in a preset gesture instruction library, and a test cycle instruction is generated according to the test cycle information.
In one embodiment of the present application, the construction of the preset gesture command library first needs to obtain a plurality of initial gesture operations, respectively assign feature descriptions to the initial gesture operations, and mark the feature descriptions in naming information of the gesture operations, then convert each initial gesture operation into an operation gesture command, store the gesture operation command into a pre-constructed database to generate a gesture command library, and determine the gesture command library as the preset gesture command library.
In one embodiment of the application, an instruction calling request is sent to a preset database based on test gesture type information, the preset database searches an instruction library according to type requirement information in the instruction calling request after receiving the instruction calling request, and then calls gesture operation instructions required by the test and issues the gesture operation instructions to a requesting party, wherein the calling of the preset gesture instruction library can be operated by a technician, can be an automatic calling process or can be a semi-automatic operation, and the operation mode of the preset gesture instruction library is not limited.
In step S240, a page test instruction is generated based on the gesture operation instruction, the test cycle instruction, and the start-stop position coordinate information of the test gesture.
In one embodiment of the application, the start-stop position coordinate information of the test gesture with a mapping relation is matched according to the gesture operation instruction, the start-stop position coordinate information of the test gesture is added into the gesture operation instruction as a position information labeling additional instruction, and then the test circulation instruction is combined with the gesture operation instruction with the position information labeling to obtain the page test instruction.
In step S250, the page test instruction is input into the operation page to be tested for testing, so as to obtain a test result of the page to be tested.
In one embodiment of the present application, the process of inputting the page test instruction into the operation page to be tested to obtain the test result of the page to be tested may be performed by the page test operation flow chart of fig. 3, and referring to fig. 3, the page test operation flow at least includes steps 310 to 330, which specifically include the following steps:
step S310, operating gesture operation on an operation page to be tested based on the gesture operation instruction and start and stop position coordinate information of the test gesture;
in one embodiment of the present application, the start-stop position coordinate information of the test gesture includes start coordinate information and end coordinate information of the test gesture, and the gesture operation instruction needs to send a pressed touch screen event to the open debugging tool with the start position coordinate information, where the event name of the touch screen is input. Then, carrying the terminal position coordinate information to be moved, and sending a sliding touch screen event to an open debugging tool, wherein the sliding event is named as input. And finally, sending a touch screen event releasing the pressing to the open debugging tool, and finishing a continuous sliding operation by pressing before finishing, wherein the event name of the touch screen finishing is input.
Step S320, performing cyclic test on the operation page to be tested based on the test cyclic instruction;
in one embodiment of the present application, the test cycle instruction includes instruction information of a test number and a test period, and the overall test is used as a whole according to the instruction information of the test number and the test period, so as to achieve the purpose of avoiding missing or missing of the test from affecting the accuracy of the test result.
Step S330, recording an actual response result of each gesture operation, and comparing the actual response result with a preset response result to obtain a current test result.
In one embodiment of the present application, the process of comparing the actual response result with the preset response result is shown in the test result determination flowchart of fig. 4.
FIG. 4 is a schematic diagram of a test result determination flow shown in an exemplary embodiment of the present application, where if the actual response result is consistent with the preset response result, it is determined as a normal test, and the actual response result is output as a test result; if the actual response result is inconsistent with the preset response result, judging that the test is abnormal, comparing the inconsistent actual response result with the preset response result, generating comparison information, and outputting the comparison information as a test result.
In one embodiment of the present application, the preset response result refers to a response result generated when the gesture instruction tests the test page in the ideal operation environment, where the generation of the preset response result may be deduced by a technician according to the instruction logic, or may be directly obtained by a history test result, or may be a response result obtained by the actual operation of the technician in the constructed ideal operation environment, and the obtaining manner of the preset response result should be determined based on the actual application, which is not limited to a specific obtaining manner.
In one embodiment of the present application, after a test result is obtained, a test log is further required to be generated according to the test result, a response situation of each gesture operation instruction in the to-be-tested operation page is determined according to the test log, then weights are set for the response situation of each gesture operation instruction according to the key performance correlation degree of different gesture operation instructions in the page test process, the response situation of each gesture operation instruction with weight information is obtained, then weight calculation is performed for the response situation of each gesture operation instruction with weight information, a score of the test is obtained, and test result evaluation with high test objective correlation can be obtained by setting weights of test items, so that quantification of the page test result is facilitated.
In an embodiment of the present application, after obtaining the comparison information obtained by comparing the inconsistent actual response result with the preset response result, the comparison information may also be fed back to the technician, so as to correct the omission and the error occurring in the test page and the test tool.
The following describes an embodiment of the apparatus of the present application, which may be used to perform the page test method in the above embodiment of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the page testing method described in the present application.
FIG. 5 is a flow chart illustrating an implementation of a page test method according to an exemplary embodiment of the present application. The method can be applied to the implementation environment shown in fig. 5, and the page 101 to be tested and the computer device 102 in the implementation environment. It should be understood that the method may be adapted to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and the implementation environments to which the method is adapted are not limited by the present embodiment.
As shown in fig. 5, in an exemplary embodiment, the specific implementation process of the page testing method specifically includes a touch screen mobile module and a browser, firstly, an operation page to be tested needs to be acquired in the browser, the operation page to be tested is connected with an open debugging tool of the browser, firstly, initial coordinates of gesture operation are acquired, the page is pressed according to the initial coordinates, and in this step, the type of touch screen event needs to be sent to the open debugging tool in the browser, and the type of event at this time is that the touch screen starts; acquiring a moving termination coordinate, and sliding the touch screen moving module from the initial coordinate to the termination coordinate, wherein the type of the touch screen event sent to the open debugging tool is touch screen sliding; and after the touch screen is slid to the termination coordinate, ending the gesture operation of the test, and releasing the gesture operation by the touch screen moving module, wherein the touch screen event type sent to the open debugging tool is touch screen ending.
Fig. 6 is a schematic diagram of a page testing apparatus according to an exemplary embodiment of the present application. The apparatus may be applied in the implementation environment shown in fig. 2 and is specifically configured in the computer device 102. The apparatus may also be adapted to other exemplary implementation environments and may be specifically configured in other devices, and the present embodiment is not limited to the implementation environments to which the apparatus is adapted.
As shown in fig. 6, the exemplary page testing apparatus includes: an information acquisition module 601, a page generation module 602, an instruction generation module 603, and a page test module 604.
The information acquisition module 601 is configured to acquire address information of a page to be tested, start-stop position coordinate information of a test gesture, type information of the test gesture, and test cycle information; the page generation module 602 is configured to determine a page to be tested according to the page address to be tested, and connect the page address to be tested to a preset test frame to generate an operation page to be tested; the instruction generating module 603 is configured to match gesture operation instructions having a mapping relationship with the test gesture type information in a preset gesture instruction library, and generate a test cycle instruction according to the test cycle information; generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture; the page test module 604 is configured to input a page test instruction into an operation page to be tested for testing, so as to obtain a test result of the page to be tested.
The embodiment of the application also provides electronic equipment, which comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the page test method provided in the above embodiments.
Fig. 7 shows a schematic diagram of a computer system suitable for use in implementing the electronic device of the embodiments of the present application. It should be noted that, the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a central processing unit (Central Processing Unit, CPU) 701 that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM) 703, for example, performing the method described in the above embodiment. In the RAM 703, various programs and data required for the system operation are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus. An Input/Output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output section 707 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The drives are also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 710 as needed, so that a computer program read out therefrom is installed into the storage section 708 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. When executed by a Central Processing Unit (CPU) 701, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the corresponding figures of the above embodiments, connecting lines may represent connection relationships between various components to represent further constituent signal paths (test_signal paths) and/or one or more ends of some lines with arrows to represent primary information flow, as an indication, not as a limitation of the scheme itself, but rather the use of these lines in connection with one or more example embodiments may help to more easily connect circuits or logic units, any represented signal (as determined by design requirements or preferences) may actually comprise one or more signals that may be transmitted in either direction and may be implemented in any suitable type of signal scheme.
The units involved in the embodiments of the present application may be implemented by means of software, or may be implemented by means of hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a page test method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, in accordance with embodiments of the present application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a usb disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
It should be appreciated that the subject application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It should be understood that the foregoing is only a preferred exemplary embodiment of the present application and is not intended to limit the embodiments of the present application, but rather that corresponding variations or modifications will be apparent to those skilled in the art from the main concepts and spirit of the present application, and that the scope of this application is defined in the appended claims.

Claims (10)

1. A page testing method, characterized in that the page testing method comprises:
acquiring address information of a page to be tested, start and stop position coordinate information of a test gesture, test gesture type information and test cycle information;
determining a page to be tested according to the address of the page to be tested, and connecting the page to be tested to a preset test frame to generate an operation page to be tested;
matching a gesture operation instruction with a mapping relation with the test gesture type information in a preset gesture instruction library, and generating a test cycle instruction according to the test cycle information, wherein the construction of the preset gesture instruction library firstly needs to acquire a plurality of initial gesture operations, respectively endows the initial gesture operations with characteristic descriptions, marks the initial gesture operations in naming information of the gesture operations, converts each initial gesture operation into an operation gesture instruction, stores the gesture operation instruction in a pre-constructed database to generate a gesture instruction library, and determines the gesture instruction library as the preset gesture instruction library;
generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture;
inputting the page test instruction into the operation page to be tested for testing, and obtaining a test result of the page to be tested;
generating a test log according to the test result, determining the response condition of each gesture operation instruction in the operation page to be tested according to the test log, setting weights for the response condition of each gesture operation instruction according to the key performance correlation degree of different gesture operation instructions in the page test process, obtaining the response condition of each gesture operation instruction with weight information, and carrying out weighted calculation on the response condition of each gesture operation instruction with weight information to obtain the score of the test, thereby facilitating the quantitative embodiment of the page test result.
2. The page testing method according to claim 1, wherein matching gesture operation instructions having a mapping relationship with the test gesture type information in a preset gesture instruction library includes:
sending an instruction calling request to a preset gesture instruction library based on the test gesture type information;
and the preset gesture instruction library calls gesture operation instructions according to the instruction call request to obtain gesture operation instructions with mapping relation with the test gesture type information.
3. The page testing method according to claim 2, wherein the gesture types in the test gesture type information at least include:
a touch gesture, wherein the touch gesture comprises gesture operation with consistent starting point coordinates and ending coordinates and no stop action;
a press gesture including a gesture operation in which a start point coordinate and a stop coordinate coincide with each other and a stay motion exists;
a swipe gesture comprising a gesture operation with a movement trajectory, the start point coordinates and the end point coordinates being inconsistent;
and the multi-finger gesture comprises gesture operations performed by a multi-contact point touch gesture, a pressing gesture and a sliding gesture at the same time.
4. The page test method according to claim 1, wherein inputting the page test instruction into the operation page to be tested for testing comprises:
running gesture operation on the operation page to be tested based on the gesture operation instruction and the start-stop position coordinate information of the test gesture;
performing cyclic testing on the operation page to be tested based on the test cyclic instruction;
recording an actual response result of each gesture operation, and comparing the actual response result with a preset response result to obtain a current test result.
5. The page testing method of claim 4, wherein comparing the actual response result with a preset response result to obtain the current test result comprises:
if the actual response result is consistent with the preset response result, judging that the test is normal, and outputting the actual response result as a test result;
if the actual response result is inconsistent with the preset response result, judging that the test is abnormal, comparing the inconsistent actual response result with the preset response result, generating comparison information, and outputting the comparison information as a test result.
6. The page testing method of any of claims 1-5, wherein obtaining start-stop position coordinate information of a test gesture comprises:
establishing a coordinate system on a page to be tested;
determining starting and ending target positions of a test gesture for executing a test in a page to be tested according to a preset test task;
and determining the coordinate information of the start and stop positions of the test gesture according to the start target position and the stop target position.
7. The method according to any one of claims 1-5, wherein determining a page to be tested according to the page address to be tested, and connecting the page address to be tested to a preset test framework to generate an operation page to be tested includes:
opening a page to be tested in a browser according to the page address to be tested;
acquiring a preset test frame interface and a built-in user terminal object of the page to be tested;
and constructing and connecting the preset test frame interface with the built-in user terminal object to generate a target operation page.
8. A page testing apparatus, comprising:
the information acquisition module is used for acquiring address information of a page to be tested, start-stop position coordinate information of a test gesture, test gesture type information and test cycle information;
the page generation module is used for determining a page to be tested according to the address of the page to be tested and connecting the page to be tested to a preset test frame to generate an operation page to be tested;
the instruction generation module is used for matching gesture operation instructions with mapping relation with the test gesture type information in a preset gesture instruction library and generating a test circulation instruction according to the test circulation information, wherein the construction of the preset gesture instruction library firstly needs to acquire a plurality of initial gesture operations, respectively endows the initial gesture operations with characteristic descriptions, marks the initial gesture operations in naming information of the gesture operations, converts each initial gesture operation into an operation gesture instruction, stores the gesture operation instruction into a pre-constructed database to generate a gesture instruction library, and determines the gesture instruction library as the preset gesture instruction library; generating a page test instruction based on the gesture operation instruction, the test cycle instruction and start-stop position coordinate information of the test gesture;
the page test module is used for inputting the page test instruction into the operation page to be tested for testing, and obtaining a test result of the page to be tested; generating a test log according to the test result, determining the response condition of each gesture operation instruction in the operation page to be tested according to the test log, setting weights for the response condition of each gesture operation instruction according to the key performance correlation degree of different gesture operation instructions in the page test process, obtaining the response condition of each gesture operation instruction with weight information, and carrying out weighted calculation on the response condition of each gesture operation instruction with weight information to obtain the score of the test, thereby facilitating the quantitative embodiment of the page test result.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the page testing method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the page testing method of any of claims 1 to 7.
CN202210901156.1A 2022-07-28 2022-07-28 Page testing method and device, electronic equipment and storage medium Active CN115145464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210901156.1A CN115145464B (en) 2022-07-28 2022-07-28 Page testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210901156.1A CN115145464B (en) 2022-07-28 2022-07-28 Page testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115145464A CN115145464A (en) 2022-10-04
CN115145464B true CN115145464B (en) 2023-07-18

Family

ID=83413285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210901156.1A Active CN115145464B (en) 2022-07-28 2022-07-28 Page testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115145464B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015039566A1 (en) * 2013-09-22 2015-03-26 Tencent Technology (Shenzhen) Company Limited Method and system for facilitating automated web page testing
US9154611B1 (en) * 2006-08-14 2015-10-06 Soasta, Inc. Functional test automation for gesture-based mobile applications
CN114253841A (en) * 2021-12-02 2022-03-29 联通智网科技股份有限公司 Test script generation method and device and storage medium
CN114297057A (en) * 2021-12-22 2022-04-08 山东省城市商业银行合作联盟有限公司 Design and use method of automatic test case

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810089B (en) * 2012-11-12 2021-12-03 Sap欧洲公司 Automatically testing gesture-based applications
CN107608609B (en) * 2016-07-11 2021-02-19 斑马智行网络(香港)有限公司 Event object sending method and device
CN107783867B (en) * 2017-07-25 2020-02-14 深圳壹账通智能科技有限公司 Gesture testing method and device, computer equipment and storage medium
CN109491902B (en) * 2018-11-01 2023-04-18 京东方科技集团股份有限公司 Interactive testing method, device and system
CN111324531A (en) * 2020-02-05 2020-06-23 香港乐蜜有限公司 Application program testing method and device, electronic equipment and storage medium
CN114625663A (en) * 2022-03-24 2022-06-14 北京字节跳动网络技术有限公司 Test method, test device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9154611B1 (en) * 2006-08-14 2015-10-06 Soasta, Inc. Functional test automation for gesture-based mobile applications
WO2015039566A1 (en) * 2013-09-22 2015-03-26 Tencent Technology (Shenzhen) Company Limited Method and system for facilitating automated web page testing
CN114253841A (en) * 2021-12-02 2022-03-29 联通智网科技股份有限公司 Test script generation method and device and storage medium
CN114297057A (en) * 2021-12-22 2022-04-08 山东省城市商业银行合作联盟有限公司 Design and use method of automatic test case

Also Published As

Publication number Publication date
CN115145464A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
US9342237B2 (en) Automated testing of gesture-based applications
CN107783898B (en) Test method and test equipment for mobile application
CN109446075B (en) Interface testing method and device
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN110320378B (en) Method, apparatus, device and computer readable storage medium for applying for a quality control test
CN111444103B (en) Web page automatic testing method and related equipment
CN108614767A (en) A kind of remote debugging method and device
CN111414309A (en) Automatic test method of application program, computer equipment and storage medium
CN111858296A (en) Interface test method, device, equipment and storage medium
CN112882953A (en) Automatic demonstration method and system for application program based on android debugging bridge
Tuovenen et al. MAuto: Automatic mobile game testing tool using image-matching based approach
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN111694550A (en) Page display control method, device and system
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN112988588B (en) Client software debugging method and device, storage medium and electronic equipment
CN110232018A (en) Interface test method, device, computer equipment
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN115145464B (en) Page testing method and device, electronic equipment and storage medium
CN112328504A (en) Buried point data inspection method, buried point data inspection device, buried point data inspection system, computer equipment and storage medium
CN116432573A (en) Performance simulation method, electronic device and storage medium
CN114936358A (en) Human-computer interaction based verification method and verification system
CN112965910B (en) Automatic regression testing method and device, electronic equipment and storage medium
CN115062571A (en) Dynamic selection method, system, equipment and computer readable storage medium for data area of integrated circuit device
CN114968751A (en) Program debugging method and program debugging device of code-free development platform
CN112905445A (en) Log-based test method and device and computer 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
GR01 Patent grant
GR01 Patent grant