CN103577290A - Test script playback rhythm control method and system - Google Patents

Test script playback rhythm control method and system Download PDF

Info

Publication number
CN103577290A
CN103577290A CN201310532559.4A CN201310532559A CN103577290A CN 103577290 A CN103577290 A CN 103577290A CN 201310532559 A CN201310532559 A CN 201310532559A CN 103577290 A CN103577290 A CN 103577290A
Authority
CN
China
Prior art keywords
operational order
monitoring
playback
project
measured
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
CN201310532559.4A
Other languages
Chinese (zh)
Other versions
CN103577290B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201310532559.4A priority Critical patent/CN103577290B/en
Publication of CN103577290A publication Critical patent/CN103577290A/en
Application granted granted Critical
Publication of CN103577290B publication Critical patent/CN103577290B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种测试脚本的回放节奏控制方法及系统,所述方法包括以下步骤:S1、测试终端在进行脚本回放时,开启系统状态监测服务;S2、测试终端接收到脚本工具发送的一条操作指令后,判断指令类型及对应的待测项目,同时执行所述操作指令;S3、系统状态监测服务监控到待测项目的预期变化后,将操作指令执行完毕的反馈信息返回至脚本工具,然后接收下一条操作指令直至脚本回放完成。本发明具有很强的适应性,可以根据测试终端的实时状况自动控制回放速度,提高测试效率的同时保证了回放的准确性,直接提高了测试报告的准确度。

A playback rhythm control method and system of a test script, the method comprising the following steps: S1, the test terminal starts the system status monitoring service when the script is played back; S2, after the test terminal receives an operation instruction sent by the script tool, Determine the instruction type and the corresponding item to be tested, and execute the operation instruction at the same time; S3, after the system status monitoring service monitors the expected change of the item to be tested, return the feedback information of the completion of the operation instruction to the script tool, and then receive the next Operate instructions until the script playback is complete. The invention has strong adaptability, can automatically control the playback speed according to the real-time condition of the test terminal, improves the test efficiency, ensures the accuracy of the playback, and directly improves the accuracy of the test report.

Description

