Application test automation transmitting data via phone/voice calls

An application for testing is determined. A test script associated with the application for testing is determined. The application is tested using the test script. The testing requires transferring data form the application to an out-of-band channel.

BACKGROUND OF THE INVENTION

The present invention relates generally to the field of application testing, and more particularly to automation of application testing using out-of-band channels.

With the increase of applications (often referred to as “apps”) on computing devices, there has been an increase in testing and authenticating such applications. Testing can involve authentication via out-of-band data correlation (wherein “data correlation” makes use of data returned in response to a previous step). “Out-of-band” refers to communication, which occurs outside of a previous established communication method or channel, and related authentication that involves using two separate networks or channels simultaneously in communication to identify a user. One such network or channel will typically be something other than a primary network or channel.

Generally, many applications include features, which trigger an action outside the application itself. In a banking application, a one-time password (OTP) can be sent as a text message (e.g., a SMS [short messaging service] text message) or audio message (e.g., voice call) and involves user input or intervention to type the password into an appropriate field. Location-based applications, on the other hand, involve user input or intervention to enter information such as a zip code in order to present relevant results. Shopping applications can often involve the sending of promotion codes via email or SMS, and can be used during a checkout process.

SUMMARY

Embodiments of the present invention include a method, computer program product, and system for testing a mobile application. In one embodiment, an application for testing is determined. A test script associated with the application for testing is determined. The application is tested using the test script. The testing requires transferring data form the application to an out-of-band channel.

DETAILED DESCRIPTION

Generally, in conventional arrangements, testing of applications, which use out-of-band processes, require significant user intervention. For instance, a banking application may produce a one-time password (OTP) and the user must communicate the OTP to an out-of-band channel. In another instance, a social media application may produce an OTP and the user must communicate the OTP to an out-of-band channel.

By way of an illustrative example, for a mobile phone application of a bank, the user may first enter his/her standard password for the application, and then request the application generate an OTP. Here, the user may hit a button (on the mobile phone touchscreen), “Generate OTP”, and the OTP may appear on the screen along with an acknowledgement. The acknowledgement may instruct the user to call a specific number and input the OTP to verify the account of the mobile phone application of a bank. Upon verification, the user may then proceed to one or more screens associated with the mobile phone application, and even then may need to re-enter his/her standard password to perform a sensitive action such as making an account balance inquiry.

Generally, conventional test automation tools for application are configured for, or bound to, merely a single application (AUT). Thus, any action, which occurs outside of the scope of the application, cannot be captured during testing, and a playback service will be unable to play that action back with the flow of the test script. Possible solutions involve manual entry of values during automation run, using data pools with pre-defined values and/or using application stubs and these solutions involve significant disadvantages. Accordingly, there are broadly contemplate herein, in accordance with at least one embodiment of the invention, methods and arrangements for providing an application test automation system which facilitates correct of out-of-band process data, effective test script creation, and fully automated playback.

Embodiments of the present invention determine data from an application under test (AUT) and communicate the data to an out-of-band channel. Embodiments of the present invention create a test script to automatically determine data from an AUT. Embodiments of the present invention create a test script to automatically communicate data to an out-of-band channel.

The present invention will now be described in detail with reference to the Figures.FIG. 1is a functional block diagram illustrating a data processing environment, generally designated100, in accordance with one embodiment of the present invention.FIG. 1provides only an illustration of one implementation and does not imply any limitations with regard to the systems and environments in which different embodiments can be implemented. Many modifications to the depicted embodiment can be made by those skilled in the art without departing from the scope of the invention as recited by the claims.

An embodiment of data processing environment100includes computing device110, connected to network102. Network102can be, for example, a local area network (LAN), a telecommunications network, a wide area network (WAN) such as the Internet, or any combination of the three, and include wired, wireless, or fiber optic connections. In general, network102can be any combination of connections and protocols that will support communications between computing device110and any other computer connected to network102, in accordance with embodiments of the present invention.

In example embodiments, computing device110can be a laptop, tablet, or netbook personal computer (PC), a desktop computer, a personal digital assistant (PDA), a smart phone, or any programmable electronic device capable of communicating with any computing device within data processing environment100. In certain embodiments, computing device110collectively represents a computer system utilizing clustered computers and components (e.g., database server computers, application server computers, etc.) that act as a single pool of seamless resources when accessed by elements of data processing environment100, such as in a cloud computing environment. In general, computing device110is representative of any electronic device or combination of electronic devices capable of executing computer readable program instructions. Computing device110can include components as depicted and described in further detail with respect toFIG. 4, in accordance with embodiments of the present invention.

