CN107480036A - Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions - Google Patents
Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions Download PDFInfo
- Publication number
- CN107480036A CN107480036A CN201710552993.7A CN201710552993A CN107480036A CN 107480036 A CN107480036 A CN 107480036A CN 201710552993 A CN201710552993 A CN 201710552993A CN 107480036 A CN107480036 A CN 107480036A
- Authority
- CN
- China
- Prior art keywords
- test
- ios mobile
- mobile solutions
- ios
- automatic
- 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/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Probability & Statistics with Applications (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of automatic test approach, device, storage medium and the terminal of iOS Mobile solutions, the automatic test approach comprises the following steps:Start the present test field scape of the iOS Mobile solutions;The positional information of the control of the present test field scape is obtained, pair control performance objective operation to be operated corresponding with the positional information;After the completion of object run execution, judge whether the present test field scape is last test scene, if it is not, then starting next test scene;Until complete the traversal of all test scenes.By the embodiment of the present invention, all test scenes, the cost that saves manpower and time can be traveled through automatically and improves testing efficiency.
Description
Technical field
The present invention relates to the automatic test technology field of iOS Mobile solutions, more particularly to a kind of iOS Mobile solutions is automatic
Method of testing, device, storage medium and terminal.
Background technology
Performance test to a Mobile solution software or Mobile solution, including CPU (Central Processing
Unit, central processing unit) occupancy, EMS memory occupation situation, frame per second, network traffics service condition, electricity service condition, be thereon
An essential link before line, while be also the foundation pointedly optimized to it in the later stage.It is (a kind of with Android
The operating system of freedom and open source code based on Linux, is mainly used for mobile device, such as smart mobile phone and flat board electricity
Brain) system compares, iOS (Mobile operating system developed by Apple Inc.) systems because the height of its system is closed, and due to
IOS uses sandbox (sandbox) Security Techniques, between different software independently of each other, it is difficult to mutually obtain data.IOS at present
The performance test common practice of Mobile solution software has two kinds of thinkings:One kind is artificially to pacify each Mobile solution software
It is attached in iOS device, then manually utilizes Xcode's (Integrated Development Tool operated on operating system Mac OS X)
Instruments instruments carry out black box performance test;Another kind is by integrating third-party performance on Mobile solution software
Test SDK (Software Development Kit, SDK), it is manually installed, operation Mobile solution to be measured is soft
Part and collecting performance data.Significant limitation be present using existing test mode:On the one hand, efficiency is low, can only be to property
Energy test scene is operated manually to complete the switching of test and different performance test scene, so needs to expend a large amount of manpowers
And time, testing efficiency are extremely low;On the one hand, test report defect, obtained result only contain the information and performance number of equipment
According to, it is difficult to positioning performance bottleneck, it is difficult to targetedly optimize;On the other hand, pure Black-box Testing can not be accomplished, for property
The unwanted extra framework bags of institute when needing integration release can be tested.
The content of the invention
The purpose of the embodiment of the present invention be to provide a kind of automatic test approach of iOS Mobile solutions, device, storage medium and
Terminal, can effectively solve in the prior art for iOS Mobile solutions using it is manually operated tested caused by testing efficiency it is low,
The problem of expending a large amount of manpowers and time, greatly improves testing efficiency, cost that time and manpower is saved.
To achieve the above object, the embodiments of the invention provide a kind of automatic test approach of iOS Mobile solutions, including with
Lower step:
Start the present test field scape of the iOS Mobile solutions;
The positional information of the control of the present test field scape is obtained, pair control to be operated corresponding with the positional information
Performance objective operates;
After the completion of object run execution, judge whether the present test field scape is last test scene, if
It is no, then start next test scene;
Until complete the traversal of all test scenes.
Compared with prior art, the automatic test approach of iOS Mobile solutions disclosed by the invention is by obtaining current test
The positional information of the control of scene, and the control performance objective operation to be operated according to corresponding to positional information, and in the target
Operation starts next test scene after the completion of performing, until completing the technical scheme of the traversal of all test scenes, solves existing
Object run can only be manually performed in technology in test scene by, which having, causes to expend a large amount of manpowers and time cost, greatly reduces and survey
The problem of trying efficiency, obtain to travel through all test scenes, the cost that saves manpower and time automatically and improve test and imitate
The beneficial effect of rate.
Preferably, obtaining the positional information of the control of the present test field scape includes:
Xpath attributes and the text attributes of the UI trees of the iOS Mobile solutions are inquired about to obtain the present test field scape
Control positional information;
The object run is clicking operation.
Preferably, when starting the present test field scape of the iOS Mobile solutions, in addition to:
Start the performance data collection process of the present test field scape, the performance data collection of the present test field scape
Process is used for the performance data for gathering the present test field scape.
Preferably, before the performance data collection process of the present test field scape is started, in addition to:Obtain performance ginseng
Digital-to-analogue plate;The performance parameter template includes performance parameter;
The performance data collection process of the present test field scape is used to gather the property according to the performance parameter template
Can performance data corresponding to parameter.
Preferably, the performance parameter includes CPU information, memory information and frame per second information.
Preferably, after the traversal of all test scenes is completed, in addition to:
The all properties data collected are generated into trace files;
Process corresponding to the iOS Mobile solutions is searched in the trace files, and according to the iOS Mobile solutions
Corresponding process filters out corresponding performance data;
The corresponding performance data generation json file outputs that will filter out.
Preferably, when to operational controls performance objective operation to be measured corresponding to the positional information, in addition to:To described
Present test field scape sectional drawing.
Preferably, when starting the present test field scape of the iOS Mobile solutions, in addition to:
When the present test field scape is first test scene in all test scenes of traversal, start to checkout area
The video record of scape;
And when completing the traversal of all test scenes, terminate the video record to test scene.
Preferably, the video record started to test scene, including:Based on AppleScript and using MAC OS
The quicktime that system X carries carries out video record to test scene.
Preferably, before the present test field scape of the iOS Mobile solutions is started, in addition to:
The ipa bags of the iOS Mobile solutions are parsed, obtain the title and Bundle_ of the iOS Mobile solutions
The UDID of equipment where ID, and the iOS Mobile solutions;
Ipa bags are installed automatically according to the UDID and the iOS Mobile solutions title;
Automatic start is carried out to the software kit after installation according to the UDID and Bundle_ID.
Preferably, in the step of being parsed to the ipa bags of the iOS Mobile solutions, in addition to:Obtain the iOS
The value of the CFBund leName fields of Mobile solution.
Preferably, the value of the CFBundl eName fields in the trace files is searched and determines that the iOS is moved
Process corresponding to dynamic application.
Preferably, after the traversal of all test scenes is completed, in addition to:
The system journal of the iOS Mobile solutions is obtained according to the UDID and Bundle_ID.
Preferably, after the traversal of all test scenes is completed, in addition to:
Statistical disposition, profit are carried out to the performance data in json files, shot image information, video record information and system journal
With web front-end technology, test result is exported with patterned form generation test report.
The embodiment of the present invention additionally provides a kind of automatic testing equipment of iOS Mobile solutions, including:
Test scene starting module, for starting the present test field scape of the iOS Mobile solutions;
Operation executing module, the positional information of the control for obtaining the present test field scape, pair with the position believe
Control performance objective operation to be operated corresponding to breath;
Spider module, after the completion of being performed in the object run, and the present test field scape is not last survey
Start next test scene during the scape of examination hall, until completing the traversal of all test scenes.
Compared with prior art, the automatic testing equipment of iOS Mobile solutions disclosed by the invention is by obtaining current test
The positional information of the control of scene, and the control performance objective operation to be operated according to corresponding to positional information, and in the target
Operation starts next test scene after the completion of performing, until completing the technical scheme of the traversal of all test scenes, solves existing
Object run can only be manually performed in technology in test scene by, which having, causes to expend a large amount of manpowers and time cost, greatly reduces and survey
The problem of trying efficiency, obtain to travel through all test scenes, the cost that saves manpower and time automatically and improve test and imitate
The beneficial effect of rate.
Preferably, the automatic testing equipment also includes:
Performance data collection module, for when starting the present test field scape of the iOS Mobile solutions, starting described work as
The performance data collection process of preceding test scene;The performance data collection process of the present test field scape is used to gather described work as
The performance data of preceding test scene.
Preferably, the performance data collection module is additionally operable to starting the performance data collection of the present test field scape
Before process, performance parameterized template is obtained;
The performance parameter template includes performance parameter;The performance data collection process of the present test field scape is used for root
Performance data corresponding to the performance parameter is gathered according to the performance parameter template.
Preferably, the performance data collection module is used to all properties data collected generating trace files,
Process corresponding to the iOS Mobile solutions, and the process according to corresponding to the iOS Mobile solutions are searched in the trace files
Corresponding performance data is filtered out, the corresponding performance data generation json file outputs that will filter out.
Preferably, the automatic testing equipment also includes screen capture module and video record module, the operation executing module
It is additionally operable to when to operational controls performance objective operation to be measured corresponding to the positional information, call the screen capture module;It is described
Screen capture module is used for the present test field scape sectional drawing;
The test scene starting module is additionally operable in the present test field scape as in all test scenes of traversal
During first test scene, video record module is called;The video record module is used to start records to the video of test scene
System;
The spider module is additionally operable to when completing the traversal of all test scenes, and the video record module terminates to surveying
The video record of examination hall scape.
Preferably, the automatic testing equipment also includes installation starting module, and the installation starting module includes:
Analyzing sub-module, for before the iOS Mobile solutions are started, being carried out to the ipa bags of the iOS Mobile solutions
Parsing, obtains the title and Bundle_ID of the iOS Mobile solutions, and the equipment where the iOS Mobile solutions
UDID;
Submodule is installed, for being pacified automatically to ipa bags according to the UDID and the iOS Mobile solutions title
Dress;
Start submodule, automatic start is carried out to the software kit after installation according to the UDID and Bundle_ID.
Preferably, the automatic testing equipment also includes:
System journal acquisition module, for obtaining the iOS Mobile solutions according to the UDID and Bundle_ID
System journal.
Preferably, the automatic testing equipment also includes:
Test report generation module, for the performance data in json files, shot image information, video record information and being
Daily record of uniting carries out statistical disposition, using web front-end technology, by test result with patterned form generation test report output.
The embodiment of the present invention additionally provides a kind of storage medium, and the storage medium includes the program of storage, in the journey
Equipment performs the automatic test approach of above-mentioned iOS Mobile solutions where the storage medium is controlled during sort run.
The embodiment of the present invention additionally provides a kind of terminal, including one or more processors;Memory;And one or more
Individual program, wherein one or more of programs are stored in the memory, and it is configured as by one or more
Individual computing device, described program include being used for the automatic test approach for performing above-mentioned iOS Mobile solutions.
Brief description of the drawings
Fig. 1 is a kind of flow chart of the automatic test approach of iOS Mobile solutions in the embodiment of the present invention.
Fig. 2 is a kind of flow chart of the automatic test approach of iOS Mobile solutions in the embodiment of the present invention.
Fig. 3 is a kind of schematic diagram of performance parameter template in the embodiment of the present invention.
Fig. 4 is a kind of flow chart of the automatic test approach of iOS Mobile solutions in the embodiment of the present invention.
Fig. 5 is a kind of structural representation of the automatic testing equipment of iOS Mobile solutions in the embodiment of the present invention.
Fig. 6 is a kind of structural representation of the automatic testing equipment of iOS Mobile solutions in the embodiment of the present invention.
Fig. 7 is a kind of structural representation of the automatic testing equipment of iOS Mobile solutions in the embodiment of the present invention.
Fig. 8 is a kind of structural representation of the automatic testing equipment of iOS Mobile solutions in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Embodiment 1
It is a kind of flow chart of the automatic test approach for iOS Mobile solutions that the embodiment of the present invention 1 provides referring to Fig. 1.Institute
Automatic test approach is stated to comprise the following steps:
Step S103, the present test field scape of the iOS Mobile solutions is started.
Step S104, the positional information of the control of the present test field scape is obtained, it is pair corresponding with the positional information
Control performance objective operation to be operated.
Step S105, after the completion of object run execution, judge whether the present test field scape is last survey
Examination hall scape, if it is not, step S106 is then performed, if so, then performing step S107.
Step S106, next test scene is started.
Step S107, until completing the traversal of all test scenes.
It should be noted that the test scene of the iOS Mobile solutions can be the iOS Mobile solutions can by with
The display interface of family operation, by being operated any control on display interface to show operating result.It is such as described
The test scene of iOS Mobile solutions can include login interface and system sets interface etc., and the login interface includes logging in
Control and registration control, the login control includes user name input frame and Password Input frame, defeated by automatically clicking user name
Keyboard can be started by entering frame or Password Input frame, and control is registered by automatically clicking, can enter the display that log-on message is filled in
Interface;The system sets interface to include font size adjustment control, iOS Mobile solutions renewal control etc., by certainly
Dynamic point hits the font size adjustment control and enters font size adjustment interface, is updated and controlled by automatically clicking iOS Mobile solutions
Part can enter the renewal interface of iOS Mobile solutions.Wherein, the present test field scape refers to current tested display
Interface, the present test field scape can be the login interface of the iOS Mobile solutions, and the last test scene can be
System sets interface.The test scene of iOS Mobile solutions is not limited to described above, no longer repeats one by one here.
In addition, when whether judge present test field scape is last test scene, can be by judging present test field
Whether the title and/or numbering of the control to be operated of scape and the title and/or numbering of default last test scene are identical, if not
Together, then it is not last test scene, while starts next test scene, until completes the traversal of all test scenes.
Specifically, the control of iOS Mobile solutions to be measured is carried out certainly using based on webdriveragent frameworks here
Dynamic operation, by the Xpath attributes and text attributes of the UI trees for searching iOS Mobile solutions to be measured to obtain the present test field
The positional information of the control of scape.The object run is clicking operation.Such as, it is desirable to the button that word is " Login " is searched, then
It can be obtained by such as issuing orders:
curl–X POST‘{“using”:”xpath”,\“value”:”//XCUIElementT ypeButton[@name
=' Login '] " ' $ DEVICE_URL/session/elements
Wherein, the server that $ DEVICE_URL are started by the equipment that webdriveragent is iOS Mobile solutions to be measured
Address.After coordinate position corresponding to control is got, corresponding control to be operated can be completed by click () method
Click on, so as to travel through all test scenes automatically, save manpower and time cost, improves testing efficiency.
Embodiment 2
As shown in Fig. 2 be the embodiment of the present invention 2 provide a kind of iOS Mobile solutions automatic test approach, the present embodiment
Further improvement is made on the basis of embodiment 1, has theed improvement is that:
In step s 103, when starting the present test field scape of the iOS Mobile solutions, in addition to:Start described work as
The performance data collection process of preceding test scene, the performance data collection process of the present test field scape are used to gather described work as
The performance data of preceding test scene.
Also include after step S107:
Step S108, all properties data collected are generated into trace files.
Step S109, process corresponding to the iOS Mobile solutions is searched in the trace files, and according to the iOS
Process corresponding to Mobile solution filters out corresponding performance data.
Step S110, the corresponding performance data generation json file outputs that will filter out.
Specifically, before the performance data collection process of the present test field scape is started, in addition to:Pass through
" instruments-s " obtains performance parameterized template, and the performance parameter template is as shown in figure 3, the performance parameter template bag
Include performance parameter.The performance data collection process of the present test field scape is used for according to performance parameter template collection
Performance data corresponding to performance parameter.The performance parameter includes CPU information, memory information and frame per second information.Can be by such as
Issue orders and get corresponding CPU information and memory information:
instruments–w$UDID–t“Activity Monitor”-D$PERF_TRACE_FILE
Wherein, $ UDID are the UDID of Devices to test, and $ PERF_TRACE_FILE are the trace files of storge quality data
Name, extends entitled .trace.Similarly, corresponding frame per second information can be got by such as issuing orders:
Instruments–w$UDID–t“Core Animation”–D$PERF_TRACE_FILE
When test scene, which travels through, to be completed, terminate performance data collection process, all performance datas are all written with correspondingly
Trace files.
The performance data files that instruments is collected are trace files, are only capable of being parsed by instruments softwares,
It cannot be directly used to generate performance test report.The embodiment of the present invention is based on instrumentsParser [5] to trace files
Parsed.During due to by start up with command-line options instruments automatic data collection performance datas, iOS to be measured can not be specified to move
Dynamic application, therefore, when parsing trace files, it is necessary to filter the data of iOS Mobile solutions to be measured.Here injection is passed through
Object-C source codes, Process_name parameters are passed to, process corresponding to iOS Mobile solutions to be measured is filtered from trace files,
It can be searched according to the value of the CFBund leName fields in the trace files and corresponding to determining the iOS Mobile solutions
Process, and the process according to corresponding to the iOS Mobile solutions filters out corresponding performance data, the corresponding performance that will filter out
Data generation json file outputs.It is specific as follows:
InstrumentsParserXcode engineerings are compiled, generate executable binary file Instru
MentsParser, the parsing of trace files can be completed by performing such as to issue orders.
instrumentsParser–p$PROCESS_NAME–i$PERF_TRACE_FILE–o$OUT PUT_DIR–f$
OUTPUT_FILE
Wherein $ PROCESS_NAME are the process name of iOS Mobile solutions to be measured, and $ PERF_TRACE_FILE are performance data
The trace filenames that collection process is got, $ OUTPUT_DIR, $ OUTPUT_FILE be respectively parse output file and
Filename, wherein the entitled json files of the file exported.
During test scene travels through automatically, to operational controls performance objective to be measured corresponding to the positional information
During operation, in addition to:To the present test field scape sectional drawing.Specifically, being carried out using libidevicemobile external members, surveying
While each step Click () operation that examination hall scape travels through automatically, sectional drawing is carried out to screen, to record corresponding operating and equipment
Picture Showing.Pass through " idevicescreenshot xxx.png " order completion screenshot captures.
When starting the present test field scape of the iOS Mobile solutions, in addition to:The present test field scape is traversal
During first test scene in all test scenes, start the video record to test scene, specifically by based on
AppleScript simultaneously carries out video record using the quicktime that OSX systems carry to test scene;And complete to own
During the traversal of test scene, terminate the video record to test scene.It is as follows to the video record script of test scene:
on run argv
setmovieName to item 1 of argv
setdelaySeconds to item 2 of argv
setfilePath to(path to desktop as text)&movieName
set f to a reference to file filePath
tell application"QuickTime Player"
setnewMovieRecording to new movie recording
tellnewMovieRecording
start
delaydelaySeconds
pause
savenewMovieRecording in f
stop
closenewMovieRecording
end tell
end tell
end run
This is not limited to for the mode of screenshot capture and video record, is no longer repeated one by one here.
Embodiment 3
As shown in figure 4, the embodiment of the present invention 3 has made further improvement on the basis of embodiment 2, improvements exist
In:Also include before step S103:
Step S100, the ipa bags of the iOS Mobile solutions are parsed, obtain the iOS Mobile solutions title and
The UDID of equipment where Bundle_ID, and the iOS Mobile solutions.
Step S101, ipa bags are installed automatically according to the UDID and the iOS Mobile solutions title.
Step S102, automatic start is carried out to the software kit after installation according to the UDID and Bundle_ID.
After step silo, in addition to:
Step S111, the system journal of the iOS Mobile solutions is obtained according to UDID and Bundle_ID.
Step S112, the performance data in json files, shot image information, video record information and system journal are united
Meter processing, using web front-end technology, by test result with patterned form generation test report output.
Specifically, in the step s 100, first, the ipa bags of iOS Mobile solutions to be measured are decompressed automatically, obtained
Info.plist files under Payload/xxx.app/ catalogues, wherein xxx are the title of iOS Mobile solutions to be measured.Then it is right
Info.plist files are parsed, and corresponding Bundle_ID is got from CFBundleIdentifier fields;From
CFBundleShortVersionString fields get corresponding version number;Got correspondingly from CFBundleName fields
Display Name.
In step S101 and step S102, pass through " idevice_id-l " order the UDID for getting Devices to test;It is right
In the installation of inclusion, pass through " ideviceinstaller-u $ UDID-i $ IPANAME " order complete inclusion automatic installation, its
Middle $ UDID are the UDID of Devices to test, and $ IPANAME are inclusion filename to be measured.Startup for inclusion, passes through "
The automatic start of inclusion is completed in idevicedebug-u $ UUID run $ BUNDLE_ID " orders, and wherein $ UDID are Devices to test
UDID, $ Bundle_ID are the value of CFBundle Identifier fields that inclusion resolution phase is got.
In step S111, iOS movements to be measured are obtained using the idevicesyslog of libimobiledevice external members
The system journal of application.Can be using order " idevicesyslog-u UDID | grep BUNDLE_ID " to obtain pair automatically
The system journal answered simultaneously is stored in corresponding file, and wherein $ UDID are the UDID of equipment to be measured, and $ BUNDLE_ID are inclusion parsing
The value for the CFBundleIdentifier fields that stage gets.
In step S112, increase income slotting using web front-end technology such as jQuery, ajax, AngularJS and echart etc.
Part shows test result in the form of patterned.User both can see the figure that each performance indications change over time
Table, performance indications peak value, valley, average value, while the complete information of performance test process can also be checked:Including system day
Will, screenshot capture, operation video etc..By testing automatically, web automated performance testing reports directly perceived and full and accurate are ultimately produced
Accuse, user needs only to check that test report can the performance overview that goes out under each test scene of analyzing and positioning and detailed performance
Test data and screenshot capture, recording, can assist developer to quickly locate performance bottleneck in time.
In summary, the automatic test approach of the iOS Mobile solutions of the embodiment of the present invention, iOS movements can be automatically performed
Using the installation of inclusion, startup, test scene automatic traversal, the automatic data collection of performance data, sectional drawing, video record, until
The generation of performance report is automated, cost of labor and time cost is so greatly reduced, improves testing efficiency.
Embodiment 4
As shown in figure 5, the embodiments of the invention provide a kind of automatic testing equipment of iOS Mobile solutions, including:
Test scene starting module 12, for starting the present test field scape of the iOS Mobile solutions;
Operation executing module 14, the positional information of the control for obtaining the present test field scape, pair with the position
Control performance objective operation to be operated corresponding to information;
Spider module 16, after the completion of being performed in the object run, and the present test field scape is not last
Start next test scene during test scene, until completing the traversal of all test scenes.
The automatic testing equipment of iOS Mobile solutions disclosed by the invention is by obtaining the position of the control of present test field scape
Information, and the control performance objective operation to be operated according to corresponding to positional information, and opened after the completion of object run execution
Next test scene is moved, until completing the technical scheme of the traversal of all test scenes, is solved in the prior art in checkout area
Object run can only be manually performed in scape to be caused to expend a large amount of manpowers and time cost, greatly reduces the problem of testing efficiency, is obtained
All test scenes, the cost that saves manpower and time and the beneficial effect for improving testing efficiency can be traveled through automatically by obtaining.
Embodiment 5
As shown in fig. 6, the embodiment of the present invention has made further improvement on the basis of embodiment 4, the improvement is that:
The automatic testing equipment also includes:
Performance data collection module 13, for when starting the present test field scape of the iOS Mobile solutions, described in startup
The performance data collection process of present test field scape;The performance data collection process of the present test field scape is described for gathering
The performance data of present test field scape.
The performance data collection module 13 is additionally operable to starting the performance data collection process of the present test field scape
Before, performance parameterized template is obtained;The performance parameter template includes performance parameter;The performance data of the present test field scape
Collection process is used for the performance data according to corresponding to the performance parameter template gathers the performance parameter.
The performance data collection module 13 is additionally operable to all properties data generation trace files that will be collected, in institute
State and process corresponding to the iOS Mobile solutions is searched in trace files, and the process mistake according to corresponding to the iOS Mobile solutions
Corresponding performance data is filtered out, the corresponding performance data generation json file outputs that will filter out.
It is thus possible to realize the acquisition that test data is obtained to the performance parameter of each test scene, it is easy to later data point
Analysis and performance bottleneck positioning.
Embodiment 6
As shown in fig. 7, the embodiment of the present invention has made further improvement on the basis of embodiment 5, the improvement is that:
The automatic testing equipment also includes screen capture module 15 and video record module 17, and the operation executing module 14 is additionally operable to right
Corresponding to the positional information during operational controls performance objective operation to be measured, the screen capture module 15 is called;The screen capture module
15 are used for the present test field scape sectional drawing;The test scene starting module 12 is additionally operable to
During first test scene in all test scenes of traversal, video record module 17 is called;The video record module 17
For starting the video record to test scene;The spider module 16 is additionally operable to when completing the traversal of all test scenes,
The video record module 17 terminates the video record to test scene.
So, by automatic sectional drawing and video record, it is easy to the later stage to analyze the performance of each test scene.
Embodiment 7
As shown in figure 8, the embodiment of the present invention has made further improvement on the basis of embodiment 6, the improvement is that:
The automatic testing equipment also includes installation starting module 11, system journal acquisition module 18 and test report generation module 19,
The installation starting module 18 includes:Analyzing sub-module 111, for before the iOS Mobile solutions are started, to the iOS
The ipa bags of Mobile solution are parsed, and obtain the title and Bundle_ID of the iOS Mobile solutions, and iOS movements
Using the UDID of the equipment at place;Submodule 112 is installed, for the title pair according to the UDID and the iOS Mobile solutions
Ipa bags are installed automatically;Start submodule 113, the software kit after installation is entered according to the UDID and the Bundle_ID
Row automatic start.The system journal acquisition module 18 is used to obtain the iOS shiftings according to the UDID and Bundle_ID
The system journal of dynamic application.The test report generation module 19 is used to believe the performance data in json files, sectional drawing
Breath, video record information and system journal carry out statistical disposition, using web front-end technology, by test result with patterned form
Generate test report output.
The automatic testing equipment of the iOS Mobile solutions of the embodiment of the present invention realizes the full-range automatic of iOS Mobile solutions
Change test, reduce cost of labor and testing time, greatly improve testing efficiency.
Embodiment 8
The embodiment of the present invention additionally provides a kind of storage medium, and the storage medium includes the program of storage, in the journey
Equipment where the storage medium is controlled during sort run performs the iOS Mobile solutions described in any embodiment in embodiment 1-3
Automatic test approach.
The embodiment of the present invention additionally provides a kind of terminal, including one or more processors;Memory;And one or more
Individual program, wherein one or more of programs are stored in the memory, and it is configured as by one or more
Individual computing device, described program include being used to perform the automatic of the iOS Mobile solutions in embodiment 1-3 described in any embodiment
Method of testing.The terminal can be mobile phone, tablet personal computer, notebook etc..
It should be noted that device embodiment described above is only schematical, wherein described be used as separating component
The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also
It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality
Need to select some or all of module therein to realize the purpose of this embodiment scheme.In addition, device provided by the invention
In embodiment accompanying drawing, the annexation between module represents there is communication connection between them, specifically can be implemented as one or
A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, you can to understand
And implement.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow
Software is helped to add the mode of required common hardware to realize, naturally it is also possible to include application specific integrated circuit, specially by specialized hardware
Realized with CPU, private memory, special components and parts etc..Generally, all functions of being completed by computer program can
Easily realized with corresponding hardware, moreover, for realizing that the particular hardware structure of same function can also be a variety of more
Sample, such as analog circuit, digital circuit or special circuit etc..But it is more for the purpose of the present invention in the case of software program it is real
It is now more preferably embodiment.Based on such understanding, technical scheme is substantially made to prior art in other words
The part of contribution can be embodied in the form of software product, and the computer software product is stored in the storage medium that can be read
In, such as the floppy disk of computer, USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory
Device (RAM, Random Access Memory), magnetic disc or CD etc., including some instructions are causing a computer to set
Standby (can be personal computer, server, or network equipment etc.) performs the method described in each embodiment of the present invention.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as
Protection scope of the present invention.
Claims (24)
1. a kind of automatic test approach of iOS Mobile solutions, it is characterised in that comprise the following steps:
Start the present test field scape of the iOS Mobile solutions;
The positional information of the control of the present test field scape is obtained, a pair control to be operated corresponding with the positional information performs
Object run;
After the completion of object run execution, judge whether the present test field scape is last test scene, if it is not, then
Start next test scene;
Until complete the traversal of all test scenes.
2. the automatic test approach of iOS Mobile solutions as claimed in claim 1, it is characterised in that obtain the current test
The positional information of the control of scene includes:
Xpath attributes and the text attributes of the UI trees of the iOS Mobile solutions are inquired about to obtain the control of the present test field scape
The positional information of part;
The object run is clicking operation.
3. the automatic test approach of iOS Mobile solutions as claimed in claim 1, it is characterised in that starting the iOS movements
During the present test field scape of application, in addition to:
Start the performance data collection process of the present test field scape, the performance data collection process of the present test field scape
For gathering the performance data of the present test field scape.
4. the automatic test approach of iOS Mobile solutions as claimed in claim 3, it is characterised in that starting the current survey
Before the performance data collection process of examination hall scape, in addition to:Obtain performance parameterized template;The performance parameter template includes performance
Parameter;
The performance data collection process of the present test field scape is used to gather the performance ginseng according to the performance parameter template
Performance data corresponding to number.
5. the automatic test approach of iOS Mobile solutions as claimed in claim 4, it is characterised in that the performance parameter includes
CPU information, memory information and frame per second information.
6. the automatic test approach of iOS Mobile solutions as claimed in claim 4, it is characterised in that complete all checkout areas
After the traversal of scape, in addition to:
The all properties data collected are generated into trace files;
Process corresponding to the iOS Mobile solutions is searched in the trace files, and it is corresponding according to the iOS Mobile solutions
Process filter out corresponding performance data;
The corresponding performance data generation json file outputs that will filter out.
7. the automatic test approach of the iOS Mobile solutions as described in claim any one of 1-6, it is characterised in that to described
Corresponding to positional information during operational controls performance objective operation to be measured, in addition to:To the present test field scape sectional drawing.
8. the automatic test approach of the iOS Mobile solutions as described in claim 1-6, it is characterised in that moved starting the iOS
During the present test field scape of dynamic application, in addition to:
When the present test field scape is first test scene in all test scenes of traversal, start to test scene
Video record;
And when completing the traversal of all test scenes, terminate the video record to test scene.
9. the automatic test approach of iOS Mobile solutions as claimed in claim 8, it is characterised in that the startup is to checkout area
The video record of scape, including:The quicktime carried based on AppleScript and using MAC OS system X is to test scene
Carry out video record.
10. the automatic test approach of iOS Mobile solutions as claimed in claim 1, it is characterised in that moved starting the iOS
Before the present test field scape of dynamic application, in addition to:
The ipa bags of the iOS Mobile solutions are parsed, obtain the title and Bundle_ID of the iOS Mobile solutions, with
And the UDID of the equipment where the iOS Mobile solutions;
Ipa bags are installed automatically according to the UDID and the iOS Mobile solutions title;
Automatic start is carried out to the software kit after installation according to the UDID and Bundle_ID.
11. the automatic test approach of iOS Mobile solutions as claimed in claim 10, it is characterised in that moved to the iOS
In the step of ipa bags of application are parsed, in addition to:Obtain the value of the CFBundleName fields of the iOS Mobile solutions.
12. the automatic test approach of iOS Mobile solutions as claimed in claim 6, it is characterised in that according to trace texts
The value of CFBundleName fields in part is searched and determines process corresponding to the iOS Mobile solutions.
13. the automatic test approach of iOS Mobile solutions as claimed in claim 6, it is characterised in that complete all checkout areas
After the traversal of scape, in addition to:
The system journal of the iOS Mobile solutions is obtained according to UDID and Bundle_ID.
14. the automatic test approach of Mobile solution as claimed in claim 13, it is characterised in that complete all test scenes
Traversal after, in addition to:
Statistical disposition is carried out to the performance data in json files, shot image information, video record information and system journal, utilized
Web front-end technology, by test result with patterned form generation test report output.
A kind of 15. automatic testing equipment of iOS Mobile solutions, it is characterised in that including:
Test scene starting module, for starting the present test field scape of the iOS Mobile solutions;
Operation executing module, the positional information of the control for obtaining the present test field scape, pair with the positional information pair
The control performance objective to be operated operation answered;
Spider module, after the completion of being performed in the object run, and the present test field scape is not last checkout area
Start next test scene during scape, until completing the traversal of all test scenes.
16. the automatic testing equipment of iOS Mobile solutions as claimed in claim 15, it is characterised in that the automatic test dress
Putting also includes:
Performance data collection module, for when starting the present test field scape of the iOS Mobile solutions, starting the current survey
The performance data collection process of examination hall scape;The performance data collection process of the present test field scape is used to gather the current survey
The performance data of examination hall scape.
17. the automatic testing equipment of iOS Mobile solutions as claimed in claim 16, it is characterised in that the performance data is adopted
Collection module is additionally operable to before the performance data collection process of the present test field scape is started, and obtains performance parameterized template;
The performance parameter template includes performance parameter;The performance data collection process of the present test field scape is used for according to institute
State performance parameter template and gather performance data corresponding to the performance parameter.
18. the automatic testing equipment of iOS Mobile solutions as claimed in claim 17, it is characterised in that the performance data is adopted
Collection module is used to all properties data collected generating trace files, and the iOS is searched in the trace files and is moved
Process corresponding to dynamic application, and the process according to corresponding to the iOS Mobile solutions filters out corresponding performance data, will filter out
The generation json files output of corresponding performance data.
19. the automatic testing equipment of the iOS Mobile solutions as described in claim any one of 15-18, it is characterised in that it is described from
Dynamic test device also includes screen capture module and video record module, and the operation executing module is additionally operable to the positional information
During corresponding operational controls performance objective operation to be measured, the screen capture module is called;The screen capture module is used for described current
Test scene sectional drawing;
It is first in all test scenes of traversal that the test scene starting module, which is additionally operable in the present test field scape,
During individual test scene, video record module is called;The video record module is used to start the video record to test scene;
The spider module is additionally operable to when completing the traversal of all test scenes, and the video record module terminates to checkout area
The video record of scape.
20. the automatic testing equipment of iOS Mobile solutions as claimed in claim 19, it is characterised in that the automatic test dress
Putting also includes installation starting module, and the installation starting module includes:
Analyzing sub-module, for before the iOS Mobile solutions are started, being solved to the ipa bags of the iOS Mobile solutions
Analysis, obtain the title and Bundle_ID of the iOS Mobile solutions, and the UDID of the equipment where the iOS Mobile solutions;
Submodule is installed, for being installed automatically to ipa bags according to the UDID and the iOS Mobile solutions title;
Start submodule, automatic start is carried out to the software kit after installation according to the UDID and Bundle_ID.
21. the automatic testing equipment of iOS Mobile solutions as claimed in claim 20, it is characterised in that the automatic test dress
Putting also includes:
System journal acquisition module, the system for obtaining the iOS Mobile solutions according to the UDID and Bundle_ID
Daily record.
22. the automatic testing equipment of iOS Mobile solutions as claimed in claim 21, it is characterised in that the automatic test dress
Putting also includes:
Test report generation module, for the performance data in json files, shot image information, video record information and system day
Will carries out statistical disposition, using web front-end technology, by test result with patterned form generation test report output.
23. a kind of storage medium, it is characterised in that the storage medium includes the program of storage, and time control is run in described program
Equipment perform claim requires the automatic test side of the iOS Mobile solutions described in any one in 1-14 where making the storage medium
Method.
24. a kind of terminal, it is characterised in that including one or more processors;Memory;And one or more programs, its
Described in one or more programs be stored in the memory, and be configured as being held by one or more of processors
OK, described program includes being used for the automatic test approach that perform claim requires the iOS Mobile solutions in 1-14 described in any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710552993.7A CN107480036A (en) | 2017-07-07 | 2017-07-07 | Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710552993.7A CN107480036A (en) | 2017-07-07 | 2017-07-07 | Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107480036A true CN107480036A (en) | 2017-12-15 |
Family
ID=60596124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710552993.7A Pending CN107480036A (en) | 2017-07-07 | 2017-07-07 | Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107480036A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108536588A (en) * | 2018-03-21 | 2018-09-14 | 四川斐讯信息技术有限公司 | A kind of method and system of test APP programs |
CN109298982A (en) * | 2018-08-29 | 2019-02-01 | 广州虎牙信息科技有限公司 | The acquisition method and device of IOS system performance information |
CN109815947A (en) * | 2018-12-14 | 2019-05-28 | 深圳壹账通智能科技有限公司 | Test method, device and the computer equipment of application |
CN110188045A (en) * | 2019-05-31 | 2019-08-30 | 武汉市灯塔互动文化传播有限公司 | A kind of method and apparatus that statistics APP performance indicator is automated based on iOS system |
CN110765002A (en) * | 2019-09-19 | 2020-02-07 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for obtaining operation behavior information |
CN111580902A (en) * | 2020-04-20 | 2020-08-25 | 微梦创科网络科技(中国)有限公司 | Mobile terminal element positioning method and system based on picture analysis |
CN111694752A (en) * | 2020-07-28 | 2020-09-22 | 中移(杭州)信息技术有限公司 | Application testing method, electronic device and storage medium |
CN112737886A (en) * | 2020-12-29 | 2021-04-30 | 交控科技股份有限公司 | Tool testing method and system |
CN113220569A (en) * | 2021-05-10 | 2021-08-06 | 中金金融认证中心有限公司 | Multi-process-based iOS compatibility automatic testing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164300A (en) * | 2011-12-13 | 2013-06-19 | 腾讯科技(深圳)有限公司 | Mobile terminal touch screen automatic testing method and device |
CN105630665A (en) * | 2014-11-07 | 2016-06-01 | 卓望数码技术(深圳)有限公司 | Application program debugging method based on Android system, and terminal equipment |
CN106649107A (en) * | 2016-12-09 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Automated testing method and device for stability of Android system |
-
2017
- 2017-07-07 CN CN201710552993.7A patent/CN107480036A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164300A (en) * | 2011-12-13 | 2013-06-19 | 腾讯科技(深圳)有限公司 | Mobile terminal touch screen automatic testing method and device |
CN105630665A (en) * | 2014-11-07 | 2016-06-01 | 卓望数码技术(深圳)有限公司 | Application program debugging method based on Android system, and terminal equipment |
CN106649107A (en) * | 2016-12-09 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Automated testing method and device for stability of Android system |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108536588A (en) * | 2018-03-21 | 2018-09-14 | 四川斐讯信息技术有限公司 | A kind of method and system of test APP programs |
CN109298982A (en) * | 2018-08-29 | 2019-02-01 | 广州虎牙信息科技有限公司 | The acquisition method and device of IOS system performance information |
CN109815947A (en) * | 2018-12-14 | 2019-05-28 | 深圳壹账通智能科技有限公司 | Test method, device and the computer equipment of application |
CN110188045A (en) * | 2019-05-31 | 2019-08-30 | 武汉市灯塔互动文化传播有限公司 | A kind of method and apparatus that statistics APP performance indicator is automated based on iOS system |
CN110765002A (en) * | 2019-09-19 | 2020-02-07 | 北京字节跳动网络技术有限公司 | Method, device, medium and electronic equipment for obtaining operation behavior information |
CN111580902A (en) * | 2020-04-20 | 2020-08-25 | 微梦创科网络科技(中国)有限公司 | Mobile terminal element positioning method and system based on picture analysis |
CN111580902B (en) * | 2020-04-20 | 2024-01-26 | 微梦创科网络科技(中国)有限公司 | Mobile terminal element positioning method and system based on picture analysis |
CN111694752A (en) * | 2020-07-28 | 2020-09-22 | 中移(杭州)信息技术有限公司 | Application testing method, electronic device and storage medium |
CN111694752B (en) * | 2020-07-28 | 2023-09-05 | 中移(杭州)信息技术有限公司 | Application testing method, electronic device and storage medium |
CN112737886A (en) * | 2020-12-29 | 2021-04-30 | 交控科技股份有限公司 | Tool testing method and system |
CN112737886B (en) * | 2020-12-29 | 2022-09-02 | 交控科技股份有限公司 | Tool testing method and system, electronic equipment and storage medium |
CN113220569A (en) * | 2021-05-10 | 2021-08-06 | 中金金融认证中心有限公司 | Multi-process-based iOS compatibility automatic testing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107480036A (en) | Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions | |
CN110659091B (en) | Conversation agent conversation flow user interface | |
US8826084B1 (en) | Method and system for implementing automated test and retest procedures | |
US7653896B2 (en) | Smart UI recording and playback framework | |
US7627821B2 (en) | Recording/playback tools for UI-based applications | |
US9161238B2 (en) | Mobile device monitoring and testing | |
US20040139176A1 (en) | Systems and methods for improving service delivery | |
CN101996131A (en) | Automatic test method and automatic test platform for graphic user interface (GUI) based on x extensive makeup language (XML) packaging key word | |
US9342277B2 (en) | Method of searching data associated with nodes of a graphical program | |
CN106844204A (en) | A kind of utilization mobile terminal generates the method and system of defect report | |
CN112199093B (en) | Resource checking method, device, equipment and computer readable storage medium | |
CN113505082B (en) | Application program testing method and device | |
CN112882930B (en) | Automatic test method and device, storage medium and electronic equipment | |
CN114003451B (en) | Interface testing method, device, system and medium | |
CN115658529A (en) | Automatic testing method for user page and related equipment | |
CN105468511A (en) | Web page script error positioning method and apparatus | |
CN113485909B (en) | Test method, test device, computing equipment and medium | |
CN113778897A (en) | Automatic test method, device, equipment and storage medium of interface | |
CN111708712A (en) | User behavior test case generation method, flow playback method and electronic equipment | |
CN111475423A (en) | Data entry method and device, electronic equipment and readable storage medium | |
CN111813648A (en) | Automatic testing method and device applied to App, storage medium and electronic equipment | |
CN114706738A (en) | Method and device for automatically burying point at client | |
CN109062785B (en) | Interface parameter constraint code positioning method and system | |
CN112433946A (en) | Interface test management method, device, equipment and storage medium | |
US11892941B2 (en) | Self-learning application test automation |
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: 20171215 |
|
RJ01 | Rejection of invention patent application after publication |