CN110362490A - Merge the automated testing method and system of iOS and Android mobile application - Google Patents

Merge the automated testing method and system of iOS and Android mobile application Download PDF

Info

Publication number
CN110362490A
CN110362490A CN201910639171.1A CN201910639171A CN110362490A CN 110362490 A CN110362490 A CN 110362490A CN 201910639171 A CN201910639171 A CN 201910639171A CN 110362490 A CN110362490 A CN 110362490A
Authority
CN
China
Prior art keywords
test
ios
transaction
android
intelligent
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.)
Granted
Application number
CN201910639171.1A
Other languages
Chinese (zh)
Other versions
CN110362490B (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910639171.1A priority Critical patent/CN110362490B/en
Publication of CN110362490A publication Critical patent/CN110362490A/en
Application granted granted Critical
Publication of CN110362490B publication Critical patent/CN110362490B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present invention provides a kind of automated testing methods and system for merging iOS and Android mobile application, comprising: obtains and install iOS and Android editions tested mobile application to corresponding Intelligent test device;Intelligent test device executes machine with automatic test by USB line and connect;Transaction page is created, and obtains the page elements of transaction page, element location information and type, and define element processing method according to the Transaction Name of tested transaction, Page Name;Tested test data used of trading is obtained, and according to page elements, element location information, element type, element processing method and Test data generation test case;Obtain the facility information that connection automatic test executes the Intelligent test device of machine;Automatic test executive mode of the test case on Intelligent test device is configured according to facility information;The Intelligent test device that test case is sent respectively to corresponding operating system is tested according to automatic test executive mode.

Description

Merge the automated testing method and system of iOS and Android mobile application
Technical field
The present invention relates to soft project automatic test field more particularly to a kind of fusion iOS and Android mobile application The method and system of automatic test.
Background technique
With the rapid development that shared economy, internet finance and mobile communication technology make rapid progress, smart phone carrying More and more movable living clients facilitate people's lives.From earliest mobile phone browser GPRS (General Packet Radio Service) online, 3G, 4G mobile internet era are arrived, smart mobile phone application client gradually replaces clear Device of looking at becomes mainstream network access, and the research and development quality of client decides the experience that market and user use.Due to client End belongs to application software scope, for instantly two big mainstream operation system of smart phone: iOS and Android, realizes in research and development There is larger differences in the process, therefore are both needed to guarantee the correctness and compatibility of test during the test.
In traditional manual test mode, the client of identical function should test it during the test and grasp in iOS Make the operating condition in system, also to test its operating condition in Android operation system, and since Android is operated System is related to the mobile phone and tablet computer of a variety of brands, the Android operation system of various brands equipment there is also miscellaneous editions and A variety of improvement, it is contemplated that the open source of Android operation system, not only cost is high for manual test applications client, while Also it is difficult to accomplish to cover comprehensively in the limited project cycle.
In addition, the mobile application automated test tool of existing market prevalence or can only support a kind of operating system Apple equipment is only supported using test, such as iOS-driver tool, and Robotium tool only supports Android device;? Though supporting two kinds of equipment simultaneously, different test methods is needed to be tested, tester learns higher operating costs, significantly The automatic test cost of application program is improved, its income is reduced, the quality for being equally unfavorable for mobile application guards work. Such as certain tools, although not only having supported apple equipment but also having supported Android device, apple equipment automatization test cases need to make With the specific XCode environmental testing of apple equipment, when can not be same under same set of environments with the test cases of Android device Operation, and design writes that the technology and method that uses is entirely different, and it is corresponding to complete that tester needs to learn bilingual Automatic test, input-output ratio are extremely low.
Summary of the invention
In order to promote mobile application automatic test efficiency, multi-client type, same client type multioperation are reduced The testing time of system, multi-model, compatibility test efficiency is promoted, the embodiment of the present invention proposes a kind of fusion iOS and Android The method and system of mobile application automatic test.By the test method and system, tester can be based on same automation Testing tool, using same test mentality of designing, code organization form and write method, the serial or parallel in same PC equipment Carry out the automatic test work of multi-client, multiple operating system, multi-model application program.
On the one hand, the embodiment of the invention provides a kind of automatic test sides for merging iOS and Android mobile application Method, which comprises
It obtains and iOS editions and Android editions tested mobile applications is installed to corresponding Intelligent test device;Wherein, described Intelligent test device executes machine with automatic test by USB line and connect;
Transaction page is created, and obtains the page of the All Activity page according to the Transaction Name of tested transaction, Page Name Element, element location information, element type, and define element processing method;
Tested test data used of trading is obtained, and according to the page elements, element location information, element type, member Plain processing method and Test data generation test case;
Obtain the facility information that connection automatic test executes the Intelligent test device of machine;
Automatic test executive mode of the test case on Intelligent test device is configured according to the facility information;
The test case is sent respectively to the intelligence of corresponding operating system according to the automatic test executive mode Test equipment, to carry out automatic test.
In one embodiment, before generating test case, the method also includes: according to the transaction flow of tested transaction Execution sequence carries out permutation and combination to transaction page.
In one embodiment, tested test data used of trading is obtained, comprising:
According to database information used in tested transaction from correspondence database read test data;And/or
It obtains user and passes through iOS operating system and the general automatic test self-defining data library of Android operation system The test data of operation interface input.
In one embodiment, the facility information that connection automatic test executes the Intelligent test device of machine is obtained, comprising:
The facility information for the Intelligent test device that operating system is Android is obtained using ADB tool;
The facility information for the Intelligent test device that operating system is iOS is obtained using Idevice Installer tool.
In one embodiment, the method also includes: obtain automatic test course in iOS operating system intelligence test set The running log of standby running log and Android operation system Intelligent test device.
On the other hand, the embodiment of the invention also provides a kind of fusion iOS and Android mobile application automatic test system System, the system deployment is on automatic test execution machine, comprising:
Tested application acquisition unit, for obtaining and installing iOS editions and Android editions tested mobile applications to corresponding intelligence It can test equipment;Wherein, the Intelligent test device executes machine with automatic test by USB line and connect;
Transaction page creating unit, for creating transaction page according to Transaction Name, the Page Name of tested transaction, and obtaining Page elements, the element location information, element type of the All Activity page are taken, and defines element processing method;
Test cases technology unit, for obtaining tested test data used of trading, and according to the page elements, element Location information, element type, element processing method and Test data generation test case;
Device information acquisition unit, the equipment letter for executing the Intelligent test device of machine for obtaining connection automatic test Breath;
Executive mode determination unit, for configuring the test case in Intelligent test device according to the facility information Automatic test executive mode;
Test cell, for being sent respectively to accordingly grasp by the test case according to the automatic test executive mode Make the Intelligent test device of system, to carry out automatic test.
In one embodiment, before generating test case, the transaction page creating unit is also used to: according to by test cross Easy transaction flow execution sequence carries out permutation and combination to transaction page.
In one embodiment, the tested approach for trading test data used of the Test cases technology unit acquisition includes:
According to database information used in tested transaction from correspondence database read test data;And/or
It obtains user and passes through iOS operating system and the general automatic test self-defining data library of Android operation system The test data of operation interface input.
In one embodiment, the device information acquisition unit includes:
ADB tool assembly, for obtaining the facility information for the Intelligent test device that operating system is Android;
Idevice Installer tool assembly, for obtaining the equipment letter for the Intelligent test device that operating system is iOS Breath.
In one embodiment, the system also includes log acquisition units, for obtaining iOS in automatic test course The running log of operating system Intelligent test device and the running log of Android operation system Intelligent test device.
The present invention has following remarkable advantage: test designs, abstract service scene process, most to paste unrelated with operating system The design of automation mode simulation test and implementation procedure of nearly craft functional test;Tester works out automatic test case When, without considering iOS and Android operation system difference, use a set of case Programming Methodology, a set of case side of writing Method, a set of case, which execute method, can be completed the automatic test work of more device types, multiple operating system, multi-model;It can expand Malleability and strong flexibility, tester can extend customized test method, and nothing in application layer according to mobile applications feature IOS and Android operation system difference need to be considered, to realize real mobile application multiple operating system fusion test.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the stream of the automated testing method of fusion iOS and Android mobile application that one embodiment of the invention provides Journey schematic diagram;
Fig. 2 is the structure of fusion iOS and Android mobile application automatization test system that one embodiment of the invention provides Schematic diagram;
Fig. 3 be another embodiment of the present invention provides testing tool structural schematic diagram;
Fig. 4 is that another embodiment of the present invention provides the system construction drawings of automated test tool;
Fig. 5 is 1 internal structure chart of application layer in embodiment illustrated in fig. 4 of the present invention;
Fig. 6 is 2 internal structure chart of service layer in embodiment illustrated in fig. 4 of the present invention;
Fig. 7 is 3 internal structure chart of core layer in embodiment illustrated in fig. 4 of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is the stream of the automated testing method of fusion iOS and Android mobile application that one embodiment of the invention provides Journey schematic diagram.As shown in Figure 1, this method mainly comprises the steps that
Step 11 obtains and installs iOS editions and Android editions tested mobile applications to corresponding Intelligent test device.Its In, each Intelligent test device passes through USB line respectively and connect with automatic test execution machine.
Step 12 creates transaction page, and obtains the All Activity page according to Transaction Name, the Page Name of tested transaction Page elements, element location information, element type, and define element processing method.
Step 13 obtains tested test data used of trading, and according to the page elements, element location information, element Type, element processing method and Test data generation test case.
Step 14 obtains the facility information that connection automatic test executes the Intelligent test device of machine.
Step 15 configures automatic test of the test case on Intelligent test device according to the facility information and holds Line mode.
The test case is sent respectively to corresponding operating system according to the automatic test executive mode by step 16 Intelligent test device, to carry out automatic test.
The embodiment of the present invention passes through the abstract and encapsulation technology to iOS and Android bottom characteristic respectively, so that tester Same test mentality of designing, code organization form and written in code method can be used in member, writes iOS in same set of tool system With Android operation system different type, the client of different model automatic test code and execute, to complete automatic Change functional test and compatibility test, promote tested performance, reduces testing time and cost.
It normally, can also be according to the transaction flow of tested transaction after creating transaction page, before generating test case Cheng Zhihang sequence carries out permutation and combination to transaction page.
It generally, can the data according to used in tested transaction when obtaining test data used in tested trade using step 13 Library information read test data from correspondence database, and/or, obtaining user by iOS operating system and Android operation is The test data for the automatic test self-defining data library operation interface input for uniting general.
It had both included the movement equipped with iOS operating system by executing the Intelligent test device that machine is connect with automatic test Equipment, and include the mobile device equipped with Android operation system, therefore when obtaining facility information, it needs to utilize ADB tool The facility information for obtaining the Intelligent test device that operating system is Android, is obtained using IdeviceInstaller tool and is grasped Make the facility information for the Intelligent test device that system is iOS.
In one embodiment, for the ease of debugging and maintenance test script, when carrying out automatic test to mobile application, Also need to obtain the running log and Android operation system of iOS operating system Intelligent test device in automatic test course The running log of Intelligent test device.
The present invention has following remarkable advantage: test designs, abstract service scene process, most to paste unrelated with operating system The design of automation mode simulation test and implementation procedure of nearly craft functional test;Tester works out automatic test case When, without considering iOS and Android operation system difference, use a set of case Programming Methodology, a set of case side of writing Method, a set of case, which execute method, can be completed the automatic test work of more device types, multiple operating system, multi-model;It can expand Malleability and strong flexibility, tester can extend customized test method, and nothing in application layer according to mobile applications feature IOS and Android operation system difference need to be considered, to realize real mobile application multiple operating system fusion test.
Based on merging iOS invention structure identical with the automated testing method of Android mobile application with shown in FIG. 1 Think, the embodiment of the present application also provides a kind of fusion iOS is identical as Android mobile application automatic test, such as following implementation Described in example.Since the principle that the system solves the problems, such as is similar to the automated testing method in Fig. 1, the implementation of the system can With referring to the implementation of the automated testing method of Fig. 1, overlaps will not be repeated.
In another embodiment, the present invention also provides a kind of fusion iOS and Android mobile application automatic test system System, structure is as shown in Fig. 2, the system includes: tested application acquisition unit 10, transaction page creating unit 20, test case Generation unit 30, device information acquisition unit 40, executive mode determination unit and test cell 60.
Wherein, application acquisition unit 10 is tested for obtaining and installing iOS editions and Android editions tested mobile applications to phase The Intelligent test device answered, Intelligent test device execute machine with automatic test by USB line and connect.Transaction page creating unit 20 for creating transaction page according to Transaction Name, the Page Name of tested transaction, and obtains the page member of the All Activity page Element, element location information, element type, and define element processing method;Test cases technology unit 30 is for obtaining by test cross Easy used test data, and according to the page elements, element location information, element type, element processing method and test number According to generation test case;Device information acquisition unit 40 is used to obtain the Intelligent test device of connection automatic test execution machine Facility information;Executive mode determination unit 50 is used to configure the test case in Intelligent test device according to the facility information On automatic test executive mode;Test cell 60 is used for the test case according to the automatic test executive mode It is sent respectively to the Intelligent test device of corresponding operating system, to carry out automatic test.
In one embodiment, after creating transaction page, before generating test case, transaction page creating unit 20 is also Permutation and combination can be carried out to transaction page according to the transaction flow execution sequence of tested transaction.
In one embodiment, it includes: root that Test cases technology unit 30, which obtains the tested approach for trading test data used, According to database information used in tested transaction from correspondence database read test data;And/or it obtains user and is operated by iOS The test data of the system automatic test self-defining data library operation interface input general with Android operation system.
In one embodiment, device information acquisition unit 40 includes an ADB tool assembly and an Idevice Installer Tool assembly, ADB tool assembly are used to obtain the facility information for the Intelligent test device that operating system is Android, Idevice Installer tool assembly is used to obtain the facility information for the Intelligent test device that operating system is iOS.
In one embodiment, system shown in Fig. 2 further includes a log acquisition unit 70 (see shown in dotted line frame in Fig. 2), For obtaining the running log and Android operation system intelligence of iOS operating system Intelligent test device in automatic test course The running log of energy test equipment.
To keep technical solution provided by the invention clearer, the present invention also provides another embodiments to come to skill of the present invention Art scheme further illustrates.
Fig. 3 illustrates the structural schematic diagram of testing tool according to an embodiment of the present invention, automated test tool portion Administration's operation is broadly divided into two parts, respectively the execution equipment disposed of automated test tool and intelligent terminal, the two It is connected using USB mode.
Wherein, automatic test executes the main load that equipment is the automated test tool deployment in the embodiment of the present invention Body can be Mac computers.Automatic test case due to running on iOS operating system is unable to run to operate in Windows System, the automatic test case for running on Android operation system can run on Mac OS operating system, and the main portion of the present invention The carrier of administration needs while supporting the smart machine of two kinds of operating system of iOS and Android, and therefore, the present invention is using apple electricity Brain executes machine as automatic test.Also, the automated test tool in the embodiment of the present invention uses cross-platform Java journey Sequence is realized, is run in the Java Virtual Machine in operating system, therefore the tool can run on the automatic of Mac OS operating system Change on test execution machine (i.e. Apple Computers), can be communicated simultaneously with the smart machine of two kinds of operating systems of iOS, Android Interaction supports the application on the smart machine to obtain the automatic test case information on the automatic test execution machine.
The embodiment of the present invention mainly supports the smart machine of iOS and Android operation system, includes iOS, different editions Smart phone, iPAD and Android Pad of Android operation system etc. are executed using USB wired mode and automatic test Machine is connected.Intelligent test device installs client to be measured, is operated by analog subscriber and realizes automatic test.
Fig. 4 illustrates fusion iOS according to an embodiment of the present invention and Android mobile application automated test tool System construction drawing, be mainly made of application layer 1, service layer 2 and core layer 3, be deployed in as automatic test execute On the Apple Computers of machine.
Wherein, the core layer 3 of the tool provides the characteristic and interaction mechanism of iOS and Android operation system for service layer, For example, core layer is responsible for merging the bottom interactive command of iOS and Android operation system, the method for analog subscriber operation is provided And network mechanism, technical support is provided for the auxiliary tool fusion of service layer 2.
Service layer 2 is the automatic test miscellaneous function that application layer mentions 1 for fusion iOS and Android operation system characteristic. For example, for application layer 1 provide database interaction capabilities, fusion iOS with after Android operation system element type define etc. it is auxiliary Assist energy.
Application layer 1 realizes the automatic test case and public assets of fusion iOS and Android operation system.For example, sharp Page basic function, the business scenario process base function of iOS and Android operation system are merged with application layer 1, are abstracted iOS With the public operation method of Android operation system, provide infrastructures for the fusion of automatic test case cross operating system Support.
Fig. 5 illustrates the internal structure chart of application layer 1 according to an embodiment of the present invention.Application layer 1 mainly includes case Example component 101, page assembly 102, case executive mode component 103 and data handling component 104.
Case component 101 is the originating end of automatic test case, is responsible for supporting iOS and Android operation system automatic Change the operation of test script, and supports to be used in mixed way under dual operating systems, multi-model, multi-client type condition.Case group Part 101 obtains whole transaction pages of transaction to be tested by invoking page component 102, by creating the overall situation as shown in FIG. 6 Configuration component 202 obtains the sequence that executes of transaction flow, and the execution sequence of transaction flow is used to arrange each transaction page Column combination;By calling case executive mode component 103 to obtain the serial or parallel option that test cases is executed in more equipment;It is logical Cross test data needed for calling data handling component 104 obtains automation test cases;By calling log group as shown in FIG. 6 Part 201 obtains automatic test course log;By calling abnormality processing component 204 as shown in FIG. 6 to obtain automatic test Exception handling information.
On the one hand, when page assembly 102 is connected to the call instruction of case component 101, by included in call instruction The information creatings transaction page such as Transaction Name, Page Name provides whole transaction pages of transaction to be tested to case component 101 Element and operating method can execute sequence according to transaction flow, carry out permutation and combination to each transaction page.Another party Face, page assembly 102 create the human-computer interaction component 206 of service layer 2 (see Fig. 6) when handling register, use for receiving Family is passed to the information such as user name and password, executes register.In addition, page assembly 102 also calls element group as shown in FIG. 6 Part 207 positions its XPath page based on element, creation transaction element object ready for use, and provides the behaviour of page elements Make method and common process method, is waited comprising input domain biography value, operation, button is clicked, OptionButton is chosen, check box is chosen Simple operations, and slide mobile phone screen, take the complex operations such as screen coordinate position, do not need to distinguish iOS or Android operation System.
When case executive mode component 103 is connected to the call instruction that case component 101 issues, by case component 101 Middle creation global configuration component object parses and obtains the configuration information of the global configuration component 202 of service layer 2, including operation System, case title etc. are responsible for that the string of iOS Yu Android operation system smart machine are provided while supported to case component 101 The parallel automatic test case method of operation;By creating auxiliary tool collection component object in case component 101, parses and obtain The configuration information of the auxiliary tool collection component 203 of service layer 2 is taken, the smart machine letter that connection automatic test executes machine is obtained Breath, comprising contents such as device id, device model, operating system versions, so as to support the cross operating system string on designated equipment Row executes same test case and carries out compatibility test, and parallel execution nominative testing case, greatly improves automation and surveys The efficiency of examination and the specific aim of compatibility test.
Data handling component 104 calls the database component of service layer 2 when being connected to the call instruction of case component 101 205, it completes to the increasing of test data, operation, the test data for providing Excel format to case component 101 such as to delete, change, look into defeated Enter and the test data of XML format inputs.
Fig. 6 illustrates the internal component structure of the service layer 2 of the embodiment of the present invention.Service layer 2 mainly includes log It is component 201, global configuration component 202, auxiliary tool collection component 203, abnormality processing component 204, database component 205, man-machine Interactive component 206 and element component 207.
When log component 201 is connected to the call instruction of case component 101, log component object is created in case component, It is responsible for providing the running log for running automatic test case in iOS and Andriod operating system to case component 101, with And iOS and the customized log approach of the automatic test of Android operation system.Also, log component 201 is also matched by the overall situation It sets component 202 and calls iOS and Android log approach, debugging and maintenance script respectively.
Global configuration component 202 receives the call instruction of case executive mode component 103, is responsible for the case of application layer 1 Executive mode component 103 provide iOS and Android operation system configuration management, be broadly divided into dual operating systems generic configuration, IOS configuration, Android configure three parts, transparent to application layer 1, are mainly used for service layer 2, the fusion of 3 cross operating system of core layer Configuration uses.Above-mentioned configuration includes serial, parallel action method the configuration of test cases, the input of test data Excel, XML The configuration etc. of structure.Global configuration component 202 calls log component 201, for providing the dual operation system of automatic test case The configuration management of system running log.Global configuration component 202 calls auxiliary tool collection component 203, for providing automatic test The configuration management of execution machine and different type smart machine.
When auxiliary tool collection component 203 is connected to the call instruction of case executive mode component 103, call in core layer 3 Session component 301 and device management component 302, the idevice installer tool command that fusion core layer 3 encapsulates respectively with ADB tool command interacts call method with test equipment for what case executive mode component 103 provided unified operation form.And And auxiliary tool collection component 203 passes through the smart machine in the dual operating systems generic configuration of global configuration component 202 and operates system The specified operating system for executing test cases of configuration item of uniting, parameter include dual operating systems, iOS operating system and Android behaviour Make system.
When abnormality processing component 204 is connected to case 101 call instruction of component, abnormality processing component is created in case component It is multiple to be responsible for abnormality processing of offer iOS and Andriod automatic test case, including read-write exception, logic exception etc. for object Type provides the customized abnormal method of automatic test of iOS and Android operation system respectively, and tester can be by complete Office's configuration component 202 calls the exception handling of iOS and Android respectively, is debugged and is safeguarded to test script.
When database component 205 is connected to the call instruction of data handling component 104, according to parameters such as library, SQL statements, it is The data handling component 104 of application layer 1 provides the test data and operating method of iOS and Andriod automatic test case, Including connection, insertion, update, the operation such as inquiry, delete, disconnect, while it is general with Android operation system to provide iOS Automatic test self-defining data library operation interface, for tester write case use.
When human-computer interaction component 206 is connected to the call instruction of page assembly 102, according to the incoming test of page assembly 102 Parameter transaction and OS Type parameter identify type of transaction, such as the input of system login, safety keyboard etc., and provide iOS Or the functions such as the gesture password operating method of Android operation system, safety keyboard operating method.
Element component 207 is used to provide required for iOS and Android operation system for the page assembly 102 of application layer 1 Element type and position directly create in transaction page object and instantiate element component object, include combobox, single choice The types such as button, check box, button, input domain, safe control, can be used the methods of id, name, XPath by UIAutomation (iOS tool) and UIAutomator (Android tool) tool positioning webpage element position, without OS Type is distinguished, automatic test case directly can be completed using the handle of element object and write.
Fig. 7 illustrates the internal component structure of the core layer 3 of the embodiment of the present invention.Core layer 3 mainly includes session Component 301, driving assembly 303, device management component 302, ADB component 304 and Idevice installer component 305.
Session component 301 receives the order of auxiliary tool collection component 203 in service layer 2, and automatic test case is uniformly processed The test equipment of iOS and Android operation system and automatic test execute the interactive connection machine of machine (MAC computer) in example operation System, the component call driving assembly 303 create interactive sessions, and iOS and Android automatic test case can pass through execution machine Script is operated, using USB line, is inputted by parameters such as device id, device type, equipment Serial Numbers and connects and test is driven to set It is standby, implement automatic test work.
Device management component 302 is used to encapsulate other interaction lives in addition to driving the order of respective operations system test equipment It enables, ADB component 304 is called to obtain the information of Android operation system, Idevice installer component 305 is called to obtain The information of iOS operating system, these information include the contents such as device model, device id, are the auxiliary tool collection group in service layer 2 Part 203 provides the command function collection of unified standard.
(Driver) component 303 is driven to be used to provide the side of interaction of iOS and Android operation system to session component 301 Method passes through driving Idevice installer tool command and ADB (Android Debug Bridge) tool command, the group Part can drive test cases to implement on iOS and Android operation system respectively according to the type of test equipment of configuration.
ADB (Android Debug Bridge) component 304 is used to integrate the drive command row of Android operation system, The Android order that all automated test tools need to execute is supplied to device management component 302 in the form of interface, by setting The standby scheduling of management assembly 302 executes.
Idevice installer component 305 is used to integrate the drive command row of iOS operating system, by all automations The iOS order that testing tool need to execute is supplied to device management component 302 in the form of interface, is adjusted by device management component 302 Degree executes.
Using automated test tool shown in Fig. 4 complete automatic test script establishment and operation when, essentially according to Lower step carries out:
1. disposing automated test tool to automatic test executes machine (MAC computer).The present invention is disposed on MAC computer The automated test tool that embodiment provides, the automated test tool are based on java applet language and are related to, and have professional platform independence, Android and the smart machine of iOS operating system can be supported to complete automatic test simultaneously.
2. Intelligent test device prepares.Android editions and iOS editions tested mobile applications are obtained, and tested by Android editions Mobile application is mounted on the Intelligent test device of Android operation system, and iOS editions tested mobile applications are mounted on iOS On the Intelligent test device of operating system, machine is executed with USB line connection Intelligent test device and automatic test.
3. test cases script prepares.The step relates generally to case component 101 and is obtained respectively by page assembly 102 The contents such as the page element of Android and iOS editions tested mobile applications, operating method, operating process.
4. test data prepares.The step relates generally to case component 101 and passes through global configuration component 202 and data processing The inquiry of component 104 obtains the test data of tested transaction.
5. configuring Intelligent test device.The step relates generally to case component 101 and passes through global configuration component 202 and case Executive mode component 103 obtains the information of Android and iOS Intelligent test device, to configure the intelligence of respective operations system Test equipment.
6. carrying out automatic test.
To be clearly illustrated to technical solution of the present invention, it is given below and is provided using using the embodiment of the present invention Automated test tool Mobile banking application carry out login account money transfer transactions automatic test case, illustrate as Under:
(1) test smart machine prepares:
Tester obtains iOS editions to be measured and Android editions Mobile banking's applications clients by download link respectively. Wherein, iOS editions Mobile banking's applications clients need to use test developer certificate to carry out the packing of test client program, Android editions Mobile banking's applications clients directly use apk format program.
(2) test cases script prepares:
1. element component 207 from each page of login account money transfer transactions by UIAutomation (iOS tool) or UIAutomator (Android tool) tool obtains traded elements positioning, type and processing method.
2. page assembly 102 receives the call instruction of case component 101, page assembly object is created, from element component 207 The transaction test page, element positioning, element type are obtained, and defines element processing method, specific test page and element type, Element processing method is as follows:
1) transaction homepage
(1) element: login account transfers accounts (button), domestic remittance (button), overseas remits money (button), voice is transferred accounts and (pressed Button), more multi-functional (button) (transaction page shows)
(2) operate: login account transfers accounts, remits money within the border, overseas remittance, voice transfer accounts, are more multi-functional
2) it transfers accounts and submits the page
(1) element: collecting account (combobox), currency type (combobox), transfer amounts (input domain), Send only Account (drop-down Frame), available balance (echo text), in next step (button), return to (button) (transaction page shows)
(2) operation: collecting account selection, transfer amounts input, Send only Account selection, next step, returns currency type selection
3) confirm the page
(1) element: the amount of money (echo text) determines (button), cancels (button) (transaction page shows)
(2) it operates: determining, cancels
4) the sign test page
(1) element: sign test mode (combobox), password (input domain) determine (button), cancel (button) (transaction page Show)
(2) operate: sign test mode selects, Password Input, determination, cancellation
5) success page
(1) element: successful information (echo text) returns to (button) (transaction page shows)
(2) it operates: returning
6) hooks handle the page
(1) element: exception information (echo text) returns to (button) (transaction page shows)
(2) it operates: returning
(3) test data prepares:
1. database component 205 passes through the parameters read test numbers such as database-name, database address, table, SQL statement According to.
2. data handling component 104 calls data package to configure test data.Login account money transfer transactions require same visitor It include two different login accounts under name in an account book, and account status is normal, one of account balance is not 0.
(4) configuration test smart machine:
1.ADB component 304 obtains Android smart machine information, comprising device id, equipment brand, device model and sets The information such as standby type.
2.Idevice installer component 305 obtains the facility information of the Intelligent test device of iOS operating system, packet Containing information such as device id, equipment brand, device model and device types.
3. device management component 302 calls ADB component 304 and Idevice installer component 305 to obtain intelligence test The facility information of equipment.
4. it is parallel execute that global configuration component 202, which calls device management component 302 to configure automatic test executive mode, Nominative testing case.
5. auxiliary tool collection component 203 calls device management component 302 to configure automatic test execution client type IOS and Android Intelligent test device.
6. case executive mode component 103 calls global configuration component 302 and auxiliary tool collection component 203 to determine the side of execution Formula and client type.
(5) automatic test is run:
1. oneself of the printing iOS Mobile banking applications client of log component 201 and Android phone Bank application client Dynamicization test log.
2. abnormality processing component 204 handles iOS Mobile banking applications client and Android phone Bank application client Automatic test anomalous event.
3. driving assembly 303 creates the session of Intelligent test device and automated test tool, iOS intelligent testing is respectively created Try equipment session and the session of Android Intelligent test device.
4. session component 301 handles iOS Intelligent test device, Android Intelligent test device and automatic test respectively The interaction and communication of tool.
5. human-computer interaction component 206 uses application belonging to gesture password or the transaction of safety keyboard Login Register account transfer System.
6. 101 invoking page component 102 of case component, data handling component 104, case executive mode component 103 are distinguished It transfers accounts in execution login account on iOS Intelligent test device and Android Intelligent test device and automates test cases.
The embodiment of the present invention can support the mobile device of iOS and Android operation system simultaneously, and serializable is in distinct device Upper automated execution same test case carries out compatibility test, also can the specified survey of automated execution on different devices parallel Case is tried, tested performance is greatly improved.The automated test tool provided through the embodiment of the present invention, not only when extended testing system Between be 7 × 24 hours, while a bit test personnel can use as more people, be effectively reduced test human cost, promote research and development test Than.
The present invention has following remarkable advantage: test designs, abstract service scene process, most to paste unrelated with operating system The design of automation mode simulation test and implementation procedure of nearly craft functional test;Tester works out automatic test case When, without considering iOS and Android operation system difference, use a set of case Programming Methodology, a set of case side of writing Method, a set of case, which execute method, can be completed the automatic test work of more device types, multiple operating system, multi-model;It can expand Malleability and strong flexibility, tester can extend customized test method, and nothing in application layer according to mobile applications feature IOS and Android operation system difference need to be considered, to realize real mobile application multiple operating system fusion test.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Specific embodiment is applied in the present invention, and principle and implementation of the present invention are described, above embodiments Explanation be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, According to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion in this specification Appearance should not be construed as limiting the invention.

