Before we start:This tutorial will show you how to record your first tests with Testdroid Recorder using First Recording. We assume that you already have Eclipse with installed Testdroid Recorder Plugin.
If you haven't installed the plugin yet, follow the Installation tutorial.
How to start:
- First, check that the device you want to use to record the test is connected to your computer or the system you are using to run the test. Alternatively, you can run the tests on a virtual device.
- Choose File -> New -> Other -> Android - Testdroid -> First Recording or Right click in workspace -> New -> Other -> Android - Testdroid -> First Recording
- If authorization window is shown, insert your Testdroid Cloud credentials to authorize and press Authorize.
- Now you are able to choose from four available options. Firstly choose Sample Android Application and click Next. Take a look at workspace, there should be created the new project - BitbarSampleApp.
- Press Record button. Now the wizard is launching your application project on your device or emulator. When you'll see Recording started comment on the screen, you're ready to go! Just use your application in the way you want it to be tested. The generated code will be shown on the screen at once.
- When you are finished, simply click Stop and Finish on the menu screen at Eclipse. The wizard takes care on: creating a new test project, also a test class for you, installing Robotium library and adding it to your Java build path. You can see generated code and correct it manually, if you need it.
- To run your newly created test in Eclipse, use Run As -> Android JUnit Test. You should see your application being tested and the JUnit view shows results.
The successful test.
Other First Recording options:
- Sample HTML Application - flow is exactly the same like in Sample Android Application, but this application shows how HTML elements are handled.
- My Android Project. Select your own Application to test - flow is exactly the same like in Sample Android Application. You can only choose existing project (in your workspace) from list.
- My APK. Select My APK and provide APK file. APK will be resolved and after that flow will be the same like in Sample Android Application