CN106708528A - Script generating method and device - Google Patents

Script generating method and device Download PDF

Info

Publication number
CN106708528A
CN106708528A CN201611236929.XA CN201611236929A CN106708528A CN 106708528 A CN106708528 A CN 106708528A CN 201611236929 A CN201611236929 A CN 201611236929A CN 106708528 A CN106708528 A CN 106708528A
Authority
CN
China
Prior art keywords
operation behavior
terminal device
information
behavior information
picture
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.)
Pending
Application number
CN201611236929.XA
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201611236929.XA priority Critical patent/CN106708528A/en
Publication of CN106708528A publication Critical patent/CN106708528A/en
Priority to PCT/CN2017/118906 priority patent/WO2018121582A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • User Interface Of Digital Computer (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a script generating method and device. The method includes: displaying a picture comprising the information of each widget of a terminal equipment UI interface on a browser; sequentially capturing user's picture operation behaviors on the browser, and acquiring related operation behavior information; recording the operation behavior information according to the user's operation sequence on the browser; saving the recorded operation behavior information, and generating script files corresponding to the operation behavior information. The script generating method and device has the advantages that a UI tester does not need to manual compile the script files, the technical requirements of the terminal equipment UI tester are lowered, the workload of the UI tester is relieved greatly, manpower and time consumed during testing are saved, and testing efficiency is increased greatly.

Description

Scenario generation method and device
Technical field
The present invention relates to computer software fields, and in particular to a kind of scenario generation method and device.
Background technology
UI (User Interface, user interface) interface of terminal device includes many control informations, such as various soft Part APP, Weather information, temporal information, phone prompt operation, homepage Home key, return key etc..In the UI of using terminal equipment During interface, by operations such as click, slip, draggings, terminal device can be made to perform corresponding function, it is user-friendly. To ensure the correctness of the function that terminal device is performed, it is necessary to enter to the function of these execution of operation and terminal device to operating Row test.
To the test at the UI interfaces of terminal device, it is necessary to UI testers write special UI test scripts.UI tests pin Originally its corresponding script is needed to use so that the technical merit requirement to UI testers is higher.Meanwhile, a large amount of UI tests Writing for script needs to spend longer time and manpower, inefficient.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on State the scenario generation method and device of problem.
According to an aspect of the invention, there is provided a kind of scenario generation method, it includes:
Display on a web browser includes the picture of each control information of terminal device UI interfaces;
The behavior that user operates picture on a web browser is caught successively, obtains related operation behavior information;
Operation behavior information is recorded according to the order that user operates on a web browser;
The operation behavior information of keeping records, generates script file corresponding with operation behavior information.
According to another aspect of the present invention, there is provided a kind of script generation device, it includes:
Synchronization module, is suitable to show the picture including each control information of terminal device UI interfaces on a web browser;
Capture module, is suitable to catch the behavior that user operates picture on a web browser successively, obtains related operation behavior Information;
Logging modle, is suitable to be recorded operation behavior information according to the order that user operates on a web browser;
Generation module, is suitable to the operation behavior information of keeping records, generates script file corresponding with operation behavior information.
According to scenario generation method and device that the present invention is provided, display on a web browser includes that terminal device UI interfaces are each The picture of individual control information;The behavior that user operates picture on a web browser is caught successively, obtains related operation behavior information; Operation behavior information is recorded according to the order that user operates on a web browser;The operation behavior information of keeping records, it is raw Into script file corresponding with operation behavior information.Using the present invention, can by the operation of the picture to being shown on browser, Get the corresponding operation behavior information to terminal device UI interfaces.And operation behavior information can be entered according to operation order Row record, and preserve.Operation behavior information to preserving can directly generate corresponding script file, without UI testers Member writes script file manually.The technical requirements to terminal device UI testers are reduced, UI testers are significantly reduced Workload, save manpower, the time spent during test, greatly improve testing efficiency.
Described above is only the general introduction of technical solution of the present invention, in order to better understand technological means of the invention, And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by specific embodiment of the invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows the flow chart of scenario generation method according to an embodiment of the invention;
Fig. 2 shows the flow chart of scenario generation method in accordance with another embodiment of the present invention;
Fig. 3 shows the flow chart of the scenario generation method according to another embodiment of the invention;
Fig. 4 shows the flow chart of the scenario generation method according to another embodiment of the invention;
Fig. 5 shows the functional block diagram of script generation device according to an embodiment of the invention;
Fig. 6 shows the functional block diagram of script generation device in accordance with another embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.Conversely, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Fig. 1 shows the flow chart of scenario generation method according to an embodiment of the invention.As shown in figure 1, script is given birth to Following steps are specifically included into method:
Step S101, on a web browser display includes the picture of each control information of terminal device UI interfaces.
It is using the process service in terminal device, the UI interfaces of terminal device is synchronous with browser, and on a web browser It is corresponding to show picture corresponding with terminal device UI interfaces.Wherein, each control of terminal device UI interfaces is included in picture Information.Such as shown on terminal device UI interfaces including such as certain software APP, phone prompt operation icon, Home key, return key Each control information, the picture for showing on a web browser accordingly also includes these control informations.
Further, the operation of the picture for showing on a web browser, can be synchronized to terminal device with corresponding UI interfaces.
Step S102, catches the behavior that user operates picture on a web browser successively, obtains related operation behavior information.
The behavior that user operates picture corresponding with terminal device UI interfaces on a web browser is caught successively, obtains correlation Operation behavior information.
Related operation behavior information includes the control letter as obtained the corresponding terminal device UI interfaces of user's operation picture Breath.Each control has its corresponding coordinate position in picture, operates the behavior of picture to act on the coordinate of picture according to user Position is calculated, and can obtain the control in the specific corresponding picture in the position, and then can get corresponding terminal setting The information of the control at standby UI interfaces.Control information includes being held in the corresponding control Id in terminal device UI interfaces, control such as control Class name, the corresponding word of control title, the coordinate position of control in picture during row etc..
Related operation behavior information also includes being operated on a web browser as caught user the behavior of picture, is converted and obtains Get the information of the operation behavior at corresponding terminal device UI interfaces.Operation behavior after conversion is included as clicked on terminal device UI The control at interface, the control for sliding terminal device UI interfaces, pulling terminal device UI interfaces, it is input into text at terminal device UI interfaces Word, the operated key such as behavior such as Home key, return key at touching terminal device UI interfaces.The information of operation behavior is included such as operation Parameter that the title of behavior, terminal device are related to when operation behavior is performed etc..Different operating behavior is related to different parameters, ginseng Number can be such as duration, call address, Transfer Parameters, coordinate position.If operation behavior is to click on during control, the parameter being related to It is call address;When operation behavior is sliding interface, the parameter being related to is coordinate address, including slides beginning and slide what is terminated Coordinate position;When operation behavior is the stand-by period between two operation behaviors, it is related to the specific duration of parameter, such as 1.2s.
More than it is for example, be configured according to actual conditions when implementing, is not specifically limited herein.
Step S103, operation behavior information is recorded according to the order that user operates on a web browser.
Step S104, the operation behavior information of keeping records generates script file corresponding with operation behavior information.
The order that the operation behavior information that step S102 is got is operated according to user on the picture that browser shows Recorded successively, the operation behavior information of the record is preserved.Operation behavior information after preservation can also be generated and it Corresponding script file, such as json script files.Script file goes for testing the terminal device of different model, Whether the operation behavior information preserved in test script file can normally be run on the terminal device of different model, to realize Detection to terminal device.
According to the scenario generation method that the present invention is provided, display on a web browser includes each control of terminal device UI interfaces The picture of information;The behavior that user operates picture on a web browser is caught successively, obtains related operation behavior information;Will operation Behavioural information is recorded according to the order that user operates on a web browser;The operation behavior information of keeping records, generation and behaviour Make the corresponding script file of behavioural information.Using the present invention, can be got by the operation of the picture to being shown on browser The corresponding operation behavior information to terminal device UI interfaces.And operation behavior information can be remembered according to operation order Record, and preserve.Operation behavior information to preserving can directly generate corresponding script file, without UI tester's hands It is dynamic to write script file.The technical requirements to terminal device UI testers are reduced, the work of UI testers is significantly reduced Measure, save manpower, the time spent during test, greatly improve testing efficiency.
Fig. 2 shows the flow chart of scenario generation method in accordance with another embodiment of the present invention.As shown in Fig. 2 script Generation method specifically includes following steps:
Step S201, on a web browser display includes the picture of each control information of terminal device UI interfaces.
Step S202, catches the behavior that user operates picture on a web browser successively, obtains related operation behavior information.
Step S203, operation behavior information is recorded according to the order that user operates on a web browser.
Above step can step S101-S103 in the embodiment of Parameter Map 1, will not be repeated here.
Step S204, changes the record of operation behavior information.
According to test needs, recorded operation behavior information can also be modified.Behaviour that such as ought be recorded When making some operation behavior information in behavioural information and need not be tested again, recorded operation behavior information can be deleted In corresponding not re-test at least one operation behavior information;If recorded operation behavior information is not suitable for surveying During examination, all recorded operation behavior information can also be deleted, re-execute step S202-S203, record new operation Behavioural information.Or when cannot be obtained to the operation behavior of picture by user for some operation behavior information, such as it is input into text Word searches control etc..These cannot can be stored in by user to the operation behavior information that the operation behavior of picture is obtained pre- If operation behavior information in.At least one operation behavior information is selected from default operation behavior information, is added it to In the operation behavior information for having recorded.After addition, the order of the operation behavior information after addition can also be further adjusted, will The operation behavior information of addition is adjusted to the order for needing.
Step S205, the operation behavior information of keeping records generates script file corresponding with operation behavior information.
The operation behavior information of keeping records, corresponding script can also be generated to the operation behavior information after preservation File, such as json script files.Script file goes for testing the terminal device of different model, test script text Whether the operation behavior information preserved in part can normally be run on the terminal device of different model, to realize to terminal device Detection.
According to the scenario generation method that the present invention is provided, what operation behavior information was operated on a web browser according to user After order is recorded, the record of operation behavior information can also be changed sequentially, delete at least one operation behavior information, or from At least one operation behavior information is selected to be added in the operation behavior information for having recorded in default operation behavior information so that Operation behavior information can modify adjustment according to testing requirement, more flexibly, the different test requests of more convenient reply, make Obtaining UI testers need not manually write script file again.The technical requirements to terminal device UI testers are reduced, greatly The big workload for alleviating UI testers, saves manpower, the time spent during test, greatly improves testing efficiency.
Fig. 3 shows the flow chart of the scenario generation method according to another embodiment of the invention.As shown in figure 3, script Generation method specifically includes following steps:
Step S301, on a web browser display includes the picture of each control information of terminal device UI interfaces.
Step S302, catches the behavior that user operates picture on a web browser successively, obtains related operation behavior information.
Step S303, operation behavior information is recorded according to the order that user operates on a web browser.
Above step can step S101-S103 in the embodiment of Parameter Map 1, will not be repeated here.
Step S304, by an operation behavior information transfer to terminal device, so that terminal device is believed according to operation behavior Breath, performs corresponding operation behavior.
Step S305, the corresponding operation behavior object information that receiving terminal apparatus are returned.
Step S306, according to operation behavior object information, judges whether operation behavior normally performs in terminal device.
The operation behavior information of acquisition is transferred to terminal device by modes such as such as network requests, for terminal device according to Operation behavior information, performs corresponding operation behavior.Afterwards, the result letter of the corresponding operation behavior that receiving terminal apparatus are returned Breath.According to operation behavior object information, binding operation behavioural information, it can be determined that whether operation behavior is normally held in terminal device OK.If operation behavior information is to click on certain control at terminal device UI interfaces, the control is certain software application APP figures installed Mark, the object information of the corresponding operation behavior of the terminal device return of reception is the opening software application, it can be determined that operation Behavior is normally performed in terminal device;If operation behavior information is to pull certain control at terminal device UI interfaces to specific bit Put, the control is certain software application APP icons installed, the result letter of the corresponding operation behavior of the terminal device return of reception Cease for software application APP icons be moved to specify untill, it can be determined that operation behavior is normally performed in terminal device.More than It is for example, be configured according to actual conditions when implementing, is not specifically limited herein.
If judging, operation behavior is normally performed in terminal device, performs step S307, otherwise, performs step S308.
Step S307, if operation behavior is normally performed in terminal device, by the corresponding operation behavior information of operation behavior Record carries out normal labeled.
Operation behavior is carried out the record of the corresponding operation behavior information of the operation behavior when terminal device is normally performed , such as can be marked for corresponding operation behavior information in a browser by normal labeled, mark the operation behavior information to test Pass through.Can be marked using such as color, word during mark, will the normal operation behavior information flag for performing be green, Or the normal letter symbol for performing of addition is marked before operation behavior information.
After normal labeled, step S310 is performed.
Step S308, if operation behavior is in the abnormal execution of terminal device, by the corresponding operation behavior information of operation behavior Record carry out error flag, return to error message prompting.
The record of the corresponding operation behavior information of operation behavior is carried out mistake by operation behavior in the abnormal execution of terminal device It is mis-marked, such as corresponding operation behavior information can be marked in a browser, mark the operation behavior information to ask Topic.Can be marked using such as color, word during mark, by the operation behavior information flag of abnormal execution for it is red, Or the letter symbol of abnormal execution is added before operation behavior information be marked.Can be with corresponding return error message Prompting.Such as shift position is incorrect for error message prompting, be not switched on corresponding control, think time exceedes the duration for setting.
Step S309, changes the record of operation behavior information.
Operation behavior is analyzed in the abnormal execution of terminal device according to the error message prompting for returning, can be right The record of the modification operation behavior information answered, such as deletes origin operation behavioural information, add again one it is new on thinking when Between parameter duration operation behavior information more long etc..
Further, after the modification, step S304 (not shown)s can also be re-executed, the operation behavior letter that will be changed Breath is transferred to terminal device, performs step S304-S309, with test the operation behavior information whether can terminal device normally hold OK.
Step S310, judges whether user triggers preservation operation.
Judge whether user triggers preservation operation, if user triggers preservation operation, perform step S311, otherwise, hold Row step S302, continues to catch the behavior that user operates picture on a web browser, obtains related operation behavior information.
Step S311, the operation behavior information of keeping records generates script file corresponding with operation behavior information.
The step refers to the step S104 in Fig. 1 embodiments, will not be repeated here.
Further, because step S303 is performed in browser, step S304 is transferred to terminal device, and two steps can not Limit specific execution sequencing, it is also possible to while performing.
According to the scenario generation method that the present invention is provided, by an operation behavior information transfer to terminal device, for end End equipment performs corresponding operation behavior according to operation behavior information.The corresponding operation behavior knot that receiving terminal apparatus are returned Fruit information.According to operation behavior object information, judge whether operation behavior normally performs in terminal device.If operation behavior is at end The abnormal execution of end equipment, can also be analyzed according to the error message prompting for returning, and change operation behavior information.So as to survey Whether the operation behavior information of trial record is reasonable, if can be used for testing terminal device UI interfaces.Meanwhile, record behaviour Making behavioural information can also modify adjustment according to actual conditions, more flexibly so that UI testers need not be manual again Write script file.The technical requirements to terminal device UI testers are reduced, the work of UI testers is significantly reduced Amount, saves manpower, the time spent during test, greatly improves testing efficiency.
Fig. 4 shows the flow chart of the scenario generation method according to another embodiment of the invention.As shown in figure 4, script Generation method specifically includes following steps:
Step S401, on a web browser display includes the picture of each control information of terminal device UI interfaces.
Step S402, catches the behavior that user operates picture on a web browser successively, obtains related operation behavior information.
Step S403, operation behavior information is recorded according to the order that user operates on a web browser.
Step S404, changes the record of operation behavior information sequentially.
Above step can step S201-S204 in the embodiment of Parameter Map 2, will not be repeated here.
Step S404 is optional step in the present embodiment, if the record order of operation behavior information need not be changed, can Skip the step.
Step S405, by least one operation behavior information transfer to terminal device, so that terminal device is gone according to operation It is information, performs corresponding operation behavior.
Step S406, the corresponding operation behavior object information that receiving terminal apparatus are returned.
Step S407, according to operation behavior object information, judges whether operation behavior normally performs in terminal device.
Step S408, if operation behavior is normally performed in terminal device, by the corresponding operation behavior information of operation behavior Record carries out normal labeled.
After normal labeled, step S411 is performed.
Step S409, if operation behavior is in the abnormal execution of terminal device, by the corresponding operation behavior information of operation behavior Record carry out error flag, return to error message prompting.
Step S410, changes the record of operation behavior information.
Step S405-S410 refers to the description of the step S303-S307 in Fig. 3 embodiments, will not be repeated here.
Step S411, the operation behavior information that has recorded of judgement whether end of transmission.
If the operation behavior information for having recorded is transferred to terminal device, step S412 is performed.Otherwise, step is performed S405, the latter operation behavioural information of the operation behavior information of this record for transmitting is continued to be transferred to terminal device, is continued Step S405-S410 is performed, whether can normally be performed in terminal device with the operation behavior information of test record.
Step S412, the operation behavior information of keeping records generates script file corresponding with operation behavior information.
The step refers to the step S104 in Fig. 1 embodiments, will not be repeated here.
According to the scenario generation method that the present invention is provided, at least one the operation behavior information transfer for recording is set to terminal It is standby, so that terminal device is according to operation behavior information, perform corresponding operation behavior.The corresponding behaviour that receiving terminal apparatus are returned Make behavior outcome information.According to operation behavior object information, judge whether operation behavior normally performs in terminal device.Can be with whole It is no reasonable that test user's operation behavior information order of body is provided that, if can be used for surveying terminal device UI interfaces Examination.Meanwhile, record operation behavior information can also modify adjustment according to actual conditions, more flexibly so that UI testers Member need not manually write script file again.The technical requirements to terminal device UI testers are reduced, UI is significantly reduced The workload of tester, saves manpower, the time spent during test, greatly improves testing efficiency.
Fig. 5 shows the functional block diagram of script generation device according to an embodiment of the invention.As shown in figure 5, script Generating means include such as lower module:
Synchronization module 510, is suitable to show the picture including each control information of terminal device UI interfaces on a web browser.
Synchronization module 510 is synchronous with browser by the UI interfaces of terminal device using the process service in terminal device, and It is corresponding on a web browser to show picture corresponding with terminal device UI interfaces.Wherein, terminal device UI circle is included in picture Each control information of face.As shown including such as certain software APP, phone prompt operation icon, Home on terminal device UI interfaces Each control information such as key, return key, the picture for showing on a web browser accordingly also includes these control informations.
Further, the operation of picture of the synchronization module 510 for showing on a web browser, can be with corresponding by its synchronization To the UI interfaces of terminal device.
Capture module 520, is suitable to catch the behavior that user operates picture on a web browser successively, obtains related operation row It is information.
Capture module 520 catches the row that user operates picture corresponding with terminal device UI interfaces on a web browser successively To obtain related operation behavior information.
Related operation behavior information includes that capture module 520 such as obtains corresponding terminal device UI circle of user's operation picture The control information in face.Each control has its corresponding coordinate position in picture, and capture module 520 operates picture according to user The coordinate position that behavior acts on picture is calculated, and can obtain the control in the specific corresponding picture in the position, and then catch Catching module 520 can get the information of the control at corresponding terminal device UI interfaces.Control information is included if control is at end Class name, the corresponding word of control title, seat of the control in picture when the corresponding control Id in end equipment UI interfaces, control are performed Cursor position etc..
Related operation behavior information also includes that capture module 520 such as catches the row that user operates picture on a web browser To be converted the information of the operation behavior for getting corresponding terminal device UI interfaces.Operation behavior after conversion is included such as The control at terminal device UI interfaces is clicked on, terminal device UI interfaces, the control at dragging terminal device UI interfaces is slided, is set in terminal Standby UI interface input words, the operated key such as behavior such as Home key, return key at touching terminal device UI interfaces.The letter of operation behavior Breath includes the parameter that such as title of operation behavior, terminal device are related to when operation behavior is performed.Different operating behavior is related to And different parameters, parameter can be such as duration, call address, Transfer Parameters, coordinate position.As operation behavior is controlled to click on During part, the parameter being related to is call address;When operation behavior is sliding interface, the parameter being related to is coordinate address, including is slided Start and slide the coordinate position for terminating;When operation behavior is the stand-by period between two operation behaviors, it is related to parameter specific Duration, such as 1.2s.
More than it is for example, be configured according to actual conditions when implementing, is not specifically limited herein.
Logging modle 530, is suitable to be recorded operation behavior information according to the order that user operates on a web browser.
Generation module 540, is suitable to the operation behavior information of keeping records, generates script text corresponding with operation behavior information Part.
The figure that the operation behavior information that logging modle 530 gets capture module 520 shows according to user in browser The order operated on piece is recorded successively, and generation module 540 preserves the operation behavior information of the record.Generation module 540 Corresponding script file, such as json script files can also be generated to the operation behavior information after preservation.Script file can Tested with suitable for the terminal device to different model, whether the operation behavior information preserved in test script file can be with Normally run on the terminal device of different model, to realize the detection to terminal device.
According to the script generation device that the present invention is provided, display on a web browser includes each control of terminal device UI interfaces The picture of information;The behavior that user operates picture on a web browser is caught successively, obtains related operation behavior information;Will operation Behavioural information is recorded according to the order that user operates on a web browser;The operation behavior information of keeping records, generation and behaviour Make the corresponding script file of behavioural information.Using the present invention, can be got by the operation of the picture to being shown on browser The corresponding operation behavior information to terminal device UI interfaces.And operation behavior information can be remembered according to operation order Record, and preserve.Operation behavior information to preserving can directly generate corresponding script file, without UI tester's hands It is dynamic to write script file.The technical requirements to terminal device UI testers are reduced, the work of UI testers is significantly reduced Measure, save manpower, the time spent during test, greatly improve testing efficiency.
Fig. 6 shows the functional block diagram of script generation device in accordance with another embodiment of the present invention.As shown in fig. 6, with Fig. 5 differences are that script generation device also includes such as lower module:
Modified module 550, is suitably modified to the record of operation behavior information sequentially.
According to test needs, modified module 550 can also modify to recorded operation behavior information, modification behaviour Make the record of behavioural information sequentially.Some operation behavior information need not be carried out again in operation behavior information that such as ought be recorded During test, modified module 550 further includes removing module 551.Removing module 551 can delete recorded operation behavior At least one operation behavior information of corresponding not re-test in information;If recorded operation behavior information is not applied to When test, removing module 551 can also delete all recorded operation behavior information, re-execute capture module 520 With logging modle 530, new operation behavior information is recorded again.Or cannot be by user couple for some operation behavior information When the operation behavior of picture is obtained, text search control is such as input into.Modified module 550 further includes add module 552.Add Plus module 552 these cannot can be first stored in by user to the operation behavior information that the operation behavior of picture is obtained it is default Operation behavior information in.Add module 552 selects at least one operation behavior information from default operation behavior information, will It is added in the operation behavior information for having recorded.Add module 552 can also further adjust the behaviour after addition after addition Make the order of behavioural information, the operation behavior information of addition is adjusted to the order for needing.
Transport module 560, is suitable at least one operation behavior information transfer to terminal device, for terminal device according to Operation behavior information, performs corresponding operation behavior.
Receiver module 570, is suitable to the corresponding operation behavior object information of receiving terminal apparatus return.
Judge module 580, is suitable to, according to operation behavior object information, judge whether operation behavior is normally held in terminal device OK;If operation behavior is normally performed in terminal device, the record of the corresponding operation behavior information of operation behavior is normally marked Note, continues next operation behavior;If operation behavior is in the abnormal execution of terminal device, by the corresponding operation behavior letter of operation behavior The record of breath carries out error flag, returns to error message prompting.
The operation behavior information that transport module 560 obtains capture module 520 is transferred to by modes such as such as network requests Terminal device, for terminal device according to operation behavior information, performs corresponding operation behavior.Afterwards, receiver module 570 receives end The object information of the corresponding operation behavior that end equipment is returned.Judge module 580 is according to operation behavior object information, binding operation Behavioural information, it can be determined that whether operation behavior normally performs in terminal device.Such as the operation behavior letter of the transmission of transport module 560 Cease to click on certain control at terminal device UI interfaces, the control is certain software application APP icons installed, receiver module 570 , to open the software application, judge module 580 can be with for the object information of the corresponding operation behavior that the terminal device of reception is returned Judge that operation behavior is normally performed in terminal device;Operation behavior information such as the transmission of transport module 560 is dragging terminal device To specified location, the control is certain software application APP icons installed to certain control at UI interfaces, what receiver module 570 was received Untill the object information of the corresponding operation behavior that terminal device is returned is specified for software application APP icons are moved to, judge Module 580 may determine that operation behavior is normally performed in terminal device.More than it is for example, according to actual feelings when implementing Condition is configured, and is not specifically limited herein.
Judge module 580 judges operation behavior when terminal device is normally performed, and judge module 580 is by the operation behavior pair The record of the operation behavior information answered carries out normal labeled, and such as judge module 580 in a browser can go corresponding operation For information is marked, marks the operation behavior information to test and pass through.Judge module 580 can be using such as color, text when marking Word etc. is marked, and the normal operation behavior information flag for performing is that green or judge module 580 are being grasped by judge module 580 The normal letter symbol for performing of addition is marked before making behavioural information.
Judge module 580 judges operation behavior in the abnormal execution of terminal device, and judge module 580 is corresponding by operation behavior The record of operation behavior information carry out error flag, such as judge module 580 can in a browser by corresponding operation behavior Information is marked, and marks the operation behavior information that problem occurs.Judge module 580 can be using such as color, word when marking Etc. being marked, the operation behavior information flag of abnormal execution is red or judge module 580 in behaviour by judge module 580 The letter symbol for making to add before behavioural information abnormal execution is marked.Judge module 580 can return to mistake with corresponding False information is pointed out.Error message prompting as shift position is incorrect, be not switched on corresponding control, think time and exceed setting when It is long etc..
Further, judge module 580 judges operation behavior in the abnormal execution of terminal device, can also be according to returning Error message prompting is analyzed, and then performs corresponding modification operation behavior information, and such as removing module 551 is by origin operation behavior Information deletion, add module 552 adds the new parameter duration on a think time operation behavior information more long again Deng.Further, after execution modified module 550 is modified, transport module 560 can also be re-executed and believes the operation behavior Whether breath is transferred to terminal device, receiver module 570 and judge module 580 is performed, to test the operation behavior information can terminal Equipment is normally performed.
Further, transport module 560 can also will perform removing module 551 in logging modle 530 or modified module 550 And/or at least one the operation behavior information transfer in the recorded operation behavior information that obtains of add module 552 is to eventually End equipment.Transport module 560 passes the operation behavior information that logging modle 530 or modified module 550 are recorded in transmission successively Terminal device is defeated by, if judge module 580 judges operation behavior after terminal device is normally performed, transport module 560 is according to suitable The latter operation behavioural information of the operation behavior information is continued to be transferred to terminal device by sequence, repeats the He of receiver module 570 Whether judge module 580, can normally be performed with the operation behavior information of test record in terminal device.If judge module 580 Judge that operation behavior, in the abnormal execution of terminal device, is analyzed according to the error message prompting for returning, perform modified module After 550 modify, the operation behavior is such as deleted.Transport module 560 and subsequent module are continued executing with, is tested.
According to the script generation device that the present invention is provided, by least one operation behavior information transfer to terminal device, with For terminal device according to operation behavior information, corresponding operation behavior is performed.The corresponding operation row that receiving terminal apparatus are returned It is object information.According to operation behavior object information, judge whether operation behavior normally performs in terminal device.If operation behavior In the abnormal execution of terminal device, can also be analyzed according to the error message prompting for returning, change operation behavior information.From And whether the operation behavior information of test record is reasonable, if can be used for testing terminal device UI interfaces.But also Test user's operation behavior information order that can be overall be provided that it is no rationally.Meanwhile, record operation behavior information can be with Modified adjustment according to actual conditions, more flexibly so that UI testers need not manually write script file again.Reduce To the technical requirements of terminal device UI testers, the workload of UI testers is significantly reduced, spent when saving test Manpower, the time taken, greatly improve testing efficiency.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of system Structure be obvious.Additionally, the present invention is not also directed to any certain programmed language.It is understood that, it is possible to use it is various Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this hair Bright preferred forms.
In specification mentioned herein, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify one or more that the disclosure and helping understands in each inventive aspect, exist Above to the description of exemplary embodiment of the invention in, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, and wherein each claim is in itself All as separate embodiments of the invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Unit or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, can use any Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can the alternative features of or similar purpose identical, equivalent by offer carry out generation Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection is appointed One of meaning mode can be used in any combination.
All parts embodiment of the invention can be realized with hardware, or be run with one or more processor Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) come realize in script generation device according to embodiments of the present invention some or The some or all functions of person's whole part.The present invention is also implemented as perform method as described herein one Point or whole equipment or program of device (for example, computer program and computer program product).It is such to realize this hair Bright program can be stored on a computer-readable medium, or can have the form of one or more signal.It is such Signal can be downloaded from internet website and obtained, or be provided on carrier signal, or be provided in any other form.
It should be noted that above-described embodiment the present invention will be described rather than limiting the invention, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol being located between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element is not excluded the presence of as multiple Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.
The invention discloses:A1, a kind of scenario generation method, it includes:
Display on a web browser includes the picture of each control information of terminal device UI interfaces;
The behavior that user operates the picture on a web browser is caught successively, obtains related operation behavior information;
The operation behavior information is recorded according to the order that user operates on a web browser;
The operation behavior information of the record is preserved, script file corresponding with the operation behavior information is generated.
A2, the method according to A1, wherein, it is described to catch the row that user operates the picture on a web browser successively To obtain related operation behavior information and further including:
The behavior that user operates the picture on a web browser is caught successively, is obtained user and is operated the picture corresponding end The information of the control information at end equipment UI interfaces and user to the operation behavior at the corresponding terminal device UI interfaces of the picture.
A3, the method according to A2, wherein, it is described to catch the row that user operates the picture on a web browser successively To obtain user and operating the control information at the corresponding terminal device UI interfaces of the picture to further include:
The behavior that user operates the picture on a web browser is caught successively, is carried out according to the position for acting on the picture Calculate, obtain the control information at the corresponding terminal device UI interfaces in the position.
A4, the method according to A2, wherein, operation of the user to the corresponding terminal device UI interfaces of the picture Behavior includes:The control for clicking on terminal device UI interfaces, the control slided terminal device UI interfaces, pull terminal device UI interfaces Part, terminal device UI interface input words and/or touching terminal device UI interface operation keys.
A5, the method according to A1, wherein, the operation behavior information is grasped on a web browser according to user described After the order of work is recorded, methods described also includes:
Change the record of the operation behavior information.
A6, the method according to A5, wherein, the modification operation behavior information is further included:
Delete the operation behavior information of wherein at least one.
A7, the method according to A5, wherein, the modification operation behavior information is further included:
Select at least one to be added in the operation behavior information from default operation behavior information, and adjust addition The order of the operation behavior information afterwards.
A8, the method according to any one of A1-A7, wherein, methods described also includes:
By at least one described operation behavior information transfer to terminal device, so that terminal device is according to the operation behavior Information, performs corresponding operation behavior;
Receive the corresponding operation behavior object information that the terminal device is returned;
According to the operation behavior object information, judge whether the operation behavior normally performs in terminal device;If institute State operation behavior normally to be performed in terminal device, the record of the corresponding operation behavior information of the operation behavior is normally marked Note;If the operation behavior is in the abnormal execution of terminal device, by the record of the corresponding operation behavior information of the operation behavior Error flag is carried out, error message prompting is returned.
The invention also discloses:B9, a kind of script generation device, it includes:
Synchronization module, is suitable to show the picture including each control information of terminal device UI interfaces on a web browser;
Capture module, is suitable to catch the behavior that user operates the picture on a web browser successively, obtains related operation Behavioural information;
Logging modle, is suitable to be recorded the operation behavior information according to the order that user operates on a web browser;
Generation module, is suitable to preserve the operation behavior information of the record, generates corresponding with the operation behavior information Script file.
B10, the device according to B9, wherein, the capture module is further adapted for:
The behavior that user operates the picture on a web browser is caught successively, is obtained user and is operated the picture corresponding end The information of the control information at end equipment UI interfaces and user to the operation behavior at the corresponding terminal device UI interfaces of the picture.
B11, the device according to B10, wherein, the capture module is further adapted for:
The behavior that user operates the picture on a web browser is caught successively, is carried out according to the position for acting on the picture Calculate, obtain the control information at the corresponding terminal device UI interfaces in the position.
B12, the device according to B10, wherein, behaviour of the user to the corresponding terminal device UI interfaces of the picture Include as behavior:The control for clicking on terminal device UI interfaces, the control slided terminal device UI interfaces, pull terminal device UI interfaces Part, terminal device UI interface input words and/or touching terminal device UI interface operation keys.
B13, the device according to B10, wherein, described device also includes:
Modified module, is suitably modified to the record of the operation behavior information.
B14, the device according to B13, wherein, the modified module is further included:
Removing module, is suitable to delete the operation behavior information of wherein at least one.
B15, the device according to B13, wherein, the modified module is further included:
Add module, is suitable to select at least one to be added to the operation behavior information from default operation behavior information In, and adjust the order of the operation behavior information after addition.
B16, the device according to any one of B9-B15, wherein, described device also includes:
Transport module, is suitable at least one operation behavior information transfer to terminal device, for terminal device root According to the operation behavior information, corresponding operation behavior is performed;
Receiver module, is suitable to receive the corresponding operation behavior object information that the terminal device is returned;
Whether judge module, be suitable to, according to the operation behavior object information, judge the operation behavior in terminal device It is normal to perform;If the operation behavior is normally performed in terminal device, by the corresponding operation behavior information of the operation behavior Record carries out normal labeled;If the operation behavior is in the abnormal execution of terminal device, by the corresponding operation of the operation behavior The record of behavioural information carries out error flag, returns to error message prompting.

