Running the TrackMyWalks UITests using Xamarin Studio

Prior to running your UITests within Xamarin Studio, you will need to add your iOS or Android apps to the Test Apps node of the Unit Tests pane, or alternatively specifying a path to your app within the AppInitializer class. If you don't do this, your tests will continue to fail until you add these projects to your solution.

In this section, we will look at how to go about adding your apps to the Test Apps node within the Unit Tests pane. Let's look at how we can achieve this with the following steps:

  1. To add your iOS and Android apps to your TrackMyWalks.UITests project, select the View menu option, then choose the Pads sub-menu item, and then the Unit Tests option, as shown in the following screenshot:

    Running the TrackMyWalks UITests using Xamarin Studio

  2. Next, right-click on the Test Apps item within the Unit Tests pane and click on the Add App Project. This will display the Select a project or solution dialog that allows you to select each of your projects for the various platforms, as shown in the following screenshot:

    Running the TrackMyWalks UITests using Xamarin Studio

  3. Once you have selected the projects that you would like to add to your TrackMyWalks.UITests solution, click OK and dismiss the dialog.

    Note

    If for some reason, you don't see your iOS app project listed, you may have forgotten to add the Xamarin Test Cloud Agent NuGet package to your iOS project.

    Once you have successfully added your projects to the TrackMyWalks.UITests solution project, our next step is to run our app and see the results:

  4. To run your UITests, select the Run menu option, then choose the Run Unit Tests menu item, as shown in the following screenshot.

    Running the TrackMyWalks UITests using Xamarin Studio

When your app starts to run, the UITest framework will automatically deploy your app to the iOS or Android simulator, and then run the app and process through each of the steps that you have specified within your test methods. The results from each of the tests will appear within the Test Results pane within Xamarin Studio.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.212.217