Create Appium tests quickly and easily directly from Eclipse using advanced test development tools:
Appium Studio for Eclipse allows you to perform end-to-end test automation directly through your IDE. You can develop, analyze, debug, and automate your testing of native, web, or hybrid applications with this software.
This tutorial is a part of our Appium Studio hands-on training series.
- Immediate visual feedback – Robust, easy-to-maintain tests with precise reportage can be created using Device Reflection which provides immediate visual feedback on all test actions. Eclipse framework assets, including properties and configuration files, are automatically generated, and development becomes even more efficient.
- Powerful object identification -Objects can be identified by both their native and web properties, including a customized UI or image/OCR. Scripts can be written using a drag-and-drop script editor.
- Code snippets, properties, and configuration files can all be leveraged through pre-configured Eclipse frameworks for reduction of errors and project stability.
- Out-of-app Appium testing – Out-of-app test coverage includes SMS, network, settings, Facebook, and third-party integration tests (including complex use cases like fingerprint scanning). Version and beta support are guaranteed.
Create an Appium test in Appium Studio for Eclipse after watching the following video tutorial:
Write your Test Logic
Click the “Dump UI” icon ( ) on the right of the device reflection.
Input a page name and click “OK”
The editor then creates and opens a “dump” file.
(Note: Click on the below image for an enlarged view)
The element you wish to interact with can then be selected.
All the properties of this element will be visible in the “Dump Properties” view.
Pink-colored lines are lines that are unique to that page.This ensures unique identification.
Select whichever properties you would like to act as identification for your chosen element, and then click “Add to Repository” ( ).
The name of the elements in the repository can be approved. Element names are a combination of page names and element names dot-separated (‘.’).
After approval, the element will be added to the repository and visible with the “Repository” view.
Add all the interesting or relevant elements on the page to your repository.
Build your Test Flow
Elements can be dragged and dropped into your test code.
A “click” command can be added by dragging the “Finger” icon.
A “sendText” command can be added by dragging the “Text” icon.
For username and password elements, the “Text” icon has been used, and for the login button, the “Finger” icon has been used to indicate a click.
The text to be sent to the text field is required to finalize a “sendKeys” command.
Run and Verify your Test Code
Click “Overwrite Capabilities” in the “Devices” view ( ).
This will cause all the test execution to be directed to this device (independent of device query capability), and install and launch capabilities will also be ignored. This makes debugging test code much easier, as the application does not need to be reinstalled each time.
Run your test by right-clicking the test class and then clicking ‘Run as’.
The results of your test will be viewable in the “Reports” folder of your project.
Check our upcoming tutorial to know more about running and verifying your test code in Appium Studio for Eclipse.