CN105183599B - script recording system and method - Google Patents

script recording system and method Download PDF

Info

Publication number
CN105183599B
CN105183599B CN201510567545.5A CN201510567545A CN105183599B CN 105183599 B CN105183599 B CN 105183599B CN 201510567545 A CN201510567545 A CN 201510567545A CN 105183599 B CN105183599 B CN 105183599B
Authority
CN
China
Prior art keywords
mobile terminal
measured
script
recording
coordinate information
Prior art date
Application number
CN201510567545.5A
Other languages
Chinese (zh)
Other versions
CN105183599A (en
Inventor
柏琼
Original Assignee
上海斐讯数据通信技术有限公司
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 上海斐讯数据通信技术有限公司 filed Critical 上海斐讯数据通信技术有限公司
Priority to CN201510567545.5A priority Critical patent/CN105183599B/en
Publication of CN105183599A publication Critical patent/CN105183599A/en
Application granted granted Critical
Publication of CN105183599B publication Critical patent/CN105183599B/en

Links

Abstract

The invention discloses script recording system and method, script recording system includes:One acquiring unit connects mobile terminal to be tested, to obtain the current screen image of mobile terminal to be measured;One display unit connects acquiring unit, and display unit provides an indicating template, and indicating template is showing current screen image;One processing unit, is separately connected acquiring unit and display unit, to calculate the size relationship of image and the current screen image of mobile terminal to be measured that indicating template is shown;One input unit connects display unit, to input cursor operation signal on the image that indicating template is shown;One control unit is separately connected input unit, display unit and processing unit, to be converted to cursor operations signal relative to the coordinate information of mobile terminal to be measured according to size relationship, and exports;One recording unit connects control unit, to record the coordinate information that cursor operation signal operates on indicating template, to form test script.

Description

Script recording system and method

Technical field

The present invention relates to mobile terminal test technical field more particularly to a kind of script recording systems on test platform And method.

Background technology

Automatic test can save a large amount of human resources, be that the behavioral test taking human as driving is converted into machine to execute A kind of process.It in test, is executed step by step according to the description of test case, to obtain actual result and expected result Compare data.During the test, it is not necessarily to manual operation, test script is voluntarily installed using machine and is executed, to reach section The purpose of human-saving resource.Current test script can only be directed to mobile terminal itself when recording, and need artificially to mobile terminal It is operated to carry out the artificial recording test script of corresponding operation, and and supports other test platforms.

Invention content

The existing above problem is recorded for existing script, a kind of automatic record aiming at releasable manpower is now provided The script recording system and method for script processed.

Specific technical solution is as follows:

A kind of script recording system is applied in the test of mobile terminal, including:

One acquiring unit connects mobile terminal to be tested, to obtain the current screen image of the mobile terminal to be measured;

One display unit connects the acquiring unit, and the display unit provides an indicating template, and the indicating template is used To show the current screen image;

One processing unit is separately connected the acquiring unit and the display unit, aobvious to calculate the indicating template The size relationship of the image shown and the current screen image of the mobile terminal to be measured;

One input unit connects the display unit, to input cursor behaviour on the image that the indicating template is shown Make signal;

One control unit is separately connected the input unit, the display unit and the processing unit, to according to institute It states size relationship to be converted to the cursor operations signal relative to the coordinate information of mobile terminal to be measured, and exports;

One recording unit connects described control unit, is operated on the indicating template to record cursor operation signal Coordinate information, to form test script.

Preferably, the acquiring unit is obtaining the current screen figure of the mobile terminal to be measured at the predetermined space moment Picture.

Preferably, described control unit is grasped being converted to the cursor operations signal relative on the indicating template The coordinate information is converted to the coordinate relative to the mobile terminal to be measured according to the size relationship by the coordinate information of work Information, and export.

Preferably, described control unit will be sent relative to the coordinate information of mobile terminal to be measured by adb orders To the mobile terminal to be measured, to call the operation for corresponding to position preset jar packet operations and click the mobile terminal to be measured.

A kind of script method for recording is applied in the test of mobile terminal, provides an indicating template, include the following steps:

S1. the current screen image of mobile terminal to be measured is obtained;

S2. the current screen image is shown on the indicating template;

S3. the size for calculating image and the current screen image of the mobile terminal to be measured that the indicating template is shown is closed System;

S4. the input cursor operation signal on the image that the indicating template is shown is received;

S5., the cursor operations signal is converted to the seat relative to the mobile terminal to be measured according to the size relationship Information is marked, and is exported;

S6. the coordinate information that record cursor operation signal operates on the indicating template, to form test script.

Preferably, in the step S1, the current screen figure of the mobile terminal to be measured is obtained at the predetermined space moment Picture.

Preferably, the detailed process of the step S5 is:The cursor operations signal is converted to relative to the display The coordinate information operated in template is converted to the coordinate information relative to described to be measured mobile whole according to the size relationship The coordinate information at end, and export.

Preferably, it in the step S5, will be sent out by adb orders relative to the coordinate information of mobile terminal to be measured It send to the mobile terminal to be measured, to call the behaviour for corresponding to position for presetting jar packet operations and clicking the mobile terminal to be measured Make.

A kind of test system, using such as above-mentioned script recording system, including:

One manipulator, connects described control unit, and described control unit is believed according to the coordinate in the recording unit Breath, controls the operation for corresponding to position that the manipulator clicks the mobile terminal to be measured.

A kind of test method provides a manipulator using such as above-mentioned script method for recording, including:According to the test The coordinate information in script controls the operation for corresponding to position that the manipulator clicks the mobile terminal to be measured.

The advantageous effect of above-mentioned technical proposal:

In the technical program, script recording system can obtain the image and shifting to be measured that display unit is shown using processing unit The size relationship of dynamic terminal current screen image, can be converted to cursor operations signal relative to movement to be measured using control unit The coordinate information of terminal can record the coordinate information of cursor operations signal by recording unit, to form test script, releasably Manpower automatic recording script.Script method for recording is by obtaining the current screen image of mobile terminal to be measured to calculate indicating template The size relationship of the image of display and the current screen image of mobile terminal to be measured, to be believed cursor operations according to size relationship It number is converted to relative to the coordinate information of mobile terminal to be measured, with output, mobile terminal to be measured is tested accordingly, can be released Put manpower automatic recording script.

Description of the drawings

Fig. 1 is a kind of module map of embodiment of script recording system of the present invention;

Fig. 2 is a kind of method flow diagram of embodiment of script method for recording of the present invention;

Fig. 3 is the structural schematic diagram of manipulator of the present invention.

Specific implementation mode

Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of not making creative work it is all its His embodiment, shall fall within the protection scope of the present invention.

It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase Mutually combination.

The invention will be further described in the following with reference to the drawings and specific embodiments, but not as limiting to the invention.

As shown in Figure 1, a kind of script recording system, is applied in the test of mobile terminal, including:

One acquiring unit 1, connects mobile terminal to be tested, to obtain the current screen image of mobile terminal to be measured;

One display unit 2 connects acquiring unit 1, and display unit 2 provides an indicating template, and indicating template is worked as to show Forth screen image;

One processing unit 4, is separately connected acquiring unit 1 and display unit 2, to calculate image that indicating template is shown with The size relationship of the current screen image of mobile terminal to be measured;

One input unit 3 connects display unit 2, to input cursor operation signal on the image that indicating template is shown;

One control unit 5 is separately connected input unit 3, display unit 2 and processing unit 4, to be incited somebody to action according to size relationship Cursor operations signal is converted to relative to the coordinate information of mobile terminal to be measured, and is exported;

One recording unit 6 connects control unit 5, to record the coordinate that cursor operation signal operates on indicating template Information, to form test script.

Coordinate information is recorded in txt file by one ground of progress, recording unit 6, records a test case, txt file It is exactly a recording content for script.

In the present embodiment, script recording system using processing unit 4 can obtain display unit 2 display image with it is to be measured The size relationship of mobile terminal current screen image can be converted to cursor operations signal relative to be measured using control unit 5 The coordinate information of mobile terminal can record the coordinate information of cursor operations signal by recording unit 6, to form test script, Releasable manpower automatic recording script.

In a preferred embodiment, acquiring unit 1 is obtaining the current screen of mobile terminal to be measured at the predetermined space moment Curtain image.

In the present embodiment, acquiring unit 1 may include a timer, so that 1 timing acquisition of acquiring unit is to be measured mobile whole The screenshotss image at end is shown on indicating template.To reach the function of real-time recording mobile terminal screen image to be measured.

In a preferred embodiment, control unit 5 is grasped being converted to cursor operations signal relative on indicating template Coordinate information is converted to relative to the coordinate information of mobile terminal to be measured according to size relationship, and exported by the coordinate information of work.

In the present embodiment, 4 algorithm process through the processing unit calculates mobile terminal screen size to be measured and display Cursor is clicked the current of indicating template by the proportionate relationship for the screen size that the indicating template of unit 2 is shown using control unit 5 Coordinate information is converted to the coordinate information relative to the current screen for clicking mobile terminal to be measured, and exports corresponding click and believe Number.

In a preferred embodiment, control unit 5 will be sent out relative to the coordinate information of mobile terminal to be measured by adb orders It send to mobile terminal to be measured, to call the operation for corresponding to position preset jar packet operations and click mobile terminal to be measured.

In the present embodiment, control unit 5 clicks movement to be measured by the compiled jar packets of adb command calls to run The corresponding position of terminal screen.

As shown in Fig. 2, a kind of script method for recording, is applied in the test of mobile terminal, provides an indicating template, including Following step:

S1. the current screen image of mobile terminal to be measured is obtained;

S2. current screen image is shown on indicating template;

S3. the size relationship of image and the current screen image of mobile terminal to be measured that indicating template is shown is calculated;

S4. the input cursor operation signal on the image that indicating template is shown is received;

S5. cursor operations signal is converted to relative to the coordinate information of mobile terminal to be measured according to size relationship, and defeated Go out;

S6. the coordinate information that record cursor operation signal operates on indicating template, to form test script.

Coordinate information, can be recorded in txt file by one ground of progress, record a test case, txt file is exactly one Record content for script.

In the present embodiment, script method for recording is by obtaining the current screen image of mobile terminal to be measured to calculate display The size relationship of the image of template for displaying and the current screen image of mobile terminal to be measured, to be grasped cursor according to size relationship It is converted to relative to the coordinate information of mobile terminal to be measured as signal, with output, mobile terminal to be measured is tested accordingly, Releasable manpower automatic recording script.

In a preferred embodiment, in step sl, the current screen of mobile terminal to be measured is obtained at the predetermined space moment Image.

In the present embodiment, it is possible to provide a timer with the screenshotss image of timing acquisition mobile terminal to be measured, and is shown in On indicating template.To reach the function of real-time recording mobile terminal screen image to be measured.

In a preferred embodiment, the detailed process of step S5 is:Cursor operations signal is converted to relative to display mould The coordinate information operated on plate is converted to coordinate information relative to the coordinate information of mobile terminal to be measured according to size relationship, And it exports.

In the present embodiment, by algorithm process, the display of mobile terminal screen size and display unit 2 to be measured is calculated The proportionate relationship of the screen size of template for displaying, the changing coordinates information that cursor is clicked to indicating template are converted to relative to click The coordinate information of the current screen of mobile terminal to be measured, and export corresponding click signal.

In a preferred embodiment, in step s 5, adb orders will be passed through relative to the coordinate information of mobile terminal to be measured It is sent to mobile terminal to be measured, to call the operation for corresponding to position preset jar packet operations and click mobile terminal to be measured.

In the present embodiment, mobile terminal screen to be measured is clicked to run by the compiled jar packets of adb command calls Corresponding position.

A kind of test system, using such as above-mentioned script recording system, including:

One manipulator connects control unit 5, and control unit 5 is according to the coordinate information in recording unit 6, control machinery hand Click the operation for corresponding to position of mobile terminal to be measured.

In the present embodiment, script recording system can carry out automatic test on third-party testing platform, pass through control Coordinate information in txt file in recording unit 6 can be converted to the language that manipulator can identify by unit 5, pass through UART (Universal Asynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter) protocol integrated test system machinery Hand is run;So that manipulator clicks corresponding coordinate on mobile terminal screen to be measured according to the coordinate information in txt file.With reality Now continual and steady test, discharges manpower, promotes the purpose of user experience.

The course of work of test system is illustrated in conjunction with Fig. 3:Manipulator uses 220V mains-supplieds, manipulator automatically multiple Position starts test script, the first linear module 7 of manipulator and the second linear module 8 are according in test script to test origin Coordinate information click the corresponding position of 9 screen of mobile terminal to be measured, after the completion of test, manipulator returns to test origin, terminates Test.

A kind of test method provides a manipulator using such as above-mentioned script method for recording, including:According to the test The coordinate information in script controls the operation for corresponding to position that the manipulator clicks the mobile terminal to be measured.

In the present embodiment, script method for recording can carry out automatic test on third-party testing platform, by that will remember Coordinate information in the txt file of record is converted to the language that manipulator can identify, is run by UART protocol control machinery hand; So that manipulator clicks corresponding coordinate on mobile terminal screen to be measured according to the coordinate information in txt file.Continued with realizing Steady testing discharges manpower, promotes the purpose of user experience.

The foregoing is merely preferred embodiments of the present invention, are not intended to limit embodiments of the present invention and protection model It encloses, to those skilled in the art, should can appreciate that all with made by description of the invention and diagramatic content Equivalent replacement and obviously change obtained scheme, should all be included within the scope of the present invention.

Claims (13)

1. a kind of script recording system is applied in the test of mobile terminal, which is characterized in that including:
One acquiring unit connects mobile terminal to be tested, to obtain the current screen image of the mobile terminal to be measured;
One display unit connects the acquiring unit, and the display unit provides an indicating template, and the indicating template is to aobvious Show the current screen image;
One processing unit is separately connected the acquiring unit and the display unit, shows calculating the indicating template The size relationship of image and the current screen image of the mobile terminal to be measured;
One input unit connects the display unit, to input cursor operations letter on the image that the indicating template is shown Number;
One control unit is separately connected the input unit, the display unit and the processing unit, to according to the ruler Very little relationship is converted to the cursor operations signal relative to the coordinate information of mobile terminal to be measured, and exports;
One recording unit connects described control unit, to record the seat that cursor operation signal operates on the indicating template Information is marked, to form test script.
2. script recording system as described in claim 1, which is characterized in that the acquiring unit is at the predetermined space moment Obtain the current screen image of the mobile terminal to be measured.
3. script recording system as described in claim 1, which is characterized in that described control unit is to by the cursor operations Signal is converted to relative to the coordinate information operated on the indicating template, is turned the coordinate information according to the size relationship It is changed to relative to the coordinate information of mobile terminal to be measured, and exports.
4. script recording system as described in claim 1, which is characterized in that described control unit will be relative to the shifting to be measured The coordinate information of dynamic terminal is sent to the mobile terminal to be measured by adb orders, is preset described in jar packet operation clicks with calling The operation of the corresponding position of mobile terminal to be measured.
5. a kind of script method for recording is applied in the test of mobile terminal, which is characterized in that an indicating template is provided, including Following step:
S1. the current screen image of mobile terminal to be measured is obtained;
S2. the current screen image is shown on the indicating template;
S3. the size relationship of image and the current screen image of the mobile terminal to be measured that the indicating template is shown is calculated;
S4. the input cursor operation signal on the image that the indicating template is shown is received;
S5., the cursor operations signal is converted to the coordinate letter relative to the mobile terminal to be measured according to the size relationship Breath, and export;
S6. the coordinate information that record cursor operation signal operates on the indicating template, to form test script.
6. script method for recording as claimed in claim 5, which is characterized in that in the step S1, at the predetermined space moment Obtain the current screen image of the mobile terminal to be measured.
7. script method for recording as claimed in claim 5, which is characterized in that the detailed process of the step S5 is:It will be described Cursor operations signal is converted to relative to the coordinate information operated on the indicating template, according to the size relationship by the seat Mark information is converted to relative to the coordinate information of mobile terminal to be measured, and is exported.
8. script method for recording as claimed in claim 5, which is characterized in that in the step S5, will be waited for relative to described It surveys the coordinate information of mobile terminal and the mobile terminal to be measured is sent to by adb orders, jar packet operation clicks are preset to call The operation of the corresponding position of the mobile terminal to be measured.
9. a kind of test system, which is characterized in that script recording system of the application as described in claim 1-4, including:
One manipulator connects described control unit, and described control unit is according to the coordinate information in the recording unit, control Make the operation that the manipulator clicks the corresponding position of the mobile terminal to be measured.
10. a kind of test method, which is characterized in that script method for recording of the application as described in claim 5-8 provides a machinery Hand, including:According to the coordinate information in the test script, controls the manipulator and click the mobile terminal to be measured The operation of corresponding position.
CN201510567545.5A 2015-09-08 2015-09-08 script recording system and method CN105183599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510567545.5A CN105183599B (en) 2015-09-08 2015-09-08 script recording system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510567545.5A CN105183599B (en) 2015-09-08 2015-09-08 script recording system and method

Publications (2)

Publication Number Publication Date
CN105183599A CN105183599A (en) 2015-12-23
CN105183599B true CN105183599B (en) 2018-07-13

Family

ID=54905691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510567545.5A CN105183599B (en) 2015-09-08 2015-09-08 script recording system and method

Country Status (1)

Country Link
CN (1) CN105183599B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897225A (en) * 2017-02-27 2017-06-27 网易(杭州)网络有限公司 Record method, device and the electronic equipment of test script
CN109871172B (en) * 2019-01-23 2020-09-15 广州杰赛科技股份有限公司 Mouse clicking method and device in automatic test and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314386A (en) * 2011-09-05 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for testing mobile terminal
CN102904996A (en) * 2012-10-16 2013-01-30 深圳创维数字技术股份有限公司 Method, device and system for testing performance of mobile phone touch screen
CN103312850A (en) * 2013-05-10 2013-09-18 江苏科技大学 Mobile phone automation testing system and work method
CN104608120A (en) * 2015-02-05 2015-05-13 天津市康凯特软件科技有限公司 Manipulator device for automatic testing of mobile phone and use method
CN104714679A (en) * 2013-12-13 2015-06-17 财团法人工业技术研究院 Automatic correction system and automatic correction method
CN104717337A (en) * 2015-04-03 2015-06-17 杭州昕云信息科技有限公司 Method for testing mobile application in batch and equipment used in method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314386A (en) * 2011-09-05 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for testing mobile terminal
CN102904996A (en) * 2012-10-16 2013-01-30 深圳创维数字技术股份有限公司 Method, device and system for testing performance of mobile phone touch screen
CN103312850A (en) * 2013-05-10 2013-09-18 江苏科技大学 Mobile phone automation testing system and work method
CN104714679A (en) * 2013-12-13 2015-06-17 财团法人工业技术研究院 Automatic correction system and automatic correction method
CN104608120A (en) * 2015-02-05 2015-05-13 天津市康凯特软件科技有限公司 Manipulator device for automatic testing of mobile phone and use method
CN104717337A (en) * 2015-04-03 2015-06-17 杭州昕云信息科技有限公司 Method for testing mobile application in batch and equipment used in method

Also Published As

Publication number Publication date
CN105183599A (en) 2015-12-23

Similar Documents

Publication Publication Date Title
CN105144057B (en) For moving the equipment, method and graphic user interface of cursor according to the cosmetic variation of the control icon with simulation three-dimensional feature
CN103812726B (en) Automated testing method and device for data communication equipment
CN104794050B (en) The test method of application program, apparatus and system
CN103324620B (en) A kind of method and apparatus that annotation results is rectified a deviation
CN106201170B (en) A kind of the footmark processing method and terminal of application icon
CN104461894B (en) The operation record device and method of Android software
CN104569688B (en) A kind of distribution terminal automatization test system and method
CN104615538B (en) A kind of mobile phone application testing method based on mobile phone interface control element
CN103870156B (en) A kind of method and device of process object
CN103049163B (en) User interface intelligent display control method and device
CN106645978B (en) The wearing state detection method and detection device of intelligent wearable device
CN103728972B (en) Test platform and method for synchronous control over multiple mechanical arms
CN104572004A (en) Information processing method and electronic device
CN104062969A (en) Hardware-in-loop simulation testing system and testing method for automobile
CN103455657B (en) A kind of site work emulation mode based on Kinect and system thereof
CN105335269B (en) Temprature control method, device and mobile terminal
CN105807965B (en) A kind of method and device for preventing from accidentally touching
JP5677591B2 (en) Determination apparatus and determination program
WO2009110725A3 (en) Three-dimensional application program framework structure and a method for implementing an application program based on the same, and an automatic testing system based on a three-dimensional application software framework and a method therefor
CN104376739A (en) Parking space guide system and method
CN103312850A (en) Mobile phone automation testing system and work method
US10657036B2 (en) Determining visual testing coverages
CN105184859B (en) A kind of substation's three-dimensional modeling method based on laser scanning
TW200600809A (en) Method for analyzing measurement data of device under test, program, measurement data analyzing system
CN102110015B (en) Method and device for determining task progress and task processing time

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201123

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co., Ltd

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201217

Address after: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee after: Bengbu Lichao Information Technology Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co., Ltd

TR01 Transfer of patent right