Claims (10)

1. a kind of scenario generation method, it includes:
Display on a web browser includes the picture of each control information of terminal device UI interfaces;
The behavior that user operates the picture on a web browser is caught successively, obtains related operation behavior information;
The operation behavior information is recorded according to the order that user operates on a web browser;
The operation behavior information of the record is preserved, script file corresponding with the operation behavior information is generated.
2. method according to claim 1, wherein, it is described to catch the row that user operates the picture on a web browser successively To obtain related operation behavior information and further including:
The behavior that user operates the picture on a web browser is caught successively, is obtained user and is operated the corresponding terminal of the picture to set The information of the control information at standby UI interfaces and user to the operation behavior at the corresponding terminal device UI interfaces of the picture.
3. method according to claim 2, wherein, it is described to catch the row that user operates the picture on a web browser successively To obtain user and operating the control information at the corresponding terminal device UI interfaces of the picture to further include:
The behavior that user operates the picture on a web browser is caught successively, is counted according to the position for acting on the picture Calculate, obtain the control information at the corresponding terminal device UI interfaces in the position.
4. method according to claim 2, wherein, behaviour of the user to the corresponding terminal device UI interfaces of the picture Include as behavior:The control for clicking on terminal device UI interfaces, the control slided terminal device UI interfaces, pull terminal device UI interfaces Part, terminal device UI interface input words and/or touching terminal device UI interface operation keys.
5. method according to claim 1, wherein, it is described by the operation behavior information according to user on a web browser After the order of operation is recorded, methods described also includes:
Change the record of the operation behavior information.
6. method according to claim 5, wherein, the modification operation behavior information is further included:
Delete the operation behavior information of wherein at least one.
7. method according to claim 5, wherein, the modification operation behavior information is further included:
At least one is selected from default operation behavior information added in the operation behavior information, and after adjusting addition The order of the operation behavior information.
8. the method according to claim any one of 1-7, wherein, methods described also includes:
By at least one described operation behavior information transfer to terminal device, so that terminal device is believed according to the operation behavior Breath, performs corresponding operation behavior;
Receive the corresponding operation behavior object information that the terminal device is returned;
According to the operation behavior object information, judge whether the operation behavior normally performs in terminal device;If the behaviour Make behavior normally to be performed in terminal device, the record of the corresponding operation behavior information of the operation behavior is carried out into normal labeled; If the operation behavior is carried out the record of the corresponding operation behavior information of the operation behavior in the abnormal execution of terminal device Error flag, returns to error message prompting.
9. a kind of script generation device, it includes:
Synchronization module, is suitable to show the picture including each control information of terminal device UI interfaces on a web browser;
Capture module, is suitable to catch the behavior that user operates the picture on a web browser successively, obtains related operation behavior Information;
Logging modle, is suitable to be recorded the operation behavior information according to the order that user operates on a web browser;
Generation module, is suitable to preserve the operation behavior information of the record, generates script corresponding with the operation behavior information File.
10. device according to claim 9, wherein, the capture module is further adapted for:
The behavior that user operates the picture on a web browser is caught successively, is obtained user and is operated the corresponding terminal of the picture to set The information of the control information at standby UI interfaces and user to the operation behavior at the corresponding terminal device UI interfaces of the picture.
CN201611236929.XA 2016-12-28 2016-12-28 Script generating method and device Pending CN106708528A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611236929.XA CN106708528A (en) 2016-12-28 2016-12-28 Script generating method and device
PCT/CN2017/118906 WO2018121582A1 (en) 2016-12-28 2017-12-27 Script generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611236929.XA CN106708528A (en) 2016-12-28 2016-12-28 Script generating method and device

