How do I set up permission for testing on Androidmanifest?

Asked

Viewed 160 times

0

I’m with a question to give permission to perform tests on an android application.

I created a case of test but the next one appears on the console:

does not specify a android.test.Instrumentationtestrunner Instrumentation or does not declare uses-library android.test.Runner in its Androidmanifest.xml

I went to the archive AndroidManifest.xml of the application and introduced the code:

<instrumentation android:name="android.test.InstrumentationTestRunner"
    android:targetPackage="com.voxar.cameraapp"
    android:label="your tests label" />

and put:

<uses-library android:name="android.test.runner" />

As suggested in stackoverflow.with

How to solve mistakes so I can start the tests?

1 answer

1

@Daniel theoretically just add these dependencies to your Gradle file.

androidTestCompile('com.android.support.test:runner:0.3') { exclude group: 'com.android.support', module: 'support-annotations' } androidTestCompile('com.android.support.test:rules:0.3') { exclude group: 'com.android.support', module: 'support-annotations' }

You do not need permission to run a simple test (change screen). If you are accessing internet or GPS or SD card, this kind of thing, then you need permission, otherwise you do not need. Follow a link with instructions for you to start your tests. I hope I’ve helped

http://developer.android.com/intl/pt-br/training/testing/index.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.