CN106961362B - Automated testing method and mobile cloud test system - Google Patents

Automated testing method and mobile cloud test system Download PDF

Info

Publication number
CN106961362B
CN106961362B CN201710138835.7A CN201710138835A CN106961362B CN 106961362 B CN106961362 B CN 106961362B CN 201710138835 A CN201710138835 A CN 201710138835A CN 106961362 B CN106961362 B CN 106961362B
Authority
CN
China
Prior art keywords
unit
container
mobile device
page
application software
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.)
Active
Application number
CN201710138835.7A
Other languages
Chinese (zh)
Other versions
CN106961362A (en
Inventor
刘丫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fanwen Technology Co., Ltd
Original Assignee
Hangzhou Copper Street Internet Financial Information Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Copper Street Internet Financial Information Service Co Ltd filed Critical Hangzhou Copper Street Internet Financial Information Service Co Ltd
Priority to CN201710138835.7A priority Critical patent/CN106961362B/en
Publication of CN106961362A publication Critical patent/CN106961362A/en
Application granted granted Critical
Publication of CN106961362B publication Critical patent/CN106961362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of automated testing methods and mobile cloud to test system, wherein automated testing method includes the following steps:Application software to be tested is installed and activated in the mobile device of online mobile device list;The all elements for obtaining application software homepage store in a reservoir, and the container is set to current container, create root node;In current container, the effective element that selection meets element rule generates automated execution instruction;The all elements for obtaining the current page after mobile device executes instruction, page elements are compared with current container interior element and existing container interior element, it is determined whether are similar pages;When if the dissimilar page, then new container and newly-increased child node are created;Next effective element in current container is chosen again and continues to execute similar judgement, and until use-case tree mould all effective elements in the block are carried out completion, test report is generated after analysis.The remote controlled mobile device shared online of the present invention carries out automatic test.

Description

Automated testing method and mobile cloud test system
Technical field
The present invention relates to information technology field, more particularly to a kind of automated testing method and mobile cloud test system.
Background technology
Cloud tests a kind of novel test scheme based on cloud computing.Service provider provides kinds of platform, and a variety of browsers are put down Platform, general user write automatic test script in local, then upload to their websites, then can be at them Platform on run automatized script.With cloud test mode, considerably reduces test environment and build the time, such as machine and network Preparation, operating system installation, various testing tool software installations etc. will all save, and only need in advance to report to the configuration surroundings of needs Cloud testing service quotient, to time direct use.By the application being then based on network, when encountered in test software use it is upper The problems such as when, also can get cloud testing service quotient remotely quickly support, and seldom will appear stagnation even stop test phenomenon.
Existing cloud test platform mainly realizes the functions such as automatic test by providing prototype testing service, needs to carry For a large amount of mobile devices of service provider's self-determination in purchasing (prototype) of platform, it is connected on special equipment, to provide testing service.And And adaptation test or the extreme saturation test of existing cloud test platform offer, it is only presented as in the monkey tests of the page, and Function Test Automation then needs user according to related development linguistic norm, records or write corresponding automated execution script, Function Test Automation is realized by playing back.Therefore, existing cloud test platform has the following problems:Mobile device updates Soon, a large amount of prototype buying, it is costly;The operation expense of mobile device is high;The system upgrade of mobile device is frequent, nothing Method accomplishes that the prototype of the different system version of same type all has;Mobile device requires connect in special equipment cabinet, collection Middle management;Monkey tests are relatively plain, and randomness is too big, are unable to reach the purpose of desired depth traversal;Function automates Test, it is necessary first to particular script and debugging can be write, after debugging successfully, could be played back, and debug and safeguard automatized script Input cost it is higher.
Invention content
The object of the present invention is to provide a kind of automated testing methods and mobile cloud to test system, solves the problem above-mentioned.
To solve the above problems, the embodiment of the present invention provides a kind of automated testing method, include the following steps:
The automation for obtaining the online mobile device list, application software to be tested and the application software to be tested that have authorized is surveyed Try keyword list;
After the application software is installed and activated in several mobile devices in line mobile device list chosen, obtain The container in a reservoir, and is set to current container by all elements storage of application software homepage, creates root node;
In current container, selection meets an effective element or one group of effective element for element rule, generates automation It executes instruction;
The all elements for obtaining the current page that mobile device executes after automated execution instruction, by page elements and currently Container interior element and existing container interior element are compared, it is determined whether are similar pages;
When if the dissimilar page, all elements of the new container storage page are created, and are set to new current container, Newly-increased child node;
Next effective element in current container is chosen again, is generated automated execution instruction, is continued to execute similar judgement, until The equal executed of effective element in current container;
It chooses upper level container and executes similar judgement in the above described manner, until the effective element in all containers has been carried out At;
It is analyzed according to all execution node-locus and implementing result, generates test report.
As an implementation, described to obtain the online mobile device list authorized, include the following steps:
When detecting that mobile device connection or the mobile device status having connected are changed, link information is obtained;
The link information for integrating all mobile devices sieves the available online mobile device of the user according to user right It elects and generates the available online mobile device list of active user.
As an implementation, described in current container, selection meets an effective element or one for element rule Group effective element generates automated execution instruction, includes the following steps:
In current container, an element or one group of element are selected, the element of selection is matched with element rule;
If successful match, automated execution instruction is generated;
If matching is unsuccessful, by order of elements in container, first Element generation automated execution instruction is selected.
As an implementation, the mobile device that obtains executes all of the current page after automated execution instruction Element is compared with current container interior element and existing container, it is determined whether is similar pages, includes the following steps:
After mobile device executes automated execution instruction, the member of the automated execution instruction will be generated in current container Element marks;
The all elements for obtaining the current page of application software to be tested again, by the page elements and current container of acquisition Element be compared, determine whether the same or similar page;
If being differed with current container or dissimilar, then judge whether that with passing stored container be same or similar page Face, if still being differed with passing container, the newly-built container storage current page elements, and newly-built container is set as currently holding Device;If same or similar with passing container, it sets the passing container to current container, and increase son section newly under a upper node Newly-increased child node is associated with current container by point;
If same or similar with current container, it is inactive elements to update the element in current container.
As an implementation, described to choose next effective element in current container again, automated execution instruction is generated, Similar judgement is continued to execute, until the equal executed of effective element in current container;Upper level container is chosen to hold in the above described manner The similar judgement of row, until the effective element in all containers is carried out completion, it is further comprising the steps of:
Often executed the instruction of automated execution, after confirming current container, continue to select in current container one not The element executed, repeat before the step of;
Until all executeds of the element in current container, previous page is returned to, the container of the page is positioned, continues to repeat Before the step of, until all executeds of the element in all containers.
As an implementation, described to be analyzed according to all execution node-locus and implementing result, generate test Report, includes the following steps:
By relationship, corresponding page, performed page elements and survey between all execution node-locus analysis and arrangement egress It tries daily record and generates test report;
Meanwhile exporting automated execution script.
The embodiment of the present invention also provides a kind of mobile cloud test system, including management platform, networked devices library and intelligence are certainly Dynamicization test platform, the management platform are used to manage test assignment, application software to be measured and the company for integrating several mobile devices Connect information, management platform includes networked devices integral unit, networked devices library include monitoring of tools unit, equipment communication unit and Automated execution unit, the intelligent automation test platform include automated setting unit, automatic test processing unit and CAT transmits and receives unit;
Wherein, the monitoring of tools unit, for detecting the mobile device for being connected to networked devices library in real time, and will be several The link information for the mobile device having connected is uploaded to networked devices integral unit;
The networked devices integral unit, the link information sent for receiving all monitoring of tools units, if will Involvement connects the online mobile device list of information integration generation and is sent to automated execution unit;
The automated setting unit, the related keyword list for application software to be tested to be arranged and offer element rule Then library;
The automatic test processing unit, the keyword list for responding the automated setting unit, according to member The rule of plain rule base, which generates, to be started using instruction and automated execution instruction, and is received the CAT and transmitted and received unit transmission Mobile device test instruction execution after information, according to after execution information analysis generate test report;
The equipment communication unit gives automated execution list for receiving to start using instruction and automated execution instruction Member, and the information that automated execution unit returns is sent to CAT and transmits and receives unit;
The automated execution unit executes instruction corresponding operation for controlling mobile device, is answered when receiving startup When with instruction, application software to be tested is installed and activated in the mobile device controlled in online mobile device list, when receiving When automated execution instructs, driving mobile device executes instruction, and obtains the correlated results information after mobile device executes.
As an implementation, the automatic test processing unit includes page elements collector, similarity mode Module, use-case tree module, element container module and detection judgment module;
Wherein, the page elements collector, for obtain it is to be tested it is application software initiated after homepage all elements With all elements for obtaining the page after application software execution automatic test to be tested instructs;
The similarity mode module, for receiving the homepage element and page member that the page elements collector obtains Element sets the application software that homepage element starts with key table list contrast judgement with automation when receiving homepage element Set unit keyword list matching, when receiving page elements, by the element of the page elements of acquisition and current container into Whether row contrast judgement is the same or similar page, in addition, by page member after the Match of elemental composition of page elements and current container It is plain to be matched with passing container;
The use-case tree module is executed for recording automatic test according to the matching result of the similarity mode module Track creates this and executes use-case root vertex when homepage element and after keyword list successful match, when page elements with work as After the Match of elemental composition of preceding container and passing container, child node is increased newly;
The element container module, for establishing container storage page elements, element executes state, and labelled element and section Point association;
The detection judgment module, it is whether also unmarked for current container after detecting the element container module relation The element of node and judge after all elements flag node current container whether be mark root node container;
The automatic test processing unit is additionally operable to according to elementary state, element rule and institute in application current container The judging result of detection judgment module is stated, next step automatic test is generated and executes instruction.
As an implementation, further include front end inlet and storage platform, the front end inlet includes subscriber unit, answers With software upload unit, the management platform includes service management unit, application software permission unit;
Wherein, the subscriber unit, for there is the user of application software testing demand to login;
The service management unit, the user authority setting logined for the subscriber unit;
The application software upload unit, for by the user after user authority setting by application software to be tested It passes;
The application software permission unit, for the application software upload unit upload application software permission and shape State is arranged and the presentation of information of application software;
The storage platform, the application software for being uploaded to the application software upload unit carry out ordering storage, And application software storage address is fed back into application software permission unit.
As an implementation, the front end inlet further include mobile device list cell, publication test assignment unit, Flow elements, Reporting Center's unit under cloud crowd's survey line, the management platform further include equipment center unit, networked devices library clothes Business end and task center cell, networked devices library further include authorization service unit, device information storage unit, and the intelligence is automatic It further includes report factory unit to change test platform;
Wherein, the authorization service unit carries out authorizing/Connection Service for the mobile device to connection, generates verification Pass signal;
The monitoring of tools unit is proved to be successful all companies of signal monitoring for respond that the authorization service unit generates The state status of the mobile device connect;
The device information storage unit is proved to be successful signal and will move for respond that the authorization service unit generates The facility information of equipment is stored on the Cache/DB in the networked devices library, and is given by the monitoring of tools unit real-time update The networked devices integral unit carries out real-time integration and generates online mobile device list, and the networked devices integral unit will be Line mobile device list is sent to equipment center unit;
The equipment center unit, for receiving the online mobile device list of the networked devices integral unit by permission It screens the online mobile device list used for active user and is shown in the mobile device list cell;
The publication test assignment unit, the movement in mobile device list for being shown to the equipment center unit Equipment selects the test-types and test assignment of application software to be detected;
The task center cell classifies by test assignment for the information according to test assignment and sends many survey tasks extremely Under the cloud crowd survey line flow elements or automatic test task is sent to the automated setting unit;
Flow elements under the cloud crowd survey line, other users for being pushed to many survey tasks in system and externally Displaying, crowd survey after task execution the test feedback generation crowd that several users submit observing and predicting announcement;
Report factory unit, the test report for receiving the automatic test processing unit, by several movements The test report of equipment is sent to Reporting Center's unit after summarizing;
Reporting Center's unit, the crowd for receiving flow elements under the cloud crowd survey line observe and predict announcement and the report work The test report of factory.
The advantageous effect of the present invention compared with the prior art is:Solve the relevant technologies such as mobile device remote control, User mobile phone need not install any application, it is only necessary to open usb data connection, be connected and installed with the client in networked devices library After computer or private services device, you can carry out remote control to mobile phone, realize the test of prototype cloud.The privately owned cloud service of enterprise, passes through System permission and the Network access control in networked devices library can carry out privatization protection to business equipment.It is any personal or The test equipment of enterprise, after mandate, you can be shown in networked devices library, user can share the equipment and obtain corresponding return Report can also rent other networking available devices and be tested, effectively realize that the device resource in networked devices libraries is integrated, save at This, supports enterprise or individual to solve mobile device in short supply, testing process management, intelligent automation test, considerably reduces survey Test system builds the time.The present invention automated testing method can online editing keyword list, pass through match keyword rule Then, it realizes intelligent depth traversal test, breaches tradition and first record the automatic test pattern that debugging plays back again, but according to intelligence It can rule traversal function, generation use-case tree construction and implementing result.User can carry out secondary modification according to use-case tree construction, whole Effective efficiency automation use-case is managed out, intelligent rules can be also changed, improve the validity of traversal next time.
Description of the drawings
Fig. 1 is the flow chart of the automated testing method of the present invention;
Fig. 2 is that the mobile cloud of the present invention tests the structure chart of system;
Fig. 3 is the structure diagram of the intelligent automation test platform of the present invention.
Attached drawing marks:1, front end inlet;11, subscriber unit;12, application software upload unit;13, mobile device list list Member;14, test assignment unit is issued;15, flow elements under cloud crowd survey line;16, Reporting Center's unit;2, management platform;21, it uses Family administrative unit;22, application software permission unit;23, equipment center unit;24, networked devices integral unit;25, in task Heart unit;3, storage platform;4, networked devices library;41, authorization service unit;42, monitoring of tools unit;43, equipment communication unit Member;44, automated execution unit;5, intelligent automation test platform;51, CAT transmits and receives unit;52, at automatic test Manage unit;521, using installation starting module;522, automation mechanized operation module;523, page elements collector;524, similarity Matching module;525, use-case tree module;526, element container module;527, judgment module is detected;53, automated setting unit; 54, report factory unit.
Specific implementation mode
Below in conjunction with attached drawing, the technical characteristic and advantage above-mentioned and other to the present invention are clearly and completely described, Obviously, described embodiment is only the section Example of the present invention, rather than whole embodiments.
As shown in Figure 1, a kind of automated testing method, specifically includes following steps:
S101:Obtain oneself of online mobile device list, application software to be tested and the application software to be tested authorized Dynamicization tests keyword list, and keyword list includes the level-one on the keyword element and homepage of application software homepage to be tested The keyword element of menu, wherein in this embodiment, the homepage of application software refers to after starting application software, removing guide page And after the non-functionals page such as advertisement, into first page of main functionality, the step is determining the test of application software Starting point;
In step 101, obtains the online mobile device list authorized and include the following steps:
S201:When detecting that mobile device connection or the mobile device status having connected are changed, connection letter is obtained Breath;
S202:The link information for integrating all mobile devices, according to user right by the available online movement of the user Equipment, which screens, generates the available online mobile device list of active user.
S102:The application software is installed in mobile device in several online mobile device lists chosen and is started;
S103:Homepage all elements are obtained after application software initiated;
S104:The homepage element of acquisition is matched with keyword list, if mismatching, the interruption ends are set again Set keyword list;
S105:If successful match, creates this and execute use-case root vertex, and memory page element holds to a page In device, by Page Container set current container;
S106:In current container, element rule base is called, according to the element of definition rule, selects legal one A effective element or one group of effective element generate automated execution instruction;
Step 106 further includes:
S301:In current container, if the element of selection is mismatched with element rule, if matching is unsuccessful, by container Middle order of elements selects first Element generation automated execution instruction.
S107:So that mobile device is executed test assignment according to automated execution instruction, obtains mobile device and execute instruction behaviour The all elements of current page after work, and the element and existing container interior element of the page elements of acquisition and current container are carried out Whether contrast judgement is the same or similar page, wherein all elements are the XML of page elements, and it includes XML knots to compare content Structure, webpage t itle and element information etc.;
S108:If the page elements obtained are the different pages from current container element, judge whether and passing container page Face is same or similar;
S109:If the page elements obtained are the same or similar page with passing Container elements, newly-increased child node is simultaneously marked Remember elements correlation, and the passing container is set to current container, step S112 is executed after completing the step;
S110:If the page elements obtained are the different pages from passing Container elements, child node is increased newly, and mark current The element has been associated with the child node in container, meanwhile, it stores in current page element to a new Page Container, and will be new Container Tag is current container, and step 106 is back to after completing the step;
S111:If the page elements obtained are the same or similar page with current container element, mark in current container The element be inactive elements;
S112:Judge whether current container also has the effective element of unmarked node, if being then back to step 106;
S113:If there is no the effective element of unmarked node, judge whether current container is the appearance for marking root node Device sets the upper level container to current container, is back to step S112 if it is not, then returning to upper level container;
S114:If current container is the container labeled as root node, terminate this test, by all execution node-locus Relationship, corresponding page, performed page elements and test log generate test report between analysis and arrangement egress;Meanwhile it is defeated Go out to automate perform script.
As shown in Fig. 2 to 3, a kind of mobile cloud test system, including front end inlet 1, management platform 2, storage platform 3, connection Net equipment library 4 and intelligent automation test platform 5, wherein front end inlet 1 includes subscriber unit 11, application software upload unit 12, flow elements 15, Reporting Center's unit 16 under mobile device list cell 13, publication test assignment unit 14, cloud crowd's survey line; Management platform 2 includes service management unit 21, application software permission unit 22, equipment center unit 23, networked devices integration list Member 24, task center cell 25;Networked devices library 4 further includes authorization service unit 41, monitoring of tools unit 42, equipment communication unit Member 43, automated execution unit 44 (i.e. Appium);Intelligent automation test platform 5 includes automated setting unit 53, automatic Change test processes unit 52, CAT transmitting and receiving units 51, automated setting unit 53 includes homepage keyword module, menu pass Key word modules and element rule base.
Workflow is as follows:User logins mobile cloud by subscriber unit 11 and tests system, and service management unit 21 confirms After identity authority, user can upload application software to be detected, application software permission unit by application software upload unit 12 The application software of 22 pairs of uploads carries out priority assignation, and the application software after permission, which is arranged, can store to 3 meeting of storage platform and generate Corresponding storage address, and the storage address information is sent to task center cell 25.Personal or enterprise (sets movement simultaneously The group of standby resource-sharing) mobile device is connected to by data line on the computer or server that can be connected to networked devices library 4, Mandate Connection Service is carried out to the mobile device of connection by authorization service unit 41, at this point, can be by the mobile device of connection It is linked into equipment center unit 23.Monitoring of tools unit 42, equipment communication unit 43 are then opened to the mobile device after mandate.If The mobile device and its equipment connection that the detection connection in real time of standby monitoring unit 42 networks, networked devices integral unit 24 is by institute It is sent to equipment center unit 23 after thering is the facility information of connection networking mobile device to integrate.System can be by user right from equipment The available mobile device for meeting active user is filtered out in center, is shown in mobile device list cell 13.Then, it uses , for the test assignment and selection test-types of the application software to be tested uploaded, appoint in the publication of publication test assignment unit 14 at family Business center cell 25 receives and according to the information of publication test assignment unit 14, pushes flow list under many survey tasks to cloud crowd's survey line Member 15 is to visual user or issues automatic test task to the automatic setting unit of intelligent automation test platform 5.Automation For setting unit 53 after receiving automatic test task, user fills in keyword list and choosing in automated setting unit 53 Several mobile devices for test in the available mobile device list of active user are selected, automatic test processing unit 52 exists Automatic test is proceeded by after receiving keyword list, generates automated execution instruction, CAT transmits and receives unit 51 will be certainly Dynamicization is executed instruction to the equipment communication unit 43 in networked devices library 4, and automated execution is instructed and sent by equipment communication unit 43 Test assignment is executed to automated execution unit 44, sends data by equipment communication unit 43 and CAT after test assignment is complete Receiving unit 51 is sent to automatic test processing unit 52, and the meeting basis of automatic test processing unit 52 currently returns the result, Next instruction is generated, until automation traversal is completed, then analyzes Test data generation test report, it is every in mobile device list One mobile device can complete test assignment and generate test report, and several test report are it is reported that factory's unit 54 (to executing Daily record carries out classification analysis statistics, is exported by html formats, generates the readability test report of height) summarize after in Reporting Center's unit 16 are shown.If what task center cell 25 was issued is many survey tasks, many survey tasks can be sent under cloud crowd's survey line Flow elements 15 are pushed to the other users in system, execute many flow gauges under line by other users, and feedback test is reported To Reporting Center.
Apart from the above, networked devices library 4 is integrated with light methods envionment tools SDKabd orders and Xcode, SDKabd orders and Xcode are used to obtain the system information of the mobile device of IOS or Android.Management platform 2 further includes networking Server-side, device information storage unit and the protocol translation unit of equipment library 4, device information storage unit authorize clothes for responding The facility information of mobile device is stored on Cache/DB by the signal that is proved to be successful that business unit 41 generates, and protocol translation unit is used In user-defined format protocol contents are translated into Appium agreements, Appium agreements are identified for automation execution unit 44.
Mobile device mandate is as follows:When mobile device is connected to networking data library by data line, open Authorization service is opened, at this point, sending ICP/IP protocol to server-side, makes to have connected mobile device and two-way is established in networking data library Road.The information that ICP/IP protocol includes is the session (computer language, referred to as " session control ") in current networked devices library 4, Server-side receives session by opening monitoring of tools service after verification.
The setting in automatic test processing unit 52 for automated testing method of the mobile cloud test system of the present invention Have with lower module:Using installation starting module 521, automation mechanized operation module 522, page elements collector 523, use-case tree module 525, element container module 526, similarity mode module 524, detection judgment module 527.Automated setting unit 53 includes head Page keyword module, menu keyword module and element rule base, wherein homepage keyword module is used to enter application software first The operating procedure of page and the keyword element for determining application software homepage;Menu keyword module is used to determine the level-one in homepage The keyword of menu determines the test starting point of application software automation;Element rule base includes the processing rule of several elements, is used In the selection and operation standard that judge page elements.
Workflow of the automated testing method of the present invention in the mobile cloud test system of the present invention is as follows:From application Software upload unit 12 obtains the application software to be tested that user uploads, and slave mobile device list obtains being used in for resource-sharing The keyword list of application software to be tested is arranged in line mobile device list in automated setting unit 53, wherein homepage is closed The keyword element of application software homepage to be tested is arranged in key word modules, and the further menu in homepage is arranged in menu keyword module Keyword element.It is generated using installation 521 response test task of starting module and starts application instruction, receiving module occurs for CAT The equipment communication unit 43 of the client for the mobile device chosen is sent an instruction to, the response of automated execution unit 44, which starts, answers The application software is installed and activated in several mobile devices chosen with instruction.Head is obtained by page elements collector 523 Page all elements, similarity mode module 524 is after receiving all elements of homepage, by the homepage element and keyword of acquisition List is matched, if mismatching, the interruption ends reset keyword list;If successful match, pass through use-case tree mould Block 525 creates this and executes use-case root vertex, and in a Page Container in memory page element to element container, will The Page Container is set to current container.In current container, element rule base is called, according to the element of definition rule, selector An effective element normally or one group of effective element generate automated execution instruction by automation mechanized operation module 522, if Driving mobile device executes test assignment after standby communication unit 43 or automated execution unit 44 respond automated execution instruction, surveys After the completion of examination, all elements of current page are obtained by page elements collector 523, it will by similarity mode module 524 The page elements of acquisition are compared with the element of current container determines whether the same or similar page, if the page member obtained Element is the different pages with current container element, then judge whether it is same or similar with passing containers page, if the page obtained is first Plain and passing Container elements are the same or similar page, then increase child node newly by use-case tree module 525 and labelled element is associated with, And by the passing container set current container, the element for judging whether also promising flag node is executed after completing the step, if obtaining It is the different pages to take element and passing Container elements, then increases child node newly by use-case tree module 525, and mark in current container The element has been associated with child node, meanwhile, storage current page element holds to the new page of one in element container module 526 In device, and new container is labeled as current container, element rule base is re-called after completing the step;If the page member obtained Element is the same or similar page with current container element, then it is inactive elements to mark the element in current container.It completes above-mentioned After step, judge whether that current container also has the element of unmarked node by detecting judgment module 527, if then re-calling Element rule base, then next effective element in current container is chosen, automated execution instruction is generated, similar judgement is continued to execute, Until the equal executed of effective element in current container;If it is not, then by detect judgment module 527 judge current container whether be The container of root node is marked, if current container is not the container for marking root node, back to upper one in use-case tree module 525 Grade container drives mobile device to execute the test assignment of each effective element in upper level container, until use-case tree module again The effective element of all containers is carried out completion in 525;If current container is the container for marking root node, terminate this survey Examination, by relationship, corresponding page, performed page elements and test log between all execution node-locus analysis and arrangement egress Test report is generated, meanwhile, export automated execution script.
The advantageous effect of the present invention compared with the prior art is:Solve the relevant technologies such as mobile device remote control, User mobile phone need not install any application, it is only necessary to open usb data connection, be connected and installed with the client in networked devices library 4 After holding computer or private services device, you can carry out remote control to mobile phone, realize the test of prototype cloud.The privately owned cloud service of enterprise is led to System permission and the Network access control in networked devices library 4 are crossed, privatization protection can be carried out to business equipment.Any individual's Or the test equipment of enterprise, after mandate, you can be shown in networked devices library 4, user can share the equipment and obtain accordingly Return can also rent other networking available devices and be tested, effectively realize that the device resource in networked devices library 4 is integrated, section Cost-saving is supported enterprise or individual to solve mobile device in short supply, testing process management, intelligent automation test, is greatly reduced The time is built in test systematization.The automated testing method of the present invention can online editing keyword list, pass through match it is crucial Word rule realizes intelligent depth traversal test, breaches tradition and first records the automatic test pattern that plays back again of debugging, but root Function is traversed according to intelligent rules, generates use-case tree construction and implementing result.User can carry out secondary repair according to use-case tree construction Change, sorts out effective efficiency automation use-case, can also change intelligent rules, improve the validity of traversal next time.
Particular embodiments described above has carried out further the purpose of the present invention, technical solution and advantageous effect It is described in detail, it should be understood that the above is only a specific embodiment of the present invention, the protection being not intended to limit the present invention Range.It particularly points out, to those skilled in the art, all within the spirits and principles of the present invention, that is done any repaiies Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of automated testing method, which is characterized in that include the following steps:
The automatic test for obtaining the online mobile device list, application software to be tested and the application software to be tested that have authorized closes Key word list;
After the application software is installed and activated in several mobile devices in line mobile device list chosen, application is obtained The container in a reservoir, and is set to current container by all elements storage of software home page, creates root node;
In current container, selection meets an effective element or one group of effective element for element rule, generates automated execution Instruction;
The all elements for obtaining the current page that mobile device executes after automated execution instruction, by page elements and current container Interior element and existing container interior element are compared, it is determined whether are similar pages;
When if the dissimilar page, all elements of the new container storage page are created, and are set to new current container, are increased newly Child node;
Next effective element in current container is chosen again, automated execution instruction is generated, continues to execute similar judgement, until current The equal executed of effective element in container;
It chooses upper level container and executes similar judgement in the above described manner, until the effective element in all containers is carried out completion;
It is analyzed according to all execution node-locus and implementing result, generates test report.
2. according to the automated testing method described in claim 1, which is characterized in that described to obtain the online movement authorized List of devices includes the following steps:
When detecting that mobile device connection or the mobile device status having connected are changed, link information is obtained;
The link information for integrating all mobile devices filters out the available online mobile device of the user according to user right To generate the available online mobile device list of active user.
3. according to the automated testing method described in claim 1, which is characterized in that described in current container, selector The effective element or one group of effective element of element rule are closed, automated execution instruction is generated, includes the following steps:
In current container, an element or one group of element are selected, the element of selection is matched with element rule;
If successful match, automated execution instruction is generated;
If matching is unsuccessful, by order of elements in container, first Element generation automated execution instruction is selected.
4. according to the automated testing method described in claim 1, which is characterized in that the acquisition mobile device executes automatic The all elements for changing the current page after executing instruction, are compared with current container interior element and existing container, it is determined whether For similar pages, include the following steps:
After mobile device executes automated execution instruction, the element mark of the automated execution instruction will be generated in current container It is denoted as executed;
The all elements for obtaining the current page of application software to be tested again, by the member of the page elements of acquisition and current container Element is compared, and determines whether the same or similar page;
If being differed with current container or dissimilar, then judge whether that with passing stored container be the same or similar page, If still being differed with passing container, the newly-built container storage current page elements, and set newly-built container to current container; If same or similar with passing container, it sets the passing container to current container, and increase child node newly under a upper node, it will Newly-increased child node is associated with current container;
If same or similar with current container, it is inactive elements to update the element in current container.
5. according to the automated testing method described in claim 1, which is characterized in that it is described choose again it is next in current container Effective element generates automated execution instruction, continues to execute similar judgement, until the effective element in current container has been held Row;It chooses upper level container and executes similar judgement in the above described manner, until the effective element in all containers is carried out completion, also Include the following steps:
An automated execution instruction has often been executed, after confirming current container, has continued the selection one in current container and is not carried out The element crossed, repeat before the step of;
Until all executeds of the element in current container, previous page is returned to, the container of the page is positioned, before continuing repetition The step of, until all executeds of the element in all containers.
6. according to the automated testing method described in claim 1, which is characterized in that described according to all execution node-locus And implementing result is analyzed, and is generated test report, is included the following steps:
By relationship, corresponding page, performed page elements and test day between all execution node-locus analysis and arrangement egress Will generates test report;
Meanwhile exporting automated execution script.
7. a kind of mobile cloud tests system, which is characterized in that flat including the test of management platform, networked devices library and intelligent automation Platform, the management platform are used to manage test assignment, application software to be measured and the link information for integrating several mobile devices, management Platform includes networked devices integral unit, and networked devices library includes monitoring of tools unit, equipment communication unit and automated execution Unit, the intelligent automation test platform include that automated setting unit, automatic test processing unit and CAT are transmitted and received Unit;
Wherein, the monitoring of tools unit has connected for detecting the mobile device for being connected to networked devices library in real time, and by several The link information of the mobile device connect is uploaded to networked devices integral unit;
The networked devices integral unit, the link information sent for receiving all monitoring of tools units, if by involvement It connects the online mobile device list of information integration generation and is sent to automated execution unit;
The automated setting unit, the related keyword list for application software to be tested to be arranged and offer element rule Library;
The automatic test processing unit, the keyword list for responding the automated setting unit, is advised according to element Then the rule in library, which generates, starts application instruction and automated execution instruction, and receives the CAT and transmit and receive the shifting that unit is sent Information after dynamic device test instruction execution, test report is generated according to the information analysis after execution;
The equipment communication unit gives automated execution unit for receiving to start using instruction and automated execution instruction, And the information that automated execution unit returns is sent to CAT and transmits and receives unit;
The automated execution unit executes instruction corresponding operation for controlling mobile device, refers to when receiving startup application When enabling, application software to be tested is installed and activated in the mobile device controlled in online mobile device list, automatic when receiving When change executes instruction, driving mobile device executes instruction, and obtains the correlated results information after mobile device executes.
8. testing system according to the mobile cloud described in claim 7, which is characterized in that the automatic test processing unit packet Include page elements collector, similarity mode module, use-case tree module, element container module and detection judgment module;
Wherein, the page elements collector, for obtain it is to be tested it is application software initiated after homepage all elements and obtain Application software to be tested is taken to execute all elements of the page after automatic test instructs;
The similarity mode module, the homepage element and page elements obtained for receiving the page elements collector, when When receiving homepage element, application software and automated setting unit that homepage element and key table list contrast judgement are started Keyword list matching, when receiving page elements, the page elements of acquisition are compared with the element of current container The same or similar page is determined whether, in addition, by page elements and mistake after the Match of elemental composition of page elements and current container It is matched toward container;
The use-case tree module executes rail for recording automatic test according to the matching result of the similarity mode module Mark creates this and executes use-case root vertex after homepage element and keyword list successful match, when page elements and currently After the Match of elemental composition of container and passing container, child node is increased newly;
The element container module, for establishing container storage page elements, element executes state, and labelled element and node close Connection;
Whether the detection judgment module also has unmarked node for current container after detecting the element container module relation Element and judge after all elements flag node current container whether be mark root node container;
The automatic test processing unit is additionally operable to according to elementary state, element rule and the inspection in application current container The judging result of judgment module is surveyed, next step automatic test is generated and executes instruction.
9. testing system according to the mobile cloud described in claim 7, which is characterized in that further include that front end inlet and storage are flat Platform, the front end inlet include subscriber unit, application software upload unit, and the management platform includes service management unit, answers With software permission unit;
Wherein, the subscriber unit, for there is the user of application software testing demand to login;
The service management unit, the user authority setting logined for the subscriber unit;
The application software upload unit, for by the user after user authority setting by application software upload to be tested;
The application software permission unit, the permission and state of the application software for application software upload unit upload are set It sets and the presentation of information of application software;
The storage platform, the application software for being uploaded to the application software upload unit carry out ordering storage, and will Application software storage address feeds back to application software permission unit.
10. testing system according to the mobile cloud described in claim 9, which is characterized in that the front end inlet further includes movement Flow elements, Reporting Center's unit under list of devices unit, publication test assignment unit, cloud crowd's survey line, the management platform is also Including equipment center unit, the server-side in networked devices library and task center cell, networked devices library further includes authorization service list Member, device information storage unit, the intelligent automation test platform further include report factory unit;
Wherein, the authorization service unit for the mobile device to connection carries out that/Connection Service, generation is authorized to be proved to be successful Signal;
The monitoring of tools unit is proved to be successful all connections of signal monitoring for respond that the authorization service unit generates The state status of mobile device;
The device information storage unit is proved to be successful signal by mobile device for respond that the authorization service unit generates Facility information be stored on the Cache/DB in the networked devices library, and by the monitoring of tools unit real-time update to described Networked devices integral unit carries out real-time integration and generates online mobile device list, and the networked devices integral unit will move online Dynamic list of devices is sent to equipment center unit;
The equipment center unit, the online mobile device list for receiving the networked devices integral unit are screened by permission The online mobile device list that is used for active user is simultaneously shown in the mobile device list cell;
The publication test assignment unit, the mobile device in mobile device list for being shown to the equipment center unit Select the test-types and test assignment of application software to be detected;
The task center cell sends crowd's survey tasks to described for according to the information of test assignment by test assignment classification Under cloud crowd's survey line flow elements or automatic test task is sent to the automated setting unit;
Flow elements under the cloud crowd survey line, other users for being pushed to many survey tasks in system and to abduction Show, crowd surveys after task execution the test feedback generation crowd that several users submit observing and predicting announcement;
Report factory unit, the test report for receiving the automatic test processing unit, by several mobile devices Test report summarize after be sent to Reporting Center's unit;
Reporting Center's unit, the crowd for receiving flow elements under the cloud crowd survey line, which observes and predicts, to be accused and the report factory Test report.
CN201710138835.7A 2017-03-09 2017-03-09 Automated testing method and mobile cloud test system Active CN106961362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710138835.7A CN106961362B (en) 2017-03-09 2017-03-09 Automated testing method and mobile cloud test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710138835.7A CN106961362B (en) 2017-03-09 2017-03-09 Automated testing method and mobile cloud test system

Publications (2)

Publication Number Publication Date
CN106961362A CN106961362A (en) 2017-07-18
CN106961362B true CN106961362B (en) 2018-08-07

Family

ID=59470089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710138835.7A Active CN106961362B (en) 2017-03-09 2017-03-09 Automated testing method and mobile cloud test system

Country Status (1)

Country Link
CN (1) CN106961362B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678939A (en) * 2017-08-29 2018-02-09 苏州惠邦科信息技术有限公司 Android terminal emulation test system
CN107943687B (en) * 2017-10-30 2021-07-30 北京奇虎科技有限公司 Equipment sharing method, device, server and storage medium
CN108572913A (en) * 2018-02-26 2018-09-25 挖财网络技术有限公司 Method, apparatus and the application of App homepages are positioned in Android client UI automation processes
CN108540558A (en) * 2018-04-16 2018-09-14 深圳市智云方圆科技有限公司 A kind of automatic test equipment and method of band cloud service function product
CN108845949A (en) * 2018-07-24 2018-11-20 浙江数链科技有限公司 A kind of performance test methods and platform
CN109491901A (en) * 2018-11-01 2019-03-19 郑州云海信息技术有限公司 A kind of the test execution progress metrics system and equipment of various dimensions
CN109359052A (en) * 2018-12-03 2019-02-19 北京车智赢科技有限公司 Mobile terminal automated testing method and system based on UI
CN109634856B (en) * 2018-12-04 2021-12-17 北京云测信息技术有限公司 IOS intelligent terminal remote real machine debugging system and method based on cloud service
CN111290940B (en) * 2018-12-10 2023-04-28 中国移动通信集团江西有限公司 Automatic test method, device, equipment and medium for APP
CN110708210B (en) * 2019-08-30 2022-05-03 深圳壹账通智能科技有限公司 Cloud test configuration method and device, computer equipment and storage medium
CN110569198A (en) * 2019-09-18 2019-12-13 北京搜狐新媒体信息技术有限公司 Method and device for automatically testing service function
CN111090577B (en) * 2019-10-12 2024-04-09 平安壹钱包电子商务有限公司 Multi-terminal synchronous test method and device, computer equipment and storage medium
CN111061956B (en) 2019-12-24 2022-08-16 北京百度网讯科技有限公司 Method and apparatus for generating information
CN112612690B (en) * 2020-11-30 2024-05-14 北京达佳互联信息技术有限公司 User interface information processing method and device, electronic equipment and storage medium
US11520685B2 (en) * 2021-03-01 2022-12-06 Fmr Llc Systems and methods for an end-to-end automation framework

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175285A (en) * 2006-11-01 2008-05-07 联想移动通信科技有限公司 Automatic testing method and system for mobile phone software
CN102541740A (en) * 2012-01-04 2012-07-04 广东欧珀移动通信有限公司 Android-based automatic test method for mobile phone notes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9317410B2 (en) * 2013-03-15 2016-04-19 International Business Machines Corporation Testing functional correctness and idempotence of software automation scripts

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175285A (en) * 2006-11-01 2008-05-07 联想移动通信科技有限公司 Automatic testing method and system for mobile phone software
CN102541740A (en) * 2012-01-04 2012-07-04 广东欧珀移动通信有限公司 Android-based automatic test method for mobile phone notes

Also Published As

Publication number Publication date
CN106961362A (en) 2017-07-18

Similar Documents

Publication Publication Date Title
CN106961362B (en) Automated testing method and mobile cloud test system
CN106940839B (en) Power transmission and transformation project quality data management and control system and method
CN108971807A (en) A kind of site welding construction technology intelligent management control method and management system
CN104065528A (en) Method And Apparatus For Analyzing And Verifying Functionality Of Multiple Network Devices
CN104639653A (en) Self-adaptive method and system based on cloud architecture
CN106569950B (en) A kind of test macro of webmastering software and the test method of webmastering software
CN105956987A (en) Road traffic engineering test detection data acquisition and evaluation system
CN110309051A (en) Method, system, equipment and the storage medium of management of test cases
CN107018203A (en) A kind of frequency converter remote monitoring control method
CN111130922A (en) Airborne information safety automatic test method and test platform
CN105405221A (en) Method and device for automated test
CN106934507A (en) A kind of new cruising inspection system and method for oil field petrochemical field
KR20170097468A (en) DlAGNOSTIC AND MANAGING METHOD OF NEW RENEWABLE ENERGY APPATUS USING MOBILE DEVICE AND THE SYSTEM THEREOF
CN103246606A (en) Method and system for testing performances of ESB (enterprises service bus) platform
CN112700020A (en) Full life cycle management system of equipment based on sweep sign indicating number
CN109086213A (en) A kind of commercial vehicle network test management system and method based on distributed system
CN113918526A (en) Log processing method and device, computer equipment and storage medium
CN106850316A (en) A kind of optical fiber into end graphically managing method and system
CN106910075B (en) The intelligent processing system and method that client mobile communication is complained
CN111930078A (en) Network testing device for core control system
CN106292578A (en) A kind of sewage treatment plant operation data acquiring and transmission system
CN116263595B (en) Universal automatic test platform for satellite single machine environment test and control method thereof
CN111212093A (en) Data processing system and control device
CN103457957B (en) A kind of network penetration test macro and method with adaptation function
CN116383061A (en) Method and related device for testing basic platform interface of substation control 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200508

Address after: No. 1902, 19th floor, building a, Huaxing Times Square, No. 478, Wensan Road, Xihu District, Hangzhou, Zhejiang Province, 310000

Patentee after: Tongjin Institute (Hangzhou) Network Technology Co., Ltd

Address before: 310000, Zhejiang Province, Xihu District, Wensanlu Road No. 478, Huaxing Times Square, block A, 23, Hangzhou

Patentee before: HANGZHOU TONGBANJIE INTERNET FINANCIAL INFORMATION SERVICES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211112

Address after: 310000 room c802, building 1, Huifeng international business center, Xihu District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Fanwen Technology Co., Ltd

Address before: 310000 room 1902, 19th floor, tower a, Huaxing Times Square, No. 478, Wensan Road, Xihu District, Hangzhou, Zhejiang Province

Patentee before: Tongjinsuo (Hangzhou) Network Technology Co., Ltd