Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIAutomator on android lower than 4.3

Is it possible to use UIautomator on api < 18? Main purpose of auto-tests is regression testing and devices with android 4.1, 4.2 should also be tested. Maybe UIautomator library versions lower than 2.0 can be used, but i cant find any info about previous versions.

like image 584
Dmitry Gr Avatar asked Jul 02 '15 09:07

Dmitry Gr


1 Answers

Add an androidTest specific AndroidManifest.xml to your project that contains the following:

<manifest
    package="${applicationId}.test"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
</manifest>

This will get merged with your default AndroidManifest.xml and allow you to keep your minSDK for your production app, and allow you to test using UIAutomator.

like image 66
jdonmoyer Avatar answered Oct 12 '22 01:10

jdonmoyer