On emulator, realize method to automatic record of courses of action and playbackA kind ofly go up to realize the courses of action method of record and playback automatically,, and can carry out the method for automatic playback particularly about utilizing pseudo-code (Pseudo Code) realization that the courses of action of user on emulator are carried out record at emulator (Emulator).
At present, on the market in popular test and the debug system also not to the record of courses of action and the function of playback, the tester can only carry out the description of language to the problem points of finding in the process of test, yet because the diversity of language and everyone understandability is different, tend to throw into question and express deviation inaccurate or that problem points is understood, thereby make program personnel expensive time when seeking problem points.Particularly when the test of the identity function of different emulators, at present can only be by the artificial repeatedly repetitive operation of carrying out of tester, it is loaded down with trivial details not only to have worked since like this, and efficient is not high, for example for the test of compute classes, a kind of especially super-strength manual labor of manual testing.In addition,, adopt execute-in-place or flash demo at present usually carrying out product function when showing, because on-the-spot atmosphere and the factor of time, the unavoidable anxiety of operator and language expression is unclear or careless omission occurs; And the process of making the flash demo file not only bothers, and expends also higher on the input of manpower and materials.
In view of this, the inventor utilizes the arithmetic operator, logic determines of pseudo-code (Pseudo Code), function such as repeats automatically, design a kind of the realization courses of action of user on emulator (Emulator) are carried out record, and can carry out the method for automatic playback.
Fundamental purpose of the present invention is that elimination traditional test and debug system can't write down problem points and searching once more of problem caused difficulty, reduce work efficiency, thereby provide a kind of pseudo-code of utilizing that courses of action are carried out record, generate virtual file, and by reading the method for the automatic playback operation process of virtual file.This method is not only applicable to the platform of different main frames, and the program personnel can utilize the automatic playback operation process of pseudo-code, finds problem points fast, thereby has avoided because of the inaccurate work delays of the text description time.
Second purpose of the present invention is to eliminate a large amount of repetitive operations that present tester is done when the identity function of test different product, and the virtual file that is generated by pseudo-code can be edited, be that the user can delete or increase operational motion in virtual file, number of times that also can the automatic playback of assigned operation.So not only reduce tester's labour intensity, also improved their work efficiency, more reduced the cost of product, shortened the Products Development time.
The 3rd purpose of the present invention provides to the user a kind of by making the virtual file of courses of action in advance, when product introduction by reading the straightforward procedure of the automatic exhibiting product function of virtual file, avoided when product function is demonstrated, operator's anxiety and language expression is unclear or careless omission occurs when carrying out execute-in-place, it is easy and light that the preliminary work that product function is showed becomes.
Technical scheme of the present invention is: a kind of realization is to the method for automatic record of courses of action and playback on emulator, and its special character is: this method comprises the following step at least:
Automatically write down flow process:
1) at first, opens the virtual record function, set up the operating process of a virtual file opening entry;
2) judge whether to want end record;
3) then judged whether operation requests,, then got back to step 2 if there is not operation requests;
4) if operation requests is arranged, after the each operation of user, the UI thread when message is sent to the CPU thread also the data turnover mode with formation be recorded in the virtual file);
5) when the user sends the end record order, the UI thread just is sent to the CPU thread to message, stops record simultaneously;
Automatic playback flow process:
1) at first, opens playback function, and open one and edited the virtual file of finishing;
2) then whether playback number of times in decision operation path is zero;
3) if be zero, then finish the playback flow process, whether will finish playback otherwise look the user;
4) UI thread timing this moment is taken out action record and is sent to the CPU thread from virtual file, by display device this action playback is come out then;
5) courses of action playback number of times subtracts 1 simultaneously;
6) when courses of action playback number of times be zero or the user send when finishing playback command, the operating process playback finishes.
Above-mentioned virtual file more can need to increase or deletion operational motion wherein according to test.
Above-mentioned virtual file more can freely be specified the number of times of the automatic playback of these courses of action.
An external storage is opened and be stored in to above-mentioned virtual file by an input media.
Above-mentioned action record is by a display device this action record playback to be come out.
The above-mentioned arithmetic operator that utilizes pseudo-code, logic determines, the function that repeats automatically increase this record and this playback function in the debug system of this emulator and test macro.
Relevant detailed content of the present invention and technology, existing just cooperation illustrates as follows:
Fig. 1 is of the present invention one relevant circuit structure calcspar, and description can realize the hardware circuit composition of this method;
Fig. 2 is that process flow diagram is write down in of the present invention one relevant operating process automatically, has described test and debug system and has utilized pseudo-code to realize the self registering process of courses of action;
Fig. 3 is the present invention's one relevant automatic playback process flow diagram of operating process, has described test and debug system and has utilized the process of pseudo-code realization to the automatic playback of courses of action; And
Fig. 4 is the present invention one most preferred embodiment figure, " adding " function in the description test emulation counter and the correctness of " taking advantage of " function.
Along with the arriving in E epoch, people's life more and more relies on electronic product, therefore The quality that improves electronic product has become the focus of competing between each producer, all wishes also to locate at product Just can find out and revise as much as possible existing problem points in debugging or test phase. Yet, Programmer and the tester of each producer can only advance in the process of production debugging and test at present Pedestrian worker's repeatedly operation, and all do not provide right in popular test and the debug system on the market Courses of action record the function with playback. Therefore programmer and tester are in the searching problem In some time, tend to the expensive time, particularly in the survey of the identity function of different emulators During examination, present method of testing is complex operation not only, and efficient is not high, for example for calculating Class testing, the manual testing is a kind of super-strength manual labor especially.
In addition, when carrying out the product function displaying, usually adopt at present execute-in-place or animation to drill Show because on-the-spot atmosphere and the factor of time, the unavoidable anxiety of operator and language expression is unclear or Careless omission appears; And the process of making the flash demo file not only bothers, and in manpower and materials Expend also higher on the input.
For these reasons, the present invention is exactly about utilizing pseudo-code to realize the user at emulator On courses of action carry out record, and can carry out the method for automatic playback. At first, the present invention That a kind of pseudo-code of utilizing is carried out record to courses of action, the generating virtual file, and by reading void Intend the method for the automatic playback operating process of file. This method is not only applicable to the flat of different main frames Platform, and can also avoid because of traditional test and debug system can't record problem points and literal can't Problem points is carried out precise and to the point accurate description, and make again searching of problem caused difficulty. Secondly, the virtual file that is used for recording courses of action among the present invention can be edited the operator Can in virtual file, delete or increase operational motion according to demands of individuals, can also specify behaviour Make the number of times of the automatic playback in path. So not only eliminated present tester at the different products of test A large amount of repetitive operations of doing during the identity function of product have reduced tester's labour intensity, Also improve their operating efficiency, more reduced the cost of product, shortened the exploitation of product Time. In addition, also to offer the user a kind of by making in advance courses of action in the present invention Virtual file, when product introduction by reading the simple of virtual file automatic Display product function Method has been avoided when product function is demonstrated, and the operator is nervous and speak when carrying out execute-in-place The speech statement is unclear or careless omission occurs, and it is easy and light that the preparation that product function is showed becomes Pine.
Therefore, of the present invention being implemented on the hardware requires as shown in Figure 1, comprisesCPU 10,outer Memory 20, built-instorage 30,display driver circuit 40,display unit 50 andinput unit 60; Require to install test and the debug system with record and playback at software.
See also Fig. 1 circuit structure block diagram, when record, at first utilize 60 dozens of input units Open a virtual file and be stored in theexternal memory 20 each operation that the operator implements Action all can be automatically recorded in this file (virtual file). When playback, in carrying out 30 related software in the memory, successively read operation action from virtual file, and by aobvious Show that drivecircuit 40 auto back indisplay unit 50 emits courses of action.
Fig. 2 is that flow chart is recorded in of the present invention one relevant operating process automatically, described test and Debug system utilizes pseudo-code to realize the self registering process of courses of action, and at the accent of emulator Add record and end record function in the test system. At first, open the virtual record function, set up A virtual file begins to record operating process (step 210); And judge whether to want end record (step 220); Then judged whether operation requests (step 230), if there is not operation requests, Then get back to step 220; If operation requests is arranged, after the each operation of user, the UI thread Also the data turnover mode with formation is recorded in virtual literary composition when message is sent to the CPU thread In the part (step 240); When the user sent the end record order, the UI thread just sent message Toward the CPU thread, stop simultaneously record.
In the virtual file that system generates automatically, the user can be according to the test needs of oneself Increase or deletion operational motion wherein, can also the automatic playback in free assigned operation path time Number.
Fig. 3 is that relevant operating process auto back of the present invention is put flow chart, has described test and accent The pseudo-code of utilizing test system realizes the process to the automatic playback of courses of action, in the debugging system of emulator Add playback in the system and finish the playback function item. At first, open playback function (step 310), and Open one and edited the virtual file of finishing, then whether decision operation path playback number of times Be zero (step 320), if be zero, then finish the playback flow process, whether will tie otherwise look the user Shu Huifang (step 330); UI thread timing this moment is taken out action record and is sent to from virtual file CPU thread (step 340) comes out this action playback by display unit then; Grasp simultaneously Make path playback number of times and subtract 1 (step 350). When courses of action playback number of times be zero or the user send out When going out to finish playback command, the operating process playback finishes.
For the clearer explanation the present invention of energy, be described as follows: " adding " function in the test emulation counter and the correctness of " taking advantage of " function especially exemplified by a most preferred embodiment.
The simulation calculation device is as shown in Figure 4:
1. at first open writing function, set up the virtual file of a .mac.
2. press in the counter successively
Button,
Button,
Button,
Button.
3. judged result, misregistration.
4. press in the counter successively
Button,
Button,
Button,
Button.
5. judged result, misregistration.
6. editor's virtual file is set the playback number of times.
7. open playback function, system is automatically according to the number of times playback operation path of appointment.
Checking " 2+3 ", the result of " 5*5 ", pseudo-code is described below.
The coordinate figure of each button of // definition;
″2″=Button(130,122);
″+″=Button(190,142);
″3″=Button(160,120);
″5″=Button(130,100);
″=″=Button(220,145);
″*″=Button(190,95);
ResultAddress=0x1234;
RepeaStart (100); The automatic playback number of times of // setting
// key entry " 2 " "+" " 3 " "=" on computer simulatoi;
An if (ReadDoube (ResultAddress)!=5.0) // result is judged, and misregistration;
{
RecordError(″2+3=?″);
}
// key entry " 5 " " * " " 5 " "=" on computer simulatoi
An if (ReadDoube (ResultAddress)!=25.0) // result is judged, and misregistration;
{
RecordError(“5*5=?”);
}
RepeatEnd (); A playback of // operating process finishes, and the playback number of times subtracts 1;
As can be seen from the above embodiments, use the present invention can finish up to a hundred times repeated test fast automatically by system, and can note mistake automatically.This method is not only applicable to various host platform, and simple to operation, can improve tester and program personnel's work efficiency by a relatively large margin, improves the quality of product, reduces product and expends, and reduces the Products Development time.How painful just think if change artificial repeatable operation into up to a hundred time will be a thing! Equally also can utilize this method that the function in the product is made into a virtual file, playback is come out automatically when product introduction.
The above only is preferred embodiment of the present invention, and all equivalences of being done according to the present patent application claim change and revise, and all should belong to the scope of patent of the present invention.