A kind of playback tempo control method and system of test script
Technical field
The present invention relates to the technical field of measurement and test of electronic equipment, relate in particular to a kind of playback tempo control method and system of test script.
Background technology
Along with popularizing of mobile intelligent terminal, people are also more and more, more and more higher to the demand of intelligent terminal, and for mobile terminal manufacturer, the test of mobile terminal also becomes increasingly complex, and what occur is increasing automated test tool thereupon.But make a general survey of the automated test tool on market, when playback script, the sequence control between adjacent two orders is mainly adopted in two ways: the one, between two adjacent orders, use fixing time slot; The 2nd, can to an order repeatedly attempt (as do not run succeeded for the first time, can proceed for the second time or more times number trial).These two kinds of modes have obvious defect, are exactly the actual operating state of not considering mobile terminal.Use fixing time slot can not adapt to the actual motion of mobile terminal, tend to the efficiency of test to cause restriction, and for the second way, in the middle of repeatedly attempting, have fixedly time slot, also easily affect testing efficiency.On the other hand, above two kinds of modes also may cause the harmful effect to test result, and the mobile terminal of take carries out the test relevant to network as example, if use above two kinds of modes, test result may change along with the variation of network condition, and then disturbed test.
Therefore, need to develop a kind of test script playback controls technology that can improve testing efficiency and ensure test result reliability.
Summary of the invention
In order to overcome the weak point of the prior art of above-mentioned indication, the invention provides a kind of playback tempo control method and system of test script, be intended to improve testing efficiency and accurate testing degree, reduce the interference causing because of script playback time slot.
The present invention is achieved by the following technical solutions:
A playback tempo control method, comprise the following steps:
S1, test terminal are when carrying out script playback, and open system status monitoring is served;
S2, test terminal receive after an operational order of wscript.exe transmission, and decision instruction type and corresponding project to be measured are carried out described operational order simultaneously;
S3, system state monitoring service monitoring are after the expection variation of project to be measured, and the feedback information that operational order is finished is back to wscript.exe, then receives next operational order until script playback completes.
In the playback tempo control method of test script of the present invention, the type of described operational order comprises clicking operation, long by operation, word input operation, physical button operation, slide.The project to be measured that described operational order is corresponding comprises one or both or three kinds in control state, Activity state, word state.
Further, described step S3 comprises:
The current variation of S31, system state monitoring service monitoring project to be measured, comprises one or both or three kinds in monitoring current control state, current Activity state, current word state;
Whether the current variation of the project to be measured of S32, judgement monitoring gained the follow-up variation of associated project to be measured, if so, continues the follow-up variation of monitoring project to be measured, otherwise directly performs step S33;
S33, the feedback information that operational order is finished are back to wscript.exe, then receive next operational order until script playback completes.
Further, the playback tempo control method of test script of the present invention also comprises: S4, wscript.exe receive after the feedback information that operational order is finished, judge whether script playback completes, if, to system state monitoring service, send script playback and complete order, system state monitoring end of service, otherwise send next operational order.
The present invention also provides a kind of playback tempo control system of test script, comprising:
Preparation module, for test terminal when carrying out script playback, open system state monitoring module;
Instruction analysis and execution module, receive for test terminal after an operational order of wscript.exe transmission, and decision instruction type and corresponding project to be measured are carried out described operational order simultaneously;
System state monitoring module, for monitoring the variation of project to be measured;
Feedback module, for monitoring after the expection variation of project to be measured, the feedback information that operational order is finished is back to wscript.exe, then receives next operational order until script playback completes.
In the playback tempo control system of test script of the present invention, the type of described operational order comprises clicking operation, long by operation, word input operation, physical button operation, slide.The project to be measured that described operational order is corresponding comprises one or both or three kinds in control state, Activity state, word state.
Further, described system state monitoring module comprises:
Current state monitoring means, for monitoring the current variation of project to be measured, comprises one or both or three kinds in monitoring current control state, current Activity state, current word state;
Succeeding state monitoring means, for judging the whether follow-up variation of associated project to be measured of current variation of the project to be measured of monitoring gained, if so, continues the follow-up variation of monitoring project to be measured, otherwise directly starts feedback module.
Further, the playback tempo control system of test script of the present invention also comprises: stop monitoring modular, for wscript.exe, receive after the feedback information that operational order is finished, judge whether script playback completes, if, to system state monitoring module, send script playback and complete order, termination system state monitoring module, otherwise send next operational order.
Compared with prior art, the present invention is by the state variation of control and measuring terminal, control the playback progress of directive script, the script playback mode that is different from existing fixedly time slot, has very strong adaptability, can automatically control playback speed according to the real time status of test terminal, intelligently test script is carried out to playback, the interference that minimizing causes because of playback time slot, has guaranteed the accuracy of playback when improving testing efficiency, directly improved the precision of test report.
Accompanying drawing explanation
The playback tempo control method schematic flow sheet of the test script that accompanying drawing 1 is an embodiment of the present invention;
The framework schematic diagram of the playback tempo control system of the test script that accompanying drawing 2 is an embodiment of the present invention.
Embodiment
For the ease of those skilled in the art's understanding, below in conjunction with drawings and Examples, the invention will be further described.
A playback tempo control method, comprise the following steps:
S1, test terminal are when carrying out script playback, and open system status monitoring is served;
S2, test terminal receive after an operational order of wscript.exe transmission, and decision instruction type and corresponding project to be measured are carried out described operational order simultaneously;
S3, system state monitoring service monitoring are after the expection variation of project to be measured, and the feedback information that operational order is finished is back to wscript.exe, then receives next operational order until script playback completes.
Activity is an assembly of being responsible for user interactions, and in Activity, all operations is all closely related with user, can show appointment control by setContentView (View).In android application, an Activity is exactly an independent screen conventionally, can show that some controls also can monitor and process user's event and make response above it.
In step S1, when test terminal starts playback script, open system state monitoring service, this serves Activity state variation, control state variation, word state variation of main monitoring system etc.
In step S2, when playback instrument sends an operational order (as button click, open application, slip screen etc.) to test terminal, the type that system state monitoring service judgement is current sent instructions, according to the instruction type judgement sending, need the project to be measured of monitoring (as button click, system state monitoring service need to be monitored control state variation and Activity state variation simultaneously), simultaneity factor is carried out this operational order.The operational order of button click of take is example, when the operational order of system state monitoring service detection to the button click of playback instrument transmission, judge that it is clicking operation type, and start to detect control state variation, Activity state variation, simultaneity factor is carried out the operation of button click.In the present invention, the type of described operational order includes but not limited to clicking operation, long by operation, word input operation, physical button operation, slide.The project to be measured that described operational order is corresponding can comprise one or both or three kinds in control state, Activity state, word state.
Further, described step S3 comprises:
The current variation of S31, system state monitoring service monitoring project to be measured, comprises one or both or three kinds in monitoring current control state, current Activity state, current word state;
Whether the current variation of the project to be measured of S32, judgement monitoring gained the follow-up variation of associated project to be measured, if so, continues the follow-up variation of monitoring project to be measured, otherwise directly performs step S33;
S33, the feedback information that operational order is finished are back to wscript.exe, then receive next operational order until script playback completes.
In step S3, system state monitoring service is monitored for project to be measured, when project generation to be measured variation in line being detected, also can judge whether that the follow-up variation that can cause project to be measured occurs (as when Activity state variation being detected according to its current variable condition, whether loaded) if also needing further to monitor next Activity interface, if can cause follow-up variation, continue to wait for that this follow-up variation occurs, to monitoring after the follow-up variation of Activity state, the feedback information just this operational order being finished is sent to wscript.exe, if can not cause that succeeding state occurs, the feedback information that system state monitoring service is finished this operational order is so sent to wscript.exe, wscript.exe receives after the feedback information that instruction is finished, continue to send next instruction to test terminal, so repeatedly, until script be finished.Take button click operational order as example, and after system is carried out click push-botton operation, there is variation to Activity state in system state monitoring service detection, and further judge whether Activity state variation can cause that succeeding state changes.The Activity state relation completing due to the current variation of Activity state and follow-up loading, therefore, when Activity state variation being detected, need further monitoring Activity interface whether to load, the follow-up variation of Activity state is monitored, to monitoring after the follow-up variation of Activity state, the feedback information just this operational order being finished is sent to wscript.exe.Following table 1 provides instruction type the to be measured project that need monitoring corresponding with it.
Instruction type Project to be measured
Clicking operation Control state, Activity state
Long by operation Control state, Activity state
Word input operation Word state
Physical button operation Control state, Activity state
Slide Control state
Form 1
Further, the playback tempo control method of test script of the present invention also comprises: S4, wscript.exe receive after the feedback information that operational order is finished, judge whether script playback completes, if, to system state monitoring service, send script playback and complete order, system state monitoring end of service, otherwise send next operational order.When wscript.exe receives after the feedback information that operational order is finished, after judgement present instruction playback completes, judge whether this present instruction also has subsequent instructions, continues to send to test terminal if having, otherwise finish playback; Wscript.exe sends it back to system state monitoring service after the order discharging, this system state monitoring service auto-destruct.
Test terminal in the present invention comprises the intelligent terminals such as smart mobile phone, panel computer.The playback tempo control method flow process that the invention also discloses the test script of a kind of embodiment, as shown in Figure 1, comprises the following steps:
S101, the service of open system status monitoring, start playback script;
S102, wscript.exe send an operational order to test terminal;
S103, test terminal receive operational order, and decision instruction type is clicking operation;
Described operational order is carried out in S104, test terminal;
The current variation that S105, system state monitoring service monitoring arrive project to be measured, comprises control state variation and Activity state variation;
Whether the current variation of the project to be measured of S106, judgement monitoring gained the follow-up variation of associated project to be measured, if so, performs step S107, otherwise directly performs step S108;
S107, continue to monitor after the follow-up variation of project to be measured execution step S108;
S108, the feedback information that operational order is finished are back to wscript.exe;
S109, wscript.exe receive after the feedback information that operational order is finished, judge whether script playback completes, be i.e. after current operation instruction, whether also have subsequent instructions, if, execution step S110, continues to send next operational order to test terminal otherwise return to step S102;
S110, wscript.exe send script playback to system state monitoring service and complete order;
S111, system state monitoring service auto-destruct.
The present invention also provides a kind of playback tempo control system of test script, as shown in Figure 2, comprising:
Preparation module 21, for test terminal when carrying out script playback, open system state monitoring module;
Instruction analysis and execution module 22, receive for test terminal after an operational order of wscript.exe transmission, and decision instruction type and corresponding project to be measured are carried out described operational order simultaneously;
System state monitoring module 23, for monitoring the variation of project to be measured;
Feedback module 24, for monitoring after the expection variation of project to be measured, the feedback information that operational order is finished is back to wscript.exe, then receives next operational order until script playback completes.
In the playback tempo control system of test script of the present invention, the type of described operational order includes but not limited to clicking operation, long by operation, word input operation, physical button operation, slide.The project to be measured that described operational order is corresponding can comprise one or both or three kinds in control state, Activity state, word state.
Further, described system state monitoring module 23 comprises:
Current state monitoring means 231, for monitoring the current variation of project to be measured, comprises one or both or three kinds in monitoring current control state, current Activity state, current word state;
Succeeding state monitoring means 232, for judging the whether follow-up variation of associated project to be measured of current variation of the project to be measured of monitoring gained, if so, continues the follow-up variation of monitoring project to be measured, otherwise directly starts feedback module.
Further, the playback tempo control system of test script of the present invention also comprises: stop monitoring modular 25, for wscript.exe, receive after the feedback information that operational order is finished, judge whether script playback completes, if, to system state monitoring module, send script playback and complete order, termination system state monitoring module, otherwise send next operational order.
Above content is in conjunction with concrete optimal way further description made for the present invention, should not assert that specific embodiment of the invention is confined to above explanation.For those skilled in the art, without departing from the inventive concept of the premise, can also make some simple deduction or replace, within the definite protection domain of the claim that all should be considered as being submitted to by the present invention.

