Android Testing in Headless Emulator

When testing Android applications you have to rely on running the tests in the emulator or a device attached to your computer. However, if you want to follow a continuous integration workflow for Android development, you might need a headless emulator that runs in a non-graphical environment. For instance, I have been using Travis CI and Gradle for automating Android builds.

To completely avoid showing the emulator interface (headless emulator) you need to start the emulator with some options in your terminal.

First, you can create an specific Android AVD as follows:

1
android create avd --force -n test -t android-17 --abi armeabi-v7a

Then, to run the headless emulator:

1
emulator -avd test -no-skin -no-audio -no-window

The '-no-skin' option removes the emulator buttons such as the home and other hardware keyboard buttons.

The '-no-audio' option disables the audio support.

Finally, the '-no-window' option disables the emulator's graphical window display.

Now yo can use this emulator to run your tests.

Comments

  1. how should i see the specific application running, on emulator in Headless mode using command line.

    ReplyDelete
  2. can you write full article about it? cause this article is incomplete without proper steps and configuration like creating AVD, emulators and then starting headless emulator and so on. (its also outdated..!!)
    anyways Thanks for the idea.

    ReplyDelete
  3. You will most likely be under a cloud and asked to opt for a blood, nail, or urine test, and nothing will stop the examiners from asking you to come back as soon as the hair starts to regrow. Some people go to these extreme lengths of shaving their hair off for the hair follicle testing, thinking they made a smart move. In reality, they put themselves in hot water. Indeed, the testers cannot collect samples from a bald head, but they surely can collect hair follicles from other parts of your body. You and your bald head will feel dumber when we tell you that your body hair grows at a slower rate than that on your head. Hence why it can reveal drug consumption for way longer than any other drug test. Going blonde just a day before the hair follicle drug test is another way to alert their radar. You might think the testers will not distinguish your new fresh yellow head, but in most cases, legal individuals who recognize you are mostly present at the instance. At times some examiners do not follow this protocol; still, the damage from extreme bleaching will raise many heads. Bleaching can indeed make your leaky hair strands lose some toxins; however, it is rare for all metabolites to get lost. The sensitive instruments used in labs are unlikely to miss drug components. Just one round of bleaching can reduce forty to eighty percent of the metabolites, but that also means you will damage your hair to the roots. Besides hydration and working out, take a potent product. All of these ways and products will help dilute and drain your system. Q: How is THC stored in the body? A: THC is fat-soluble, and this composite of weed gets entrapped in fat cells of the human body. It is then broken down and flows into the bloodstream.

    ReplyDelete

Post a Comment

Popular posts from this blog

Automating Android builds with Gradle

Heroic Web Applications with AngularJS