Claims (10)

1. a kind of automated testing method for merging iOS and Android mobile application, which is characterized in that the described method includes:
It obtains and iOS editions and Android editions tested mobile applications is installed to corresponding Intelligent test device;Wherein, the intelligence Test equipment executes machine with automatic test by USB line and connect;
According to the Transaction Name of tested transaction, Page Name create transaction page, and obtain the All Activity page page elements, Element location information, element type, and define element processing method;
Obtain tested test data used of trading, and according to the page elements, element location information, element type, element at Reason method and Test data generation test case;
Obtain the facility information that connection automatic test executes the Intelligent test device of machine;
Automatic test executive mode of the test case on Intelligent test device is configured according to the facility information;
The test case is sent respectively to the intelligence test of corresponding operating system according to the automatic test executive mode Equipment, to carry out automatic test.
2. the automated testing method of fusion iOS and Android mobile application according to claim 1, which is characterized in that Before generating test case, the method also includes: according to the transaction flow execution of tested transaction sequence to transaction page into Row permutation and combination.
3. the automated testing method of fusion iOS and Android mobile application according to claim 1, which is characterized in that Obtain tested test data used of trading, comprising:
According to database information used in tested transaction from correspondence database read test data;And/or
User is obtained to operate by the general automatic test self-defining data library of iOS operating system and Android operation system The test data of interface input.
4. the automated testing method of fusion iOS and Android mobile application according to claim 1, which is characterized in that Obtain the facility information that connection automatic test executes the Intelligent test device of machine, comprising:
The facility information for the Intelligent test device that operating system is Android is obtained using ADB tool;
The facility information for the Intelligent test device that operating system is iOS is obtained using IdeviceInstaller tool.
5. the automated testing method of fusion iOS and Android mobile application according to claim 1, which is characterized in that The method also includes: obtain the running log and Android of iOS operating system Intelligent test device in automatic test course The running log of operating system Intelligent test device.
6. a kind of fusion iOS and Android mobile application automatization test system, which is characterized in that the system deployment is certainly On dynamicization test execution machine, comprising:
Tested application acquisition unit, for obtaining and installing iOS editions and Android editions tested mobile applications to corresponding intelligent testing Try equipment;Wherein, the Intelligent test device executes machine with automatic test by USB line and connect;
Transaction page creating unit, for creating transaction page according to Transaction Name, the Page Name of tested transaction, and obtaining institute There are page elements, the element location information, element type of transaction page, and defines element processing method;
Test cases technology unit for obtaining tested test data used of trading, and is positioned according to the page elements, element Information, element type, element processing method and Test data generation test case;
Device information acquisition unit, the facility information for executing the Intelligent test device of machine for obtaining connection automatic test;
Executive mode determination unit, for according to the facility information configure the test case on Intelligent test device from Dynamicization test execution mode;
Test cell, for the test case to be sent respectively to corresponding operating system according to the automatic test executive mode The Intelligent test device of system, to carry out automatic test.
7. fusion iOS according to claim 6 and Android mobile application automatization test system, which is characterized in that Before generating test case, the transaction page creating unit is also used to: right according to the transaction flow execution sequence of tested transaction Transaction page carries out permutation and combination.
8. fusion iOS according to claim 6 and Android mobile application automatization test system, which is characterized in that institute Stating the tested approach for trading test data used of Test cases technology unit acquisition includes:
According to database information used in tested transaction from correspondence database read test data;And/or
User is obtained to operate by the general automatic test self-defining data library of iOS operating system and Android operation system The test data of interface input.
9. fusion iOS according to claim 6 and Android mobile application automatization test system, which is characterized in that institute Stating device information acquisition unit includes:
ADB tool assembly, for obtaining the facility information for the Intelligent test device that operating system is Android;
Idevice Installer tool assembly, for obtaining the facility information for the Intelligent test device that operating system is iOS.
10. fusion iOS according to claim 6 and Android mobile application automatization test system, which is characterized in that The system also includes: log acquisition unit, for obtaining iOS operating system Intelligent test device in automatic test course The running log of running log and Android operation system Intelligent test device.
CN201910639171.1A 2019-07-16 2019-07-16 Automatic testing method and system for integrating iOS and Android mobile applications Active CN110362490B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910639171.1A CN110362490B (en) 2019-07-16 2019-07-16 Automatic testing method and system for integrating iOS and Android mobile applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910639171.1A CN110362490B (en) 2019-07-16 2019-07-16 Automatic testing method and system for integrating iOS and Android mobile applications