Computing device110includes test automation program120, application130and test case repository140. Test automation program120is a program, application, or subprogram of a larger program for setting up and/or running a test script of an application under test (e.g., application130). Application130is the application under test (AUT). An application may be under test during the development of the application or to test an issue in the application. Test case repository140may include a test script for each application under test and test scripts that are created for an application under test are stored in test case repository140.

In an alternative embodiment, test automation program120may be found on one or more devices (not shown) interconnected to computing device110via network102. In yet another embodiment, test automation program120may be on computing device110and any other number of other devices interconnected to computing device110via network102.

In an embodiment, test automation program120includes recording engine122and playback engine124. In an embodiment, recording engine122records actions that take place in the application. In an embodiment, recording engine122can record actions that are textual based (i.e., OTP as text in the application), audio based (i.e., application130indicates the OTP in audio form), or any other form of media. In an embodiment, playback engine124plays back actions that are recorded. In an embodiment, playback engine124may play back the actions in the original form of media recorded by recording engine122. In an alternative embodiment, playback engine124may play back the actions in a different form of media from the form of media recorded by recording engine122.

In an embodiment, test automation program120determines an application (i.e., application130) for testing. Test automation program120determines a test script from test case repository140that is associated with application130. Recording engine122records data from application130. Test automation program120compares and correlates the data received by recording engine122and data input by a user.

In an alternative embodiment, test automation program120determines an application (i.e., application130) for testing. Test automation program120tests application130using the test script. Recording engine122records data from application130. Test automation program120communicates data to an out-of-band channel using playback engine124.

A user interface (not shown) is a program that provides an interface between a user and test automation program120. A user interface refers to the information (such as graphic, text, and sound) a program presents to a user and the control sequences the user employs to control the program. There are many types of user interfaces. In one embodiment, the user interface can be a graphical user interface (GUI). A GUI is a type of user interface that allows users to interact with electronic devices, such as a keyboard and mouse, through graphical icons and visual indicators, such as secondary notations, as opposed to text-based interfaces, typed command labels, or text navigation. In computer, GUIs were introduced in reaction to the perceived steep learning curve of command-line interfaces, which required commands to be typed on the keyboard. The actions in GUIs are often performed through direct manipulation of the graphics elements.

In an embodiment, computing device110includes application130. In an embodiment, application130is the application under test (AUT). In an embodiment, application130may be any type of application that can be used on computing device110. In an embodiment, application130may be a banking application, social media application, location-based application, or a shopping application. In an embodiment, application130may be any application that may be tested. In an embodiment, application130may be any application that may use a one-time password (OTP). In an alternative embodiment, application130may be found on one or more devices (not shown) interconnected to computing device110via network102. In yet another embodiment, application130may be on computing device110and any other number of other devices interconnected to computing device110via network102.

In an embodiment, computing device110includes test case repository140. In an embodiment, test case repository140may be found on computing device110. In an alternative embodiment, test case repository140may be found on one or more device (not shown) interconnected to computing device110via network102. In yet another embodiment, test case repository140may be on computing device110and any other number of devices interconnected to computing device110via network102. In an embodiment, test case repository140may include a test script for each application under test and test scripts that are created for an application under test are stored in test case repository140. A test script may be an output of recording user actions performed on an application in a structured format (e.g., combination of action and its meta data).

Test case repository140may be implemented using any volatile or non-volatile storage media for storing information, as known in the art. For example, test case repository140may be implemented with a tape library, optical library, one or more independent hard disk drives, or multiple hard disk drives in a redundant array of independent disks (RAID). Similarly, test case repository140may be implemented with any suitable storage architecture known in the art, such as a relational database, an object-oriented database, or one or more tables.

FIG. 2is a flowchart of workflow200depicting operational steps for setting up a test script of an application under test, in accordance with an embodiment of the present invention. In one embodiment, the steps of the workflow are performed by test automation program120. Alternatively, steps of the workflow can be performed by any other program while working with test automation program120. In an embodiment, test automation program120can invoke workflow200upon receiving an indication to test an application.

Test automation program120determines an application for testing (step205). In an embodiment, test automation program120receives an indication from a user, via the user interface discussed previously, of an application to be tested. In an alternative embodiment, test automation program120receives an indication from another program of an application to be tested. In an embodiment, the application may be application130. For example, test automation program120receives an indication from the user to test a banking application.

