Recording and playing back user actions on an iOS simulator?

I would like to be able to play a series of taps on an iOS simulator, ideally created when recording these taps. If recording is not possible, perhaps I can do this in code, either inside the program, or using an external program such as AppleScript. Or maybe with tools?

Is it possible? I would need to start playing custom actions after starting the application.

+6
source share
4 answers

There are several built-in and hybrid iOS testing infrastructures that will allow you to create test scripts (for example, simulate custom branches), record these events and use them to play back later, possibly in the CI environment. Listed below are some of the structures that we reviewed, and some of which we used in our mobile environment.

KIF

Overview:

KIF stand for "Keep It Functional". This makes it easy to manage iOS applications using the accessibility attributes available to the OS for people with disabilities.

KIF relies on iOSโ€™s built-in availability to complete its testing steps. Therefore, it is important that your application is fully accessible. It is also a great way to ensure that your application can be used with an eye. As a rule, access to your application is as simple as providing your opinions with reasonable shortcuts. More information is available in the Apple documentation.

A website with source code and instructions can be found on Github

Test cases are created in Objective-C through Xcode / AppCode.

Frank

Overview:

Frank "Selenium for native iOS apps." Frank lets you write tests / test / acceptance test requirements (using Cucumber) and run them against your iOS application.

The basic premise is that the infrastructure embeds the HTTP server in the test version of the application, and then allows the client to send HTTP requests to the application to run test scripts.

"Frank also includes a powerful" application inspector "(called Symbiote), which you can use to get detailed information about your working application. This allows you to check the application for objects on the screen."

Test cases: Test cases are written in natural language using cucumber.

(site already mentioned above)

hookah

Overview:

Calabash is built on the same architecture as Frank. It embeds the HTTP server in the test version of the application, and then allows the client to send HTTP requests to the application to run test scripts.

"Calabash is cross-platform, supporting native Android and iOS applications. It is open source and free, and has a company, LessPainful, support and development."

โ€œCalabash consists of libraries that allow the test code to programmatically interact with native and hybrid applications. The interaction consists of several actions by the end user.

Test cases are written in natural language through Cucumber. Here is an example:

Main site: http://calaba.sh

Monkeytalk

(formerly known as "FoneMonkey")

Overview: Monkeytalk is an automated testing system that provides the user with the ability to record a set of instructions and then play these scripts in a simulator or device.

MonkeyTalk is free and open source. It can be run from the command line so that it looks like a good candidate for use in the CI build environment. It also generates JUnit XML files that are used to send test results to Jenkins.

MonkeyTalk provides libraries that are compiled into a test version of the application.

Test cases: MonkeyTalk comes with its own IDE to create a test case. It records the actions performed on a simulator or device, and can play them in script form. This allows you to provide data files for input, such as names and passwords. However, the IDE runs on Windows, OSX or Linux, iOS devices and simulators will only work on OSX.

Home: http://www.gorillalogic.com/testing-tools/monkeytalk

+9
source

I think open source for this is Frank . It is not possible to record actions, but you can specify a set of taps, gestures, etc. In the code. As a bonus, this forces you to configure accessibility settings correctly, as this is what it uses to manage tests.

+1
source

test-studio can record user actions, and it's free!

0
source

Sikuli Script is newer and works with iOS and in the simulator - http://www.sikuli.org

0
source

All Articles