Publications (2)

Publication Number Publication Date
CN110362490A true CN110362490A (en) 2019-10-22
CN110362490B CN110362490B (en) 2023-08-08

Family

ID=68219316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910639171.1A Active CN110362490B (en) 2019-07-16 2019-07-16 Automatic testing method and system for integrating iOS and Android mobile applications

Country Status (1)

Country Link
CN (1) CN110362490B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444103A (en) * 2020-03-31 2020-07-24 腾讯音乐娱乐科技(深圳)有限公司 Automatic testing method for Web page and related equipment
CN111782189A (en) * 2020-06-23 2020-10-16 广州市挖米科技有限责任公司 Medical system deployment method and device
CN112579443A (en) * 2020-12-08 2021-03-30 温氏食品集团股份有限公司 Automatic testing method and platform of intelligent testing robot
CN113518146A (en) * 2021-09-14 2021-10-19 云账户技术(天津)有限公司 Method and device for acquiring mobile terminal information
CN115687160A (en) * 2022-12-30 2023-02-03 杭州兑吧网络科技有限公司 Interface test system, method and equipment cluster
CN111444103B (en) * 2020-03-31 2024-04-26 腾讯音乐娱乐科技(深圳)有限公司 Web page automatic testing method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250307A (en) * 2016-07-20 2016-12-21 福建省农村信用社联合社 A kind of bank's mobile phone application automated testing method and system
US20170052877A1 (en) * 2015-08-20 2017-02-23 Ca, Inc. Generic test automation for graphical user interface (gui) applications
CN107451060A (en) * 2017-08-01 2017-12-08 安徽善金科技股份有限公司 A kind of across mobile terminal automated test frame system
EP3333712A2 (en) * 2016-11-15 2018-06-13 Accenture Global Solutions Limited Simultaneous multi-platform testing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170052877A1 (en) * 2015-08-20 2017-02-23 Ca, Inc. Generic test automation for graphical user interface (gui) applications
CN106250307A (en) * 2016-07-20 2016-12-21 福建省农村信用社联合社 A kind of bank's mobile phone application automated testing method and system
EP3333712A2 (en) * 2016-11-15 2018-06-13 Accenture Global Solutions Limited Simultaneous multi-platform testing
CN107451060A (en) * 2017-08-01 2017-12-08 安徽善金科技股份有限公司 A kind of across mobile terminal automated test frame system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444103A (en) * 2020-03-31 2020-07-24 腾讯音乐娱乐科技(深圳)有限公司 Automatic testing method for Web page and related equipment
CN111444103B (en) * 2020-03-31 2024-04-26 腾讯音乐娱乐科技(深圳)有限公司 Web page automatic testing method and related equipment
CN111782189A (en) * 2020-06-23 2020-10-16 广州市挖米科技有限责任公司 Medical system deployment method and device
CN111782189B (en) * 2020-06-23 2024-03-22 广州市挖米科技有限责任公司 Medical system deployment method and device
CN112579443A (en) * 2020-12-08 2021-03-30 温氏食品集团股份有限公司 Automatic testing method and platform of intelligent testing robot
CN113518146A (en) * 2021-09-14 2021-10-19 云账户技术(天津)有限公司 Method and device for acquiring mobile terminal information
CN113518146B (en) * 2021-09-14 2021-12-03 云账户技术(天津)有限公司 Method and device for acquiring mobile terminal information
CN115687160A (en) * 2022-12-30 2023-02-03 杭州兑吧网络科技有限公司 Interface test system, method and equipment cluster