Test automation program120determines a test script to setup (step210). In other words, test automation program120determines a test script to be setup that is associated with application130. In an embodiment, test automation program120may create a new test script for application130that does not have a previously created test script. In an alternative embodiment, test automation program120may determine an already created test script for application130and modify the already created test script. In yet another alternative embodiment, test automation program120may determine a test script template used for a specific type of applications that are the same as application130. In an embodiment, the test script is stored in test case repository140. For example, test automation program120determines banking application test script associated with banking application. Banking application test script is stored in test case repository140.

Test automation program120uses recording engine122to record data (step215). In other words, the determined test script is initiated and the test script progresses to an instance where the AUT (i.e., application130) needs to use an OTP for out-of-band channel verification. The recording engine122included in test automation program120interacts with application130to record data from application130regarding the OTP. The data may be textual based (i.e., OTP as text in application130), audio based (i.e., application130indicates the OTP in audio form), or any other form of media. In an embodiment, the data recorded by recording engine122may be stored in test case repository140. For example, test automation program120initiates the test script associated with the banking application, the banking application produces a OTP of “xy347tlr” as a textual representation on the user interface, and recording engine122records the OTP and stores the information in test case repository140.

Test automation program120compares and correlates user input to recorded data (step220). In other words, test automation program120determines the user input of the OTP to the out-of-band channel and compares the user input data to the data previously recorded by recording engine to determine the accuracy of the test script. Test automation program120determines the user input data for the OTP made to the out-of-band channel. The user input data may be textual based (i.e., user input of OTP as text to out-of-band channel), audio based (i.e., user input of OTP in audio form to out-of-band channel), or any other form of media. In an embodiment, the textual based out-of-band channel may be in the form of an SMS or e-mail. In an embodiment, the audio based out-of-band channel may be a phone call or any form of voice communication. In an embodiment, the user input data and recording engine122data may be in the same form of media. In an alternative embodiment, the user input data and recording engine122data may be different forms of media.

Test automation program120compares the user input data to the data recorded by recording engine122previously. If test automation program120determines the two sets of data are the same then the test script is setup correctly. In other words, the test automation program120, when using the test script, records the correct data from application130for the OTP. If test automation program120determines the two sets of data are different then the test scrip is setup incorrectly and any step of workflow300may be performed to correct the test script. In other words, the test automation program120, when using the test script, records incorrect data from application130for the OTP because the recorded data does not match the user input data. For example, test automation program120determines the user input data to the out-of-band channel is “xy347tlr” by determining the audio communication by the user to the out-of-band channel was the sequence of “xy347tlr” in that alphanumeric order. Test automation program120compares the user input of “xy347tlr” to the recorded data of “xy347tlr”. Test automation program120determines the two sets of data are the same and therefore the test script for the banking application is setup correctly because recording engine122is recording the correct OTP from the banking application.

In an embodiment, the test script uses recording engine122to discover the view object ID/position which contains the data that includes the OTP. In an embodiment, during step215, test automation program120, using recording engine122, captures all the view objects and the text in the activity screen of application130just before the communication to the out-of-band channel (i.e., the phone call). In an embodiment, test automation program120, using recording engine122, intercepts the operating system event-bus to capture all of the keystroke actions made for application130during the communication to the out-of-band channel (i.e., the phone call). In an embodiment, test automation program120correlates the key stroke actions for application130and compares them to the OTP entered through keystrokes during communication to the out-of-band channel (i.e., the phone call). In an embodiment, based on the correlation and accuracy of the key strokes, test automation program120identifies the object ID/position the OTP will be located.

FIG. 3is a flowchart of workflow300depicting operational steps for running a test script of an application under test, in accordance with an embodiment of the present invention. In one embodiment, the steps of the workflow are performed by test automation program120. Alternatively, steps of the workflow can be performed by any other program while working with test automation program120. In an embodiment, test automation program120can invoke workflow200upon receiving an indication to test an application.

Test automation program120determines an application for testing (step305). In an embodiment, test automation program120receives an indication from a user, via the user interface discussed previously, of an application to be tested. In an alternative embodiment, test automation program120receives an indication from another program of an application to be tested. In an embodiment, the application may be application130. For example, test automation program120receives an indication from the user to test a banking application.

Test automation program120will test application using a test script (step310). In other words, test automation program120determines the test script in test case repository140that is associated with application130. In an embodiment, the test script has been previously created or setup using workflow200. Test automation program120then initiates the test script to test application130. For example, test automation program120determines the test script in test case repository140that is associated with the banking application and test automation program120initiates the test script.

