Skip to content

Latest commit

 

History

History
119 lines (84 loc) · 6.08 KB

exercise2.md

File metadata and controls

119 lines (84 loc) · 6.08 KB

Visual Studio Team Services and Xamarin

Learnings

  1. Create Team Service account
  2. Create Team Service Project
  3. Import Code from GitHub into Project
  4. Build automation of project in VSTS

Create your Team Service account

  1. Go to the offical Visual Studio Team Service page and create an account for free.
  2. Login with your existing microsoft account or create a new one.
  3. A name for your VSTS and additional information to your first project (created on account creation) have to be entered.

VSTS_Create_Account

After login there is an overview of your existing projects (should be only one after creating a new account). The navigation area is on the top left and there are four navigation points:

  1. Overview
  2. Users
  3. Rooms
  4. Load Tests

Overview

Dashboard with some overview information about your VSTS account.

  • Your projects
  • VSTS News
  • Build and load testing statistics

VSTS_Overview

Users

User management of the VSTS account.

  • List all users and their access level.
  • Create and edit users and their access level.
  • Export users as csv.

VSTS_Users

Rooms

View of the team rooms management of the VSTS account. Team rooms are automatically created for each project to discuss issues and share the status.

VSTS_Users

Load Tests

View of the load test management of the VSTS account. Create, edit and start cloud-based load testing for your web projects. 20.000 minutes each month are free. See Getting started with Performance testing for more information.

VSTS_Users

Create Team Project in VSTS

Choose a project name and a description to specify your app. In our case, we choose Hanselman.Forms. There are three process template to choose:

  1. Agile
  2. CMMI
  3. Scrum

Choose the process that fits best for your team (see Guidance for more information). Finally choose a version control system, we use Git.

VSTS_Create_Project

VSTS_Create_Project_Progress

Import data from GitHub

In this example we use the code from an external GitHub repository, so we have to import this code. Click on Code, Import repository and add the following link: https://github.com/jamesmontemagno/Hanselman.Forms.git;

VSTS_Import_Code_From_GitHub

The code should appear in the VSTS repo after the import completed. You can clone from the VSTS repo at any time.

VSTS_After_Import_Code_From_GitHub

Connect Visual Studio to your VSTS repository

  1. Open Visual Studio
  2. Open the Team Explorer (View > Team Explorer)
  3. Click on Manage Connections > Connect to Team project
    Connect to Team project
  4. Add your VSTS
    Add the VSTS to Visual Studio
  5. Select the Hanselman.Forms project
    Select the project
  6. Clone the repository
    Select the project
  7. Try to run the app in the Android Emulator (see Exercise 1 for trouble shooting)
    Plan enough time for solving problems with Emulator, Xamarin, NuGet, etc.

Build Automation

  1. Without changing any code we can configure our automated build with VSTS.

  2. Switch to the BUILD view. This view provides an overview of all build definitions and their current status.

  3. Create a new build definition by clicking on the NEW DEFINITION button. Build_Start

  4. In the opened dialog you can choose a predefined build template. The templates are grouped in two tabs: Build and Deployement. Choose Build

  5. Choose the Xamarin.Android Build template. Build_New_Definition

  6. Click on Next

  7. Choose the created repository of your VSTS and choose the master branch as default branch.

  8. Activate the option Continous integration to start the build whenever the selected branch is updated.

  9. Choose Hosted as your default agent queue. The hosted version has 240 build minutes for free. More information can be fround here.

  10. Click on the Create button to finish this step.

Build_New_Definition

You see two columns in your build definition settings: The build steps are listed in the left section, the settings of the selected build step are on the right side.

Build_Edit_Build_Steps_1

  1. Discuss the several steps in the build template
  2. Disable the Xamarin Test Cloud - Test step: Select the step and deselect the Enabled checkbox in the Control options section. We'll add test automation later.
  3. Click on Queue new build, confirm the opened dialog without changing anything and watch the logging information.

Build_Start_First_Build

Build_Log

Build_Log_Success