Support Center

Testdroid Recorder

Last Updated: Aug 17, 2015 10:20AM CEST

About Testdroid Recorder



Record and Playback

Testdroid Recorder is an Eclipse Plug-in for creation of automated test cases.
Eclipse is the most used development environment among Android application developers. Also developers with Enterprise Java  background are familiar with Eclipse, which makes the transition from Enterprise Java to Android applications development easier.
Testdroid Recorder offers recording and playback functionality, so you do not have to write tests manually. Our solution lets you record actions on object level when using the app on the phone. Recording on object level enables playback of the test scripts on various Android devices despite the differences in the OS versions, UI themes, screen sizes, screen resolutions and so on. The result is robust automated tests, which can be executed over and over again on wide variety of devices without need for fine tuning for different devices.
We have also created a video that describes the advanced recording features in Testdroid Recorder.


No Need for Source code, No linking of external libraries, No rooted devices

You also do not need to include or link any external libraries to your application to enable recordings with Testdroid Recorder. You can record application without source code and because there is no extra libraries included to the application under testing, you are actually testing exactly the same application what your users will be using, not a test version of the app. You can also do true black box testing and use external QA services to work with Testdroid, no need to risk your source code. Also the devices do not need to be rooted, any standard off-the-shelf Android device will do, as well as Android Emulator if you find that more suitable.


How does it work


Capturing the touch events

Testdroid Recorder accesses Android’s View hierarchy to inspect the user inputs. When user clicks something on the screen Testdroid Recorder will capture that UI event call and store it.
The output, the automated test scripts, of Testdroid Recorder is Java, just normal standard Java. When the test code is generated, Recorder creates the sequence of UI widget calls and generates corresponding lines of  test code automatically. This way your tests are not relying only on x,y clicks on the screen and can be executed on any Android device.
There are over 9 million developers with Java competence, which makes Testdroid a safe choice from the management perspective. You are not tied to a proprietary scripting language, with very limited number of experts.

Creating the test project

Testdroid Recorder takes your Android Test project and automatically generates all files needed to set up a working test project. Including all the necessary libraries to the test project and setting up paths takes hours, but with Recorder it takes only minutes. This means that you will have your first automated Android tests in matter of minutes - not hours or days!

Testing without sources

As QA are often separate department and have no access to source code of application or this access is completely unnecessary we let customers to record tests without sources - you can provide only apk file of application. Remember that ADT sign test with special DEBUG key when it's run and if sources of application is not available then it assumes this application is installed on device and what is the most important this installed application must have the same key like test - so must be signed with DEBUG key. But for this we provide our extended "Android JUnit test" runner which is called "Android JUnit test from apk"(you can see it when you click right click on project and choose "run as..."). This feature do many things for you - uninstall the application if it's installed on device, resign it using DEBUG key(create a temporary copy of apk - original file is not touched) and install back and then run test using normal ADT mechanism. So no sources are needed by recording as well as playback.

Wide range of gestures and sensors supported

Using Testdroid Recorder to record your Android Instrumentation tests is easy and you can record full set of  gestures. The supported gestures are drags, swipes, pinch zoom, and multipath drags, as well as hard keys. You can change your orientation many time in test to see how application looks on landscape and portrait as well. You can also change the device language with Recorder to test localized applications with the same script.


Important element in tests is possibility to assert such things like texts present on screen or enabling of elements. Testdroid Recorder allows you to add specific asserts as well as allow you to assert all current present texts and disabled widgets by one click - this feature is called "smart assert".

WebView support

Testdroid Recorder includes special recognition of WebView elements. This means that it's not seen as single view but Recorder recognizes elements inside WebView like html elements and is able to record such actions like click on html elements or enter texts into html elements. Is also possible to assert html elements. It is very important feature when more and more applications use WebView to implement login view as well as more and more applications are implemented as pure html applications.
But keep in mind that Testdroid Recorder load JS script to WebView to be able to record from it so if you implement own WebView
and override loadUrl method remember to not break urls with prefix "javascript:", in other case it won't work. You should also remember that when activity with WebView is present our JS script may need few seconds to be fully loaded so clicking at once after activity with WebView is shown may cause that action wouldn't be recorded.

Manual command edition

It's almost impossible to handle every programmers cases and properly record every actions from every applications that's why we are systematically extending manual commands edition features. You can add new commands if something wasn't recorded, you can edit command if something was recorded with wrong parameters. You can also do standard editor actions like dragging commands, deleting, cutting, copying and pasting commands as well as whole methods. If you do many things during recording sometimes you will have very long sleeps - you doesn't matter of this, you can cut all sleep commands with one click giving maximum time you want to have.
Try to looking on output during recording and edit if anything is wrong to be sure that your result in .java file will be satisfied.


Important thing for test results are screenshots. It's the best way to see how application look in our Testdroid Cloud on every phone. Recorder let you put screenshot command with one click. Before 2.9 version of Recorder we couldn't obtain screenshots from openGL applications as well as we didn't use to catch elements outside our application like status bar, keyboard etc. Since version 2.9 of Recorder as well as 3.0 versions of our ExtSolo library we are able to do it. New way of screenshots doesn't work locally but there works old method. To do any screenshots we need to WRITE_EXTERNAL_STORAGE permission, because screenshots are saved on sdcard, which is also required to be installed on phone.

Test validation

Important part of test automation is test validation, passing and failing test cases. The automated test cases based on standard Android test framework are based on JUnit testing framework for Java language. JUnit has been important in the development of test-driven development and is very widely know among web developers. Testdroid Recorder has a lot of options to validate the output of tests. With Smart Asserts it is easy create test cases, which validate correctness of the application behavior and correct buttons are present. You can also validate that certain text is on the view. Timeline captures the time between user actions during recording and then repeat the same user actions with exactly same time intervals during the playback. This is very useful feature for instance when your application accesses a web service to retrieve some data or does some other time consuming processing before the user can continue. Waiting commands are commands (asserts) which help in dynamic applications. Before each command on view, a waiting  command has been added. This will help you to test your applications more robustly. Using waiting commands is very important, because most of the time tests are inconsistent and you get odd test results due to premature clicking of button or other actions. Almost every time the issue is the network delay. For example there are actions on content (for instance click on image), which is not present on the screen yet due fetching the images from the server and the tests fail because of that.

Test Execution

Android tests created with Testdroid Recorder can be executed from Eclipse as JUnit tests. You can also run the tests in Testdroid Cloud on 120+ real devices to see quickly, how does your application work on different makes and models, from the small screen devices to tablets. If you connect your own Android device to your workstation via USB cable you can also execute the tests locally and see the results in Eclipse’s JUnit result view.
You can also run App Crawler from Recorder since version 3.0 - it means you even don't need to record or write test. With few clicks you can send your apk or application project from eclipse and your application will be automatically tested by our intelligence test tool (tool which automatically clicks over a buttons, lists, go through activities, login if it is needed etc.).

Please download the Testdroid Recorder product leaflet here

Contact Us
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found