I know this is silly question, but i am just stuck with this:
1.I have one main project called MainProject. 2. Inside that there is one test project which has its own source and menifest file and in menifest file i added all required to make it test project like this :
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app.tests" android:versionCode="1"
android:versionName="1.0">
<application>
<uses-library android:name="android.test.runner" />
</application>
<uses-sdk android:minSdkVersion="3" />
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.example.app" android:label="Tests for My App" />
</manifest>
Now i right click on it go to "Run As" and "Run Configuration" and select "Android JUnit Test" but it showing error:
MainProject does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml
Any help plz?
There is one video link of @Lucifer below which is helpful and also my own answer which a link you can check which is also helpful.
Robotium is an Android test automation framework that has full support for native and hybrid applications. Robotium makes it easy to write powerful and robust automatic black-box test cases. With the support of Robotium, test case developers can write function, system and acceptance test scenarios, spanning multiple Android activities.
select File/new/project
select Android Test Project
give the Project a name
select test target as the other project you already have, in your posting above "MainProject"
pick the target platform, ie Android 4.0
finish and the test project is made
add classes under src in the test project that extend one of the android.test classes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With