Claims (10)

1. a playback tempo control method for test script, is characterized in that, comprises the following steps:
S1, test terminal are when carrying out script playback, and open system status monitoring is served;
S2, test terminal receive after an operational order of wscript.exe transmission, and decision instruction type and corresponding project to be measured are carried out described operational order simultaneously;
S3, system state monitoring service monitoring are after the expection variation of project to be measured, and the feedback information that operational order is finished is back to wscript.exe, then receives next operational order until script playback completes.
2. the playback tempo control method of test script according to claim 1, is characterized in that: the type of described operational order comprises clicking operation, long by operation, word input operation, physical button operation, slide.
3. the playback tempo control method of test script according to claim 1, is characterized in that: the project to be measured that described operational order is corresponding comprises one or both or three kinds in control state, Activity state, word state.
4. the playback tempo control method of test script according to claim 3, is characterized in that, described step S3 comprises:
The current variation of S31, system state monitoring service monitoring project to be measured, comprises one or both or three kinds in monitoring current control state, current Activity state, current word state;
Whether the current variation of the project to be measured of S32, judgement monitoring gained the follow-up variation of associated project to be measured, if so, continues the follow-up variation of monitoring project to be measured, otherwise directly performs step S33;
S33, the feedback information that operational order is finished are back to wscript.exe, then receive next operational order until script playback completes.
5. according to the playback tempo control method of the test script described in any one in claim 1~4, it is characterized in that, also comprise:
S4, wscript.exe receive after the feedback information that operational order is finished, and judge whether script playback completes, and if so, to system state monitoring service, send script playback and complete order, system state monitoring end of service, otherwise send next operational order.
6. a playback tempo control system for test script, is characterized in that, comprising:
Preparation module, for test terminal when carrying out script playback, open system state monitoring module;
Instruction analysis and execution module, receive for test terminal after an operational order of wscript.exe transmission, and decision instruction type and corresponding project to be measured are carried out described operational order simultaneously;
System state monitoring module, for monitoring the variation of project to be measured;
Feedback module, for monitoring after the expection variation of project to be measured, the feedback information that operational order is finished is back to wscript.exe, then receives next operational order until script playback completes.
7. the playback tempo control system of test script according to claim 6, is characterized in that: the type of described operational order comprises clicking operation, long by operation, word input operation, physical button operation, slide.
8. the playback tempo control system of test script according to claim 6, is characterized in that: the project to be measured that described operational order is corresponding comprises one or both or three kinds in control state, Activity state, word state.
9. the playback tempo control system of test script according to claim 8, is characterized in that, described system state monitoring module comprises:
Current state monitoring means, for monitoring the current variation of project to be measured, comprises one or both or three kinds in monitoring current control state, current Activity state, current word state;
Succeeding state monitoring means, for judging the whether follow-up variation of associated project to be measured of current variation of the project to be measured of monitoring gained, if so, continues the follow-up variation of monitoring project to be measured, otherwise directly starts feedback module.
10. according to the playback tempo control system of the test script described in any one in claim 6~9, it is characterized in that, also comprise:
Stop monitoring modular, for wscript.exe, receive after the feedback information that operational order is finished, judge whether script playback completes, if, to system state monitoring module, send script playback and complete order, termination system state monitoring module, otherwise send next operational order.
CN201310532559.4A 2013-11-01 2013-11-01 Test script playback rhythm control method and system Expired - Fee Related CN103577290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310532559.4A CN103577290B (en) 2013-11-01 2013-11-01 Test script playback rhythm control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310532559.4A CN103577290B (en) 2013-11-01 2013-11-01 Test script playback rhythm control method and system

