- Visual Studio 2015 or 2017 with installed "Modile development with .NET" workload
- Test Studio Mobile Android extension:
- Download the Test Studio Mobile extension for Android and unpack it
- Extract MobileTestingExtension.jar somewhere on your PC
1. Start new Visual Studio project and select Templates->Android->Bindings Library (Android)
2. Add MobileTestingExtension.jar to project:
Solution Explorer->Right click on 'Jars' folder->Add->Existing Item... Navigate to MobileTestingExtension.jar and add it to the project.
3. Edit MobileTestingExtension.jar properties:
In Solution Explorer select MobileTestingExtension.jar and change 'Build Action' to 'EmbeddedJar'
4. Open project Properties and set Target Framework to be same as Target Framework of the application that will be tested.
5. Ensure to set explicitly the Android Codegen Target in project Properties to jar2xml.
6. Build Bindings library. You probably will get some warning messages in output console, but the library should be build sucefully and ouputed DLL will be located at:
Visual Studio Projects\ClassLibrary\ClassLibrary\bin\Debug\ClassLibrary.dll
For more information about building Xamarin bindings library see: Creating Bindings Library
1. Add Bindings Library to the project under test:
2. Open AndroidManifest.xml for editing
3. Add the following top-level instrumentation element which will be used as App-Identifier in Test Studio Mobile and change target package name to match your application package:
<instrumentation android:name="com.telerik.testingextension.MobileTestingInstrumentation" android:targetPackage="Todo.Android"/>
4. Add the following activity element as a child of the application element:
<activity android:name="com.telerik.testingextension.EntryPoint" android:theme="@android:style/Theme.NoDisplay" > <intent-filter> <action android:name="com.telerik.testing.ACTION_AUTOMATE"/> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
5. Your application is ready for testing.
For more information about recording and executing tests with Test Studio Mobile see: Test Studio Mobile Help