Troubleshooting Xamarin UI Tests
Troubleshooting Xamarin UI Tests
What if your Xamarin UI Tests don’t show in Test Explorer, won’t run, or have unpredictable behavior? This video walks through these and other issues like ‘APK file not found’, contention with multiple devices and ‘Unsupported major.minor version’.
Issues
There’s no way to know if there are multiple errors are between me and configuration nirvana. At least, not until I have an end-to-end, working prototype. Here are a few “gotcha” areas (i.e. “silly things I have done”)…
- Tests don’t show in Test Explorer
- Tests won’t run
- APK file not found
- Unpredictable app behavior
- Multiple devices connected
- No devices connected
- “Unsupported major.minor version”
What to Check
So where to start? Here are some of the questions addressed by the video:
- What are the critical application properties, such as compilation targets, manifest permissions, packaging and build options?
- What NuGet packages and versions are required for the test project?
- How does Visual Studio know where to find the various DK’s: JDK, SDK and NDK? For example, if the ANDROID_HOME environment variable is wrong, will the app and test still run? And if so, what Android SDK will it use?
- How does the test target devices? Could there be contention even if the test code is correct?
I hope this helps you troubleshoot your Xamarin UI test configuration. Please share any issues you are facing in the comments.
Originally published at Falafel Software Blog.