Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Testing and securing android studio applications

You're reading from   Testing and securing android studio applications Debug and secure your Android applications with Android Studio

Arrow left icon
Product type Paperback
Published in Aug 2014
Publisher Packt
ISBN-13 9781783988808
Length 162 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Antonio Hernández Niñirola Antonio Hernández Niñirola
Author Profile Icon Antonio Hernández Niñirola
Antonio Hernández Niñirola
Belén Cruz Zapata Belén Cruz Zapata
Author Profile Icon Belén Cruz Zapata
Belén Cruz Zapata
Arrow right icon
View More author details
Toc

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 $19.99/month. Cancel anytime
Banner background image