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

Running UI test cases


The Java test project created in the previous section has to be compiled into a JAR file to run your test cases. The JAR file has to be copied onto the same Android device in which the application under test is running. Follow the next steps to run your test case:

  1. Open the terminal panel in Android Studio (Tools | Open Terminal).

  2. Navigate to the Android Studios tools folder where the android executable is found:

    $ cd androidSDK/tools/
    
  3. Get the ID of the Android target that you want to use in your project. Execute the android executable with the list of the target actions. This command will list the available Android targets along with their IDs:

    $ ./android list targets
    
  4. Execute the android executable with the create uitest-project action. This command receives the name of the output project (-n), the ID of the Android target (-t), and the path of your Java test project (-p) as parameters. This step is to generate the project's build file as a test project:

    $ ./android...
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