CN110362490B - Automatic testing method and system for integrating iOS and Android mobile applications - Google Patents

Automatic testing method and system for integrating iOS and Android mobile applications Download PDF

Info

Publication number
CN110362490B
CN110362490B CN201910639171.1A CN201910639171A CN110362490B CN 110362490 B CN110362490 B CN 110362490B CN 201910639171 A CN201910639171 A CN 201910639171A CN 110362490 B CN110362490 B CN 110362490B
Authority
CN
China
Prior art keywords
test
transaction
ios
intelligent
equipment
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
CN201910639171.1A
Other languages
Chinese (zh)
Other versions
CN110362490A (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 invention provides an automated testing method and system for fusing iOS and Android mobile applications, comprising the following steps: acquiring and installing an iOS and Android mobile application to be tested to corresponding intelligent test equipment; the intelligent test equipment is connected with the automatic test executor through a USB line; creating a transaction page according to the transaction name and the page name of the transaction to be tested, acquiring page elements, element positioning information and types of the transaction page, and defining an element processing method; acquiring test data for a tested transaction, and generating a test case according to page elements, element positioning information, element types, element processing methods and the test data; acquiring equipment information of intelligent test equipment connected with an automatic test executor; configuring an automatic test execution mode of the test case on the intelligent test equipment according to the equipment information; and respectively sending the test cases to intelligent test equipment of the corresponding operating system for testing according to an automatic test execution mode.

Description

Automatic testing method and system for integrating iOS and Android mobile applications
Technical Field
The invention relates to the field of software engineering automation testing, in particular to a method and a system for integrating iOS and Android mobile application automation testing.
Background
With the rapid development of sharing economy, internet finance and mobile communication technology, smartphones bear more and more mobile living clients, so that people can live conveniently. From the earliest mobile phone browser GPRS (General Packet Radio Service) to the 3G and 4G mobile Internet era, the smart mobile phone application client gradually replaces the browser to become a mainstream Internet surfing mode, and the research and development quality of the client determines the experience of markets and users. Because the client belongs to the category of application software, the method aims at the current two main stream smart phone operating systems: the iOS and the Android have larger difference in the research and development process, so that the correctness and compatibility of the test are ensured in the test process.
In the traditional manual testing mode, the clients with the same function test the running condition of the clients on the iOS operating system and the running condition of the clients on the Android operating system in the testing process, and as the Android operating system relates to mobile phones and tablet computers of various brands, the Android operating systems of all brands of equipment also have various versions and various improvements, and the manual testing application client is extremely high in cost and difficult to realize full coverage in a limited project period in consideration of the openness of the Android operating systems.
In addition, the mobile application automation testing tool popular in the market at present can only support application testing of one operating system, for example, the iOS-driver tool only supports apple equipment, and the Robotium tool only supports Android equipment; or two kinds of equipment are supported simultaneously, but different testing methods are needed for testing, so that the tester has higher study and use cost, the automatic testing cost of the application program is greatly improved, the income is reduced, and the quality daemon of mobile application is also not facilitated. For example, although some tools support both apple equipment and Android equipment, an automation test case of the apple equipment needs to use a specific XCode environment test of the apple equipment, the automation test case cannot run simultaneously with the test case of the Android equipment in the same set of environment, and the technology and method for designing and writing are completely different, so that a tester needs to learn two languages to complete corresponding automation tests, and the input-output ratio is extremely low.
Disclosure of Invention
In order to improve the automatic test efficiency of mobile applications, reduce the test time of multiple client types, multiple operating systems of the same client type and multiple machines, and improve the compatibility test efficiency, the embodiment of the invention provides a method and a system for fusing the automatic test of iOS and Android mobile applications. By the testing method and the system, testers can adopt the same testing design idea, code organization form and writing method based on the same automatic testing tool, and perform automatic testing work of multiple clients, multiple operating systems and multiple machine type application programs on the same PC equipment in series or in parallel.
On one hand, the embodiment of the invention provides an automated testing method for fusing iOS and Android mobile applications, which comprises the following steps:
acquiring and installing an iOS version and an Android version of the tested mobile application to corresponding intelligent test equipment; the intelligent test equipment is connected with the automatic test execution machine through a USB line;
creating a transaction page according to the transaction name and the page name of the transaction to be tested, acquiring page elements, element positioning information and element types of all the transaction pages, and defining an element processing method;
acquiring test data for a tested transaction, and generating a test case according to the page element, the element positioning information, the element type, the element processing method and the test data;
acquiring equipment information of intelligent test equipment connected with an automatic test executor;
configuring an automatic test execution mode of the test case on intelligent test equipment according to the equipment information;
and respectively sending the test cases to intelligent test equipment of a corresponding operating system according to the automatic test execution mode so as to perform automatic test.
In an embodiment, before generating the test case, the method further comprises: and arranging and combining the transaction pages according to the execution sequence of the transaction flow of the tested transaction.
In one embodiment, obtaining test data for a tested transaction includes:
reading test data from a corresponding database according to database information for the tested transaction; and/or the number of the groups of groups,
and acquiring test data input by a user through an operation interface of an automatic test custom database which is common to the iOS operating system and the Android operating system.
In one embodiment, obtaining device information for intelligent test devices connected to an automated test execution machine includes:
acquiring equipment information of intelligent test equipment with an Android operating system by using an ADB tool;
device information of intelligent test devices with an operating system iOS is obtained by using Idevice Installer tools.
In an embodiment, the method further comprises: and acquiring an operation log of the intelligent testing equipment of the iOS operating system and an operation log of the intelligent testing equipment of the Android operating system in the automatic testing process.
On the other hand, the embodiment of the invention also provides an automated testing system for fusing iOS and Android mobile applications, wherein the system is deployed on an automated testing execution machine and comprises the following components:
the tested application acquisition unit is used for acquiring and installing the iOS version and the Android version of the tested mobile application to the corresponding intelligent test equipment; the intelligent test equipment is connected with the automatic test execution machine through a USB line;
the transaction page creation unit is used for creating a transaction page according to the transaction name and the page name of the transaction to be tested, acquiring page elements, element positioning information and element types of all the transaction pages, and defining an element processing method;
the test case generation unit is used for acquiring test data used for the tested transaction and generating a test case according to the page element, the element positioning information, the element type, the element processing method and the test data;
the device information acquisition unit is used for acquiring device information of intelligent test devices connected with the automatic test execution machine;
the execution mode determining unit is used for configuring an automatic test execution mode of the test case on the intelligent test equipment according to the equipment information;
and the test unit is used for respectively sending the test cases to intelligent test equipment of a corresponding operating system according to the automatic test execution mode so as to perform automatic test.
In an embodiment, before generating the test case, the transaction page creation unit is further configured to: and arranging and combining the transaction pages according to the execution sequence of the transaction flow of the tested transaction.
In one embodiment, the method for obtaining test data for the tested transaction by the test case generating unit includes:
reading test data from a corresponding database according to database information for the tested transaction; and/or the number of the groups of groups,
and acquiring test data input by a user through an operation interface of an automatic test custom database which is common to the iOS operating system and the Android operating system.
In an embodiment, the device information acquisition unit includes:
the ADB tool component is used for acquiring equipment information of intelligent test equipment with an Android operating system;
idevice Installer tool component for obtaining device information of intelligent test device whose operating system is iOS.
In an embodiment, the system further comprises: the log acquisition unit is used for acquiring the running log of the iOS intelligent testing equipment and the running log of the Android intelligent testing equipment in the automatic testing process.
The invention has the following remarkable advantages: the test design is irrelevant to an operating system, a business scene flow is abstracted, and the test design and execution process is simulated in an automatic mode closest to manual functional test; when a tester compiles an automatic test case, the difference between the iOS and the Android operating system is not required to be considered, and the automatic test work of multiple equipment types, multiple operating systems and multiple machines can be completed by using a set of case programming method, a set of case writing method and a set of case executing method; the method has strong expandability and flexibility, testers can expand the custom test method at the application layer according to the characteristics of the mobile application program, and the difference between the iOS and the Android operating system is not required to be considered, so that the real mobile application multi-operating system fusion test is realized.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an automated testing method for fusing iOS and Android mobile applications according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an automated testing system for integrating iOS and Android mobile applications according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a testing tool according to another embodiment of the present invention;
FIG. 4 is a system architecture diagram of an automated test tool according to another embodiment of the present invention;
FIG. 5 is a diagram illustrating the internal architecture of the application layer 1 in the embodiment of FIG. 4 according to the present invention;
FIG. 6 is a diagram illustrating the internal architecture of service layer 2 in the embodiment of FIG. 4 according to the present invention;
fig. 7 is a diagram illustrating an internal structure of the core layer 3 in the embodiment of fig. 4 according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of an automated testing method for fusing iOS and Android mobile applications according to an embodiment of the present invention. As shown in fig. 1, the method mainly comprises the following steps:
and 11, acquiring and installing the iOS version and the Android version of the tested mobile application to the corresponding intelligent test equipment. Wherein, each intelligent test equipment is connected with the automatic test executor through USB line respectively.
And 12, creating a transaction page according to the transaction name and the page name of the tested transaction, acquiring page elements, element positioning information and element types of all the transaction pages, and defining an element processing method.
And step 13, acquiring test data for the tested transaction, and generating a test case according to the page element, the element positioning information, the element type, the element processing method and the test data.
And 14, acquiring equipment information of intelligent test equipment connected with the automatic test executor.
And 15, configuring an automatic test execution mode of the test case on the intelligent test equipment according to the equipment information.
And step 16, respectively sending the test cases to intelligent test equipment of a corresponding operating system according to the automatic test execution mode so as to perform automatic test.
According to the embodiment of the invention, through the abstraction and packaging technology of the iOS and Android bottom layer characteristics, testers can write and execute the automatic test codes of clients with different types and different models of the iOS and the Android operating system in the same tool system by adopting the same test design thought, code organization form and code writing method, so that the automatic function test and compatibility test are completed, the test efficiency is improved, and the test time and cost are reduced.
Generally, after the transaction page is created and before the test case is generated, the transaction pages may be further arranged and combined according to the execution sequence of the transaction flow of the tested transaction.
Generally, when the test data for the tested transaction is obtained in step 13, the test data may be read from the corresponding database according to the database information for the tested transaction, and/or the test data input by the user through the operation interface of the automation test custom database commonly used by the iOS operation system and the Android operation system may be obtained.
Because the intelligent test equipment connected with the automatic test executor comprises the mobile equipment with the iOS operating system and the mobile equipment with the Android operating system, when equipment information is acquired, the ADB tool is required to acquire the equipment information of the intelligent test equipment with the Android operating system, and the IdeviceITler tool is required to acquire the equipment information of the intelligent test equipment with the iOS operating system.
In an embodiment, in order to facilitate debugging and maintaining the test script, when the mobile application is automatically tested, an operation log of the iOS operating system intelligent test device and an operation log of the Android operating system intelligent test device in the automatic test process need to be obtained.
The invention has the following remarkable advantages: the test design is irrelevant to an operating system, a business scene flow is abstracted, and the test design and execution process is simulated in an automatic mode closest to manual functional test; when a tester compiles an automatic test case, the difference between the iOS and the Android operating system is not required to be considered, and the automatic test work of multiple equipment types, multiple operating systems and multiple machines can be completed by using a set of case programming method, a set of case writing method and a set of case executing method; the method has strong expandability and flexibility, testers can expand the custom test method at the application layer according to the characteristics of the mobile application program, and the difference between the iOS and the Android operating system is not required to be considered, so that the real mobile application multi-operating system fusion test is realized.
Based on the same inventive concept as the automated testing method for fusing iOS and Android mobile applications shown in fig. 1, the embodiments of the present application further provide an automated testing method for fusing iOS and Android mobile applications, which is the same as the automated testing method for fusing iOS and Android mobile applications, as described in the following embodiments. Since the principle of the system for solving the problem is similar to that of the automated test method in fig. 1, the implementation of the system can refer to the implementation of the automated test method in fig. 1, and the repetition is not repeated.
In another embodiment, the invention further provides an iOS and Android mobile application fusion automation test system, the structure of which is shown in fig. 2, and the system comprises: the system comprises an application to be tested acquisition unit 10, a transaction page creation unit 20, a test case generation unit 30, a device information acquisition unit 40, an execution mode determination unit and a test unit 60.
The tested application obtaining unit 10 is used for obtaining and installing the iOS version and the Android version of the tested mobile application to corresponding intelligent test equipment, and the intelligent test equipment is connected with the automatic test execution machine through a USB line. The transaction page creation unit 20 is configured to create a transaction page according to a transaction name and a page name of a transaction to be tested, obtain page elements, element positioning information and element types of all the transaction pages, and define an element processing method; the test case generating unit 30 is configured to obtain test data for a tested transaction, and generate a test case according to the page element, the element positioning information, the element type, the element processing method, and the test data; the device information acquiring unit 40 is configured to acquire device information of an intelligent test device connected to the automated test executor; the execution mode determining unit 50 is configured to configure an automatic test execution mode of the test case on the intelligent test device according to the device information; the test unit 60 is configured to send the test cases to the intelligent test devices of the corresponding operating systems according to the automated test execution mode, so as to perform automated testing.
In an embodiment, after creating the transaction page and before generating the test case, the transaction page creating unit 20 further ranks and combines the transaction pages according to the execution sequence of the transaction flow of the tested transaction.
In one embodiment, the test case generating unit 30 obtains test data for a tested transaction by: reading test data from a corresponding database according to database information for the tested transaction; and/or acquiring test data input by a user through an operation interface of an automatic test custom database which is common to the iOS operating system and the Android operating system.
In an embodiment, the device information obtaining unit 40 includes an ADB tool component and a Idevice Installer tool component, where the ADB tool component is used to obtain device information of the intelligent test device with the operating system being Android, and the Idevice Installer tool component is used to obtain device information of the intelligent test device with the operating system being iOS.
In an embodiment, the system shown in fig. 2 further includes a log obtaining unit 70 (shown in a dashed box in fig. 2) for obtaining the running log of the iOS operating system intelligent test device and the running log of the Android operating system intelligent test device in the automated test procedure.
In order to make the technical scheme provided by the invention clearer, the invention also provides another embodiment for further explaining the technical scheme of the invention.
Fig. 3 is a schematic structural diagram of a test tool according to an embodiment of the present invention, where an automated test tool deployment operation is mainly divided into two parts, namely an execution device and an intelligent terminal device deployed by the automated test tool, and the two parts are connected by a USB method.
The automated test execution device is a main carrier for deployment of the automated test tool in the embodiment of the present invention, and may be a Mac computer. Because the automatic test cases running in the iOS operating system cannot run in the Windows operating system, and the automatic test cases running in the Android operating system can run in the Mac OS operating system, the carrier mainly deployed in the invention needs to support intelligent devices of both iOS and Android operating systems, so that the invention adopts an apple computer as an automatic test executor. Moreover, the automatic test tool in the embodiment of the invention is realized by adopting a cross-platform Java program and runs in a Java virtual machine on an operating system, so that the tool can run on an automatic test execution machine (namely an apple computer) of a Mac OS operating system, can simultaneously perform communication interaction with intelligent equipment of an iOS operating system and an Android operating system, and supports an application on the intelligent equipment to acquire automatic test case information on the automatic test execution machine.
The embodiment of the invention mainly supports the intelligent equipment of the iOS and the Android operating systems, and comprises the iOS, intelligent mobile phones of different versions of the Android operating systems, iPAD, android Pad and the like, and is connected with an automatic test execution machine in a USB wired mode. The intelligent test equipment is provided with a client to be tested, and automatic test is realized by simulating user operation.
Fig. 4 is a system structure diagram of an iOS and Android mobile application automation test tool in an embodiment of the present invention, which mainly includes an application layer 1, a service layer 2, and a core layer 3, and is deployed on an apple computer as an automation test executor.
The core layer 3 of the tool provides the service layer with the characteristics and interaction mechanism of the iOS and the Android operating systems, for example, the core layer is responsible for fusing the bottom interaction command of the iOS and the Android operating systems, provides a method and a network mechanism for simulating user operation, and provides technical support for the fusion of auxiliary tools of the service layer 2.
The service layer 2 provides an automatic test auxiliary function for fusing the characteristics of the iOS and the Android operating system for the application layer 1. For example, auxiliary functions such as database interaction capability, element type definition after fusing the iOS and the Android operating systems and the like are provided for the application layer 1.
And the application layer 1 realizes the integration of the automation test cases and the public assets of the iOS and the Android operating system. For example, by means of integrating the page basic functions and the business scene flow basic functions of the iOS and the Android operating systems by the application layer 1, the common operation method of the iOS and the Android operating systems is abstracted, and infrastructure support is provided for integration of the automatic test cases across the operating systems.
Fig. 5 illustrates an internal structural diagram of the application layer 1 according to an embodiment of the present invention. The application layer 1 mainly includes a case component 101, a page component 102, a case execution mode component 103, and a data processing component 104.
The case component 101 is an initiating terminal of an automatic test case, and is responsible for supporting the running of the iOS and Android operating system automatic test scripts and supporting the mixed use under the conditions of double operating systems, multiple machine types and multiple client types. The case component 101 obtains all transaction pages of the transaction to be tested by calling the page component 102, and obtains the execution sequence of the transaction flow by creating the global configuration component 202 as shown in fig. 6, wherein the execution sequence of the transaction flow is used for arranging and combining the transaction pages; acquiring serial or parallel options of test cases executed by multiple devices by calling a case execution mode component 103; acquiring test data required by the automated test case by invoking the data processing component 104; acquiring an automated test procedure log by invoking the log component 201 as shown in fig. 6; automated test exception handling information is obtained by invoking an exception handling component 204 as shown in FIG. 6.
On the one hand, when the page component 102 receives the call command of the case component 101, the transaction page is created by the information such as the transaction name, the page name and the like contained in the call command, and all the transaction page elements and the operation methods of the transaction to be tested are provided to the case component 101, so that each transaction page can be arranged and combined according to the execution sequence of the transaction flow. On the other hand, when the page component 102 processes the login operation, a man-machine interaction component 206 of the service layer 2 (see fig. 6) is created, and is configured to receive information such as a user name and a password, and perform the login operation. In addition, the page component 102 also calls the element component 207 as shown in fig. 6, so that the element component creates an element object to be used in a transaction based on XPath page positioning of an element, and provides an operation method and a public processing method of the page element, wherein the operation method comprises simple operations such as inputting field transmission values, operation waiting, button clicking, radio button selection, check box check, and the like, and complex operations such as sliding a mobile phone screen, taking a screen coordinate position, and the like, and the operation method does not need to distinguish an iOS or an Android operating system.
When the case execution mode component 103 receives a call command issued by the case component 101, by creating a global configuration component object in the case component 101, analyzing and acquiring configuration information of the global configuration component 202 of the service layer 2, including an operating system, a case name and the like, and providing a serial-parallel automatic test case operation mode for simultaneously supporting the iOS and the Android operating system intelligent devices for the case component 101; by creating the auxiliary tool set component object in the case component 101, analyzing and acquiring the configuration information of the auxiliary tool set component 203 of the service layer 2, and acquiring the intelligent device information of the connection automation test executor, including the content such as the device ID, the device model, the operating system version and the like, the compatibility test can be supported by executing the same test case on the appointed device in series across the operating system, and the appointed test case can be executed in parallel, so that the efficiency of the automation test and the pertinence of the compatibility test are greatly improved.
When receiving the call command of the case component 101, the data processing component 104 calls the database component 205 of the service layer 2 to complete the operations of adding, deleting, modifying, checking and the like on the test data, and provides test data input in Excel format and test data input in XML format for the case component 101.
Fig. 6 exemplarily shows an internal component structure of the service layer 2 of the embodiment of the present invention. The service layer 2 mainly comprises a log component 201, a global configuration component 202, an auxiliary tool set component 203, an exception handling component 204, a database component 205, a man-machine interaction component 206 and an element component 207.
When the log component 201 receives a call command of the case component 101, a log component object is created in the case component, and is responsible for providing running logs of the automatic test cases running in the iOS and Android operating systems and an automatic test custom log method of the iOS and Android operating systems for the case component 101. Moreover, the log component 201 also calls iOS and Android log methods, debugging and maintaining scripts through the global configuration component 202, respectively.
The global configuration component 202 receives a call command of the case execution mode component 103, is responsible for providing configuration management of the iOS and Android operating systems for the case execution mode component 103 of the application layer 1, is mainly divided into three parts of dual-operating-system general configuration, iOS configuration and Android configuration, is transparent to the application layer 1, and is mainly used for cross-operating-system fusion configuration of the service layer 2 and the core layer 3. The configuration includes serial and parallel execution mode configuration of test cases, test data Excel, XML input structure configuration, etc. The global configuration component 202 invokes the log component 201 to provide configuration management of the dual operating system run logs of the automated test cases. The global configuration component 202 invokes the auxiliary toolset component 203 to provide configuration management of the automated test executor and the different types of intelligent devices.
When the auxiliary tool set component 203 receives the call command of the case execution mode component 103, the session component 301 and the device management component 302 in the core layer 3 are called, and the idevice installer tool command and the ADB tool command respectively packaged by the core layer 3 are fused, so that a unified operation form interaction call method with the test device is provided for the case execution mode component 103. And, the auxiliary tool set component 203 specifies the operating system for executing the test case through the configuration item of the intelligent device operating system in the dual operating system general configuration of the global configuration component 202, and the parameters include the dual operating system, the iOS operating system and the Android operating system.
When the exception handling component 204 receives the call command of the case component 101, an exception handling component object is created in the case component and is responsible for providing exception handling of iOS and Android automated test cases, including reading and writing exception, logic exception and other types, and respectively providing automated test custom exception methods of iOS and Android operating systems, and a tester can respectively call exception handling mechanisms of iOS and Android through the global configuration component 202 to debug and maintain test scripts.
When the database component 205 receives a call command of the data processing component 104, test data and an operation method of the iOS and Android automatic test cases are provided for the data processing component 104 of the application layer 1 according to parameters such as a library, an SQL statement and the like, the operations including connection, insertion, updating, query, deletion, disconnection and the like are included, and meanwhile, an automatic test custom database operation interface common to the iOS and the Android operation systems is provided for a tester to write the cases.
When the man-machine interaction component 206 receives the call command of the page component 102, the transaction type, such as system login, secure keyboard input, and the like, is identified according to the test transaction parameter and the operating system type parameter transmitted by the page component 102, and functions of the iOS or Android operating systems, such as gesture password operation methods, secure keyboard operation methods, and the like, are provided.
The element component 207 is configured to provide the page component 102 of the application layer 1 with element types and positions required by iOS and Android operating systems, directly create and instantiate an element component object in a transaction page object, including a drop-down box, a radio button, a check box, a button, an input field, a security control, and the like, and locate a page element position by using a uiutomation (iOS tool) and a uiutomator (Android tool) tool by using a id, name, XPath method and the like, so that automatic test case writing can be completed by directly using handles of the element object without distinguishing the operating system types.
Fig. 7 exemplarily shows an internal component structure of the core layer 3 of the embodiment of the present invention. The core layer 3 mainly includes a session component 301, a driving component 303, a device management component 302, an ADB component 304, and a Idevice installer component 305.
The session component 301 receives the command of the auxiliary tool set component 203 in the service layer 2, uniformly processes the interactive connection mechanism between the testing equipment of the iOS and Android operating systems and the automated testing execution machine (MAC computer) in the operation of the automated testing cases, and invokes the driving component 303 to create an interactive session, wherein the iOS and Android automated testing cases can be connected and drive the testing equipment through the input of parameters such as equipment ID, equipment type, equipment serial number and the like by executing machine operation scripts, and the automated testing work is implemented by using a USB cable.
The device management component 302 is configured to package other interaction commands except the commands for driving the corresponding operating system test device, call the ADB component 304 to obtain information of the Android operating system, and call the Idevice installer component 305 to obtain information of the iOS operating system, where the information includes a device model, a device ID, and the like, and provide a unified function command set for the auxiliary tool set component 203 in the service layer 2.
A Driver component 303 is configured to provide interaction methods between the iOS and the Android operating systems to the session component 301, and by driving Idevice installer tool commands and ADB (Android Debug Bridge) tool commands, the component can drive test cases to be respectively implemented on the iOS and the Android operating systems according to the configured test device types.
ADB (Android Debug Bridge) component 304 is configured to integrate a driver command line of the Android operating system, provide Android commands to be executed by all automated test tools to device management component 302 in the form of an interface, and schedule execution by device management component 302.
Idevice installer component 305 is configured to integrate the driver command line of the iOS operating system, and to provide iOS commands to be executed by all automated test tools to the device management component 302 in the form of an interface, and to schedule execution by the device management component 302.
When the automatic test tool shown in fig. 4 is used for completing the programming and running of the automatic test script, the method mainly comprises the following steps:
1. deploying an automated test tool to an automated test execution machine (MAC computer). The automatic testing tool provided by the embodiment of the invention is deployed on the MAC computer, is related based on Java programming language, has cross-platform property, and can simultaneously support intelligent equipment of Android and iOS operating systems to complete automatic testing.
2. The intelligent test equipment is prepared. And acquiring the Android and iOS mobile applications to be tested, installing the Android mobile applications to be tested on intelligent test equipment of an Android operating system, installing the iOS mobile applications to be tested on intelligent test equipment of the iOS operating system, and connecting the intelligent test equipment with an automatic test executor by using a USB (universal serial bus) line.
3. Test case script preparation. The step mainly involves that the case component 101 respectively obtains the content such as page elements, operation methods, operation flows and the like of the Android and iOS version mobile application to be tested through the page component 102.
4. Test data preparation. This step involves primarily the case component 101 querying the data processing component 104 through the global configuration component 202 to obtain test data for the transaction under test.
5. And configuring intelligent test equipment. This step mainly involves the case component 101 obtaining information of Android and iOS intelligent test devices through the global configuration component 202 and the case execution mode component 103, so as to configure the intelligent test devices corresponding to the operating system.
6. Automated testing is performed.
In order to more clearly describe the technical scheme of the invention, an automatic test case for carrying out account registration transfer transaction in a mobile banking application by using the automatic test tool provided by the embodiment of the invention is provided below, and the specific description is as follows:
test smart device preparation:
and respectively acquiring the iOS version to be tested and the Android mobile banking application client side by the tester through the download link. The iOS version mobile banking application client needs to use a test developer certificate to package a test client program, and the Android version mobile banking application client directly uses an apk format program.
(II) test case script preparation:
1. the element component 207 obtains the transaction element location, type and processing method from the registered account transfer transaction pages through the uiaiutomation (iOS tool) or uiaiutostat (Android tool) tool.
2. The page component 102 receives the call instruction of the case component 101, creates a page component object, obtains the transaction test page, the element location, the element type from the element component 207, and defines an element processing method, and the specific test page and element type, and the element processing method are as follows:
1) Trade home page
(1) Element (b): registered account transfer (button), in-house money transfer (button), out-of-home money transfer (button), voice transfer (button), more functions (button) (transaction page presentation)
(2) The operation is as follows: registered account transfer, in-house money transfer, out-of-home money transfer, voice transfer, and more
2) Transfer submitting page
(1) Element (b): money collection account (drop-down box), currency (drop-down box), transfer amount (input field), payment account (drop-down box), available balance (text back), next step (button), return (button) (transaction page show)
(2) The operation is as follows: collection account selection, currency selection, transfer amount input, payment account selection, next step, return
3) Validation page
(1) Element (b): amount (text back), ok (button), cancel (button) (transaction page show)
(2) The operation is as follows: determining and cancelling
4) Signature verification page
(1) Element (b): signature verification mode (drop-down frame), password (input field), determination (button), cancellation (button) (transaction page display)
(2) The operation is as follows: signature verification mode selection, password input, determination and cancellation
5) Successful page
(1) Element (b): success information (text back display), back (button) (transaction page presentation)
(2) The operation is as follows: return to
6) Exception branch processing page
(1) Element (b): abnormal information (text display), return (button) (transaction page display)
(2) The operation is as follows: return to
(III) test data preparation:
1. database component 205 reads the test data by parameters such as database name, database address, table, SQL statement, etc.
2. The data processing component 104 invokes the data component configuration test data. The registered account transfer transaction requires that two different registered accounts be included under the same customer name, and that the account status be normal, with one account balance being other than 0.
(IV) configuring a test intelligent device:
the adb component 304 obtains Android smart device information, including information such as device ID, device brand, device model, and device type.
2.Idevice installer component 305 obtains device information for the intelligent test device of the iOS operating system, including information for device ID, device brand, device model, and device type.
3. The device management component 302 invokes the ADB component 304 and Idevice installer component 305 to obtain device information for the intelligent test device.
4. The global configuration component 202 invokes the device management component 302 to configure the automated test execution mode to specify test cases for parallel execution.
5. The auxiliary tool set component 203 invokes the device management component 302 to configure the automated test execution client type as iOS and Android intelligent test devices.
6. Case execution mode component 103 invokes global configuration component 302 and auxiliary tool set component 203 to determine the execution mode and client type.
And (V) automatic test operation:
1. the log component 201 prints automated test logs for iOS mobile banking application clients and Android mobile banking application clients.
2. The exception handling component 204 handles automated test exception events for iOS mobile banking application clients and Android mobile banking application clients.
3. The driving component 303 creates a session of the intelligent test equipment with the automated test tool, creating an iOS intelligent test equipment session and an Android intelligent test equipment session, respectively.
4. The session component 301 handles interaction and communication of the iOS intelligent test device, the Android intelligent test device, and the automated test tool, respectively.
5. The human interaction component 206 logs in to the application to which the registered account transfer transaction pertains using a gesture password or a secure keyboard.
6. The case component 101 invokes the page component 102, the data processing component 104, and the case execution mode component 103 to execute the registered account transfer automation test cases on the iOS smart test device and the Android smart test device, respectively.
The embodiment of the invention can simultaneously support mobile equipment of the iOS and Android operating systems, can automatically execute the same test case on different equipment in series to carry out compatibility test, and can also automatically execute appointed test cases on different equipment in parallel, thereby greatly improving test efficiency. According to the automatic test tool provided by the embodiment of the invention, the test time is prolonged to 7 multiplied by 24 hours, and meanwhile, one tester can be used by multiple people, so that the labor cost of the test is effectively reduced, and the research and development test ratio is improved.
The invention has the following remarkable advantages: the test design is irrelevant to an operating system, a business scene flow is abstracted, and the test design and execution process is simulated in an automatic mode closest to manual functional test; when a tester compiles an automatic test case, the difference between the iOS and the Android operating system is not required to be considered, and the automatic test work of multiple equipment types, multiple operating systems and multiple machines can be completed by using a set of case programming method, a set of case writing method and a set of case executing method; the method has strong expandability and flexibility, testers can expand the custom test method at the application layer according to the characteristics of the mobile application program, and the difference between the iOS and the Android operating system is not required to be considered, so that the real mobile application multi-operating system fusion test is realized.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. An automated testing method for fusing iOS and Android mobile applications, the method comprising:
acquiring and installing an iOS version and an Android version of the tested mobile application to corresponding intelligent test equipment; the intelligent test equipment is connected with an automatic test execution machine through a USB (universal serial bus) line, the automatic test execution machine is a Mac (Mac) computer, and an automatic test tool realized by a cross-platform java program runs on a Mac OS (operating system) in the Mac computer;
creating a transaction page according to the transaction name and the page name of the transaction to be tested, acquiring page elements, element positioning information and element types of all the transaction pages, and defining an element processing method;
acquiring test data for a tested transaction, and generating a test case according to the page element, the element positioning information, the element type, the element processing method and the test data;
acquiring equipment information of intelligent test equipment connected with an automatic test executor;
configuring an automatic test execution mode of the test case on intelligent test equipment according to the equipment information;
and respectively sending the test cases to intelligent test equipment of a corresponding operating system according to the automatic test execution mode so as to perform automatic test.
2. The automated testing method of fusing iOS and Android mobile applications of claim 1, wherein prior to generating the test case, the method further comprises: and arranging and combining the transaction pages according to the execution sequence of the transaction flow of the tested transaction.
3. The automated testing method for fusing iOS and Android mobile applications of claim 1, wherein obtaining test data for a tested transaction comprises:
reading test data from a corresponding database according to database information for the tested transaction; and/or the number of the groups of groups,
and acquiring test data input by a user through an operation interface of an automatic test custom database which is common to the iOS operating system and the Android operating system.
4. The automated testing method of fusing iOS and Android mobile applications of claim 1, wherein obtaining device information of an intelligent testing device connected to an automated test executor comprises:
acquiring equipment information of intelligent test equipment with an Android operating system by using an ADB tool;
device information of intelligent test devices with an operating system iOS is obtained by using Idevice Installer tools.
5. The automated testing method of fusing iOS and Android mobile applications of claim 1, further comprising: and acquiring an operation log of the intelligent testing equipment of the iOS operating system and an operation log of the intelligent testing equipment of the Android operating system in the automatic testing process.
6. An iOS and Android mobile application automated test system is fused, wherein the system is deployed on an automated test executor and comprises:
the tested application acquisition unit is used for acquiring and installing the iOS version and the Android version of the tested mobile application to the corresponding intelligent test equipment; the intelligent test equipment is connected with an automatic test execution machine through a USB (universal serial bus) line, the automatic test execution machine is a Mac (Mac) computer, and an automatic test tool realized by a cross-platform java program runs on a Mac OS (operating system) in the Mac computer;
the transaction page creation unit is used for creating a transaction page according to the transaction name and the page name of the transaction to be tested, acquiring page elements, element positioning information and element types of all the transaction pages, and defining an element processing method;
the test case generation unit is used for acquiring test data used for the tested transaction and generating a test case according to the page element, the element positioning information, the element type, the element processing method and the test data;
the device information acquisition unit is used for acquiring device information of intelligent test devices connected with the automatic test execution machine;
the execution mode determining unit is used for configuring an automatic test execution mode of the test case on the intelligent test equipment according to the equipment information;
and the test unit is used for respectively sending the test cases to intelligent test equipment of a corresponding operating system according to the automatic test execution mode so as to perform automatic test.
7. The converged iOS and Android mobile application automation test system of claim 6, wherein the transaction page creation unit is further configured to, prior to generating the test case: and arranging and combining the transaction pages according to the execution sequence of the transaction flow of the tested transaction.
8. The system for automatically testing the converged iOS and Android mobile applications according to claim 6, wherein the means for obtaining test data for a tested transaction by the test case generating unit comprises:
reading test data from a corresponding database according to database information for the tested transaction; and/or the number of the groups of groups,
and acquiring test data input by a user through an operation interface of an automatic test custom database which is common to the iOS operating system and the Android operating system.
9. The system for automatically testing the converged iOS and Android mobile applications according to claim 6, wherein the device information acquisition unit comprises:
the ADB tool component is used for acquiring equipment information of intelligent test equipment with an Android operating system;
idevice Installer tool component for obtaining device information of intelligent test device whose operating system is iOS.
10. The converged iOS and Android mobile application automation test system of claim 6, further comprising: the log acquisition unit is used for acquiring the running log of the iOS intelligent testing equipment and the running log of the Android intelligent testing equipment in the automatic testing process.
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 CN110362490A (en) 2019-10-22
CN110362490B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782189B (en) * 2020-06-23 2024-03-22 广州市挖米科技有限责任公司 Medical system deployment method and device
CN112579443B (en) * 2020-12-08 2022-07-12 温氏食品集团股份有限公司 Automatic testing method and platform of intelligent testing robot
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

