Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Testing and securing android studio applications

You're reading from  Testing and securing android studio applications

Product type Book
Published in Aug 2014
Publisher Packt
ISBN-13 9781783988808
Pages 162 pages
Edition 1st Edition
Languages

The UI test project


The test code to evaluate the UI of an application has to be included in a normal Java project. This Java project will be built into a JAR file, which will be copied in the Android device to evaluate the application under test. Since Android Studio does not support the uiautomator framework, for this section you can use any other tool that allows you create a Java project. The required steps are as follows:

  1. Create a standard Java project. This is the test project where the test code will be implemented using the uiautomator API. You can call this project UITestProject.

  2. Import the JUnit library into your test project. Currently, JUnit 3.8 is the supported version.

  3. Import the Android library as an external JAR into your test project. This JAR is named android.jar and is stored in your Android SDK installation folder under <android-sdk>/platforms/<sdk>/.

  4. Import the uiautomator library as an external JAR into your test project. This JAR is named uiautomator.jar and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}