Xamarin.Forms - App Center UITest
Sample code for the Xamarin.Forms UITest doc.
In the iOS
ViewInitializedmethod is wired up to populate the iOS AccessibilityIdentifier from the Xamarin.Forms
In the Android
ViewInitializedmethod is wired up to populate the Android ContentDescription from the Xamarin.Forms
In the Xamarin.Forms user interface, the
AutomationIdis set on controls that need to be referenced in tests.
In the UITests unit test project, there is a set of cross-platform tests in a virtual class (
CrossPlatformTests). These tests will be run against both platforms. The cross-platform tests reference the
AutomationIdused in the UI code, eg.
In the UITests unit test project the iOS and Android subclasses of
CrossPlatformTestsdo the platform-specific set-up.
The Visual Studio for Mac test runner can run these tests in the platform simulators. Note that the virtual class containing the core tests is shown but with all tests ignored. The tests only run 'for real' from within the platform-specific sub-classes of