Citations (3)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9658944B2 (en) * 2015-08-20 2017-05-23 Ca, Inc. Generic test automation for graphical user interface (GUI) applications

Patent Citations (3)

* 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
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

Also Published As

Publication number Publication date
CN110362490A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
US9792203B2 (en) Isolated testing of distributed development projects
CN107291438B (en) Automatic script generation method and device and electronic equipment
CN105912473B (en) Mobile APP automatically testing platform and test method based on BDD
CN105528290B (en) Construction method of script-based embedded software simulation and test integrated platform
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN107102947B (en) ATM transaction flow testing device and method
EP2431869A1 (en) Dry-run design time environment
CN110013672B (en) Method, device, apparatus and computer-readable storage medium for automated testing of machine-run games
US20120089931A1 (en) Lightweight operation automation based on gui
CN110716853A (en) Test script recording method, application program testing method and related device
CN106843901B (en) Page rendering and verification method and device
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
US20210117313A1 (en) Language agnostic automation scripting tool
CN115658529A (en) Automatic testing method for user page and related equipment
CN111176629A (en) Application development method and device
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN113742215A (en) Method and system for automatically configuring and calling test tool to perform test analysis
CN117112060A (en) Component library construction method and device, electronic equipment and storage medium
CN105339974B (en) Analog sensor
CN115509913A (en) Software automation test method, device, machine readable medium and equipment
CN114297961A (en) Chip test case processing method and related device
CN101251824B (en) Method for testing public objects request proxy structure and tools
Hinze et al. Model-driven GUI & interaction design using emulation

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