A Tool Review of SeeTest’s Eclipse for Mobile Testing Plugin
A Tool Review of SeeTest’s Eclipse for Mobile Testing Plugin
See how the Appium Studio for Eclipse plugin works and get a sense for how to use it in this review and tutorial.
Join the DZone community and get the full member experience.Join For Free
Effective and comprehensive automated mobile testing is a necessity in shortening mobile app release cycles. We at Experitest have developed a new plugin for Eclipse for mobile testing. Appium Studio for Eclipse allows you to develop and execute your mobile test suites directly from within Eclipse using real iOS and Android devices.
Appium Studio for Eclipse will increase your automated testing capacity by enabling simple test creation. This includes some of the most elaborate mobile app scenarios like scanning barcodes and identifying fingerprints.
When you develop and execute tests with Appium Studio for Eclipse you will be able to cut down on the time it takes to integrate with Appium or whatever preferred mobile test development tool you use. The way that we accomplish this is by providing the test development and debugging tools all from within the plugin. You can also edit your tests from within Eclipse.
Appium Studio for Eclipse installs and sets up quickly as a plugin available from the Eclipse Marketplace. This gives developers the ability to start testing in minutes and to develop tests even faster using the visual tools such as the device reflection, object spy and test recorder.
When installed, Appium Studio for Eclipse functions as a lightweight mobile automation tool that used as a framework. The integration possibilities are nearly limitless as the plugin is integrable with JUnit TestNG or any automation framework of your choice.
The speed and precision with which you will develop and execute tests are due not only to the simple setup and installation but the ability to connect to and test on physical iOS and Android devices.
The final result is pretty astounding. Appium Studio for Eclipse gives developers the ability to perform end-to-end Eclipse test automation from directly within their IDE which adds up to faster and more efficient automation testing. That makes the Eclipse plugin an essential automation testing tool.
The Appium Studio for Eclipse plugin makes all of this possible with the following:
Connecting to and interacting with the device reflection of real iOS and Android devices hosted in Experitest’s global data centers.
Using the application manager to easily manage your mobile applications
Identifying any onscreen object with the object spy and saving that information with the dump capabilities.
Highlighting sections of your code using the storyline feature in order to make the information more accessible for nonexperts.
In the main UI, (as seen in the screenshot above) is the device reflection on the right. On the bottom are the available cloud devices. The left contains the repository view which is where the information downloaded off of the device is saved. For a deeper overview, take a look at our Appium Studio for Eclipse documentation.
Let’s take a bit of a closer look at some of the capabilities ofAppium Studio for Eclipse:
Install Appium Studio for Eclipse in Minutes
One of the main advantages of Appium Studio for Eclipse is a swift installation that gives you the ability to begin your Appium testing quickly and easily.
The plugin is lightweight and installs on top of your Eclipse Software. Simply search for “Appium Studio” it in the Eclipse Marketplace and install it from there. Once the plugin installs Eclipse will need to reboot.
If you like you can also install from a file. That file is available as a free download here.
Once the download is complete, go to the help menu in Eclipse and select the option to ‘Install New Software.’ Next click on ‘Add’ and then select ‘Archive’. Once the next window opens all you need to do is to select the plugin and accept the terms of service. As with the first installation method, Eclipse will reboot once the plugin installs.
For more about installing Appium Studio for Eclipse, click here.
Connect to Physical Mobile Devices From Appium Studio for Eclipse
Once Appium Studio for Eclipse installs, the next step is to connect to devices for testing. This is done via the SeeTest Digital Assurance Lab which gives you remote access to hundreds of real Android and iOS devices. These devices are hosted at Experitest’s global data centers.
After you have completed your registration to the Digital Assurance Lab you need the full cloud URL and an access key in order to connect Eclipse to the lab.
Once you log into the lab you will be able to view the device reflection and interact with each device in real time. This gives developers the ability to develop Appium tests via these devices. Access to these devices which represent a large cross-section of the device makes, models and OS versions will increase your test coverage and improve your Appium Testing overall.
The access key is an alphanumeric combination of your username, project name, and password.
It is important to note that an access key has a limited lifespan and once expired you will need to generate a new access key. Also, it is worth mentioning that access keys only work for one project so multiple projects will need multiple keys. Finally, if you change your password that will invalidate your keys and you will need to regenerate new ones.
In order to generate an access key, you can go into the cloud UI and select the ‘Get Access Key’ option.
This will open a new window that will display your access key.
When you have copied your access key you can navigate back to Eclipse where you will click on the ‘Cloud’ icon. In the window that opens you must type in your access key and the cloud URL which is: http://seetest.io.
Now that you have connected Eclipse and the Digital Assurance Lab you can open the mobile perspective from the ‘Window’ menu and view all of the available devices. Next, you can open whichever device you would like to interact with and develop tests on.
For more about connecting devices, click here.
Simplify Your Appium Testing With a Quick Configuration of Your Java Project
Creating a new project is simple, but what will really advance your testing capabilities is to apply the configuration/nature to your project. This will add the following to your project:
A classpath container to make all of the needed jar files available.
A BaseTest class to provide some basic framework services to your test initialization.
AndroidDemoTest and an IOSDemoTest to verify your configuration.
The cloud.properties files containing the information about the cloud in use.
Build.gradle for simple CI environment integration.
In order to apply this configuration, simply open an existing Java project or create a new one.
Right-click on the project and select configuration -> ‘SeeTest TestNG Nature’ or ‘SeeTest JUnit Nature.’
Once you have configured your project, you can right click on the ‘testng.xml’ and execute the automatically generated sample tests. This will verify that your environment configuration is running as it should be. Both the Android and iOS demo tests will be executed in parallel.
Mobile Application Management
The application management feature from Appium Studio for Eclipse allows you to manage your mobile applications from within Eclipse. Upload your app to Eclipse and you can launch it on any of the mobile devices you are working on. Developers can use this capability to start testing with ease.
Click on ‘Install’ In the ‘Applications’ view. Next click on ‘Launch’. You will receive a notification when the process has been carried out successfully.
If you want to add your application information to the Appium capabilities setup, all you need to do is to select the application section title in the ‘Applications’ view and drag it to the code area.
Use the Advanced Test Development Tools to Create Appium Tests From Eclipse for Mobile
The Eclipse for mobile plugin makes automated testing simpler using advanced test development tools.
These tools include:
Immediate visual feedback via the device reflection on any action performed which helps you create robust and maintainable tests.
Object identification that records the native/web properties of objects including image/OCR and customized UI.
Leverage Eclipse for mobile project framework assets that are pre-configured and include code snippets, properties, and configuration files to reduce errors and easily create stable projects.
Increase your coverage rates by testing outside of your app (SMS, network, settings, Facebook). You can also test 3rd party integrations for complex use cases such as fingerprint authentication or code scanning.
Writing Your Test Logic
One of the many ways you can write your test logic is by clicking on the ‘Dump UI’ icon located on the right of the device reflection. Give the page a name (in this case ‘login’) and click ‘OK.’
A ‘dump’ file will be created and opened by the editor. The element’s properties will appear in the in the ‘Dump Properties’ view when you select the element you would like to interact with. Properties colored in pink are unique to the page.
Select the property (or properties) you would like to use to identify the element. Then click on the ‘Add to Repository’ icon.
Next, you must approve of the name elements in the repository. The element name is comprised of the page name and the element name separated by a dot (‘.’).
Once approved the element will be added to the repository (see the ‘Repository’ view).
Building Your Test Flow
Start by dragging and dropping elements into your test code.
Dragging the ‘Finger’ icon will add a ‘click’ command.
Dragging the ‘Text’ icon will add a ‘sendText’ command.
In this case, we will use the ‘Text’ icon for both the username and the password elements. The ‘Finger’ icon will be used for clicking on the login button. To finalize the ‘sendKeys’ commands you must provide the text that needs to be sent to the text field.
Run and Verify Your Test Code
The ability to run execute and edit your Appium tests directly from Eclipse is essential in creating an effective automation project. With the element highlighting tool you will be able to better understand any faults in your Appium tests. Element Highlighting is great in that during test executions you can see the exact element that is being used on the screen of the mobile application.
Click on the ‘Overwrite capabilities’ icon in the ‘Devices’ view. This will cause any test execution to be directed to the device, it will also ignore the install and launch capability. This makes debugging your test code much simpler and eliminates the need to reinstall the application each time.
Once the execution finishes you can see the results in the ‘reports’ folder under your project. The reports also make use of the Element Highlighting capability by using the information gathered to generate screenshots of every step of a completed test. The reports also indicate whether each step passed or failed.
Run Your Tests in Parallel and Scale Up Your Appium Testing
The final piece of Appium Studio for Eclipse is the execution of tests on multiple mobile devices in parallel. Parallel test execution increases your automation coverage and dramatically shortens testing cycles. This means that you will be releasing high-quality apps faster than ever.
Grid execution management is offered via the SeeTest Digital Assurance Lab. This intelligent system automatically and dynamically schedules and executes tests on an unlimited number of mobile devices according to the parameters you have pre-defined. It also provides you with the ability to execute these tests directly from your CI environment.
When your test execution has finished running you will be able to access the test reports for each execution. Included in each report are screenshots of each step of the test. This shortens investigation times and gives you a better end-to-end view of your quality status. This is accomplished with a consolidated view of all your test results and automated root cause analysis.
Parallel Execution From Eclipse
Open the cloud parallel execution wizard in order to create a script, that can be triggered by your CI environment and execute your tests on multiple devices at the same time.
Open the wizard by right-clicking on your project, selecting ‘New’ and then ‘Other…’
Next, select the ‘Cloud Parallel execution’ wizard:
After you click next you can select the devices you would like to execute on using the checkboxes to select Android or iOS devices, or a selection of both.
The next step is to select the tests you would like to execute, by selecting the file name and number of parallel threads you want to use.
Once finished a script file will be created.
It can be run by right-clicking on it and choosing the option to ‘Run as.’
Wrapping It All Up
Appium Studio for Eclipse is a tool that satisfies the growing need for mobile automation testing. It contains everything you would ever need in order to use Eclipse for mobile test automation. Appium Studio for Eclipse enables the development of robust tests and reinforces the best practices that are essential in successful automation testing.
You can start fresh with new tests or use your existing Appium tests. The visual feedback provided makes scripting simple, and the scaling capabilities mean that no automation project will be too big to tackle. Combine that scalability with parallel test execution that can be carried out on a huge number of device/OS combinations and you have a tool at your disposal that will revolutionize the way you develop and test your mobile apps.
Opinions expressed by DZone contributors are their own.