Publications (1)

Publication Number Publication Date
CN106708528A true CN106708528A (en) 2017-05-24

Family

ID=58903637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611236929.XA Pending CN106708528A (en) 2016-12-28 2016-12-28 Script generating method and device

Country Status (2)

Country Link
CN (1) CN106708528A (en)
WO (1) WO2018121582A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729223A (en) * 2017-08-31 2018-02-23 福建天晴数码有限公司 A kind of method and device of recording user operation on mobile terminals
WO2018121582A1 (en) * 2016-12-28 2018-07-05 北京奇虎科技有限公司 Script generation method and device
CN109783755A (en) * 2018-12-20 2019-05-21 平安科技(深圳)有限公司 Browser operation analogy method, device, readable storage medium storing program for executing and terminal device
CN112866312A (en) * 2019-11-27 2021-05-28 北京奇艺世纪科技有限公司 Script generation method, remote operation method and related equipment
CN113282502A (en) * 2021-06-04 2021-08-20 青岛海尔科技有限公司 Script generation method, device, storage medium and electronic device
CN113590092A (en) * 2021-07-15 2021-11-02 远光软件股份有限公司 Script generation method and device and computer readable storage medium
CN115982024A (en) * 2022-12-26 2023-04-18 中国人民财产保险股份有限公司 Test script generation method, test script generation device, storage medium, and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006268666A (en) * 2005-03-25 2006-10-05 Fujitsu Ltd Automatic test system with correction function, automatic test method, and program
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN102419732A (en) * 2011-12-27 2012-04-18 Tcl集团股份有限公司 Android-platform-based automated testing method and testing tool
CN104951393A (en) * 2014-03-25 2015-09-30 中国电信股份有限公司 Testing method and device
CN105955881A (en) * 2016-04-22 2016-09-21 百度在线网络技术(北京)有限公司 Automated test step recording and playback method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708528A (en) * 2016-12-28 2017-05-24 北京奇虎科技有限公司 Script generating method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006268666A (en) * 2005-03-25 2006-10-05 Fujitsu Ltd Automatic test system with correction function, automatic test method, and program
CN101241466A (en) * 2007-02-08 2008-08-13 深圳迈瑞生物医疗电子股份有限公司 Embedded software test method and system
CN102419732A (en) * 2011-12-27 2012-04-18 Tcl集团股份有限公司 Android-platform-based automated testing method and testing tool
CN104951393A (en) * 2014-03-25 2015-09-30 中国电信股份有限公司 Testing method and device
CN105955881A (en) * 2016-04-22 2016-09-21 百度在线网络技术(北京)有限公司 Automated test step recording and playback method and apparatus

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王水,张晓民: "《软件工程素质导论》", 28 February 2011 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018121582A1 (en) * 2016-12-28 2018-07-05 北京奇虎科技有限公司 Script generation method and device
CN107729223A (en) * 2017-08-31 2018-02-23 福建天晴数码有限公司 A kind of method and device of recording user operation on mobile terminals
CN109783755A (en) * 2018-12-20 2019-05-21 平安科技(深圳)有限公司 Browser operation analogy method, device, readable storage medium storing program for executing and terminal device
CN112866312A (en) * 2019-11-27 2021-05-28 北京奇艺世纪科技有限公司 Script generation method, remote operation method and related equipment
CN113282502A (en) * 2021-06-04 2021-08-20 青岛海尔科技有限公司 Script generation method, device, storage medium and electronic device
CN113590092A (en) * 2021-07-15 2021-11-02 远光软件股份有限公司 Script generation method and device and computer readable storage medium
CN115982024A (en) * 2022-12-26 2023-04-18 中国人民财产保险股份有限公司 Test script generation method, test script generation device, storage medium, and program product

