RSS

Tag Archives: terminal

UI Automation di Android (bagian dari unit testing)

pernah melakukan Unit Testing di sebuah aplikasi?

Nah, berikut ini adalah contoh Automation test di Android. UI Automation Test merupakan bagian dari Unit testing yang bertujuan membiasakan tester terhadap komponen UI (termasuk view dan control) dari aplikasi yang ditargetkan.
Selain itu, kita bisa menganalisa aplikasi orang lain untuk mengetahui komponen apa saja yang digunakan di aplikasi tersebut.
Output yang dihasilkan berupa screenshot UI dan komponen-komponen penyusun UI secara hirarki dari parent to child (seperti halnya di XML layout)

untuk menganalisa komponen-komponen UI dari sebuah aplikasi, dapat dilakukan via Android SDK, yaitu via terminal (arahkan ke <android-sdk>/tools/), ketik :

$ uiautomatorviewer [enter]

Tampilannya seperti berikut :

Image

Lengkapnya dapat dilihat di : http://developer.android.com/tools/testing/testing_ui.html

 
Leave a comment

Posted by on May 28, 2014 in Android, Programming

 

Tags: , , , , , , , , , , , , ,

Enable multiple users & user session on Android

Multiple User Mode is the ability to give the phone to another person, let them log in with their own account information, and any changes they make are done under their account. They give the phone back to you, and you’ll have none of their clutter, photos, emails, or apps on your account.

Preparation :

  1. You’ll either need root access (rooting) on your Android device, ADB tools via commandprompt, or a terminal emulation application installed.
  2. In a terminal window or ADB, you’ll need to obtain SuperUser/root access. This is generally done by typing :
    adb shell [enter]
    su [enter]
    After obtaining SuperUser access, type in:
    pm get-max-users [enter]
    note : if pm get-max-users failed, maybe package manager not supported on your device, it’s no problem at all. 😉
  3. Now type in:
    setprop fw.max_users 8 [enter]
    note : this will create privilages for maximum number of users supported by the device
  4. Then, type in :
    pm create-user [usernameyouwanthere] [enter]
    example : create-user Guest [enter]

    For another pm (package manager) cheatsheet, you can visit this.

And, viola! you can try to “press and  hold” power button, if it is successful, it will show like this :

Image

 
Leave a comment

Posted by on December 5, 2013 in Uncategorized

 

Tags: , , , , , , , , , ,