Test automation program120uses recording engine122to record data (step315). In other words, the determined test script is initiated and the test script progresses to an instance where the AUT (i.e., application130) needs to communicate an OTP from application130to an out-of-band channel for verification. The recording engine122included in test automation program120interacts with application130to record data from application130regarding the OTP. In an embodiment, the test script uses recording engine122to discover the view object ID/position which contains the data that includes the OTP and then recording engine122records the data found in the view object ID/position. The data may be textual based (i.e., OTP as text in application130), audio based (i.e., application130indicates the OTP in audio form), or any other form of media. In an embodiment, the information recorded by recording engine122may be stored in test case repository140. For example, test automation program120initiates the test script associated with the banking application, the banking application produces a OTP of “xy347tlr” as a textual representation on the user interface, and recording engine122records the OTP and stores the information in test case repository140.

Test automation program120uses playback engine124to communicate the data to the out-of-band channel (step320). In other words, the playback engine124will communicate the data previously recorded by recording engine122to the out-of-band channel for verification. The playback engine124included in test automation program120interacts with the out-of-band channel to communicate the recorded data to the out-of-band channel. In an embodiment, the test script uses playback engine124to playback the data that was recorded by recording engine122in the determined the view object ID/position which contains the data that includes the OTP. The playback engine124data may be textual based (i.e., playback engine124communication of OTP as text to out-of-band channel), audio based (i.e., playback engine124communication of OTP in audio form to out-of-band channel), or any other form of media. In an embodiment, the data communicated by playback engine124may be stored in test case repository140. For example, test automation program120, in the process of the test script for the banking application, must communicate an OTP to an out-of-band channel. Playback engine124retrieves the data (i.e., the OTP) from test case repository140and playback engine124communicates the data to the out-of-band channel. Upon receiving the out-of-band channel receiving the OTP and verifying the OTP, application130is verified and the test script can continue.

In an embodiment, the test script uses playback engine124to playback the data that was recorded by recording engine122in the determined view object ID/position which contains the data that includes the OPT. After discovering the OTP, playback engine124playbacks the same technique (recorded in the record phase) used to send data to the out-of-band channel. The recorded view object ID/position and the recorded data-transfer technique get used in the playback phase. For example, if the out-of-band channel is a phone call, when the phone call is received, keystrokes for the corresponding OTP is injected in to the OS Event Bus to transfer to the phone call. In an embodiment, the time in which the keystroke events should be injected is determined either by time comparison observed during the record phase (without any phone call parsing) or basic keyword spotting in the phone call.

FIG. 4depicts computer400that is an example of a computing system that includes test automation program120. Computer400includes processors401, cache403, memory402, persistent storage405, communications unit407, input/output (I/O) interface(s)406and communications fabric404. Communications fabric404provides communications between cache403, memory402, persistent storage405, communications unit407, and input/output (I/O) interface(s)406. Communications fabric404can be implemented with any architecture designed for passing data and/or control information between processors (such as microprocessors, communications and network processors, etc.), system memory, peripheral devices, and any other hardware components within a system. For example, communications fabric404can be implemented with one or more buses or a crossbar switch.

Memory402and persistent storage405are computer readable storage media. In this embodiment, memory402includes random access memory (RAM). In general, memory402can include any suitable volatile or non-volatile computer readable storage media. Cache403is a fast memory that enhances the performance of processors401by holding recently accessed data, and data near recently accessed data, from memory402.

Program instructions and data used to practice embodiments of the present invention may be stored in persistent storage405and in memory402for execution by one or more of the respective processors401via cache403. In an embodiment, persistent storage405includes a magnetic hard disk drive. Alternatively, or in addition to a magnetic hard disk drive, persistent storage405can include a solid state hard drive, a semiconductor storage device, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, or any other computer readable storage media that is capable of storing program instructions or digital information.

The media used by persistent storage405may also be removable. For example, a removable hard drive may be used for persistent storage405. Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer readable storage medium that is also part of persistent storage405.

Communications unit407, in these examples, provides for communications with other data processing systems or devices. In these examples, communications unit407includes one or more network interface cards. Communications unit407may provide communications through the use of either or both physical and wireless communications links. Program instructions and data used to practice embodiments of the present invention may be downloaded to persistent storage405through communications unit407.

I/O interface(s)406allows for input and output of data with other devices that may be connected to each computer system. For example, I/O interface406may provide a connection to external devices408such as a keyboard, keypad, a touch screen, and/or some other suitable input device. External devices408can also include portable computer readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards. Software and data used to practice embodiments of the present invention can be stored on such portable computer readable storage media and can be loaded onto persistent storage405via I/O interface(s)406. I/O interface(s)406also connect to display409.