CN109298994A - A kind of script records, method for testing software and equipment - Google Patents
A kind of script records, method for testing software and equipment Download PDFInfo
- Publication number
- CN109298994A CN109298994A CN201710605880.9A CN201710605880A CN109298994A CN 109298994 A CN109298994 A CN 109298994A CN 201710605880 A CN201710605880 A CN 201710605880A CN 109298994 A CN109298994 A CN 109298994A
- Authority
- CN
- China
- Prior art keywords
- script
- recorded file
- file
- recording function
- terminal
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
The embodiment of the invention discloses a kind of script method for recording, which comprises obtains N number of recording function point, each recording function point is used at least one action event for terminal for indicating to capture in advance, and N is the positive integer greater than 1;1 recording function points in N number of recording function point are combined, script recorded file is generated;Alternatively, splitting to a recording function point in N number of recording function point, script recorded file is generated;In this way, can be determined according to preset need when being combined to recording function point, realize the independent assortment of script recorded file;In addition recording function point can also be split, obtains script recorded file, to improve the efficiency of script recording.The embodiment of the invention also discloses a kind of script recording arrangement, server, terminal, method for testing software and equipment.
Description
Technical field
The present invention relates to software automated testing field more particularly to a kind of recordings of script, method for testing software and equipment.
Background technique
With the development of mobile internet, the software (such as cell phone software) of terminal is feature-rich colorful, and function is also more next
It is more, cause corresponding Experience of Software Testing Work to become complex, if software test can be made using traditional Black-box Testing
Workload is increased sharply therewith;In the prior art, software automated testing scheme is based on recording, playback thought makes largely manually
Test job is converted into automatic test, substantially increases Efficiency of Software Testing;But as company is for software quality requirement
Raising, the quickening of software iteration speed, software function integrate complexity improve so that the automatic test script of terminal software
The recording working time is urgent, and the script function point of a large amount of automatic tests can not be reused, and multiple script recorded files can not
A new script recorded file is combined to form, causes script to record workload and gradually increases, gradually becoming influences mobile phone
One of an important factor for software automated testing efficiency.
Summary of the invention
In order to solve the above technical problems, an embodiment of the present invention is intended to provide a kind of recording of script, method for testing software and setting
It is standby, script recorded file can be freely combined, improve the efficiency that script is recorded.
The technical scheme of the present invention is realized as follows:
The embodiment of the invention provides a kind of script method for recording, which comprises
Obtain N number of recording function point, each recording function point be used to indicate to capture in advance for terminal at least one
Action event, N are the positive integer greater than 1;
1 recording function points in N number of recording function point are combined, script recorded file is generated.
In the embodiment of the present invention, the 1 recording function points in N number of recording function point are combined,
Generate script recorded file, comprising:
1 recording function points in N number of recording function point are combined, are generated at least one of following: foot
This document, script template,
Script recorded file is generated, the script recorded file is used to quote the script template, and/or, the script
Recorded file includes the script file;The script template being cited is used for when updating, and corresponding script template is quoted in triggering
Script recorded file carries out corresponding update;After generating script recorded file, the script file in the script recorded file is protected
It holds constant.
In the embodiment of the present invention, the method also includes:
After generating the script recorded file, the script recorded file is sent to terminal, is based on terminal described
Script recorded file carries out script playback.
It is described that the script recorded file is sent to terminal in the embodiment of the present invention, comprising: to utilize Android test frame
Android debugging bridge (Android Debug Bridge, ADB) order the script recorded file pushed into the terminal.
The embodiment of the invention also provides a kind of method for testing software, are applied in terminal, which comprises
When the operating system of the terminal is Android operation system, script recorded file is obtained using Android test frame;
The script recorded file is used to indicate to run for terminal software and the script file of recording;
By carrying out script playback to the script recorded file, the software test result of the terminal software is obtained.
It is described to obtain script recorded file using Android test frame in the embodiment of the present invention, comprising:
ADB order based on Android test frame receives the script recorded file.
The embodiment of the invention also provides a kind of servers, including first processor and the first data transmitter-receiver set, wherein
First data transmitter-receiver set, for obtaining N number of recording function point, each recording function point is for indicating preparatory
At least one action event for terminal of capture, N are the positive integer greater than 1;
The first processor, for being combined to 1 recording function points in N number of recording function point,
Generate script recorded file.
In the embodiment of the present invention, the first processor, specifically for at least two in N number of recording function point
Recording function point is combined, and is generated at least one of following: script file, script template generate script recorded file, the foot
This recorded file is used to quote the script template, and/or, the script recorded file includes the script file;Wherein, quilt
The script template of reference is used for when updating, and the script recorded file that corresponding script template is quoted in triggering carries out corresponding update;?
After generating script recorded file, each script file in the script recorded file is remained unchanged
In the embodiment of the present invention, the first processor is also used to after generating the script recorded file, described in triggering
Data transmitter-receiver set;
First data transmitter-receiver set, for the script recorded file being sent to terminal, is made when being toggled
Terminal is based on the script recorded file and carries out script playback.
In the embodiment of the present invention, first data transmitter-receiver set, specifically for the ADB order using Android test frame
The script recorded file is pushed into the terminal.
The embodiment of the invention also provides a kind of script recording arrangement, including second processor and can locate for storing
The first memory of the computer program run on reason device,
The second processor is for executing following steps when running the computer program:
Obtain N number of recording function point, each recording function point be used to indicate to capture in advance for terminal at least one
The information of action event, the information of the action event include mode of operation and operating time point;N is the positive integer greater than 1;
1 recording function points in N number of recording function point are combined, script recorded file is generated.
In the embodiment of the present invention, when the second processor is specifically used for running the computer program, following step is executed
It is rapid:
1 recording function points in N number of recording function point are combined, are generated at least one of following: foot
This document, script template,
Script recorded file is generated, the script recorded file is used to quote the script template, and/or, the script
Recorded file includes the script file;The script template being cited is used for when updating, and corresponding script template is quoted in triggering
Script recorded file carries out corresponding update;Each script text after generating script recorded file, in the script recorded file
Part remains unchanged.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, special
The step of sign is, which realizes any one of the above script method for recording when being executed by processor.
The embodiment of the invention also provides a kind of terminals, including third processor and the second data transmitter-receiver set;Wherein,
Second data transmitter-receiver set, for the operating system in the terminal be Android operation system when, utilize primary peace
Tall and erect test frame obtains script recorded file, and the script recorded file is used to indicate to run for terminal software and the foot of recording
This document;
Third processor, for obtaining the terminal software by carrying out script playback to the script recorded file
Software test result.
In the embodiment of the present invention, second data transmitter-receiver set, specifically for the ADB order based on Android test frame
Receive the script recorded file.
The embodiment of the invention also provides a kind of software test apparatus, it is applied in terminal, the equipment includes the everywhere
Manage device and the second memory for storing the computer program that can be run on a processor, wherein
The fourth processor is for executing following steps when running the computer program:
When the operating system of the terminal is Android operation system, script is obtained using primary Android test frame and is recorded
File;The script recorded file is used to indicate to run for terminal software and the script file of recording;
By carrying out script playback to the script recorded file, the software test result of the terminal software is obtained.
In the embodiment of the present invention, when the fourth processor is specifically used for running the computer program, following step is executed
It is rapid:
Android debugging bridge ADB order based on Android test frame receives the script recorded file.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the meter
The step of calculation machine program realizes any one of the above method for testing software when being executed by processor.
In the embodiment of the present invention, N number of recording function point is obtained first, what each recording function point was used to indicate to capture in advance
For at least one action event of terminal, N is the positive integer greater than 1;Then, in N number of recording function point at least
Two recording function points are combined, and generate script recorded file;In this way, when being combined to recording function point, Ke Yigen
It is determined according to preset need, realizes that the independent assortment of script recorded file obtains alternatively, it is also possible to split to recording function point
To script recorded file, thus, improve the efficiency that script is recorded;Since script recording is a part of software automated testing,
The efficiency of software automated testing thus can be improved.
Detailed description of the invention
Fig. 1 is a flow chart of method for testing software of the embodiment of the present invention;
Fig. 2 is the hardware structural diagram that method for testing software is realized in the embodiment of the present invention;
Fig. 3 is a modular structure schematic diagram of method for testing software of the embodiment of the present invention;
Fig. 4 is a schematic diagram of script template in the embodiment of the present invention;
Fig. 5 is a schematic diagram of script file in the embodiment of the present invention;
Fig. 6 is a schematic diagram of comprehensive script recorded file in the embodiment of the present invention;
Fig. 7 is another flow chart of method for testing software of the embodiment of the present invention;
Fig. 8 is the hardware structural diagram of the server of the embodiment of the present invention;
Fig. 9 is the composed structure schematic diagram of the script recording arrangement of the embodiment of the present invention;
Figure 10 is the hardware structural diagram of the terminal of the embodiment of the present invention;
Figure 11 is the composed structure schematic diagram of software test apparatus of the embodiment of the present invention.
Specific embodiment
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 description.
The embodiment of the present invention can for terminal software carry out script recording, later, by the script file to recording into
The purpose of software automated testing is realized in row playback;Here, terminal can be fixed terminal or mobile terminal, and mobile terminal can be with
It is mobile phone, tablet computer etc.;In an optional example, terminal is mobile phone, and terminal software is cell phone software (app).
In actual implementation, in terminal software operation, at least one action event of terminal can be captured, and will capture
Action event be sent to server, later, server can according to the event of capture generate script recorded file;Show at one
In example property, the action event of terminal includes but is not limited to keypad input event, mouse click event, mouse moving event, pulls
Event, touch click event, touch slip event etc..
Terminal, server and action event, the following specific embodiment of proposition based on above-mentioned record.
First embodiment
A kind of method for testing software is proposed in first embodiment of the invention, Fig. 1 is software test side of the embodiment of the present invention
One flow chart of method, as shown in Figure 1, this method may include:
Step 101: obtaining N number of recording function point, what each recording function point was used to indicate to capture in advance is directed to terminal
At least one action event, N are the positive integer greater than 1.
Here, receive what terminal was periodically sent in one example for obtaining the implementation of N number of recording function point
Screenshot capture, capture obtain N for operations such as the mouse click of screenshot capture, double-click, dragging, the inputs of keypad character string
A recording function point.
Optionally, this step can use server, also can use the realization of another terminal;That is, can benefit
It is received with server or another terminal come the screenshot capture of self terminal, and then obtains N number of recording function point.
Here, each recording function point is considered as corresponding mobile phone operation instruction, in one example, can also be by phase
The mobile phone operation instruction answered is sent to mobile phone, later, corresponding operating instruction is executed by mobile phone, for example, a point can be sent
The instruction of button is hit to mobile phone.
Step 102: 1 recording function points in N number of recording function point being combined, script record is generated
File processed;Alternatively, splitting to a recording function point in N number of recording function point, script recorded file is generated.
Here, when being combined to recording function point, it can be determined according to preset need, realize script recorded file
Independent assortment improves the efficiency that script is recorded.
Illustratively, a kind of implementation of this step may include:
1 recording function points in N number of recording function point are combined, are generated at least one of following: foot
This document, script template,
Script recorded file is generated, the script recorded file is used to quote the script template, and/or, the script
Recorded file includes the script file;The script template being cited is used for when updating, and corresponding script template is quoted in triggering
Script recorded file carries out corresponding update;Each script text after generating script recorded file, in the script recorded file
Part remains unchanged.
As can be seen that script template and/or script file are obtained by being combined to recording function point, and script
Recorded file be generated based on script template and/or script file, then, the combination of recording function point can determine
The content of script recorded file.
It, can be according to preset need, at least two records in N number of recording function point in an optional example
Function point processed is combined, and generate at least one of following: script file, script template, here, preset need can be used to indicate that
The combination of predetermined recording function point;In this way, the combination of recording function point can be determined according to preset need,
So, script recorded file can be realized by the combination to recording function point, in this way, the benefit of recording function point can be improved
Use efficiency.
As can be seen that script template and script file may each be and be made of recording function point, but the two has area
Not, specifically, script template is when changing, if a script recorded file quotes the script template, script records text
Script template in part, which can synchronize, to be updated;And for script file, after generating script file, by replicating script
File generated script recorded file, later, if the script file generated changes, include in script recorded file is identical
Script file remain unchanged, that is, without synchronized update;As can be seen that showing that script is recorded by quoting script template
When file, recycling script template can achieve, improve the utilization efficiency of script template.
It should be noted that the script file generated can be one, it is also possible to multiple;Likewise, in the foot of generation
This template can be one or more;The script recorded file of generation is also possible to one or more.Generating multiple script records
When file processed, it can use at least two script recorded files and combine comprehensive script recorded file (also referred to as script recorded file
Group), for example, generating three script recorded files altogether, script recorded file 1, script recorded file 2 and script record text respectively
Part 3, then, it at this time can be based on script recorded file 1 and the comprehensive recording script of 2 combination producing of script recorded file.
That is, can carry out script if to carry out subsequent script playback based on single script recorded file and return
It puts, script playback can also be carried out based on comprehensive script file;In addition, a script recorded file can be recorded by other scripts
File or comprehensive script recorded file use, and have the characteristics that scalability is strong.
Before this step, it can be determined according to preset need at least two recording functions in N number of recording function point
Point is combined, or is split to a recording function point in N number of recording function point;And then execute this step
Suddenly, in this way, the granularity for the file that can be recorded with custom script.Also, pass through the script recorded file of playback recording early period, essence
Each function point of app is really tested, easily range test and depth test.
Step 103: after generating script recorded file, script recorded file being sent to terminal.
In one example, when the operating system of terminal is Android operation system, it can use primary Android test block
Frame reads the script recorded file, and script recorded file is pushed to end using the ADB order of primary Android test frame
End.
Be understood that when, the purpose that script recorded file is sent to terminal is: make terminal be based on script record text
Part carries out script playback.
Illustratively, in order to achieve the purpose that software test, terminal can be sent out screen when specific software is run
Otherwise screenshot is not sent out screenshot capture, here, specific software refers to the software for needing to carry out software automated testing;This
Sample, the script recorded file obtained in first embodiment of the invention according to recording function point is corresponding with specific software, later, eventually
The software automated testing to specific software may be implemented by carrying out script playback to script recorded file in end.
Step 104: terminal is based on script recorded file and carries out script playback.
Optionally, when the operating system of terminal is Android operation system, it can use primary Android test frame and obtain
Script recorded file.
It further, can be by carrying out foot to the script recorded file after terminal can obtain script recorded file
This playback obtains the software test result of terminal specific software.
Existing mobile phone app automatic test scheme mainly includes following several:
1) by automating Core Generator realization to the institute of Android system using Android (Android) cell phone software reliability
There is the compatibility of atomic operation, carries out the volume of reliability test use-case to the software run in Android operation system with visual means
It writes, and is accustomed to generating the test case of software according to the practical operation of user.
2) by calculating the image of the display of display screen and the current screen picture size relationship of affiliated mobile phone to be measured, record
The operation information of cursor operations signal on a display screen forms test script, and then carries out cell phone software test.
3) by testing the suitability of the different editions of the corresponding different mobile terminal of every kind of app, operating system, app's
Stability and test to having installed and having unloaded link, and using the stability of the testing tools such as monkey test app and
Robustness.
During above scheme carries out script recording, the efficiency recorded there are script is relatively low and be not available preposition
The determination for the script file recorded, specifically, for scheme 1), only script recording is briefly described, is not said
It is bright it can be concluded that script template, the management method that also do not record to script is illustrated;For scheme 2), not to script into
Row templating processing, the script file that recording can not be freely combined become new script file, are unable to control script recorded file
Function point between granularity;For scheme 3), detailed test job is not done to app function point, can not be accurately positioned out
The mistake that app function point occurs.
In addition, conventional script recording process gradually exposes following problems:
1) script recording process, if a wrong step is recorded in midway, is needed again based on the recording of continuous function point
It records, causes script to record work heavy and boring.
2) it is largely repeated in script recording process and the recording function point being commonly used can not be transplanted to next step script
Work is recorded, if previous step records work modification, a large amount of scripts is caused to be recorded again.
3) function point for having recorded completion can not be combined into new script recorded file by script recording process.Script is recorded
Granularity is too big, can not be multiplexed the duplicate simple script recorded file of a large amount of functions.
For the above problem and defect present in software automated testing and script recording process, the embodiment of the present invention
In, by being combined to recording function point, script recorded file is generated, quite customized recording script granularity can be by foot
The code grain size refinement of this recording, customizing script file execute the granularity for recording test function point;By setting script template,
Be freely combined recording function point, script file or and the modes such as script template, so that script recording process is there is scalability and can
Reusability.
After by carrying out combination producing script template to recording function point, script template is realized so that it is convenient to foot
The script template is called or quoted to this recorded file, when the script template modification that multiple script recorded files are quoted or called simultaneously
When, it is only necessary to a script template is modified, does not need to repair all script recorded files of reference script template
Change, reduce the workload of script recording, and is easily modified the used script template of batch.
Optionally, when needing to obtain multiple script recorded files, it is (serial that multiple script recorded files can be sequentially generated
Mode), multiple script recorded files can also be generated simultaneously by parallel mode, a script recorded file can quote other
Script recorded file, in this way, increasing the scalability of script recorded file.
Further, configuration file can be recorded with customized parsing script, simulates common script operational process;Specifically
It says, script is parsed by primary Android test frame and records volume file, and can use Jar packet and recorded script by ADB order
File push processed is not necessarily to compiled code into mobile phone to be tested, directly runs the Jar packet and perform script recorded file data
Carry out operating handset and achievees the purpose that testing mobile phone software function.
Second embodiment
In order to more embody the purpose of the present invention, on the basis of first embodiment of the invention, carry out further
It illustrates.
Second embodiment of the invention can carry out script recording and software automated testing to mobile phone app, and Fig. 2 is the present invention
A hardware structural diagram of method for testing software is realized in embodiment;As shown in Fig. 2, mobile phone terminal 201, can be used for periodically
Push the command adapted thereto and script recording text that mobile phone screen screenshot and recording function point to server, processing server forwarding come
Part;Server 202, can be used for by mobile phone send screenshot capture be forwarded to personal computer (Personal Computer,
PC it) holds, and recording function point can be forwarded to the end PC, can be also used for generating script recorded file and storing script recording text
Part;The end PC 203 is displayed for mobile phone screen screenshot, and captures the operation processing for screenshot capture.
Fig. 3 is a modular structure schematic diagram of method for testing software of the embodiment of the present invention, as shown in figure 3, the present invention the
The method for testing software of two embodiments can use script file and record module 301, script file management module 302 and script text
Part playing module 303 is realized, and script file management module 302 may include script template administrative unit 3021, script file
Synthesis unit 3022 and script file generation unit 3023;
Here, script file records module for realizing script recording process, recording function point is generated, by recording function point
Method is sent to script file management module, and script recording process may comprise steps of in one example:
S1: mobile phone terminal timing sends screenshot capture to server.
S2: picture is transmitted to the end of the webpage (web) on the end PC by server, here it is possible to which the image size of web terminal is pressed
It is shown according to the certain proportion of mobile phone textures, then, the mouse that screen is captured in web terminal is clicked, and is double-clicked, dragging and keyboard
The sequence of operations such as the input of character string, gradually generate it is a series of can operating handset recording function point.
Recording function point is forwarded to mobile phone by server by the end S3:PC, after mobile phone receives instruction, makes corresponding position
Reason;Server can also simultaneously record these function points operated, form script template or script file;And by foot
This template or script file are stored.
Script file management module 302 can be used for receiving script file and record the recording function point information of module, and presses
These function points are set script file or script template by demand;It can be also used for the database of scene recording or server
Recording function point, script module, the script file of middle storage are combined into comprehensive script recorded file on demand, and by the synthesis
Script recorded file is saved in the database of server;It can be also used for integrating all in script recorded file use
Template is substituted for newest script template in server database, and the synthesis script recorded file after update script template is sent out
It send to script file playing module, to carry out script playback.
For the function of each unit of script file management module 302, in an alternative embodiment,
Script template administrative unit 3021, can be used to implement at least one of following function: addition script module deletes foot
This module updates script template, Download Script module.
Script file synthesis unit 3022 can be used for recording function point, script template, script file by needing group
Synthesize the synthesis script recorded file an of entirety.
Script file generation unit 3023, can be used for integrate in script recorded file it is cited to script template replace
It changes newest script template in existing server into, and the synthesis script recorded file after update script template is sent to script
File playing module, to carry out script playback.
Script template, script file and comprehensive script file are illustrated separately below.
Script template is stored in server, has a series of recording function points, and with unique identification, comprehensive foot
This recorded file can be used for this script template, when the recording function point change in script template, other all references
To this script template synthesis script recorded file all with change.
Fig. 4 is a schematic diagram of script template in the embodiment of the present invention, as shown in figure 4, script template 41 may include
1st recording function point P1 and the n-th recording function point Pn to m recording function point Pm, here, n and m are the nature greater than 1
Number, and n is less than m.
Script file can be with multiple recording function points, the difference of script file and script template: the record of script file
When function point processed is modified, the recording function point of this script file is only modified, others include that the synthesis script of this script file is recorded
File processed is unaffected.
Fig. 5 is a schematic diagram of script file in the embodiment of the present invention, as shown in figure 5, script file 51 may include
1st recording function point P1 and a recording function point Pa to b recording function point Pb, here, a and b are the nature greater than 1
Number, and a is less than b.
Comprehensive script recorded file may include multiple recording function points, script recorded file, script file, script template
Deng;Comprehensive script recorded file can repeat to make by any combination between recording function point, script file, script template
With the script recorded;And script template can be set by a large amount of consistent recording function points of function of reusing, when this
When recording function point changes, corresponding script template need to be only modified.
Fig. 6 is a schematic diagram of comprehensive script recorded file in the embodiment of the present invention, as shown in fig. 6, comprehensive script record
File 61 processed may include script template 41, script file 51, script recorded file 610 and c recording function point Pc to d
Recording function point Pd, here, c and d are the natural number greater than 1, and c is less than d.
Script file playing module 303, which can use the customized script recorded file of primary Android test frame reading, to be come
Realize script playback;Illustratively, customized script recorded file or comprehensive script are read by primary Android test frame
Recorded file, and mobile phone operation is executed according to the corresponding operational order of corresponding recording function point;By ADB order by primary Android
The Jar packet (i.e. Jar file) that test frame generates is pushed in mobile phone;The script recorded file that will can be run by ADB order
Or comprehensive script recorded file is pushed in mobile phone, and triggers operation Jar packet order, so that mobile phone brings into operation, test script is ordered
It enables, realizes script playback;Later, when carrying out script playback, (exception information institute can be preset if there is exception information
The condition of satisfaction, when meeting corresponding condition, there is exception information in determination), it can use script command and send exception information
Or the storage of screen printing picture is into mobile phone EMS memory;When script command end of run, stores an ends file mark and exist
As the identifier terminated in memory.Here it is possible to periodically check whether ends file mark by ADB order, such as exist
Ends file mark, then by exception information file and screenshot, all read in server, completes software test operation.
Fig. 7 is another flow chart of method for testing software of the embodiment of the present invention, as shown in fig. 7, this method may include:
Step: 701: being based on web terminal analogue mobile phone screen taps, pull, sliding carries out script recording.
Step 702: in script recording process, defining script template or script file.
Step 703: being collectively referred to as script recorded file using script file or script template group.
Step 704: the script template in script recorded file is replaced with into newest script target in server script library,
And it pushes to script file playing module and carries out script playback.
3rd embodiment
In order to more embody the purpose of the present invention, on the basis of first embodiment of the invention and second embodiment,
Further illustrated.
Third embodiment of the invention proposes a kind of server, for realizing script recording function.
Fig. 8 is the hardware structural diagram of the server of the embodiment of the present invention, as shown in figure 8, the server includes first
Processor 801 and the first data transmitter-receiver set 802, wherein
First data transmitter-receiver set 802 is sent to processing for obtaining N number of recording function point, and by N number of recording function point
Device, each recording function point are used at least one action event for terminal for indicating to capture in advance, and N is just whole greater than 1
Number;
First processor 801 is generated for being combined to 1 recording function points in N number of recording function point
Script recorded file.
Illustratively, first processor 801, specifically for 1 recording function points in N number of recording function point
Be combined, generate at least one of following: script file, script template generate script recorded file, and script recorded file is used for
Script template is quoted, and/or, script recorded file includes script file;Wherein, the script template being cited is for updating
When, the script recorded file that corresponding script template is quoted in triggering carries out corresponding update;After generating script recorded file, script record
Each script file in file processed remains unchanged
Further, first processor 801 are also used to after generating script recorded file, trigger data R-T unit;
First data transmitter-receiver set 802, for script recorded file being sent to terminal, makes terminal when being toggled
Script playback is carried out based on script recorded file.
Illustratively, the first data transmitter-receiver set 802, specifically for debugging bridge ADB using the Android of Android test frame
Script recorded file is pushed to terminal by order.
Fourth embodiment
In order to more embody the purpose of the present invention, on the basis of first embodiment of the invention and second embodiment,
Further illustrated.
Fourth embodiment of the invention proposes a kind of script recording arrangement, and Fig. 9 is that the script recording of the embodiment of the present invention is set
Standby composed structure schematic diagram, as shown in figure 9, the script recording arrangement includes: second processor 901 and can be for storing
The first memory 902 of the computer program run on processor,
Second processor 901 is for executing following steps when running computer program:
Obtain N number of recording function point, each recording function point be used to indicate to capture in advance for terminal at least one
The information of action event, the information of action event include mode of operation and operating time point;N is the positive integer greater than 1;
1 recording function points in N number of recording function point are combined, script recorded file is generated.
Illustratively, when second processor is specifically used for operation computer program, following steps are executed:
1 recording function points in N number of recording function point are combined, are generated at least one of following: script text
Part, script template,
Script recorded file is generated, script recorded file is used to quote script template, and/or, script recorded file includes
Script file;The script template being cited is used for when updating, and the script recorded file that corresponding script template is quoted in triggering carries out
It is corresponding to update;After generating script recorded file, each script file in script recorded file is remained unchanged.
5th embodiment
In order to more embody the purpose of the present invention, on the basis of first embodiment of the invention and second embodiment,
Further illustrated.
Fifth embodiment of the invention proposes a kind of terminal, and Figure 10 is the hardware configuration signal of the terminal of the embodiment of the present invention
Figure, as shown in Figure 10, which includes third processor 1001 and the second data transmitter-receiver set 1002;Wherein,
Second data transmitter-receiver set 1002, for the operating system in terminal be Android operation system when, utilize primary peace
Tall and erect test frame obtains script recorded file, and script recorded file is sent to third processor, and script recorded file is used for
It indicates to run for terminal software and the script file of recording;
Third processor 1001, for obtaining the software of terminal software by carrying out script playback to script recorded file
Test result.
Illustratively, the second data transmitter-receiver set 1002 is recorded specifically for the reception script based on Android test frame
File.
Sixth embodiment
In order to more embody the purpose of the present invention, on the basis of first embodiment of the invention and second embodiment,
Further illustrated.
Sixth embodiment of the invention proposes a kind of software test apparatus, can be applied in terminal, and Figure 11 is the present invention
The composed structure schematic diagram of embodiment software test apparatus, as shown in figure 11, which includes: fourth processor
1101 and the second memory 1102 for storing the computer program that can be run on a processor, wherein
Fourth processor 1101 is for executing following steps when running computer program:
When the operating system of terminal is Android operation system, script is obtained using primary Android test frame and records text
Part;Script recorded file is used to indicate to run for terminal software and the script file of recording;
By carrying out script playback to script recorded file, the software test result of terminal software is obtained.
Illustratively, fourth processor executes following steps when being specifically used for operation computer program:
Android debugging bridge ADB order based on Android test frame receives script recorded file.
It, in the absence of conflict, can be in any combination between technical solution documented by the embodiment of the present invention.
In several embodiments provided by the present invention, it should be understood that disclosed method and smart machine, Ke Yitong
Other modes are crossed to realize.Apparatus embodiments described above are merely indicative, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can be tied
It closes, or is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed each group
Can be through some interfaces at the mutual coupling in part or direct-coupling or communication connection, equipment or unit it is indirect
Coupling or communication connection, can be electrical, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member, which can be or may not be, to be physically separated, aobvious as unit
The component shown can be or may not be physical unit, it can and it is in one place, it may be distributed over multiple network lists
In member;Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated into a second processing unit,
It is also possible to each unit individually as a unit, can also be integrated in one unit with two or more units;
Above-mentioned integrated unit both can take the form of hardware realization, can also add the form of SFU software functional unit real using hardware
It is existing.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.
Claims (18)
1. a kind of script method for recording, which is characterized in that the described method includes:
Obtain N number of recording function point, at least one operation for terminal that each recording function point is used to indicate to capture in advance
Event, N are the positive integer greater than 1;
1 recording function points in N number of recording function point are combined, script recorded file is generated;Alternatively,
A recording function point in N number of recording function point is split, script recorded file is generated.
2. the method according to claim 1, wherein at least two in N number of recording function point
Recording function point is combined, and generates script recorded file, comprising:
1 recording function points in N number of recording function point are combined, are generated at least one of following: script text
Part, script template;
Script recorded file is generated, the script recorded file is used to quote the script template, and/or, the script is recorded
File includes the script file;The script template being cited is used for when updating, and the script of corresponding script template is quoted in triggering
Recorded file carries out corresponding update;After generating script recorded file, the script file in the script recorded file is kept not
Become.
3. the method according to claim 1, wherein the method also includes:
After generating the script recorded file, the script recorded file is sent to terminal, terminal is made to be based on the script
Recorded file carries out script playback.
4. according to the method described in claim 3, it is characterized in that, described be sent to terminal for the script recorded file, packet
It includes: the script recorded file being pushed into the terminal using the Android debugging bridge ADB order of Android test frame.
5. a kind of method for testing software, which is characterized in that be applied in terminal, which comprises
When the operating system of the terminal is Android operation system, script recorded file is obtained using Android test frame;It is described
Script recorded file is used to indicate to run for terminal software and the script file of recording;
By carrying out script playback to the script recorded file, the software test result of the terminal software is obtained.
6. according to the method described in claim 5, it is characterized in that, described obtain script recording text using Android test frame
Part, comprising:
Android debugging bridge ADB order based on Android test frame receives the script recorded file.
7. a kind of server, which is characterized in that including first processor and the first data transmitter-receiver set, wherein
First data transmitter-receiver set, for obtaining N number of recording function point, each recording function point is for indicating to capture in advance
At least one action event for terminal, N is positive integer greater than 1;
The first processor is combined 1 recording function points in N number of recording function point for basis,
Generate script recorded file;Alternatively, splitting to a recording function point in N number of recording function point, script is generated
Recorded file.
8. server according to claim 7, which is characterized in that the first processor is specifically used for according to the N
1 recording function points in a recording function point are combined, and are generated at least one of following: script file, script mould
Plate;Script recorded file is generated, the script recorded file is used to quote the script template, and/or, the script records text
Part includes the script file;Wherein, the script template being cited is used for when updating, and the foot of corresponding script template is quoted in triggering
This recorded file carries out corresponding update;Each script file after generating script recorded file, in the script recorded file
It remains unchanged.
9. server according to claim 7, which is characterized in that the first processor is also used to generating the foot
After this recorded file, the data transmitter-receiver set is triggered
First data transmitter-receiver set, for the script recorded file being sent to terminal, makes terminal when being toggled
Script playback is carried out based on the script recorded file.
10. server according to claim 9, which is characterized in that first data transmitter-receiver set is specifically used for utilizing
The script recorded file is pushed to the terminal by the Android debugging bridge ADB order of Android test frame.
11. a kind of script recording arrangement, which is characterized in that can be run on a processor including second processor and for storing
Computer program first memory,
The second processor is for executing following steps when running the computer program:
Obtain N number of recording function point, at least one operation for terminal that each recording function point is used to indicate to capture in advance
The information of event, the information of the action event include mode of operation and operating time point;N is the positive integer greater than 1;
1 recording function points in N number of recording function point are combined, script recorded file is generated;Alternatively,
A recording function point in N number of recording function point is split, script recorded file is generated.
12. equipment according to claim 11, which is characterized in that the second processor is specifically used for running the calculating
When machine program, following steps are executed:
1 recording function points in N number of recording function point are combined, are generated at least one of following: script text
Part, script template,
Script recorded file is generated, the script recorded file is used to quote the script template, and/or, the script is recorded
File includes the script file;The script template being cited is used for when updating, and the script of corresponding script template is quoted in triggering
Recorded file carries out corresponding update;After generating script recorded file, each script file in the script recorded file is protected
It holds constant.
13. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
The step of any one of Claims 1-4 the method is realized when processor executes.
14. a kind of terminal, which is characterized in that including third processor and the second data transmitter-receiver set;Wherein,
Second data transmitter-receiver set, for the operating system in the terminal be Android operation system when, utilize primary Android survey
Examination frame obtains script recorded file, and the script recorded file is used to indicate to run for terminal software and the script text of recording
Part;
Third processor, for obtaining the software of the terminal software by carrying out script playback to the script recorded file
Test result.
15. terminal according to claim 14, which is characterized in that second data transmitter-receiver set, specifically for being based on
The Android debugging bridge ADB order of Android test frame receives the script recorded file.
16. a kind of software test apparatus, which is characterized in that be applied in terminal, the equipment includes fourth processor and is used for
Store the second memory for the computer program that can be run on a processor, wherein
The fourth processor is for executing following steps when running the computer program:
When the operating system of the terminal is Android operation system, script is obtained using primary Android test frame and records text
Part;The script recorded file is used to indicate to run for terminal software and the script file of recording;
By carrying out script playback to the script recorded file, the software test result of the terminal software is obtained.
17. equipment according to claim 16, which is characterized in that the fourth processor is specifically used for running the calculating
When machine program, following steps are executed:
Android debugging bridge ADB order based on Android test frame receives the script recorded file.
18. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
Processor realizes step described in claim 5 or 6 when executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710605880.9A CN109298994A (en) | 2017-07-24 | 2017-07-24 | A kind of script records, method for testing software and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710605880.9A CN109298994A (en) | 2017-07-24 | 2017-07-24 | A kind of script records, method for testing software and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109298994A true CN109298994A (en) | 2019-02-01 |
Family
ID=65167631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710605880.9A Pending CN109298994A (en) | 2017-07-24 | 2017-07-24 | A kind of script records, method for testing software and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109298994A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103313289A (en) * | 2012-03-09 | 2013-09-18 | 腾讯科技(深圳)有限公司 | Wap system automatic test system and method |
CN103853658A (en) * | 2012-12-04 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Automated testing method for production and playback in Android equipment and Android equipment |
CN104461894A (en) * | 2014-12-17 | 2015-03-25 | 用友软件股份有限公司 | Android App operating recording device and method |
WO2015074534A1 (en) * | 2013-11-19 | 2015-05-28 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for processing a recording |
-
2017
- 2017-07-24 CN CN201710605880.9A patent/CN109298994A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103313289A (en) * | 2012-03-09 | 2013-09-18 | 腾讯科技(深圳)有限公司 | Wap system automatic test system and method |
CN103853658A (en) * | 2012-12-04 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Automated testing method for production and playback in Android equipment and Android equipment |
WO2015074534A1 (en) * | 2013-11-19 | 2015-05-28 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for processing a recording |
CN104461894A (en) * | 2014-12-17 | 2015-03-25 | 用友软件股份有限公司 | Android App operating recording device and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908541B (en) | Interface testing method and device, computer equipment and storage medium | |
WO2020155777A1 (en) | Ui automated function testing method, testing device, testing apparatus, and storage medium | |
CN105094783B (en) | method and device for testing stability of android application | |
US7930683B2 (en) | Test automation method for software programs | |
CN102141962B (en) | Safety distributed test framework system and test method thereof | |
CN104461894B (en) | The operation record device and method of Android software | |
CN104461903B (en) | The method and apparatus of test client based on browser | |
CN108959059B (en) | Test method and test platform | |
EP2572294B1 (en) | System and method for sql performance assurance services | |
CN105426278A (en) | Client equipment performance test method and system | |
Nivas | Test harness and script design principles for automated testing of non-GUI or web based applications | |
CN107832207A (en) | Interface performance test method, apparatus, storage medium and computer equipment | |
KR101637371B1 (en) | System for testing an application use for a smart device and method therefor | |
CN102693183A (en) | Method and system for realizing automatic software testing | |
CN101295280A (en) | Automatic software debugging method and system | |
CN111290951B (en) | Test method, terminal, server, system and storage medium | |
CN103544100A (en) | Method, system and client side for testing APP of portable data processing equipment | |
CN113111000B (en) | Continuous integrated automatic test system and method, electronic equipment and storage medium | |
CN106649107A (en) | Automated testing method and device for stability of Android system | |
US10846212B2 (en) | Evidence gathering system and method | |
CN109783533A (en) | Collecting method, device, computer equipment and storage medium | |
CN109426611A (en) | A kind of method for testing software and device | |
CN109558318A (en) | A kind of code administration method and code storage distributed system | |
JP2007004255A (en) | Program for debug support | |
JP2014035595A (en) | Testing device for communication system, testing program for communication system, and testing method for communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190201 |
|
RJ01 | Rejection of invention patent application after publication |