Publications (2)

Publication Number Publication Date
CN103577290A true CN103577290A (en) 2014-02-12
CN103577290B CN103577290B (en) 2017-04-19

Family

ID=50049121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310532559.4A Expired - Fee Related CN103577290B (en) 2013-11-01 2013-11-01 Test script playback rhythm control method and system

Country Status (1)

Country Link
CN (1) CN103577290B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461694A (en) * 2014-12-17 2015-03-25 北京奇虎科技有限公司 Multi-script playback method and device
CN105872534A (en) * 2016-04-05 2016-08-17 Tcl海外电子(惠州)有限公司 Terminal testing method and device
CN108874569A (en) * 2018-05-31 2018-11-23 北京三快在线科技有限公司 The method, apparatus and electronic equipment of event response and file generated
CN110928759A (en) * 2018-09-19 2020-03-27 福建天泉教育科技有限公司 Message push test method and terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175284A (en) * 2006-11-01 2008-05-07 联想移动通信科技有限公司 Function testing method of portable electronic apparatus
CN102495799A (en) * 2011-12-02 2012-06-13 刘伟 Automatic test system and method of movable terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175284A (en) * 2006-11-01 2008-05-07 联想移动通信科技有限公司 Function testing method of portable electronic apparatus
CN102495799A (en) * 2011-12-02 2012-06-13 刘伟 Automatic test system and method of movable terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461694A (en) * 2014-12-17 2015-03-25 北京奇虎科技有限公司 Multi-script playback method and device
CN104461694B (en) * 2014-12-17 2018-05-04 北京奇虎科技有限公司 More script back methods and device
CN105872534A (en) * 2016-04-05 2016-08-17 Tcl海外电子(惠州)有限公司 Terminal testing method and device
CN108874569A (en) * 2018-05-31 2018-11-23 北京三快在线科技有限公司 The method, apparatus and electronic equipment of event response and file generated
CN108874569B (en) * 2018-05-31 2021-07-30 北京三快在线科技有限公司 Event response and file generation method and device and electronic equipment
CN110928759A (en) * 2018-09-19 2020-03-27 福建天泉教育科技有限公司 Message push test method and terminal
CN110928759B (en) * 2018-09-19 2024-03-01 福建天泉教育科技有限公司 Message pushing testing method and terminal

