visual studio online load testing git / version control testing build and release analytics team...

36
Using Third-Party ALM solutions along with Visual Studio Online Will Smythe

Upload: ralf-harrison

Post on 30-Dec-2015

245 views

Category:

Documents


0 download

TRANSCRIPT

Using Third-Party ALM solutions along with Visual Studio Online

Will Smythe

Visual Studio Online

Included for certain paid MSDN subscribers:

Free Plan for up to 5 users

http://yourname.visualstudio.com

Visual Studio Online

Load Testing

Git / Version Control

Testing

Build and

release

Analytics

Team Collab

Agile Planning / Work items

Test Mgmt

Why?Need for specialized tools

Easy acquisition of tools

Market need and pressure to deliver more faster

Different teams, different cultures

Development teams today typically use multiple tools from multiple vendors to deliver software …

Tools and services are speaking a common language

Loose, lightweight contracts (e.g. REST) make

integration easy

Integration underpins new services

Integration is the enabler

Integration is enabling teams to use a broader set of tools and services to plan, develop, build, test, and deliver

software

Why can’t I connect the tools and services I need to deliver software with Visual Studio Online?

(Answer: now you can)

Enables integration with Visual Studio Online

and thousands of custom and

third-party apps services

Built on open standards

Embraces all platforms, devices,

languages, and services

Expands and empowers the ecosystem

Visual Studio Online REST APIs, Service Hooks, and OAuth

TechEd Launch partners

Visual Studio Online

OAuth2

REST APIs

Custom AzureNativeWeb

Third-Party Cloud

Services

Mobile Store

ServicesApps

Services Hooks.NET Client OM

TFS Java SDK

REST APIs

Fully documented, HTTP/JSON APIs for accessing Visual Studio Online resources and operations

Lightweight and easy to work with

Integrate with Visual Studio Online from any device, platform, or technology stack, including Windows, Android, iOS, Node.js, and more.

Visual Studio Online REST APIs

Available APIsBuild

Work item tracking

Version control

Git

Test management

Team room

Service hooks

Account and profile

Collection, project, and team

Some of what you can do …

Create a work item

Retrieve a list of active, high priority bugs

Queue a new build

Get the last 10 commits to a Git repository

Get results of a recent test run

Add a message to a team room

Get the byte contents of a file or build drop

ResourcesAPI reference:

http://www.visualstudio.com/integrate/reference/reference-vso-overview-vsi

API basics:

http://www.visualstudio.com/integrate/get-started/get-started-rest-basics-vsi

HTTP Request

Method

GET // readPOST // createPATCH // updateDELETE // deletePUT // replace

URL

Most commonhttps://{account}.visualstudio.com/DefaultCollection/_apis/{area}/{resource}?api-version=1.0-preview

Otherhttps://app.vssps.visualstudio.com/_apis/{area}/{resource}? // for account and profilehttps://app.visualstudio.com/_apis/{area}/{resource}? // for account-level APIs (e.g. “get project collections”)

Headers

AcceptAccept: application/json;api-version=1.0-preview

AuthAuthorization: Basic [user name:password] (Base64 encoded)Authorization: Bearer [access token]

Content-type (for POST, PATCH, PUT)Content-type: application/json

Body JSON resource (when method is POST, PATCH, PUT)

HTTP Response

Code

2xx // successful400 // bad request403 // authentication issue404 // invalid URL; not visible to authenticated user

HeaderContent-typeapplication/json; charset=utf-8

Body

JSON string (for most methods, except for DELETE)

Get last 5 buildsGET /_apis/build/builds?$top=5&api-version=1.0-preview

Get a list of all Git repositories in this accountGET /_apis/git/repositories&api-version=1.0-preview

Get a work itemGET /_apis/wit/workitems/123?$expand=all&api-version=1.0-preview

Trigger a new buildPOST /_apis/build/requests?api-version=1.0-preview

