CN108763086A - Script method for recording, terminal and computer readable storage medium based on remote real machine - Google Patents

Script method for recording, terminal and computer readable storage medium based on remote real machine Download PDF

Info

Publication number
CN108763086A
CN108763086A CN201810547231.2A CN201810547231A CN108763086A CN 108763086 A CN108763086 A CN 108763086A CN 201810547231 A CN201810547231 A CN 201810547231A CN 108763086 A CN108763086 A CN 108763086A
Authority
CN
China
Prior art keywords
script
control
mobile terminal
terminal
web client
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.)
Granted
Application number
CN201810547231.2A
Other languages
Chinese (zh)
Other versions
CN108763086B (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.)
Kang Keyi Information Technology (shenzhen) Co Ltd
Original Assignee
Kang Keyi Information Technology (shenzhen) 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 Kang Keyi Information Technology (shenzhen) Co Ltd filed Critical Kang Keyi Information Technology (shenzhen) Co Ltd
Priority to CN201810547231.2A priority Critical patent/CN108763086B/en
Publication of CN108763086A publication Critical patent/CN108763086A/en
Application granted granted Critical
Publication of CN108763086B publication Critical patent/CN108763086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Abstract

The invention discloses a kind of script method for recording based on remote real machine, this method include:Script recording terminal determines that the corresponding mobile terminal of connection request, script recording terminal are established telecommunication with web client and connect, and connect with mobile terminal by data line when receiving the connection request of web client transmission;When receiving the control data that web client is triggered based on pseudo operation interface, control information is obtained from control data, and the control event suitable for mobile terminal is generated based on control information;Script recording terminal is operated according to control corresponding with control information on control event triggering mobile terminal with executing corresponding control;Script recording terminal receives mobile terminal and monitors the data that control operation generates, and test script is generated according to data.The present invention also proposes a kind of script recording terminal based on remote real machine and a kind of computer readable storage medium.The present invention solves the technical issues of acquisition inefficiency of test script in the prior art.

Description

