Thu. Jan 23rd, 2020

Operating Xamarin.UITest Assessments on Other Cell OS

3 min read

Within the first weblog of our Xamarin.UITest 101 series , now we have coated easy methods to arrange the Xamarin construction atmosphere with Visible Studio on Windows 10 , lately we can arrange a construction atmosphere for Apple’s macOS and undergo operating Xamarin.UITest assessments on Android and iOS platforms.

Environment Up Xamarin Surroundings on macOS

Let’s first arrange the macOS atmosphere through putting in Visible Studio for Mac.

We will move to https://visualstudio.microsoft.com/vs/mac/ and obtain Visible Studio for Mac.

download vs for mac

After downloading and putting in the Visible Studio for Mac construction atmosphere, we can be brought about with choices for set up.

Make a selection Android and iOS within the Goals segment, and click on the Set up and Replace (if any updates) button.

installing vs for mac

Making a New Challenge on Visible Studio for Mac

After the set up is done, we can see a discussion field with the choices to open or create a brand new undertaking.

Since now we have already created a cross-platform Xamarin.Bureaucracy app and a pattern check of it with Xamarin.UITest in the previous blog , it’s really easy to take the undertaking code to the macOS device.

Open the undertaking with Visible Studio for Mac.

open a local xamarin uitest project

Android Challenge

After the undertaking is constructed, we will be able to set up our Xamarin.Bureaucracy app at the Android tool.

install xamarin app on an android device

After which, we will be able to run our Xamarin.UITest assessments in opposition to the Android tool.

running xamarin.uitest tests on the android device

iOS Challenge

To release the app at the Xamarin iOS platform, we want to alternate our construction atmosphere to the important configuration of ATXamarin.iOS. Additionally, we will have to uncomment the [TestFixture(Platform.iOS)] platform.

installing xamarin app on an ios device

To put in the applying, we’d like to make a choice the simulator (the place the app shall be put in and introduced) and click on at the Play button.

In our case, we can select the simulator of the iPhone 11 (iOS 13.3).

running xamarin.uitest tests on the ios device

To run Xamarin.UITest assessments, we want to alternate the configuration of the AppInitializer.cs magnificence.

appinitializer for xamarin ios project

For this, we need to take a trail to the app within the AppBundle manner. The trail will have to be specified relative to the folder with our check.

Clearly, we need to specify the identifier of our simulator too.

With a purpose to get this identifier, we will be able to use the next command:

xcrun tools -s gadgets

xcrun command

We want the identifier of the iPhone 11 (iOS 13.3).

identifier for iphone 11 ios 13.3

Once we input the entire important information, we will be able to run our assessments. However at this level, there can also be an error with the customization of Calabash elements.

We want to set up Xamarin Check Cloud Agent for the ATXamarin.iOS undertaking.

xamarin test cloud agent

After the package deal is added, we need to input the next code block within the AppDelegate.cs magnificence:

#if ENABLE_TEST_CLOUD
  Xamarin.Calabash.Get started();
#endif

appdelegate.cs for ios

After this, we will be able to run Xamarin.UITest assessments at the iOS simulator.

running all Xamarin UITest unit tests

When the check is done, we can see a newly created merchandise (very similar to the only created after a check run at the Android tool).

the item created on after the Xamarin.UITest test on ios

The submit Running Xamarin.UITest Tests on Different Mobile OS seemed first on Bitbar .

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © All rights reserved. | Newsphere by AF themes.