{ definition: { id: "26“ }, priority: "Normal", reason: "Manual“ }

Examples

Note: assumes a base URL of https://account.visualstudio.com/DefaultCollection

Demo

REST APIs

API version must be specified with every requestAPI versions are in the format {major}.{minor}[-{stage}] (For example, 1.0-preview, 1.0, 1.1, 1.2-preview, 2.0)During a preview APIs are subject to change, but you can specify a precise version of a particular API when needed (For example, 1.0-preview.1, 1.0-preview.2)Once an API is released (1.0, for example), its preview version (1.0-preview) is deprecated and can be deactivated after 12 weeks

A note on versioning …

Service hooks

Perform actions on external services when events happen in your Visual Studio online projects

Service hooks

Visual Studio Online

Developer

checks in code

Tester opens a

bug

A build fails

Managed at the project level

Available to project admins only (by default)

A subscription defines the type of event (and filters), target service, and action to perform

Enables outbound integration scenariosComplements REST

Avoids polling and speeds up integration

Efficiently integrates different toolsUseful for complex, interconnected workflows between tools (common in ALM)

Sounds cool … but so what?

Available services and eventsConsumer Services

AppVeyor

Campfire

Flowdock

HipChat

Jenkins

Kato

MyGet

Trello

UserVoice

Zendesk

Example scenarios

Notify a HipChat room when a new bug is created

Publish NuGet package to MyGet when a build completes

Create a card in Trello for new live-site incident

Trigger on-prem build process when code is checked in

Update UserVoice ticket when a linked work item changes

Available events Build completed Code checked in (TFVC), code pushed Work item created/updated/commented on

Connector ServicesAzure Service Bus

Azure Storage

Web hooks

Zapier

Demo

Service hooks

Web hookPOST events to a specified URLWell-defined JSON payload includes:

Human-readable messages about the eventJSON representation of the resource

Settings control how much details is sent

Service hooksService-specific code with custom configuration parametersTypically calls a service-specific API on the target service

Web vs. service hooks

http://www.visualstudio.com/integrate/get-started/get-started-service-hooks-events-vsi

Event payload (example){ "id": "698261b2-8a2a-47d5-ae40-5ea8fd7f734b", "eventType": "build.complete", "publisherId": "tfs", "message": { "text": "My First Project Build FabrikamAppsBuild_20131216.1 completed (Status: Successfully Completed)", "html": "My First Project Build <a href=\"https://fabrikam.visualstudio.com/web/build.aspx?pcguid=095e6561-c80c-40f3-81ed-11db98815141&amp;builduri=vstfs%3a%2f%2f%2fBuild%2fBuild%2f7\">FabrikamAppsBuild_20131216.1</a> completed (Status: Successfully Completed)", "markdown": "My First Project Build [FabrikamAppsBuild_20131216.1](https://fabrikam.visualstudio.com/web/build.aspx?pcguid=095e6561-c80c-40f3-81ed-11db98815141&builduri=vstfs%3a%2f%2f%2fBuild%2fBuild%2f7) completed (Status: Successfully Completed)" }, "resource": { "id": 7, "name": "FabrikamAppsBuild_20131216.1", "url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/build/Builds/7" }, "createdDate": "2013-12-16T04:33:48.106Z" }}

Connect your projects to 250+ other services

Drive actions on other services when events happen in your project (and vice versa)

Leverages service hooks

Zapier

Demo

Zapier with Visual Studio Online

Auth

Options

Basic authentication

• Simple, easy to get started

• Supported from almost all clients/languages

• Only option for some clients (native mobile app)

OAuth 2.0

• More secure than basic

• Gives users (and developers) more control over level/scope of access

• Authorization is revocable

Visual Studio Online supports OAuth 2.0Authorization code grant type flow, but with JWT-based assertions

OAuth basics

1. Register your app - https://app.vssps.visualstudio.com/app/register

2. Authorize users

3. Get an access token

4. Use the access token

Limited set of scopes (currently)Authorization is tied to an identity, not an account

Provides client app/service access to all REST APIs

Access token expires relatively quickly

Recommendation is to only persist the refresh token (which is used to acquire a new access token)

Authorizations are managed by users on their profile page (https://app.vssps.visualstudio.com/Profile/View)

OAuth notes

Demo

Registering an OAuth client app

Developing your own integration? Or looking for a partner solution?

http://integrate.visualstudio.com

Get started

Thank [email protected]@willsmythe

Complete an evaluation and enter to win!

Evaluate this session

Scan this QR code to evaluate this session.

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Travis CITeam City

Heroku

Rational ClearCase/ClearQuestJenkins

Zendesk

New Relic

CodePlexBugzilla

BitBucket

CircleCI

Jira

Asana

Pivotal TrackerDucksboard

CollabNet

Rally

Team Concert/Jazz

AppHarbor

Improved Git Permissions

Amazon AWSEclipse

HP

Zapier

LeanKitLoader.io

Team Foundation Server

Rational

Atlassian

Rally

Team Rooms

Lighthouse

Trello

MicroFocus

Basecamp

Blimp