Script method for recording, terminal and computer readable storage medium based on remote real machine
Technical field
The present invention relates to computer art field more particularly to a kind of script method for recording based on remote real machine, terminal and Computer readable storage medium.
Background technology
During software development, in order to find potential mistake in software, defect, or in order to whether confirm software Meet the performance requirement that user proposes before software development, it will usually which manual test or automatic is carried out to the software that developed Change test.Since manual test need to occupy plenty of time and manpower and testing efficiency is relatively low, based on time and cost Consider, the mode that automatic test is usually taken at this stage tests software.And in order to carry out automatic test, usually need It to be tested using automatic test script.Therefore, how to obtain automatic test script becomes those skilled in the art The problem more paid close attention to.And in traditional test method, it needs, by tester's hand-coding test script, to cause to test The acquisition inefficiency of script.
Invention content
The present invention provides a kind of script method for recording, terminal and computer readable storage medium based on remote real machine, Main purpose is the technical issues of solving the acquisition inefficiency of test script in the prior art.
To achieve the above object, the present invention also provides a kind of script method for recording based on remote real machine, this method include:
Script recording terminal determines that the connection request is corresponding when receiving the connection request of web client transmission Mobile terminal, wherein the script recording terminal is established telecommunication with the web client and connect, and the script is recorded eventually Adb connections are established between end and the mobile terminal;
When receiving the control data that web client is triggered based on pseudo operation interface, obtained from the control data Control information is taken, the control event suitable for the mobile terminal is generated based on the control information;
The script recording terminal triggers corresponding with the control information on the mobile terminal according to the control event Control, operated with executing corresponding control;
The script recording terminal receives the data obtained based on the monitoring control operation that mobile terminal is sent, according to The data generate test script.
Optionally, the script recording terminal determines the connection when receiving the connection request of web client transmission Before asking corresponding mobile terminal step, the method further includes step:
When detecting new mobile terminal access, the facility information of the mobile terminal is obtained and by the facility information It is sent to web client displaying, so that user triggers the connection request according to the facility information of displaying.
Optionally, the script recording terminal receives mobile terminal and monitors the data that the control operation generates, according to institute After stating the step of data generate test script, the method further includes step:
The test script of generation is sent to the web client, so that the web client is on display interface It is synchronous to show the test script.
Optionally, the script recording terminal triggers according to the control event and believes with the control on the mobile terminal Corresponding control is ceased, after executing the step of corresponding control operates, the method further includes step:
When receiving the interface information of mobile terminal transmission, the interface information is sent to web client, for institute State web client current display of mobile terminal described in simultaneous display on the pseudo operation interface according to the interface information Content.
Optionally, the connection between the script recording terminal and the web client is websocket connections.
In addition, to achieve the above object, the present invention also provides a kind of the script recording terminal based on remote real machine, the terminal Including memory and processor, the script that be stored in the memory to run on the processor records program, described Script is recorded when program is executed by the processor and realizes following steps:
When receiving the connection request of web client transmission, the corresponding mobile terminal of the connection request is determined, In, the script recording terminal is established telecommunication with the web client and is connect, the script recording terminal and the movement Adb connections are established between terminal;
When receiving the control data that web client is triggered based on pseudo operation interface, obtained from the control data Control information is taken, the control event suitable for the mobile terminal is generated based on the control information;
Control corresponding with the control information on the mobile terminal is triggered according to the control event, to execute correspondence Control operation;
The data obtained based on the monitoring control operation that mobile terminal is sent are received, test is generated according to the data Script.
Optionally, the script is recorded program and can also be executed by the processor, to receive web client described When the connection request of transmission, before determining the corresponding mobile terminal step of the connection request, following steps are also realized:
When detecting new mobile terminal access, the facility information of the mobile terminal is obtained and by the facility information It is sent to web client displaying, so that user triggers the connection request according to the facility information of displaying.
Optionally, the script is recorded program and can also be executed by the processor, to receive described in mobile terminal monitoring The data that control operation generates also realize following steps after the step of data generation test script:
The test script of generation is sent to the web client, so that the web client is on display interface It is synchronous to show the test script.
Optionally, the script is recorded program and can also be executed by the processor, with described according to the control event Control corresponding with the control information on the mobile terminal is triggered, after executing the step of corresponding control operates, also Realize following steps:
When receiving the interface information of mobile terminal transmission, the interface information is sent to web client, for institute State web client current display of mobile terminal described in simultaneous display on the pseudo operation interface according to the interface information Content.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium It is stored with script on storage medium and records program, the script is recorded program and can be executed by one or more processor, with reality Now as described above script method for recording based on remote real machine the step of.
Script method for recording, terminal and computer readable storage medium proposed by the present invention based on remote real machine, script Recording terminal determines the corresponding mobile terminal of connection request, when receiving when receiving the connection request of web client transmission When the control data that web client is triggered based on pseudo operation interface, control information is obtained from control data, is believed based on control Breath generates the control event suitable for mobile terminal;According to control corresponding with control information on control event triggering mobile terminal Part is operated with executing corresponding control;It receives mobile terminal and monitors the data that control operation generates, test foot is generated according to data This.Case user only needs to trigger control data on pseudo operation interface, you can and it realizes and remote control is carried out to mobile terminal, and Test script is automatically generated by the data got to the monitoring for controlling event, is not necessarily to tester manual editing, reduces and surveys Work group amount of the examination personnel when preparing script, improves the acquisition efficiency of test script.
Description of the drawings
Fig. 1 is the flow diagram for the script method for recording based on remote real machine that one embodiment of the invention provides;
Fig. 2 is the internal structure schematic diagram for the script recording terminal based on remote real machine that one embodiment of the invention provides;
Fig. 3 is the mould that script records program in the script recording terminal based on remote real machine that one embodiment of the invention provides Block schematic diagram.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of script method for recording based on remote real machine.It is one embodiment of the invention shown in referring to Fig.1 The flow diagram of the script method for recording based on remote real machine provided.This method can be executed by a terminal, the terminal It can be by software and or hardware realization.
In the present embodiment, the script method for recording based on remote real machine includes:
Step S10, script recording terminal determine that the connection is asked when receiving the connection request of web client transmission Seek corresponding mobile terminal, wherein the script recording terminal is established telecommunication with the web client and connect, the foot Adb connections are established between this recording terminal and the mobile terminal.
The method of the present embodiment is illustrated so that mobile terminal is Android device as an example in the following contents.Script is recorded eventually End may include one or multiple computers, and adb connections are established between script recording terminal and Android device, and script is recorded eventually The control to Android device is realized by adb connections in end.Websocket companies are established between web client and script recording terminal It connects.Wherein, websocket is a kind of based on TCP (Transmission Control Protocol, transmission control protocol) Full-duplex communication agreement can realize browser and server full-duplex communication.In the scheme of the present embodiment, websocket Realize the full-duplex communication between mobile terminal and web client.In addition, be deployed in Android device minicap and Minitouch tools.
User logs in web client by any one PC;Script recording terminal will by websocket connections The data of minicap tools acquisition on mobile terminal are sent to web client.User passes through the web client on browser The Android device connected on remote control script recording terminal.Specifically, a mobile phone simulator is realized on a web server, After user logs in web client, show that the Android currently connected on script recording terminal is set on the display interface of web client Standby facility information, user select the Android device to be connected as needed.Synchronously show that user selects in web client Android device pseudo operation interface, on the current display interface of minicap tools acquisition Android device in Android device Page elements, and be sent to script recording terminal, the page elements data received be sent to web by script recording terminal Client, and then the display interface in Android device is synchronously illustrated on the pseudo operation interface of web client.
Wherein, the major function of minicap tools is connect using the scheduled application programming of the system of mobile terminal Mouth carries out real-time snap shot, and sends script recording terminal after being compressed to sectional drawing data to, due to the data transmission of minicap Efficiency is very high, therefore can guarantee real-time Transmission and the display of picture.
Step S20, when receiving the control data that web client is triggered based on pseudo operation interface, from the control Control information is obtained in request, and the control event suitable for the mobile terminal is generated based on the control information.
Step S30, the script recording terminal according to the control event trigger on the mobile terminal with the control The corresponding control of information is operated with executing corresponding control.
For web client, user can trigger control by the control on mouse control pseudo operation interface and ask It asks, specifically, when detecting the control operation of pseudo operation interface triggering of the user based on current presentation, identifies current control Corresponding control is operated, the attribute information of the control is obtained, and then obtains the scripted code of control based on attribute information;If detection Control to user's operation is no attribute control, then obtains coordinate information of the control on the pseudo operation interface.According to obtaining The script information or coordinate information taken generates control data, and the control data is sent to script recording terminal.This programme The coordinate of middle recording uses relative coordinate, can be applied to the Android device of different resolution.It should be noted that user is touching Before sending out control data, triggers the script on interface and record enabled instruction, which is recorded enabled instruction and sent by web client To script recording terminal, script recording terminal can start the recording of perform script according to the enabled instruction.
When script recording terminal receives the control data of web client transmission, control letter is obtained from control data Breath, control information can be control code or control coordinate, if control code, be then suitable for according to control information generation The control event of Android device, is connect by the adb between Android device control event being sent to Android device, so that peace Tall and erect equipment executes corresponding operation according to the control event received.Specifically, the embodiment of the present invention is based on minitouch tools It realizes the connection between mobile terminal and script recording terminal, and mobile terminal is controlled.Wherein, minitouch tools It is run on mobile terminals after Android NDK (Native Development Kit) compilings, minitouch provides shifting The interface of the various touch control operations of dynamic terminal, including press, lift, slide, therefore point hitter can be simulated by minitouch Machine event.Specifically, it is then realized on minitouch file push to mobile terminal first by adb forword orders Port mapping, to establish script recording terminal and mobile terminal port socket connections.Connect establishing the socket After connecing, the script recording terminal can be transmitted startup event and (start as described in being generated after listening to user and clicking start button Event) to the mobile terminal, the mobile terminal generates enabled instruction after receiving the startup event.
Step S40, what the script recording terminal reception mobile terminal was sent operates acquisition based on the monitoring control Data generate test script according to the data.
At this point, the minicap tools and minitouch tools that are deployed in the Android device carry out in real time action event It monitors, record Android device executes the data that corresponding operation generates according to the control event of script recording terminal, by above-mentioned number According to script recording terminal is sent to, script recording terminal is converted into test script by the analyzing processing to above-mentioned data, Script recording terminal calls websocket connections that test script is sent in web client synchronous displaying by server-side.
It constantly repeats as procedure described above, control is recorded based on the termination on recording interface when web client detects user When the recording END instruction of part triggering, stop the recording of current test script, and by the test script of recording according to preset foot This format stores.When user wants the effect for the test script that detection is recorded, by playing back the script online, you can realization pair The control of long-range Android device, and then observe the effect of test script.
For example, current sync shows the initial interface after the application unlatching in the Android device in web client, it should There are login control, user to be clicked by mouse action on the pseudo operation interface of web client and log in control on interface, then Web client can obtain corresponding control code according to the attribute information of the login control, be asked according to the control of control code building It asks, is sent to script recording terminal, script recording terminal controls triggering in Android device and logs in control, and Android device is stepped in triggering Record control after, this can be responded, enter input account and password interface in, at this point, minicap tools and Minitouch tools are sent to script recording terminal by the data that aforesaid operations generate are monitored, by script recording terminal according to this A little data generate test script.
The script method for recording based on remote real machine that the present embodiment proposes, script recording terminal are receiving web client When holding the connection request sent, the corresponding mobile terminal of connection request is determined, pseudo operation circle is based on when receiving web client When the control data of face triggering, control information is obtained from control data, is generated suitable for mobile terminal based on control information Control event;According to control corresponding with control information on control event triggering mobile terminal, operated with executing corresponding control; It receives mobile terminal and monitors the data that control operation generates, test script is generated according to data.User only needs in pseudo operation Control data is triggered on interface, you can realize and remote control is carried out to mobile terminal, and by being obtained to the monitoring for controlling event To data automatically generate test script, be not necessarily to tester manual editing, reduce work group of the tester when preparing script Amount, improves the acquisition efficiency of test script.
The present invention also provides a kind of script recording terminal based on remote real machine.With reference to shown in Fig. 2, implement for the present invention one The internal structure schematic diagram for the script recording terminal based on remote real machine that example provides.
In the present embodiment, the script recording terminal 1 based on remote real machine can be PC (Personal Computer, it is a People's computer), can also be the terminal devices such as smart mobile phone, tablet computer, pocket computer.The script record based on remote real machine Terminal 1 processed includes at least memory 11, processor 12, communication bus 13 and network interface 14.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), magnetic storage, disk, CD etc..Memory 11 Can be the internal storage unit of the script recording terminal 1 based on remote real machine in some embodiments, such as should be based on long-range The hard disk of the script recording terminal 1 of prototype.Memory 11 can also be the script based on remote real machine in further embodiments The plug-in type hard disk being equipped on the External memory equipment of recording terminal 1, such as the script recording terminal 1 based on remote real machine, intelligence Energy storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include the storage inside list of the script recording terminal 1 based on remote real machine Member also includes External memory equipment.Memory 11 can be not only used for storage and be installed on the script recording terminal based on remote real machine 1 application software and Various types of data, such as script record the code etc. of program 01, can be also used for temporarily storing and have exported Or the data that will be exported.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as perform script record program 01 etc..
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 may include optionally standard wireline interface and wireless interface (such as WI-FI interface), be commonly used in Communication connection is established between the terminal 1 and other electronic equipments.
Optionally, which can also include user interface, and user interface may include display (Display), input Unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate Referred to as display screen or display unit, for being shown in the information and use that are handled in the script recording terminal 1 based on remote real machine In the visual user interface of display.
Fig. 2 is illustrated only records the script recording based on remote real machine of program 01 eventually with component 11-14 and script The script based on remote real machine is recorded it will be appreciated by persons skilled in the art that the structure shown in Fig. 1 is not constituted in end 1 The restriction of terminal 1 may include either combining certain components or different components than illustrating less either more components Arrangement.
In 1 embodiment of terminal shown in Fig. 2, it is stored with script in memory 11 and records program 01;Processor 12 executes The script stored in memory 11 realizes following steps when recording program 01:
Script recording terminal determines that the connection request is corresponding when receiving the connection request of web client transmission Mobile terminal, wherein the script recording terminal is established telecommunication with the web client and connect, and the script is recorded eventually Adb connections are established between end and the mobile terminal.
When receiving the control data that web client is triggered based on pseudo operation interface, obtained from the control data Control information is taken, the control event suitable for the mobile terminal is generated based on the control information.
The script recording terminal triggers corresponding with the control information on the mobile terminal according to the control event Control, operated with executing corresponding control.
The script recording terminal receives the data obtained based on the monitoring control operation that mobile terminal is sent, according to The data generate test script.
The method of the present embodiment is illustrated so that mobile terminal is Android device as an example in the following contents.Script is recorded eventually End may include one or multiple computers, and adb connections are established between script recording terminal and Android device, and script is recorded eventually The control to Android device is realized by adb connections in end.Websocket companies are established between web client and script recording terminal It connects.Wherein, websocket is a kind of based on TCP (Transmission Control Protocol, transmission control protocol) Full-duplex communication agreement can realize browser and server full-duplex communication.In the scheme of the present embodiment, websocket Realize the full-duplex communication between mobile terminal and web client.In addition, be deployed in Android device minicap and Minitouch tools.
User logs in web client by any one PC;Script recording terminal will by websocket connections The data of minicap tools acquisition on mobile terminal are sent to web client.User passes through the web client on browser The Android device connected on remote control script recording terminal.Specifically, a mobile phone simulator is realized on a web server, After user logs in web client, show that the Android currently connected on script recording terminal is set on the display interface of web client Standby facility information, user select the Android device to be connected as needed.Synchronously show that user selects in web client Android device pseudo operation interface, on the current display interface of minicap tools acquisition Android device in Android device Page elements, and be sent to script recording terminal, the page elements data received be sent to web by script recording terminal Client, and then the display interface in Android device is synchronously illustrated on the pseudo operation interface of web client.
Wherein, the major function of minicap tools is connect using the scheduled application programming of the system of mobile terminal Mouth carries out real-time snap shot, and sends script recording terminal after being compressed to sectional drawing data to, due to the data transmission of minicap Efficiency is very high, therefore can guarantee real-time Transmission and the display of picture.
For web client, user can trigger control by the control on mouse control pseudo operation interface and ask It asks, specifically, when detecting the control operation of pseudo operation interface triggering of the user based on current presentation, identifies current control Corresponding control is operated, the attribute information of the control is obtained, and then obtains the scripted code of control based on attribute information;If detection Control to user's operation is no attribute control, then obtains coordinate information of the control on the pseudo operation interface.According to obtaining The script information or coordinate information taken generates control data, and the control data is sent to script recording terminal.This programme The coordinate of middle recording uses relative coordinate, can be applied to the Android device of different resolution.It should be noted that user is touching Before sending out control data, triggers the script on interface and record enabled instruction, which is recorded enabled instruction and sent by web client To script recording terminal, script recording terminal can start the recording of perform script according to the enabled instruction.
When script recording terminal receives the control data of web client transmission, control letter is obtained from control data Breath, control information can be control code or control coordinate, if control code, be then suitable for according to control information generation The control event of Android device, is connect by the adb between Android device control event being sent to Android device, so that peace Tall and erect equipment executes corresponding operation according to the control event received.Specifically, the embodiment of the present invention is based on minitouch tools It realizes the connection between mobile terminal and script recording terminal, and mobile terminal is controlled.Wherein, minitouch tools It is run on mobile terminals after Android NDK (Native Development Kit) compilings, minitouch provides shifting The interface of the various touch control operations of dynamic terminal, including press, lift, slide, therefore point hitter can be simulated by minitouch Machine event.Specifically, it is then realized on minitouch file push to mobile terminal first by adb forword orders Port mapping, to establish script recording terminal and mobile terminal port socket connections.Connect establishing the socket After connecing, the script recording terminal can be transmitted startup event and (start as described in being generated after listening to user and clicking start button Event) to the mobile terminal, the mobile terminal generates enabled instruction after receiving the startup event.
At this point, the operation thing of the minicap tools and minitouch tools that are deployed in the Android device to display interface Part is monitored in real time, and record Android device executes the number that corresponding operation generates according to the control event of script recording terminal According to above-mentioned data being sent to script recording terminal, script recording terminal is converted by the analyzing processing to above-mentioned data For test script, script recording terminal calls websocket connections to be sent to test script in web client by server-side Synchronous displaying.
It constantly repeats as procedure described above, control is recorded based on the termination on recording interface when web client detects user When the recording END instruction of part triggering, stop the recording of current test script, and by the test script of recording according to preset foot This format stores.When user wants the effect for the test script that detection is recorded, by playing back the script online, you can realization pair The control of long-range Android device, and then observe the effect of test script.
For example, current sync shows the initial interface after the application unlatching in the Android device in web client, it should There are login control, user to be clicked by mouse action on the pseudo operation interface of web client and log in control on interface, then Web client can obtain corresponding control code according to the attribute information of the login control, be asked according to the control of control code building It asks, is sent to script recording terminal, script recording terminal controls triggering in Android device and logs in control, and Android device is stepped in triggering Record control after, this can be responded, enter input account and password interface in, at this point, minicap tools and Minitouch tools are sent to script recording terminal by the data that aforesaid operations generate are monitored, by script recording terminal according to this A little data generate test script.
The script recording terminal based on remote real machine that the present embodiment proposes, in the connection for receiving web client transmission When request, the corresponding mobile terminal of connection request is determined, when the control for receiving web client and being triggered based on pseudo operation interface When request, control information is obtained from control data, and the control event suitable for mobile terminal is generated based on control information;According to Control event triggers control corresponding with control information on mobile terminal, is operated with executing corresponding control;Receive mobile terminal The data that control operation generates are monitored, test script is generated according to data.User only needs to trigger control on pseudo operation interface System request, you can realize and remote control is carried out to mobile terminal, and the data by being got to the monitoring for controlling event are automatic Test script is generated, tester manual editing is not necessarily to, reduces work group amount of the tester when preparing script, improves test foot This acquisition efficiency.
Optionally, in other examples, script, which records program, can also be divided into one or more module, and one A or multiple modules are stored in memory 11, and are held by one or more processors (the present embodiment is by processor 12) For row to complete the present invention, the so-called module of the present invention is the series of computation machine program instruction section for referring to complete specific function, Implementation procedure of the program in the script recording terminal based on remote real machine is recorded for description script.
Shown in Fig. 3, for the present invention is based on the records of the script in one embodiment of script recording terminal of remote real machine The program module schematic diagram of processing procedure sequence, in the embodiment, script, which records program, can be divided into terminal selecting module 10, information Acquisition module 20, operation executing module 30 and script generation module 40, illustratively:
Terminal selecting module 10 is used for:When receiving the connection request of web client transmission, the connection request is determined Corresponding mobile terminal, wherein the script recording terminal is established telecommunication with the web client and connect, the script Adb connections are established between recording terminal and the mobile terminal;
Data obtaining module 20 is used for:When receiving the control data that web client is triggered based on pseudo operation interface, Control information is obtained from the control data, the control thing suitable for the mobile terminal is generated based on the control information Part;
Operation executing module 30 is used for:According to the control event trigger on the mobile terminal with the control information pair The control answered is operated with executing corresponding control;
Script generation module 40 is used for:The data obtained based on the monitoring control operation that mobile terminal is sent are received, Test script is generated according to the data.
The journeys such as above-mentioned terminal selecting module 10, data obtaining module 20, operation executing module 30 and script generation module 40 Sequence module is performed realized functions or operations step and is substantially the same with above-described embodiment, and details are not described herein.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with script and record program, the script is recorded program and can be executed by one or more processors, to realize following operation:
When receiving the connection request of web client transmission, the corresponding mobile terminal of the connection request is determined, In, the script recording terminal is established telecommunication with the web client and is connect, the script recording terminal and the movement Adb connections are established between terminal;
When receiving the control data that web client is triggered based on pseudo operation interface, obtained from the control data Control information is taken, the control event suitable for the mobile terminal is generated based on the control information;
Control corresponding with the control information on the mobile terminal is triggered according to the control event, to execute correspondence Control operation;
The data obtained based on the monitoring control operation that mobile terminal is sent are received, test is generated according to the data Script.
Computer readable storage medium specific implementation mode of the present invention and the above-mentioned script recording terminal based on remote real machine It is essentially identical with each embodiment of method, do not make tired state herein.
It should be noted that the embodiments of the present invention are for illustration only, can not represent the quality of embodiment.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, terminal, article or the method for including a series of elements include not only those elements, but also include being not explicitly listed Other element, or further include for this process, terminal, article or the intrinsic element of method.Do not limiting more In the case of, the element that is limited by sentence "including a ...", it is not excluded that in the process including the element, terminal, article Or there is also other identical elements in method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone, Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of script method for recording based on remote real machine, which is characterized in that the method includes:
Script recording terminal determines the corresponding movement of the connection request when receiving the connection request of web client transmission Terminal, wherein the script recording terminal is established telecommunication with the web client and is connect, the script recording terminal with Adb connections are established between the mobile terminal;
When receiving the control data that web client is triggered based on pseudo operation interface, control is obtained from the control data Part information generates the control event suitable for the mobile terminal based on the control information;
The script recording terminal triggers control corresponding with the control information on the mobile terminal according to the control event Part is operated with executing corresponding control;
The script recording terminal receives the data obtained based on the monitoring control operation that mobile terminal is sent, according to described Data generate test script.
2. the script method for recording based on remote real machine as described in claim 1, which is characterized in that the script recording terminal It is described before determining the corresponding mobile terminal step of the connection request when receiving the connection request of web client transmission Method further includes step:
When detecting new mobile terminal access, obtains the facility information of the mobile terminal and send the facility information It is shown to web client, so that user triggers the connection request according to the facility information of displaying.
3. the script method for recording based on remote real machine as described in claim 1, which is characterized in that the script recording terminal After receiving the step of mobile terminal monitors the data that the control operation generates, test script is generated according to the data, institute The method of stating further includes step:
The test script of generation is sent to the web client, so that the web client is synchronous on display interface Show the test script.
4. the script method for recording based on remote real machine as described in claim 1, which is characterized in that the script recording terminal Control corresponding with the control information on the mobile terminal is triggered according to the control event, is grasped with executing corresponding control After the step of making, the method further includes step:
When receiving the interface information of mobile terminal transmission, the interface information is sent to web client, for described Web client is according to the interface information on the pseudo operation interface in the current display of mobile terminal described in simultaneous display Hold.
5. the script method for recording based on remote real machine according to any one of claims 1 to 4, which is characterized in that described Connection between script recording terminal and the web client is websocket connections.
6. a kind of script recording terminal based on remote real machine, which is characterized in that the terminal includes memory and processor, institute It states the script that is stored with and can run on the processor on memory and records program, the script records program by the processing Device realizes following steps when executing:
When receiving the connection request of web client transmission, the corresponding mobile terminal of the connection request is determined, wherein institute It states script recording terminal and establishes telecommunication with the web client and connect, the script recording terminal and the mobile terminal Between establish adb connections;
When receiving the control data that web client is triggered based on pseudo operation interface, control is obtained from the control data Part information generates the control event suitable for the mobile terminal based on the control information;
Control corresponding with the control information on the mobile terminal is triggered according to the control event, to execute corresponding control System operation;
The data obtained based on the monitoring control operation that mobile terminal is sent are received, is generated according to the data and tests foot This.
7. the script recording terminal based on remote real machine as claimed in claim 6, which is characterized in that the script records program It can also be executed by the processor, when receiving the connection request of web client transmission, to determine that the connection is asked described Before seeking corresponding mobile terminal step, following steps are also realized:
When detecting new mobile terminal access, obtains the facility information of the mobile terminal and send the facility information It is shown to web client, so that user triggers the connection request according to the facility information of displaying.
8. the script recording terminal based on remote real machine as claimed in claim 6, which is characterized in that the script records program It can also be executed by the processor, to monitor the data that the control operation generates in reception mobile terminal, according to the data After the step of generating test script, following steps are also realized:
The test script of generation is sent to the web client, so that the web client is synchronous on display interface Show the test script.
9. the script recording terminal based on remote real machine as described in any one of claim 6 to 8, which is characterized in that described Script is recorded program and can also be executed by the processor, with it is described according to the control event trigger on the mobile terminal with The corresponding control of the control information also realizes following steps after executing the step of corresponding control operates:
When receiving the interface information of mobile terminal transmission, the interface information is sent to web client, for described Web client is according to the interface information on the pseudo operation interface in the current display of mobile terminal described in simultaneous display Hold.
10. a kind of computer readable storage medium, which is characterized in that be stored with script record on the computer readable storage medium Processing procedure sequence, the script are recorded program and can be executed by one or more processor, to realize as any in claim 1 to 5 Described in the script method for recording based on remote real machine the step of.
CN201810547231.2A 2018-05-31 2018-05-31 Script recording method, terminal and computer readable storage medium based on remote true machine Active CN108763086B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810547231.2A CN108763086B (en) 2018-05-31 2018-05-31 Script recording method, terminal and computer readable storage medium based on remote true machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810547231.2A CN108763086B (en) 2018-05-31 2018-05-31 Script recording method, terminal and computer readable storage medium based on remote true machine

Publications (2)

Publication Number Publication Date
CN108763086A true CN108763086A (en) 2018-11-06
CN108763086B CN108763086B (en) 2024-04-02

Family

ID=64000847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810547231.2A Active CN108763086B (en) 2018-05-31 2018-05-31 Script recording method, terminal and computer readable storage medium based on remote true machine

Country Status (1)

Country Link
CN (1) CN108763086B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109603154A (en) * 2018-12-14 2019-04-12 网易(杭州)网络有限公司 Interface test method, client, Entrust Server and system
CN109710526A (en) * 2018-12-24 2019-05-03 北京云测信息技术有限公司 One kind being based on cloud service automatic test script recording and playback system and method
CN109840201A (en) * 2018-12-15 2019-06-04 中国平安人寿保险股份有限公司 UI test method, device, electronic equipment and computer readable storage medium
CN110830651A (en) * 2019-11-04 2020-02-21 深圳传音控股股份有限公司 Terminal control method, terminal device, and storage medium
CN110837474A (en) * 2019-11-13 2020-02-25 北京博睿宏远数据科技股份有限公司 Script recording method, device, terminal and storage medium
CN111290944A (en) * 2020-01-16 2020-06-16 北京小米移动软件有限公司 Script generation method, device and storage medium
CN111708704A (en) * 2020-06-19 2020-09-25 腾讯科技(深圳)有限公司 Cloud real machine testing method and device, terminal and storage medium
CN111752827A (en) * 2020-06-04 2020-10-09 武汉迎风聚智科技有限公司 Test script generation method and device
CN112596848A (en) * 2020-12-30 2021-04-02 北京达佳互联信息技术有限公司 Screen recording method and device, electronic equipment, storage medium and program product
CN112860561A (en) * 2021-02-23 2021-05-28 汇链通供应链科技(上海)有限公司 Automatic performance testing method and terminal device
CN113038251A (en) * 2019-12-25 2021-06-25 北京奇艺世纪科技有限公司 Control method and control device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778053A (en) * 2012-10-18 2014-05-07 周玲玲 Remote real machine test system and method of mobile terminals
CN105138458A (en) * 2015-09-10 2015-12-09 上海斐讯数据通信技术有限公司 Method and system for recording automatic testing scripts by combining intelligent terminal and computer terminal
CN105224456A (en) * 2015-09-29 2016-01-06 北京奇虎科技有限公司 A kind of test script generates methods, devices and systems
CN105740153A (en) * 2016-02-29 2016-07-06 网易(杭州)网络有限公司 Cloud testing method and device
CN106874206A (en) * 2017-02-27 2017-06-20 网易(杭州)网络有限公司 Method, device and electronic equipment for cross-platform automatic test
CN107193750A (en) * 2017-07-04 2017-09-22 北京云测信息技术有限公司 A kind of script method for recording and device
CN107357724A (en) * 2017-06-27 2017-11-17 深圳市泰衡诺科技有限公司上海分公司 Automatic software test method and device in Android system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778053A (en) * 2012-10-18 2014-05-07 周玲玲 Remote real machine test system and method of mobile terminals
CN105138458A (en) * 2015-09-10 2015-12-09 上海斐讯数据通信技术有限公司 Method and system for recording automatic testing scripts by combining intelligent terminal and computer terminal
CN105224456A (en) * 2015-09-29 2016-01-06 北京奇虎科技有限公司 A kind of test script generates methods, devices and systems
CN105740153A (en) * 2016-02-29 2016-07-06 网易(杭州)网络有限公司 Cloud testing method and device
CN106874206A (en) * 2017-02-27 2017-06-20 网易(杭州)网络有限公司 Method, device and electronic equipment for cross-platform automatic test
CN107357724A (en) * 2017-06-27 2017-11-17 深圳市泰衡诺科技有限公司上海分公司 Automatic software test method and device in Android system
CN107193750A (en) * 2017-07-04 2017-09-22 北京云测信息技术有限公司 A kind of script method for recording and device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109603154A (en) * 2018-12-14 2019-04-12 网易(杭州)网络有限公司 Interface test method, client, Entrust Server and system
CN109603154B (en) * 2018-12-14 2022-05-20 网易(杭州)网络有限公司 Game interface testing method, client, hosting server and system
CN109840201A (en) * 2018-12-15 2019-06-04 中国平安人寿保险股份有限公司 UI test method, device, electronic equipment and computer readable storage medium
CN109710526A (en) * 2018-12-24 2019-05-03 北京云测信息技术有限公司 One kind being based on cloud service automatic test script recording and playback system and method
CN110830651B (en) * 2019-11-04 2024-02-13 深圳传音控股股份有限公司 Terminal control method, terminal device and storage medium
CN110830651A (en) * 2019-11-04 2020-02-21 深圳传音控股股份有限公司 Terminal control method, terminal device, and storage medium
CN110837474A (en) * 2019-11-13 2020-02-25 北京博睿宏远数据科技股份有限公司 Script recording method, device, terminal and storage medium
CN113038251B (en) * 2019-12-25 2022-10-14 北京奇艺世纪科技有限公司 Control method and control device
CN113038251A (en) * 2019-12-25 2021-06-25 北京奇艺世纪科技有限公司 Control method and control device
CN111290944A (en) * 2020-01-16 2020-06-16 北京小米移动软件有限公司 Script generation method, device and storage medium
CN111290944B (en) * 2020-01-16 2023-11-28 北京小米移动软件有限公司 Script generation method, script generation device and storage medium
CN111752827A (en) * 2020-06-04 2020-10-09 武汉迎风聚智科技有限公司 Test script generation method and device
CN111708704A (en) * 2020-06-19 2020-09-25 腾讯科技(深圳)有限公司 Cloud real machine testing method and device, terminal and storage medium
CN112596848A (en) * 2020-12-30 2021-04-02 北京达佳互联信息技术有限公司 Screen recording method and device, electronic equipment, storage medium and program product
CN112860561B (en) * 2021-02-23 2022-05-27 汇链通产业供应链数字科技(厦门)有限公司 Automatic performance testing method and terminal device
CN112860561A (en) * 2021-02-23 2021-05-28 汇链通供应链科技(上海)有限公司 Automatic performance testing method and terminal device

Also Published As

Publication number Publication date
CN108763086B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
CN104484273B (en) The method of testing of application program, equipment and system
CN108804302B (en) Remote testing method, system and related equipment
CN104765678B (en) The method and device tested the application on mobile terminal device
CN106021095B (en) A kind of Android application automated testing method based on push-mechanism
US9925465B2 (en) Game accessing method and processing method, server, terminal, and system
CN110532169A (en) Interface testing case generation method, device, computer equipment and storage medium
CN104869203B (en) Method of testing, device and the test equipment of interim card
CN104424089A (en) Terminal testing method and device
CN108307021B (en) Parallel following test equipment, cloud real machine and method for mobile terminal
CN110032507A (en) Applied program testing method, device, system, electronic equipment and storage medium
CN105183630B (en) Applied program testing method and device
CN108717391A (en) Monitoring device, method and the computer readable storage medium of test process
CN110493812B (en) Distribution network test processing method, device and system, processor and master control equipment
CN105975367B (en) Test method and device for mobile equipment
CN108830383B (en) Method and system for displaying machine learning modeling process
CN111866160B (en) Multi-machine control method, device, equipment and storage medium
CN110955600A (en) Interface test method and device
CN108363667A (en) A kind of log information capture apparatus
CN110554831A (en) Operation synchronization method, device, equipment and storage medium
CN112799891A (en) iOS device test method, device, system, storage medium and computer device
CN113608812A (en) Remote control method, device, system and storage medium
CN111538608A (en) Method for preventing terminal equipment from being down, terminal equipment and storage medium
CN110399723A (en) Leak detection method and device, storage medium and electronic device
CN107122291A (en) Mobile terminal software stability test method and apparatus

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