Also Published As

Publication number Publication date
WO2018121582A1 (en) 2018-07-05

Similar Documents

Publication Publication Date Title
CN106708528A (en) Script generating method and device
US10853232B2 (en) Adaptive system for mobile device testing
US9268671B2 (en) Embedded test management for mobile applications
CN104461900B (en) Test method, control server, test terminal and the system of user interface
US6396517B1 (en) Integrated trigger function display system and methodology for trigger definition development in a signal measurement system having a graphical user interface
CN102722440B (en) A kind of debugging apparatus of embedded system executable code, adjustment method and embedded system
CN108733552B (en) FPGA remote debugging system and remote debugging method
CN106033393B (en) A kind of applied program testing method and system and mobile terminal
CN110768872B (en) Inspection method, system, device, computer equipment and storage medium
CN110716853A (en) Test script recording method, application program testing method and related device
CN104461903B (en) The method and apparatus of test client based on browser
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN105183630B (en) Applied program testing method and device
CN104598380A (en) Method and system for automatic testing based on control
CN103744787A (en) Cellphone automated testing method
WO2013054975A1 (en) Method and system for automating a scene-based test
CN107967209A (en) It is a kind of to detect method, detection device and server wrong in the web page code of front end
CN104008041B (en) Terminal applies test method and device
CN108874268A (en) The acquisition method and device of user behavior data
CN106021101B (en) The method and device that mobile terminal is tested
CN104866416B (en) The method and apparatus for realizing application program capacity analysis
CN106897207A (en) Ui testing method and apparatus
WO2016015220A1 (en) Executable code abnormality detection
CN109558323A (en) For debugging system, the method and apparatus of the page
CN109558328A (en) A kind of test method of code coverage, system, device and readable storage medium storing program for executing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170524

RJ01 Rejection of invention patent application after publication