Also Published As

Publication number Publication date
CN103577290B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
CN102722434B (en) Performance test method and tool aiming at Linux process scheduling
CN103941207B (en) Automatic power-measuring endpoint detection methods and system thereof
CN102708016B (en) The software and hardware method for testing reliability of task based access control section and system
CN103077114B (en) Based on the automated testing method of temperature measuring equipment communication protocol
CN103699122A (en) Finished car controller test platform and control method
TW201321968A (en) Test method for handheld electronic device application
CN102879673A (en) Method and device for testing accuracy of touch screen
CN103577290A (en) Test script playback rhythm control method and system
CN107181607A (en) One kind is based on application system Fault Locating Method and device end to end
CN105260077B (en) The detection method of electronic equipment and its capacitive touch screen
CN108957385A (en) A kind of electric energy measuring equipment automatic calibration line exception epitope confirmation method and device
US20120174231A1 (en) Assessing System Performance Impact of Security Attacks
US10820274B2 (en) Systems and methods for testing power consumption of electronic devices
US20240411605A1 (en) Method and system for processing computing task
CN109831348A (en) Automatic jig test method, equipment and system
CN109738694A (en) A kind of chip power-consumption prediction technique, device, electronic equipment and storage medium
CN103617342B (en) A kind of power grid state estimation multi-algorithm fusion system
CN114168432B (en) Application program power consumption detection method and device, electronic equipment and storage medium
CN105677689B (en) Log recording method and device
CN105739478A (en) Missile fault prediction device and method
CN105487958A (en) Processor internal behavior monitoring method
CN105095093A (en) Intelligent terminal performance test method and system
CN103984625A (en) System robustness testing method based on use rate analysis
CN106980715A (en) A kind of method for not having to add ICT measuring point networks in quick inspection PCB
CN110307619A (en) Method and device for accurately testing unit equipment, unit equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 523860 Guangdong oper Mobile Communication Co., Ltd., No. 18, Wusha Haibin Road, Chang'an Town, Dongguan City, Guangdong Province

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 523860 Guangdong oper Mobile Communication Co., Ltd., No. 18, Wusha Haibin Road, Chang'an Town, Dongguan City, Guangdong Province

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170419

CF01 Termination of patent right due to non-payment of annual fee