Also Published As

Publication number Publication date
CN110362490B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN110362490A (en) Merge the automated testing method and system of iOS and Android mobile application
Canfora et al. A wrapping approach for migrating legacy system interactive functionalities to service oriented architectures
US5873094A (en) Method and apparatus for automated conformance and enforcement of behavior in application processing systems
CN105487864B (en) The method and apparatus of Code automatic build
CN105912473B (en) Mobile APP automatically testing platform and test method based on BDD
AU2016201389A1 (en) Method and system for process automation in computing
WO1996032675A9 (en) Automated enforcement of behavior in application program
CN105739987A (en) SOA-oriented rapid JavaWeb application construction system framework
WO2001082071A1 (en) Methods and systems for supporting and deploying distributed computing components
WO1994018629A1 (en) Model information control system
US8661356B2 (en) Time application having an intergrated check engine
CN105893061A (en) Application program development method and system
CN104750603A (en) Multi-core DSP (Digital Signal Processor) software emulator and physical layer software testing method thereof
Sokolova et al. Android passive MVC: a novel architecture model for the android application development
CN108647147A (en) It is a kind of to execute automatic test machine people and its application method using atlas analysis
US20210117313A1 (en) Language agnostic automation scripting tool
CN1996375A (en) Method and device for implementing transaction test in host environment
CN103152433B (en) A kind of use, interaction and the request processing method at Distributed Services end
Andrade The Tuxedo System: Software for Constructing and Managing Distributed Business Applications
CN109918338B (en) Safety chip operating system testing device
Marchetto et al. From objects to services: toward a stepwise migration approach for Java applications
US10142400B2 (en) Context-sensitive information retrieval
CN113688141A (en) Application function design method and software development platform
CN117573200B (en) Dynamic configurable equivalent device system and flow configuration method
CN105912463B (en) Smart card protocol Auto-Test System and method based on MP300 equipment

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