CN105183599A - Script recording system and method - Google Patents

Script recording system and method Download PDF

Info

Publication number
CN105183599A
CN105183599A CN201510567545.5A CN201510567545A CN105183599A CN 105183599 A CN105183599 A CN 105183599A CN 201510567545 A CN201510567545 A CN 201510567545A CN 105183599 A CN105183599 A CN 105183599A
Authority
CN
China
Prior art keywords
mobile terminal
measured
coordinate information
script
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.)
Granted
Application number
CN201510567545.5A
Other languages
Chinese (zh)
Other versions
CN105183599B (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 a script recording system and method. The script recording system comprises an obtaining unit, a display unit, a processing unit, an input unit, a control unit and a recording unit. The obtaining unit is connected with a mobile terminal to be tested and used for obtaining the current screen image of the mobile terminal to be tested; the display unit is connected with the obtaining unit, provides a display template and is used for displaying the current screen image; the processing unit is connected with the obtaining unit and the display unit and used for calculating the size relation between an image displayed on the display template and the current screen image of the mobile terminal to be tested; the input unit is connected with the display unit and used for inputting a cursor operating signal on the image displayed on the display template; the control unit is connected with the input unit, the display unit and the processing unit and used for converting the cursor operating signal into coordinate information relative to the mobile terminal to be tested according to the size relation and outputting the coordinate information; the recording unit is connected with the control unit and used for recording operation coordinate information, on the display template, of the cursor operating signal to form a test script.

Description

Script recording system and method
Technical field
The present invention relates to mobile terminal test technical field, particularly relate to a kind of script recording system on test platform and method.
Background technology
Automatic test can save a large amount of human resources, is a kind of process being converted into machine execution with the behavioral test artificially driven.When testing, the description according to test case performs step by step, thus obtain actual result and expected result compare data.In test process, without the need to manual operation, adopt machine installation testing script performing voluntarily, thus reach the object of saving human resources.Can only for mobile terminal itself when current test script is recorded, need artificially to operate to carry out corresponding operation to mobile terminal and artificially record test script, and and support other test platform.
Summary of the invention
Record the problems referred to above existed for existing script, a kind of the script recording system and the method that are intended to realize discharging the automatic recording script of manpower are now provided.
Concrete technical scheme is as follows:
A kind of script recording system, is applied in the test of mobile terminal, comprises:
One acquiring unit, connects mobile terminal to be tested, in order to obtain the current screen image of described mobile terminal to be measured;
One display unit, connects described acquiring unit, and described display unit provides an indicating template, and described indicating template is in order to show described current screen image;
One processing unit, connects described acquiring unit and described display unit respectively, in order to the size relationship of current screen image of the image and described mobile terminal to be measured that calculate the display of described indicating template;
One input block, connects described display unit, inputs cursor operations signal in order on the image that shows at described indicating template;
One control module, connects described input block, described display unit and described processing unit respectively, in order to according to described size relationship described cursor operations signal to be converted to the coordinate information relative to described mobile terminal to be measured, and exports;
One record cell, connects described control module, in order to record the coordinate information that cursor operation signal operates on described indicating template, to form test script.
Preferably, described acquiring unit is in order to obtain the current screen image of described mobile terminal to be measured in the predetermined space moment.
Preferably, described coordinate information, in order to described cursor operations signal to be converted to the coordinate information relative to described indicating template operates, to be converted to the coordinate information relative to described mobile terminal to be measured according to described size relationship, and to export by described control module.
Preferably, the coordinate information relative to described mobile terminal to be measured is sent to described mobile terminal to be measured by adb order by described control module, to call the operation corresponding to position of the described mobile terminal to be measured of the capable click of default jar contracted affreightment.
A kind of script method for recording, is applied in the test of mobile terminal, provides an indicating template, comprise the steps:
S1. the current screen image of mobile terminal to be measured is obtained;
S2. on described indicating template, described current screen image is shown;
S3. the size relationship of the image of described indicating template display and the current screen image of described mobile terminal to be measured is calculated;
S4. be received in described indicating template display image on input cursor operations signal;
S5. described cursor operations signal is converted to the coordinate information relative to described mobile terminal to be measured according to described size relationship, and exports;
S6. the coordinate information that cursor operation signal operates on described indicating template is recorded, to form test script.
Preferably, in described step S1, obtain the current screen image of described mobile terminal to be measured in the predetermined space moment.
Preferably, the detailed process of described step S5 is: described cursor operations signal is converted to the coordinate information relative to described indicating template operates, described coordinate information is converted to the coordinate information relative to described mobile terminal to be measured according to described size relationship, and exports.
Preferably, in described step S5, the coordinate information relative to described mobile terminal to be measured is sent to described mobile terminal to be measured by adb order, to call the operation corresponding to position of the described mobile terminal to be measured of the capable click of default jar contracted affreightment.
A kind of test macro, apply script recording system described above, comprising:
One mechanical arm, connects described control module, and described control module, according to the described coordinate information in described record cell, controls the operation corresponding to position that described mobile terminal to be measured clicked by described mechanical arm.
A kind of method of testing, applies script method for recording described above, provides a mechanical arm, comprising: according to the described coordinate information in described test script, controls the operation corresponding to position that described mobile terminal to be measured clicked by described mechanical arm.
The beneficial effect of technique scheme:
In the technical program, script recording system adopts processing unit can obtain the image of display unit display and the size relationship of mobile terminal current screen image to be measured, utilize control module cursor operations signal can be converted to coordinate information relative to mobile terminal to be measured, the coordinate information of cursor operation signal can be recorded by record cell, to form test script, manpower automatic recording script can be discharged.Script method for recording is by obtaining the current screen image of mobile terminal to be measured with the size relationship of the current screen image of the image and mobile terminal to be measured that calculate indicating template display, thus cursor operations signal is converted to the coordinate information relative to mobile terminal to be measured according to size relationship, to export, mobile terminal to be measured is tested accordingly, manpower automatic recording script can be discharged.
Accompanying drawing explanation
Fig. 1 is the module map of a kind of embodiment of script recording system of the present invention;
Fig. 2 is the method flow diagram of a kind of embodiment of script method for recording of the present invention;
Fig. 3 is the structural representation of mechanical arm of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all belongs to the scope of protection of the invention.
It should be noted that, when not conflicting, the embodiment in the present invention and the feature in embodiment can combine mutually.
Below in conjunction with the drawings and specific embodiments, the invention will be further described, 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, comprises:
One acquiring unit 1, connects mobile terminal to be tested, in order to obtain the current screen image of mobile terminal to be measured;
One display unit 2, connect acquiring unit 1, display unit 2 provides an indicating template, and indicating template is in order to show current screen image;
One processing unit 4, connects acquiring unit 1 and display unit 2 respectively, in order to the size relationship of the current screen image of the image and mobile terminal to be measured that calculate indicating template display;
One input block 3, connects display unit 2, inputs cursor operations signal in order on the image that shows at indicating template;
One control module 5, connects input block 3, display unit 2 and processing unit 4 respectively, in order to according to size relationship cursor operations signal to be converted to the coordinate information relative to mobile terminal to be measured, and exports;
One record cell 6, connection control unit 5, in order to record the coordinate information that cursor operation signal operates on indicating template, to form test script.
A progressive ground, coordinate information is recorded in txt file by record cell 6, records a test case, and txt file is exactly one and records content for script.
In the present embodiment, script recording system adopts processing unit 4 can obtain the image of display unit 2 display and the size relationship of mobile terminal current screen image to be measured, utilize control module 5 cursor operations signal can be converted to coordinate information relative to mobile terminal to be measured, the coordinate information of cursor operation signal can be recorded by record cell 6, to form test script, manpower automatic recording script can be discharged.
In a preferred embodiment, acquiring unit 1 is in order to obtain the current screen image of mobile terminal to be measured in the predetermined space moment.
In the present embodiment, acquiring unit 1 can comprise a timer, is shown on indicating template to make the snapshot picture of acquiring unit 1 timing acquisition mobile terminal to be measured.Thus reach the function of real-time recording mobile terminal screen image to be measured.
In a preferred embodiment, coordinate information, in order to cursor operations signal to be converted to the coordinate information relative to indicating template operates, to be converted to the coordinate information relative to mobile terminal to be measured according to size relationship, and to export by control module 5.
In the present embodiment, by the algorithm process of processing unit 4, the proportionate relationship of the screen size that the indicating template calculating mobile terminal screen size to be measured and display unit 2 shows, the changing coordinates information adopting control module 5 cursor to be clicked indicating template is converted to the coordinate information relative to the current screen clicking mobile terminal to be measured, and exports corresponding click signal.
In a preferred embodiment, the coordinate information relative to mobile terminal to be measured is sent to mobile terminal to be measured by adb order by control module 5, to call the capable operation corresponding to position clicking mobile terminal to be measured of default jar contracted affreightment.
In the present embodiment, control module 5 is wrapped by the jar that adb command calls is compiled to run the correspondence position clicking mobile terminal screen to be measured.
As shown in Figure 2, a kind of script method for recording, is applied in the test of mobile terminal, provides an indicating template, comprises the steps:
S1. the current screen image of mobile terminal to be measured is obtained;
S2. on indicating template, current screen image is shown;
S3. the size relationship of the image of indicating template display and the current screen image of mobile terminal to be measured is calculated;
S4. be received in indicating template display image on input cursor operations signal;
S5. cursor operations signal is converted to the coordinate information relative to mobile terminal to be measured according to size relationship, and exports;
S6. the coordinate information that cursor operation signal operates on indicating template is recorded, to form test script.
A progressive ground, can be recorded in txt file by coordinate information, record a test case, and txt file is exactly one and records content for script.
In the present embodiment, script method for recording is by obtaining the current screen image of mobile terminal to be measured with the size relationship of the current screen image of the image and mobile terminal to be measured that calculate indicating template display, thus cursor operations signal is converted to the coordinate information relative to mobile terminal to be measured according to size relationship, to export, mobile terminal to be measured is tested accordingly, manpower automatic recording script can be discharged.
In a preferred embodiment, in step sl, the current screen image of mobile terminal to be measured is obtained in the predetermined space moment.
In the present embodiment, a timer can be provided, with the snapshot picture of timing acquisition mobile terminal to be measured, and be shown on indicating template.Thus 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 the coordinate information relative to indicating template operates, and coordinate information is converted to the coordinate information relative to mobile terminal to be measured, and exports according to size relationship.
In the present embodiment, pass through algorithm process, the proportionate relationship of the screen size that the indicating template calculating mobile terminal screen size to be measured and display unit 2 shows, changing coordinates information cursor being clicked indicating template is converted to the coordinate information of the current screen relative to click mobile terminal to be measured, and exports corresponding click signal.
In a preferred embodiment, in step s 5, the coordinate information relative to mobile terminal to be measured is sent to mobile terminal to be measured by adb order, to call the capable operation corresponding to position clicking mobile terminal to be measured of default jar contracted affreightment.
In the present embodiment, wrapped by the jar that adb command calls is compiled to run the correspondence position clicking mobile terminal screen to be measured.
A kind of test macro, apply script recording system described above, comprising:
One mechanical arm, connection control unit 5, control module 5, according to the coordinate information in record cell 6, controls the operation corresponding to position that mobile terminal to be measured clicked by mechanical arm.
In the present embodiment, script recording system can carry out automatic test on third-party testing platform, coordinate information in txt file in record cell 6 can be changed into by control module 5 language that mechanical arm can identify, run by UART (UniversalAsynchronousReceiver/Transmitter, universal asynchronous receiving-transmitting transmitter) protocol integrated test system mechanical arm; Coordinate corresponding on mobile terminal screen to be measured is clicked according to the coordinate information in txt file to make mechanical arm.To realize continual and steady test, release manpower, promotes the object of Consumer's Experience.
Composition graphs 3 illustrates the course of work of test macro: mechanical arm adopts 220V mains-supplied, mechanical arm automatically resets to test initial point, start test script, first linear module 7 of mechanical arm and the second linear module 8 click the relevant position of mobile terminal 9 screen to be measured according to the coordinate information in test script, after having tested, test initial point got back to by mechanical arm, terminates test.
A kind of method of testing, applies script method for recording described above, provides a mechanical arm, comprising: according to the described coordinate information in described test script, controls the operation corresponding to position that described mobile terminal to be measured clicked by described mechanical arm.
In the present embodiment, script method for recording can carry out automatic test on third-party testing platform, by the coordinate information in the txt file of record being changed into the language that mechanical arm can identify, is run by UART protocol integrated test system mechanical arm; Coordinate corresponding on mobile terminal screen to be measured is clicked according to the coordinate information in txt file to make mechanical arm.To realize continual and steady test, release manpower, promotes the object of Consumer's Experience.
The foregoing is only preferred embodiment of the present invention; not thereby embodiments of the present invention and protection domain is limited; to those skilled in the art; should recognize and all should be included in the scheme that equivalent replacement done by all utilizations instructions of the present invention and diagramatic content and apparent change obtain in protection scope of the present invention.

Claims (10)

1. a script recording system, is applied in the test of mobile terminal, it is characterized in that, comprising:
One acquiring unit, connects mobile terminal to be tested, in order to obtain the current screen image of described mobile terminal to be measured;
One display unit, connects described acquiring unit, and described display unit provides an indicating template, and described indicating template is in order to show described current screen image;
One processing unit, connects described acquiring unit and described display unit respectively, in order to the size relationship of current screen image of the image and described mobile terminal to be measured that calculate the display of described indicating template;
One input block, connects described display unit, inputs cursor operations signal in order on the image that shows at described indicating template;
One control module, connects described input block, described display unit and described processing unit respectively, in order to according to described size relationship described cursor operations signal to be converted to the coordinate information relative to described mobile terminal to be measured, and exports;
One record cell, connects described control module, in order to record the coordinate information that cursor operation signal operates on described indicating template, to form test script.
2. script recording system as claimed in claim 1, is characterized in that, described acquiring unit is in order to obtain the current screen image of described mobile terminal to be measured in the predetermined space moment.
3. script recording system as claimed in claim 1, it is characterized in that, described control module is in order to be converted to the coordinate information relative to described indicating template operates by described cursor operations signal, described coordinate information is converted to the coordinate information relative to described mobile terminal to be measured according to described size relationship, and exports.
4. script recording system as claimed in claim 1, it is characterized in that, coordinate information relative to described mobile terminal to be measured is sent to described mobile terminal to be measured by adb order by described control module, to call the operation corresponding to position of the described mobile terminal to be measured of the capable click of default jar contracted affreightment.
5. a script method for recording, is applied in the test of mobile terminal, it is characterized in that, provides an indicating template, comprises the steps:
S1. the current screen image of mobile terminal to be measured is obtained;
S2. on described indicating template, described current screen image is shown;
S3. the size relationship of the image of described indicating template display and the current screen image of described mobile terminal to be measured is calculated;
S4. be received in described indicating template display image on input cursor operations signal;
S5. described cursor operations signal is converted to the coordinate information relative to described mobile terminal to be measured according to described size relationship, and exports;
S6. the coordinate information that cursor operation signal operates on described indicating template is recorded, to form test script.
6. script method for recording as claimed in claim 5, is characterized in that, in described step S1, obtains the current screen image of described mobile terminal to be measured in the predetermined space moment.
7. script method for recording as claimed in claim 5, it is characterized in that, the detailed process of described step S5 is: described cursor operations signal is converted to the coordinate information relative to described indicating template operates, described coordinate information is converted to the coordinate information relative to described mobile terminal to be measured according to described size relationship, and exports.
8. script method for recording as claimed in claim 5, it is characterized in that, in described step S5, coordinate information relative to described mobile terminal to be measured is sent to described mobile terminal to be measured by adb order, to call the operation corresponding to position of the described mobile terminal to be measured of the capable click of default jar contracted affreightment.
9. a test macro, is characterized in that, applies the script recording system as described in claim 1-4, comprising:
One mechanical arm, connects described control module, and described control module, according to the described coordinate information in described record cell, controls the operation corresponding to position that described mobile terminal to be measured clicked by described mechanical arm.
10. a method of testing, it is characterized in that, apply the script method for recording as described in claim 5-8, a mechanical arm is provided, comprise: according to the described coordinate information in described test script, control the operation corresponding to position that described mobile terminal to be measured clicked by described mechanical arm.
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 true CN105183599A (en) 2015-12-23
CN105183599B 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)

