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
coordinate information
indicating template
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
CN201510567545.5A
Other languages
Chinese (zh)
Other versions
CN105183599A (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.)
Huzhou YingLie Intellectual Property Operation Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Mobile Radio Communication Systems (AREA)

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 (10)

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 Active 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 Active 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 (3)

* 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
CN111913775B (en) * 2020-08-05 2024-04-26 临沂未来世纪人工智能有限公司 Automatic clicking method and device for mobile phone screen and storage medium thereof

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
CN103533016B (en) A kind of broadband network tests the speed and intelligent analysis method
CN105183599B (en) script recording system and method
CN102607645B (en) Data acquisition method, data acquisition device and mobile terminal
JP2016509292A5 (en)
CN107281710A (en) A kind of method of remedial action error
ATE425488T1 (en) INFORMATION PROCESSING DEVICE WITH A SENSOR FOR DETERMINING COORDINATE VALUES AND CHANGES OF A NUMEROUS POINTS ON A SCREEN
CN108307021A (en) Mobile terminal parallel to follow test equipment, cloud prototype and method
CN103390067B (en) The data processing method analyzed for internet entity and device
JP2011161780A5 (en) Image processing apparatus, control method therefor, and computer program
CN106708508B (en) A kind of interface data processing method and device
CN105227399A (en) Based on network equipment Debugging message acquisition methods and the system of User space
CN106204678A (en) The display color adjustment method of content, system and device
CN114443753B (en) Map data display method and device for cleaning robot, robot and medium
CN109117238B (en) WeChat applet-based legend display system and method
CN109614169B (en) Automatic operation method of Windows client application program based on pixel coordinate mode
CN201741036U (en) Embedded automobile failure diagnosis device capable of one-key remote upgrading
CN103941983A (en) Information processing method and device and electronic device
CN106814935A (en) The application icon display methods and terminal of a kind of terminal
CN103631232B (en) Data monitoring control method and device
CN106462139B (en) Programable display and drawing practice
CN110689614A (en) Method, medium, device and system for collecting device information based on electronic map
CN106686062B (en) Intelligent management and control system and method for aquatic product drug sampling and residue detection
CN106621190B (en) Method, device and system for simulating running on map data based on running machine
CN105007297A (en) Interaction method and apparatus of social network
CN111597940B (en) Rendering model evaluation method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
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
TR01 Transfer of patent right

Effective date of registration: 20210310

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

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

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