Invention content
The existing above problem is recorded for existing script, a kind of automatic record aiming at releasable manpower is now provided
The script recording system and method for script processed.
Specific technical solution is as follows:
A kind of script recording system is applied in the test of mobile terminal, including:
One acquiring unit connects mobile terminal to be tested, to obtain the current screen image of the mobile terminal to be measured;
One display unit connects the acquiring unit, and the display unit provides an indicating template, and the indicating template is used
To show the current screen image;
One processing unit is separately connected the acquiring unit and the display unit, aobvious to calculate the indicating template
The size relationship of the image shown and the current screen image of the mobile terminal to be measured;
One input unit connects the display unit, to input cursor behaviour on the image that the indicating template is shown
Make signal;
One control unit is separately connected the input unit, the display unit and the processing unit, to according to institute
It states size relationship to be converted to the cursor operations signal relative to the coordinate information of mobile terminal to be measured, and exports;
One recording unit connects described control unit, is operated on the indicating template to record cursor operation signal
Coordinate information, to form test script.
Preferably, the acquiring unit is obtaining the current screen figure of the mobile terminal to be measured at the predetermined space moment
Picture.
Preferably, described control unit is grasped being converted to the cursor operations signal relative on the indicating template
The coordinate information is converted to the coordinate relative to the mobile terminal to be measured according to the size relationship by the coordinate information of work
Information, and export.
Preferably, described control unit will be sent relative to the coordinate information of mobile terminal to be measured by adb orders
To the mobile terminal to be measured, to call the operation for corresponding to position preset jar packet operations and click the mobile terminal to be measured.
A kind of script method for recording is applied in the test of mobile terminal, provides an indicating template, include the following steps:
S1. the current screen image of mobile terminal to be measured is obtained;
S2. the current screen image is shown on the indicating template;
S3. the size for calculating image and the current screen image of the mobile terminal to be measured that the indicating template is shown is closed
System;
S4. the input cursor operation signal on the image that the indicating template is shown is received;
S5., the cursor operations signal is converted to the seat relative to the mobile terminal to be measured according to the size relationship
Information is marked, and is exported;
S6. the coordinate information that record cursor operation signal operates on the indicating template, to form test script.
Preferably, in the step S1, the current screen figure of the mobile terminal to be measured is obtained at the predetermined space moment
Picture.
Preferably, the detailed process of the step S5 is:The cursor operations signal is converted to relative to the display
The coordinate information operated in template is converted to the coordinate information relative to described to be measured mobile whole according to the size relationship
The coordinate information at end, and export.
Preferably, it in the step S5, will be sent out by adb orders relative to the coordinate information of mobile terminal to be measured
It send to the mobile terminal to be measured, to call the behaviour for corresponding to position for presetting jar packet operations and clicking the mobile terminal to be measured
Make.
A kind of test system, using such as above-mentioned script recording system, including:
One manipulator, connects described control unit, and described control unit is believed according to the coordinate in the recording unit
Breath, controls the operation for corresponding to position that the manipulator clicks the mobile terminal to be measured.
A kind of test method provides a manipulator using such as above-mentioned script method for recording, including:According to the test
The coordinate information in script controls the operation for corresponding to position that the manipulator clicks the mobile terminal to be measured.
The advantageous effect of above-mentioned technical proposal:
In the technical program, script recording system can obtain the image and shifting to be measured that display unit is shown using processing unit
The size relationship of dynamic terminal current screen image, can be converted to cursor operations signal relative to movement to be measured using control unit
The coordinate information of terminal can record the coordinate information of cursor operations signal by recording unit, to form test script, releasably
Manpower automatic recording script.Script method for recording is by obtaining the current screen image of mobile terminal to be measured to calculate indicating template
The size relationship of the image of display and the current screen image of mobile terminal to be measured, to be believed cursor operations according to size relationship
It number is converted to relative to the coordinate information of mobile terminal to be measured, with output, mobile terminal to be measured is tested accordingly, can be released
Put manpower automatic recording script.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of not making creative work it is all its
His embodiment, shall fall within the protection scope of the present invention.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase
Mutually combination.
The invention will be further described in the following with reference to the drawings and specific embodiments, but not as limiting to the invention.
As shown in Figure 1, a kind of script recording system, is applied in the test of mobile terminal, including:
One acquiring unit 1, connects mobile terminal to be tested, to obtain the current screen image of mobile terminal to be measured;
One display unit 2 connects acquiring unit 1, and display unit 2 provides an indicating template, and indicating template is worked as to show
Forth screen image;
One processing unit 4, is separately connected acquiring unit 1 and display unit 2, to calculate image that indicating template is shown with
The size relationship of the current screen image of mobile terminal to be measured;
One input unit 3 connects display unit 2, to input cursor operation signal on the image that indicating template is shown;
One control unit 5 is separately connected input unit 3, display unit 2 and processing unit 4, to be incited somebody to action according to size relationship
Cursor operations signal is converted to relative to the coordinate information of mobile terminal to be measured, and is exported;
One recording unit 6 connects control unit 5, to record the coordinate that cursor operation signal operates on indicating template
Information, to form test script.
Coordinate information is recorded in txt file by one ground of progress, recording unit 6, records a test case, txt file
It is exactly a recording content for script.
In the present embodiment, script recording system using processing unit 4 can obtain display unit 2 display image with it is to be measured
The size relationship of mobile terminal current screen image can be converted to cursor operations signal relative to be measured using control unit 5
The coordinate information of mobile terminal can record the coordinate information of cursor operations signal by recording unit 6, to form test script,
Releasable manpower automatic recording script.
In a preferred embodiment, acquiring unit 1 is obtaining the current screen of mobile terminal to be measured at the predetermined space moment
Curtain image.
In the present embodiment, acquiring unit 1 may include a timer, so that 1 timing acquisition of acquiring unit is to be measured mobile whole
The screenshotss image at end is shown on indicating template.To reach the function of real-time recording mobile terminal screen image to be measured.
In a preferred embodiment, control unit 5 is grasped being converted to cursor operations signal relative on indicating template
Coordinate information is converted to relative to the coordinate information of mobile terminal to be measured according to size relationship, and exported by the coordinate information of work.
In the present embodiment, 4 algorithm process through the processing unit calculates mobile terminal screen size to be measured and display
Cursor is clicked the current of indicating template by the proportionate relationship for the screen size that the indicating template of unit 2 is shown using control unit 5
Coordinate information is converted to the coordinate information relative to the current screen for clicking mobile terminal to be measured, and exports corresponding click and believe
Number.
In a preferred embodiment, control unit 5 will be sent out relative to the coordinate information of mobile terminal to be measured by adb orders
It send to mobile terminal to be measured, to call the operation for corresponding to position preset jar packet operations and click mobile terminal to be measured.
In the present embodiment, control unit 5 clicks movement to be measured by the compiled jar packets of adb command calls to run
The corresponding position of terminal screen.
As shown in Fig. 2, a kind of script method for recording, is applied in the test of mobile terminal, provides an indicating template, including
Following step:
S1. the current screen image of mobile terminal to be measured is obtained;
S2. current screen image is shown on indicating template;
S3. the size relationship of image and the current screen image of mobile terminal to be measured that indicating template is shown is calculated;
S4. the input cursor operation signal on the image that indicating template is shown is received;
S5. cursor operations signal is converted to relative to the coordinate information of mobile terminal to be measured according to size relationship, and defeated
Go out;
S6. the coordinate information that record cursor operation signal operates on indicating template, to form test script.
Coordinate information, can be recorded in txt file by one ground of progress, record a test case, txt file is exactly one
Record content for script.
In the present embodiment, script method for recording is by obtaining the current screen image of mobile terminal to be measured to calculate display
The size relationship of the image of template for displaying and the current screen image of mobile terminal to be measured, to be grasped cursor according to size relationship
It is converted to relative to the coordinate information of mobile terminal to be measured as signal, with output, mobile terminal to be measured is tested accordingly,
Releasable manpower automatic recording script.
In a preferred embodiment, in step sl, the current screen of mobile terminal to be measured is obtained at the predetermined space moment
Image.
In the present embodiment, it is possible to provide a timer with the screenshotss image of timing acquisition mobile terminal to be measured, and is shown in
On indicating template.To reach the function of real-time recording mobile terminal screen image to be measured.
In a preferred embodiment, the detailed process of step S5 is:Cursor operations signal is converted to relative to display mould
The coordinate information operated on plate is converted to coordinate information relative to the coordinate information of mobile terminal to be measured according to size relationship,
And it exports.
In the present embodiment, by algorithm process, the display of mobile terminal screen size and display unit 2 to be measured is calculated
The proportionate relationship of the screen size of template for displaying, the changing coordinates information that cursor is clicked to indicating template are converted to relative to click
The coordinate information of the current screen of mobile terminal to be measured, and export corresponding click signal.
In a preferred embodiment, in step s 5, adb orders will be passed through relative to the coordinate information of mobile terminal to be measured
It is sent to mobile terminal to be measured, to call the operation for corresponding to position preset jar packet operations and click mobile terminal to be measured.
In the present embodiment, mobile terminal screen to be measured is clicked to run by the compiled jar packets of adb command calls
Corresponding position.
A kind of test system, using such as above-mentioned script recording system, including:
One manipulator connects control unit 5, and control unit 5 is according to the coordinate information in recording unit 6, control machinery hand
Click the operation for corresponding to position of mobile terminal to be measured.
In the present embodiment, script recording system can carry out automatic test on third-party testing platform, pass through control
Coordinate information in txt file in recording unit 6 can be converted to the language that manipulator can identify by unit 5, pass through UART
(Universal Asynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter) protocol integrated test system machinery
Hand is run;So that manipulator clicks corresponding coordinate on mobile terminal screen to be measured according to the coordinate information in txt file.With reality
Now continual and steady test, discharges manpower, promotes the purpose of user experience.
The course of work of test system is illustrated in conjunction with Fig. 3:Manipulator uses 220V mains-supplieds, manipulator automatically multiple
Position starts test script, the first linear module 7 of manipulator and the second linear module 8 are according in test script to test origin
Coordinate information click the corresponding position of 9 screen of mobile terminal to be measured, after the completion of test, manipulator returns to test origin, terminates
Test.
A kind of test method provides a manipulator using such as above-mentioned script method for recording, including:According to the test
The coordinate information in script controls the operation for corresponding to position that the manipulator clicks the mobile terminal to be measured.
In the present embodiment, script method for recording can carry out automatic test on third-party testing platform, by that will remember
Coordinate information in the txt file of record is converted to the language that manipulator can identify, is run by UART protocol control machinery hand;
So that manipulator clicks corresponding coordinate on mobile terminal screen to be measured according to the coordinate information in txt file.Continued with realizing
Steady testing discharges manpower, promotes the purpose of user experience.
The foregoing is merely preferred embodiments of the present invention, are not intended to limit embodiments of the present invention and protection model
It encloses, to those skilled in the art, should can appreciate that all with made by description of the invention and diagramatic content
Equivalent replacement and obviously change obtained scheme, should all be included within the scope of the present invention.