Cited By (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
CN109871172A (en) * 2019-01-23 2019-06-11 广州杰赛科技股份有限公司 Mouse click method, device and readable storage medium storing program for executing in a kind of automatic test
CN111913775A (en) * 2020-08-05 2020-11-10 临沂未来世纪人工智能有限公司 Automatic clicking method and device for mobile phone screen and storage medium thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314386B (en) * 2011-09-05 2016-06-29 百度在线网络技术(北京)有限公司 A kind of method and apparatus testing mobile terminal
CN102904996B (en) * 2012-10-16 2016-08-03 深圳创维数字技术有限公司 The method and device of a kind of handset touch panel performance test, system
CN103312850B (en) * 2013-05-10 2016-03-30 江苏科技大学 A kind of mobile phone automatized test macro and method of work
TWI496052B (en) * 2013-12-13 2015-08-11 Ind Tech Res Inst Auto calibration system and auto calibration method
CN104608120B (en) * 2015-02-05 2017-04-26 天津市康凯特软件科技有限公司 Manipulator device for automatic testing of mobile phone and use method
CN104717337B (en) * 2015-04-03 2018-03-02 杭州昕云信息科技有限公司 A kind of method of batch testing mobile phone application and its equipment used

Cited By (4)

* 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
CN109871172A (en) * 2019-01-23 2019-06-11 广州杰赛科技股份有限公司 Mouse click method, device and readable storage medium storing program for executing in a kind of automatic test
CN111913775A (en) * 2020-08-05 2020-11-10 临沂未来世纪人工智能有限公司 Automatic clicking method and device for mobile phone screen and storage medium thereof
CN111913775B (en) * 2020-08-05 2024-04-26 临沂未来世纪人工智能有限公司 Automatic clicking method and device for mobile phone screen and storage medium thereof

Also Published As

Publication number Publication date
CN105183599B (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN102904996B (en) The method and device of a kind of handset touch panel performance test, system
US11280809B2 (en) Method and apparatus for processing oscilloscope signal and oscilloscope
CN104360816A (en) Screen capture method and system
CN103914375A (en) Method and device for testing owner-drawing interface software
CN103513912B (en) A kind of interface switching method and device
CN102624576A (en) Method for automatically testing webpage downloading time of browser and system thereof
CN105183599A (en) Script recording system and method
CN103110230A (en) Intelligent clothing production system and intelligent clothing production method
CN111639002B (en) Sleep power consumption testing method, system, computer equipment and storage medium
CN104268083A (en) Software automatic testing method and device
CN112810553B (en) Data visualization system based on self-adaptive platform automobile open system architecture
CN104951400A (en) Method and device for testing product
CN105094440A (en) Touch screen anti-shaking method and system based on mobile terminal and mobile terminal
CN105138463A (en) Testing method and system for mobile terminal software
CN105354138A (en) Method for determining specific control attribute of mobile phone page
CN105227399A (en) Based on network equipment Debugging message acquisition methods and the system of User space
CN102610002B (en) Machine station state detection system and method
CN105718363B (en) Mobile phone response starting time point acquisition methods and device
CN105138458A (en) Method and system for recording automatic testing scripts by combining intelligent terminal and computer terminal
CN103473170B (en) Test macro and method of testing
CN111078518B (en) Data acquisition method, terminal device and computer readable storage medium
CN106933440B (en) Terminal operation method and device and terminal
CN103713988A (en) Program testing device and program testing method
CN105096215A (en) Patrol record analysis method based on Android system
TWI446234B (en) Wireless-touch display system and method thereof

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.