This commit is contained in:
Ed Kaim 2017-03-07 14:02:00 -08:00
Родитель 2a855c067e 04a430d2de
Коммит 9224fa7d4c
102 изменённых файлов: 521 добавлений и 828 удалений

Просмотреть файл

@ -56,10 +56,6 @@ entries:
url: labs/tfs/branchingandmerging
output: web, pdf
- title: Code Discovery using Live Dependency Validation in Visual Studio Enterprise 2017
url: labs/tfs/architecturevalidation
output: web, pdf
- title: Collaboration Experiences for Development Teams using Team Foundation Server 2017
url: labs/tfs/devteamcollaboration
output: web, pdf
@ -80,7 +76,7 @@ entries:
url: labs/tfs/intellitest
output: web, pdf
- title: Live Unit Testing in Visual Studio 2017
- title: Live Unit Testing and Live Dependency Validation in Visual Studio 2017
url: /labs/tfs/liveunittesting
output: web, pdf

Просмотреть файл

@ -1,6 +1,6 @@
{% include custom/sidebarconfigs.html %}
<ul id="mysidebar" class="nav">
<li class="sidebarTitle"><a href="{{ sidebar[0].url }}">{{sidebar[0].product}}</a></li>
<li class="sidebarTitle"><a href="{{site.url }}{{site.baseurl }}{{ sidebar[0].url }}">{{sidebar[0].product}}</a></li>
{% for entry in sidebar %}
{% for folder in entry.folders %}
{% if folder.output contains "web" %}

Просмотреть файл

@ -8,7 +8,7 @@ comments: true
<br>
<br>
The ALM VM update is a massive exercise and takes several weeks from start and finish. I would like to thank the following indiviudals for their contributions and support, without their expertise and generous time, this could not have been a possibility
The ALM VM update is a massive exercise and takes several weeks from start and finish. I would like to thank the following individuals for their contributions and support, without their expertise and generous time, this could not have been a possibility.
<table class ="mainTable" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr class ="mainTable" >

Просмотреть файл

@ -1249,3 +1249,6 @@ span.PageTitle{
margin-bottom: 28px;
}
th.text_center{
text-align: center;
}

Просмотреть файл

@ -10,13 +10,11 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
## Overview
In this lab, you will learn about the agile planning and portfolio management tools and processes provided by Team Foundation Server 2017 and how they can help you quickly plan, manage, and track work across your entire team. You will explore the product backlog, sprint backlog, and task boards which can be used to track the flow of work during the course of an iteration. We will also take a look at how the tools have been enhanced in this release to scale for larger teams and organizations.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
@ -24,271 +22,256 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
This lab requires you to use the default state of the virtual machine, before any modifications are made to work items or source in TFS. If you followed the “Working with the Visual Studio 2017 ALM Virtual Machine.docx” instructions you should already have a snapshot/checkpoint of the virtual machine before working with it for the first time. Apply this snapshot/checkpoint before starting this lab.
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Agile Project Management ##
## Exercise 1: Agile Project Management
In this exercise, you will learn how to use Team Foundation Server 2017 to manage your product backlog, create work items, break work items into tasks, assign tasks to team members, and track progress using the task board. This overview will demonstrate the basic project management tools that small- to medium-sized development teams can utilize for product development.
> **Note:** The team project used in this lab uses a Scrum process template, but the core features demonstrated apply to all process templates.
<a name="Ex1Task1"></a>
### Task 1: Team Foundation Server Web Portal ###
### Task 1: Team Foundation Server Web Portal
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
> **Note:** In order to fully demonstrate the ALM features in this lab, we will first set the virtual machine to a specific date that lines up with a pre-configured, in-flight iteration. This lab needs to be walked through using the original virtual machine state (without any modifications made to source or work items), otherwise you will see errors.
1. **Right-click** the **ConfigureALMDemo.bat** file on the Desktop and then select “**Run as administrator**”. This will set the date and time in the virtual machine to be a specific date that lines up with the demonstration data.
2. **Right-click** the **ConfigureALMDemo.bat** file on the Desktop and then select “**Run as administrator**”. This will set the date and time in the virtual machine to be a specific date that lines up with the demonstration data.
1. Launch **Internet Explorer** from the taskbar and click **TFS FF Portal** from the favorites bar at the top.
3. Launch **Internet Explorer** from the taskbar and click **TFS FF Portal** from the favorites bar at the top.
![](images/000.png)
<img src="images/000.png" />
1. Select **Browse all** option from the team dropdown box in the top left corner of the portal.
4. Select **Browse all** option from the team dropdown box in the top left corner of the portal.
![](images/001.png)
<img src="images/001.png" />
1. This view shows that the Fabrikam Fiber collection has one project in it named **FabrikamFiber**. This project contains a few different teams, with the **Fabrikam Fiber Leadership Team** being set as the default team for the project. We will take a closer look at teams in a later exercise.
5. This view shows that the Fabrikam Fiber collection has one project in it named **FabrikamFiber**. This project contains a few different teams, with the **Fabrikam Fiber Leadership Team** being set as the default team for the project. We will take a closer look at teams in a later exercise.
> **Note:** This lab refers to this default team as both the leadership team and the management team. They both refer to the same team.
![](images/002.png)
<img src="images/002.png" />
1. Select the **Fabrikam Fiber Web Team** and then click **Navigate**.
6. Select the **Fabrikam Fiber Web Team** and then click **Navigate**.
![](images/003.png)
<img src="images/003.png" />
1. The **Home** view for the Fabrikam Fiber Web team provides a high-level overview of the current iteration (Sprint 3) including team workload versus capacity, burndown of tasks over time, and team favorites, which can include a configurable assortment of work item queries, build definitions, and version control paths. In addition, there are links to quickly create new work items and bugs, load the backlog, task board, initiate requests for feedback and so on.
7. The **Home** view for the Fabrikam Fiber Web team provides a high-level overview of the current iteration (Sprint 3) including team workload versus capacity, burndown of tasks over time, and team favorites, which can include a configurable assortment of work item queries, build definitions, and version control paths. In addition, there are links to quickly create new work items and bugs, load the backlog, task board, initiate requests for feedback and so on.
![](images/004.png)
<img src="images/004.png" />
> **Note:** Team favorites can be added or removed from within the web portal. For example, navigate to the Build tab to assign build definitions as a team favorite. In addition, team favorite work item queries can be modified from within Visual Studio.
Each team can have different team favorites listed, different work capacity, and even different work items. The determining factor of where a work item will show up is governed by the **Area** field.
8. Each team can have different team favorites listed, different work capacity, and even different work items. The determining factor of where a work item will show up is governed by the **Area** field.
1. As you can see under the **Team Members** section, there are several members listed in this team. Teams are a concept that were originally introduced in Team Foundation Server 2012 to make it easier to manage, assign, and track work.
9. As you can see under the **Team Members** section, there are several members listed in this team. Teams are a concept that were originally introduced in Team Foundation Server 2012 to make it easier to manage, assign, and track work.
<a name="Ex1Task2"></a>
### Task 2: Working with the Backlog ###
### Task 2: Working with the Backlog
1. Navigate to the backlog by clicking **Backlogs** under the **Work** section.
![](images/005.png)
<img src="images/005.png" />
1. The product backlog helps define the work that needs to be done. Once you have a backlog, you can use it to help manage when that work gets done, as well as associate items on the backlog with check-ins, acceptance tests, or other criteria.
2. The product backlog helps define the work that needs to be done. Once you have a backlog, you can use it to help manage when that work gets done, as well as associate items on the backlog with check-ins, acceptance tests, or other criteria.
![](images/006.png)
<img src="images/006.png" />
> **Note:** The Current iteration shown in the tree on the left side of this screen is Iteration 3. Team Foundation Server uses the current date and time to determine the current iteration. The virtual machine you are using has been set to use a date of July 9, 2013 for purposes of this lab.
1. Imagine that the VP of Fabrikam Fiber has requested that a new user story be implemented for the customer-facing service portal. This new user story will enable customers to see weather-related service outages. This user story is being designated as high-priority because many customers requested it and customer service indicated that it would greatly reduce phone support during outages.
3. Imagine that the VP of Fabrikam Fiber has requested that a new user story be implemented for the customer-facing service portal. This new user story will enable customers to see weather-related service outages. This user story is being designated as high-priority because many customers requested it and customer service indicated that it would greatly reduce phone support during outages.
1. Select the last row of the product backlog and then create a new **Product Backlog Item** with the title “**Customer should see weather-related outages on portal.”**
4. Select the last row of the product backlog and then create a new **Product Backlog Item** with the title “**Customer should see weather-related outages on portal.”**
![](images/007.png)
<img src="images/007.png" />
> **Note:** New work items are generally inserted above the selected location. The exception is that if you select the last work item, the insertion will be after the selected location.
1. Click **Add** to add the new user story to the backlog.
5. Click **Add** to add the new user story to the backlog.
![](images/008.png)
<img src="images/008.png" />
1. Work items on the product backlog are ordered based on priority with high priority items at the top. Our new work item has a high priority so move it to the top of the list by dragging and dropping it into place.
6. Work items on the product backlog are ordered based on priority with high priority items at the top. Our new work item has a high priority so move it to the top of the list by dragging and dropping it into place.
![](images/009.png)
<img src="images/009.png" />
1. Lets edit the new user story to assign it to the appropriate product owner and record an initial estimate of expected effort. **Double-click** the new user story.
7. Lets edit the new user story to assign it to the appropriate product owner and record an initial estimate of expected effort. **Double-click** the new user story.
![](images/010.png)
<img src="images/010.png" />
1. The work item form provides full access to every detail youll ever need for a given work item. Its designed to be responsive so it can adapt to your devices form factor. If you want to make sure youre always aware of this work item changes, you can **Follow** it to get notifications.
8. The work item form provides full access to every detail youll ever need for a given work item. Its designed to be responsive so it can adapt to your devices form factor. If you want to make sure youre always aware of this work item changes, you can **Follow** it to get notifications.
![](images/011.png)
<img src="images/011.png" />
1. You can also fill out many of the extended text fields using rich text. For example, locate the **Discussion** panel and type **“Customers have been asking about this forever!”**. You can then highlight **“forever”** and press **Ctrl+B** to emphasize it.
9. You can also fill out many of the extended text fields using rich text. For example, locate the **Discussion** panel and type **“Customers have been asking about this forever!”**. You can then highlight **“forever”** and press **Ctrl+B** to emphasize it.
![](images/012.png)
<img src="images/012.png" />
1. You can also drag and drop attachments directly onto the work item. Select the **Attachment** tab on the right side of the work item form. Then open an instance of **Windows Explorer** to **C:\Samples** and drag the **storyboard PPTX** file onto the **Attachments** panel.
10. You can also drag and drop attachments directly onto the work item. Select the **Attachment** tab on the right side of the work item form. Then open an instance of **Windows Explorer** to **C:\Samples** and drag the **storyboard PPTX** file onto the **Attachments** panel.
![](images/013.png)
<img src="images/013.png" />
1. Return to the **Details** tab.
11. Return to the **Details** tab.
![](images/014.png)
<img src="images/014.png" />
1. Assign the new item to **Brian Keller** (the product owner for the Fabrikam Fiber Team), set the state to **Approved**, and set an initial effort of **8**. Click **Save & Close**.
12. Assign the new item to **Brian Keller** (the product owner for the Fabrikam Fiber Team), set the state to **Approved**, and set an initial effort of **8**. Click **Save & Close**.
![](images/015.png)
<img src="images/015.png" />
> **Note:** Each team may choose to define the **Effort** value as they see fit, using a unit of story points, hours, days, or number of sodas required. The point here is that this measure is a relative value with respect to other work items. Work will be broken down into hours later.
> **Note:** A popular planning approach that helps to eliminate group think and considers input from all team members is known as planning poker. You can read more about it at [http://en.wikipedia.org/wiki/Planning_poker](http://en.wikipedia.org/wiki/Planning_poker).
1. Assign the new user story to the current iteration, **Iteration 3**, by dragging and dropping it as shown below.
13. Assign the new user story to the current iteration, **Iteration 3**, by dragging and dropping it as shown below.
![](images/016.png)
<img src="images/016.png" />
> **Note:** If you are a Scrum purist, you are probably cringing at the fact that we just added new work to a mid-flight iteration. While this is something you might never do in the real world, this is a shortcut taken for purposes of this lab in order to simplify the workflow and still show you all of the aspects of the project management interface. Well, that and the VP told you to.
1. Look at the **Iteration Path** for the new user story to make sure that it is assigned to **Iteration 3** as expected. This user story will remain on the product backlog until the work has been completed.
14. Look at the **Iteration Path** for the new user story to make sure that it is assigned to **Iteration 3** as expected. This user story will remain on the product backlog until the work has been completed.
![](images/017.png)
<img src="images/017.png" />
1. Open the work item once again and select the **History** tab. Here you can see a complete audit trail of every action performed against this work item, as well as state graph that makes it easy to visualize changes over time. Press **Esc** to dismiss the work item.
15. Open the work item once again and select the **History** tab. Here you can see a complete audit trail of every action performed against this work item, as well as state graph that makes it easy to visualize changes over time. Press **Esc** to dismiss the work item.
![](images/018.png)
<img src="images/018.png" />
1. If you made a mistake when adding a work item, or if the work item simply shouldnt be part of the backlog for any reason, you can drag it to the **Recycle Bin**. Drag the item you just created onto the **Recycle Bin**. Then click the **Recycle Bin** to view its contents.
16. If you made a mistake when adding a work item, or if the work item simply shouldnt be part of the backlog for any reason, you can drag it to the **Recycle Bin**. Drag the item you just created onto the **Recycle Bin**. Then click the **Recycle Bin** to view its contents.
![](images/019.png)
<img src="images/019.png" />
1. Right now it only contains the item you just deleted. Fortunately, you can right-click the item and select **Restore** to put it back where it belongs. Confirm the restoration when asked.
17. Right now it only contains the item you just deleted. Fortunately, you can right-click the item and select **Restore** to put it back where it belongs. Confirm the restoration when asked.
![](images/020.png)
<img src="images/020.png" />
1. Its now time to return to the backlog. However, since youre in the **Recycle Bin**, theres no direct path. Fortunately, TFS now supports a variety of **keyboard shortcuts** that make rapid navigation as easy as possible. Press the “**?”** key (probably **Shift+/**) on your keyboard to view the available options.
18. Its now time to return to the backlog. However, since youre in the **Recycle Bin**, theres no direct path. Fortunately, TFS now supports a variety of **keyboard shortcuts** that make rapid navigation as easy as possible. Press the “**?”** key (probably **Shift+/**) on your keyboard to view the available options.
![](images/021.png)
<img src="images/021.png" />
1. The shortcut to the backlog is the **l** (lowercase “L”) key. Press it now to go there.
19. The shortcut to the backlog is the **l** (lowercase “L”) key. Press it now to go there.
1. The product backlog view also provides a velocity chart that shows the amount of work that the team has undertaken in each sprint, with the current sprint breaking that down further to differentiate between work in progress and work completed. Click the mini chart in the upper-right corner to load the larger view.
20. The product backlog view also provides a velocity chart that shows the amount of work that the team has undertaken in each sprint, with the current sprint breaking that down further to differentiate between work in progress and work completed. Click the mini chart in the upper-right corner to load the larger view.
![](images/022.png)
<img src="images/022.png" />
1. During _Iteration 1_, the team completed 35 story points worth of effort. _Iteration 2_ was more productive with 49 story points completed. The current iteration, represented by _Iteration 3_, shows that we do not currently have any work items in the Committed state. Remember that these story points are a relative measure of effort that was agreed upon by the team.
21. During _Iteration 1_, the team completed 35 story points worth of effort. _Iteration 2_ was more productive with 49 story points completed. The current iteration, represented by _Iteration 3_, shows that we do not currently have any work items in the Committed state. Remember that these story points are a relative measure of effort that was agreed upon by the team.
![](images/023.png)
<img src="images/023.png" />
1. Press the **Esc** key to close the velocity chart.
22. Press the **Esc** key to close the velocity chart.
1. The product backlog view also groups the past, current, and future iterations by their assigned dates. Click **Iteration 3** so that we can break down work and assign it to the appropriate team members.
23. The product backlog view also groups the past, current, and future iterations by their assigned dates. Click **Iteration 3** so that we can break down work and assign it to the appropriate team members.
![](images/024.png)
<img src="images/024.png" />
1. Before we break down the new user story, lets take a quick tour of this iteration backlog view. To start with, it shows all user stories and associated tasks that are assigned to the selected iteration, regardless of state.
24. Before we break down the new user story, lets take a quick tour of this iteration backlog view. To start with, it shows all user stories and associated tasks that are assigned to the selected iteration, regardless of state.
![](images/025.png)
<img src="images/025.png" />
1. At a glance, you can see that the current iteration runs from July 1 to 12, with four work days remaining. Just to the right of the current iteration date range, there is a small graph showing the burn down of the remaining work.
25. At a glance, you can see that the current iteration runs from July 1 to 12, with four work days remaining. Just to the right of the current iteration date range, there is a small graph showing the burn down of the remaining work.
**![](images/026.png)**
<img src="images/026.png" />
1. Click the burn down graph to view it. The graph shows remaining work over the course of the iteration. It also provides insight for the **Available Capacity** that can be applied to the work (total work hours remaining across resources).
26. Click the burn down graph to view it. The graph shows remaining work over the course of the iteration. It also provides insight for the **Available Capacity** that can be applied to the work (total work hours remaining across resources).
![](images/027.png)
<img src="images/027.png" />
1. Press the **Esc** key to close the burn down graph.
27. Press the **Esc** key to close the burn down graph.
<a name="Ex1Task3"></a>
### Task 3: Team Capacity Planning ###
### Task 3: Team Capacity Planning
1. Locate the overall **Work** bar that shows how close to capacity we are for the current iteration based on the total of the Remaining Work for the tasks in this iteration and based on the total capacity for the team. It looks like we are okay now, but we still havent broken the new user story into tasks for the team yet.
![](images/028.png)
<img src="images/028.png" />
1. Select the **Capacity** tab to review the team capacity details.
2. Select the **Capacity** tab to review the team capacity details.
![](images/029.png)
1. The capacity view allows us to specify the number of hours per day that each team member will be working on this project, days off per team member, and overall team days off. These capacity settings apply to the current iteration. You can optionally use the activity column to describe the disciplines that each team member specializes in. When tasks are broken down by activity as well, it can provide another view across your teams capacity to determine if, for example, you have enough people working on documentation to meet the demands for this iteration. For now, leave the capacity settings unmodified.
3. The capacity view allows us to specify the number of hours per day that each team member will be working on this project, days off per team member, and overall team days off. These capacity settings apply to the current iteration. You can optionally use the activity column to describe the disciplines that each team member specializes in. When tasks are broken down by activity as well, it can provide another view across your teams capacity to determine if, for example, you have enough people working on documentation to meet the demands for this iteration. For now, leave the capacity settings unmodified.
![](images/030.png)
1. Return to the **Backlog** view for the current iteration.
4. Return to the **Backlog** view for the current iteration.
![](images/031.png)
1. Lets say that the decision is made to proceed with committing to the new work item. Return to the **Iteration 3** backlog view. Click the button with the **+** symbol in it to the left of the new user story to add a new task. This will become a child task of the user story and will be used to help describe the implementation details required to complete this user story.
5. Lets say that the decision is made to proceed with committing to the new work item. Return to the **Iteration 3** backlog view. Click the button with the **+** symbol in it to the left of the new user story to add a new task. This will become a child task of the user story and will be used to help describe the implementation details required to complete this user story.
![](images/032.png)
1. For the new task, enter “**Consume OData feed for weather alerts**” for the Title, assign it to **Brian Keller**, and set the Remaining Work to **8** hours.
6. For the new task, enter “**Consume OData feed for weather alerts**” for the Title, assign it to **Brian Keller**, and set the Remaining Work to **8** hours.
![](images/033.png)
1. Select the **Links** tab and you can see that this task has already been linked to its parent work item.
7. Select the **Links** tab and you can see that this task has already been linked to its parent work item.
![](images/034.png)
1. Click **Save & Close**.
8. Click **Save & Close**.
![](images/035.png)
1. Note that the new task was added as a child of the user story and that the overall team work bar has turned red indicating that we have too much work assigned based on capacity.
9. Note that the new task was added as a child of the user story and that the overall team work bar has turned red indicating that we have too much work assigned based on capacity.
![](images/036.png)
1. It looks like the bug has not been worked on yet, so this may be a good candidate to reschedule for a future iteration so that the team can get back on track given their additional workload. Drag and drop the bug onto **Iteration 4** on the left-hand side of the window.
10. It looks like the bug has not been worked on yet, so this may be a good candidate to reschedule for a future iteration so that the team can get back on track given their additional workload. Drag and drop the bug onto **Iteration 4** on the left-hand side of the window.
![](images/037.png)
1. Take another look at the overall **Work** bar once again to make sure it is now green. This means that we are within the current team capacity. Just dont tell the VP, or he might find another high-priority request for us to work on!
11. Take another look at the overall **Work** bar once again to make sure it is now green. This means that we are within the current team capacity. Just dont tell the VP, or he might find another high-priority request for us to work on!
![](images/038.png)
<a name="Ex1Task4"></a>
### Task 4: Working with the Task Board ###
1. Now that we have finished breaking down the work and assigning it to team members, lets take a look at the task board that will be used in the next stand-up team meeting to report and record progress. Select the **Board** tab from Iteration 3.
![](images/039.png)
1. By default, the task board shows all tasks for the current iteration grouped by product backlog item and by the current state. Drag and drop the “**Consume OData feed for weather alerts**” task to the **In Progress** column.
2. By default, the task board shows all tasks for the current iteration grouped by product backlog item and by the current state. Drag and drop the “**Consume OData feed for weather alerts**” task to the **In Progress** column.
![](images/040.png)
> **Note:** The task board is touch enabled as well. This will not work within this virtual machine, but you might want to put in your request now for that nice wall-mounted touch-screen monitor you have been desiring for your team.
1. **Single-click** the **8** value shown on the “**Consume OData feed for weather alerts**” task and change the Remaining Work to **5** to simulate Brian working on the task during the day.
3. **Single-click** the **8** value shown on the “**Consume OData feed for weather alerts**” task and change the Remaining Work to **5** to simulate Brian working on the task during the day.
![](images/041.png)
1. The new high-priority task is now in progress with an estimated 5 hours of work left to go.
4. The new high-priority task is now in progress with an estimated 5 hours of work left to go.
![](images/042.png)
1. Drag and drop the task titled “**Create database for branch office location lookup**” to the **Done** column to record that work as completed. Note that the remaining work is automatically reduced to **0**.
5. Drag and drop the task titled “**Create database for branch office location lookup**” to the **Done** column to record that work as completed. Note that the remaining work is automatically reduced to **0**.
![](images/043.png)
1. Notice that the burn down chart in the top-right corner is automatically updated after you made changes on the task board. Click the burn down chart and note that there is about 15 hours of effort left in order to complete the work for the iteration.
6. Notice that the burn down chart in the top-right corner is automatically updated after you made changes on the task board. Click the burn down chart and note that there is about 15 hours of effort left in order to complete the work for the iteration.
![](images/044.png)
1. Close the burn down chart.
7. Close the burn down chart.
1. Note that each row representing a work item shows a rollup of hours remaining, which is a sum of remaining work for all child tasks. In addition to that each column representing a status has a rollup of remaining work giving you a good idea of how much work the team is actively working on right now.
8. Note that each row representing a work item shows a rollup of hours remaining, which is a sum of remaining work for all child tasks. In addition to that each column representing a status has a rollup of remaining work giving you a good idea of how much work the team is actively working on right now.
![](images/045.png)
1. The task board also groups by team members. Select the **People** grouping option in the top-right of the task board view.
9. The task board also groups by team members. Select the **People** grouping option in the top-right of the task board view.
![](images/046.png)
1. This view makes it easy to see what team members are currently working on and how much effort remains for each for the remainder of the current iteration.
10. This view makes it easy to see what team members are currently working on and how much effort remains for each for the remainder of the current iteration.
![](images/047.png)
1. Click **Backlog Items** to return to the backlog portfolio for the team.
11. Click **Backlog Items** to return to the backlog portfolio for the team.
<a name="![](images/048.png)"></a>
## ![](images/048.png) ##
![](images/048.png)
<a name="Exercise2"></a>
## Exercise 2: Agile Portfolio Management ##
In this exercise, you will learn about some of the agile portfolio management capabilities provided by Team Foundation Server. These capabilities allow larger organizations to understand the scope of work across several teams and see how that work rolls up into broader initiatives. In this exercise, you will explore how multiple teams at Fabrikam Fiber can collaborate together to work on features.
<a name="Ex2Task1"></a>
### Task 1: Configuring Team Hierarchy and Area Paths ###
1. Lets start out by taking a look at the Fabrikam Fiber project from the top-down, in a manner that would typically be associated with a management role.
@ -321,12 +304,10 @@ In this exercise, you will learn about some of the agile portfolio management ca
![](images/055.png)
1. Select **Work | Backlogs** to return to the backlog visible to the leadership team.
1. Select **Work \| Backlogs** to return to the backlog visible to the leadership team.
<a name="![](images/056.png)"></a>
### ![](images/056.png) ###
![](images/056.png)
<a name="Ex2Task2"></a>
### Task 2: Portfolio Management ###
1. The leadership team can see backlog items across all teams, including status and scheduled iteration.
@ -413,24 +394,22 @@ In this exercise, you will learn about some of the agile portfolio management ca
1. Click the **Expand** button twice in order to expand the features backlog two levels. Note that it is easy to distinguish between work that the database team is contributing to or is assigned, and work that is assigned to other teams by looking at the colored bar. If the bar is hollow (not filled in), this means that the work is assigned to a different team.
<a name="![](images/077.png)"></a>
## ![](images/077.png) ##
![](images/077.png)
<a name="Exercise3"></a>
## Exercise 3: Flexibility of Agile Tools ##
In the previous exercise, you learned about how Team Foundation Server can scale to meet the needs of larger teams working towards common goals. This approach requires that everybody in the organization uses the same team project within Team Foundation Server and therefore the same process template (which defines the way work items and their workflows are defined). Understanding this, Microsoft has begun to allow individual teams to customize certain aspects of the ways in which they manage and track their work without requiring centralized changes to their process templates.
In this exercise, you will learn more about Kanban and how it contributes to the flexibility of the agile toolset. You will also learn about work item tagging. Both of these features can be utilized and customized independently by different teams, without making changes to the underlying process template.
<a name="Ex3Task1"></a>
### Task 1: Introduction to Kanban Tools ###
1. The **Kanban** board was first introduced with Team Foundation Server 2012 Update 1. Kanban is a process improvement tool that can be used in an incremental fashion regardless of the current software development methodology that you are using. It assists with the throttling and tracking of work and illustrates the delivery of value over time to the project stakeholders. Each backlog has its own Kanban board, and each team has its own view of that.
1. Navigate to the **Fabrikam Fiber Devices Team** using the navigation as before.
![](images/078.png)
![](images/078.png)
![](images/079.png)
@ -594,10 +573,8 @@ In this exercise, you will learn more about Kanban and how it contributes to the
1. Note that the bug card is now colored red to indicate its critical severity.
<a name="![](images/117.png)"></a>
### ![](images/117.png) ###
![](images/117.png)
<a name="Ex3Task2"></a>
### Task 2: Kanban prioritization ###
1. As cards are reordered within a column on the Kanban board, their relative priorities are adjusted in the backlog. Select the **Backlog** tab and notice that the “Technician can see service tickets…” work item is prioritized above “Technician can report busy/late…”.
@ -632,10 +609,8 @@ In this exercise, you will learn more about Kanban and how it contributes to the
1. In addition to viewing by backlog items, you can also view the Kanban board relative to features. Click **Features** to switch the board mode. You can then click on the **Backlog Item** annotations to expand their checklists.
<a name="![](images/125.png)"></a>
### ![](images/125.png) ###
![](images/125.png)
<a name="Ex3Task3"></a>
### Task 3: Work Item Tagging ###
1. **Work item tagging** allows you to easily categorize, query and filter lists of work items.
@ -684,15 +659,13 @@ In this exercise, you will learn more about Kanban and how it contributes to the
> **Note:** Additional filtering can be done by selecting another tag (if there are any in this filtered subset). To remove the filter, simply click the Filter button once again.
<a name="Exercise4"></a>
## Exercise 4: Work Item Charting ##
In this exercise, we will demonstrate the work item charting capability of Team Foundation Server. Work item charting allows you to create visual chart representations of the data returned from TFS work item queries. This can be used to help better understand the state of projects.
<a name="Ex4Task1"></a>
### Task 1: Creating and Sharing Work Item Charts ###
1. Lets say that the Fabrikam Fiber management team would like to better understand how tasks are broken down by user. Navigate to the work item queries section of the web portal. Select **Work | Queries**.
1. Lets say that the Fabrikam Fiber management team would like to better understand how tasks are broken down by user. Navigate to the work item queries section of the web portal. Select **Work \| Queries**.
![](images/135.png)
@ -762,16 +735,14 @@ In this exercise, we will demonstrate the work item charting capability of Team
![](images/151.png)
1. These lightweight charts can also be pinned to a dashboard. Click the **Tasks by Team** charts ellipses button and select **Add to dashboard | Overview**. This dashboard is used on the projects home page.
1. These lightweight charts can also be pinned to a dashboard. Click the **Tasks by Team** charts ellipses button and select **Add to dashboard \| Overview**. This dashboard is used on the projects home page.
![](images/152.png)
1. Click the **Home** link to return to the leadership teams homepage and view the pinned chart.
<a name="![](images/153.png)"></a>
### ![](images/153.png) ###
![](images/153.png)
<a name="Ex4Task2"></a>
### Task 2: Customizing Dashboard ###
1. You can also customize a dashboard by clicking the **Edit** button in the bottom right corner. This will switch the dashboard into **edit mode**. You need to be in edit mode in order to rearrange the dashboard or make configuration changes, which removes the risk of accidental edits during normal usage.

Двоичные данные
labs/tfs/appinsights/images/047.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Просмотреть файл

@ -10,33 +10,29 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
[Visual Studio Application Insights](https://azure.microsoft.com/services/application-insights) is an extensible analytics service that helps you understand the performance and usage of your live web application. It's designed for developers, to help you continuously improve the performance and usability of your app. It works with web apps on .NET or J2EE, hosted on-premises or in the cloud. You can also apply it to Windows background services and desktop apps.
In this lab we will start with a fresh ASP.NET application and explore how you can instrument it with Application Insights. This will make it easier to track site usage and patterns, as well as to detect, diagnose, and triage issues related to performance and more.
<a name="Prerequisites"></a>
### Prerequisites ###
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
You will also need an Azure account, which you can set up at [http://azure.com](http://azure.com/).
<a name="Exercise1"></a>
## Exercise 1: Instrumenting with Application Insights ##
<a name="Ex1Task1"></a>
### Task 1: Adding Application Insights to an ASP.NET Application ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
1. Launch **Visual Studio** from the taskbar.
1. Select **File | New | Project** from the main menu.
1. Select **File \| New \| Project** from the main menu.
1. From the **Visual C# | Web** section, select the **ASP.NET Web Application (.NET Framework)** template and enter a **Name** of **“AppInsightsLab”**. Click **OK** to continue.
1. From the **Visual C# \| Web** section, select the **ASP.NET Web Application (.NET Framework)** template and enter a **Name** of **“AppInsightsLab”**. Click **OK** to continue.
![](images/000.png)
@ -96,10 +92,8 @@ You will also need an Azure account, which you can set up at [http://azure.com](
1. Finally, **packages.config** has been updated to reflect the NuGet packages and **Web.config** has been updated to reflect the assembly references.
<a name="![](images/014.png)"></a>
### ![](images/014.png) ###
![](images/014.png) ###
<a name="Ex1Task2"></a>
### Task 2: Tracking usage data ###
1. Press **F5** to build and run the project. Navigate around the site for a few pages using the navigation links at the top to generate traffic. Be sure to visit the **Contact** page.
@ -124,10 +118,9 @@ You will also need an Azure account, which you can set up at [http://azure.com](
1. The **Track Operation** tab provides the details and timeline of the steps involved in the request. In this case, its a pretty simple single-step operation that succeeded.
<a name="![](images/020.png)"></a>
### ![](images/020.png) ###
![](images/020.png) ###
<a name="Ex1Task3"></a>
### Task 3: Working with the Application Insights Portal ###
1. Open a new browser window (not a new tab in the debug browser window) and navigate to [https://portal.azure.com](https://portal.azure.com/). The portal provides even more functionality.
@ -202,10 +195,10 @@ You will also need an Azure account, which you can set up at [http://azure.com](
1. Besides the **Server**, the **Client** also has a dependency on **AJAX** requests, which you can see here.
<a name="![](images/038.png)"></a>
### ![](images/038.png) ###
<a name="Ex1Task4"></a>
![](images/038.png) ###
### Task 4: Tracking exceptions ###
1. Return the **Solution Explorer** in **Visual Studio** and double-click **Controllers\HomeController.cs** to open that file.
@ -283,7 +276,7 @@ You will also need an Azure account, which you can set up at [http://azure.com](
1. Close the debug app browser window.
<a name="Ex1Task5"></a>
### Task 5: Integrating telemetry ###
1. Add the following code inside the **About** method. This will track a server-side custom event every time someone visits **Home/About**.

Двоичные данные
labs/tfs/architecturevalidation/images/01.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 36 KiB

Двоичные данные
labs/tfs/architecturevalidation/images/02.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 22 KiB

Двоичные данные
labs/tfs/architecturevalidation/images/03.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 112 KiB

Двоичные данные
labs/tfs/architecturevalidation/images/04.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 27 KiB

Двоичные данные
labs/tfs/architecturevalidation/images/1.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 7.8 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 44 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 35 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 59 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 46 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 27 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 28 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 60 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 63 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 90 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 109 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 33 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 26 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 55 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 391 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 41 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 128 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 86 KiB

Просмотреть файл

@ -1,117 +0,0 @@
---
title: Code Discovery using Live Dependency Validation in Visual Studio Enterprise 2017
layout: page
sidebar: tfs
permalink: /labs/tfs/architecturevalidation/
folder: /labs/tfs/architecturevalidation/
---
Lab version: 15.0.26020.0
Last updated: 2/19/2017
## Overview
Visual Studio enables teams to validate architectural dependencies in their solutions using the [Layer Designer](https://msdn.microsoft.com/en-us/library/dd465141.aspx).
It first shipped in Visual Studio 2010. The experience of the Layer Designer has been improved in Visual Studio 2017 with the introduction Dependency Validation experience to help ensure that developers respect the architectural constraints of the application as they edit their code.
In Visual Studio 2017 we have re-written the validation code to use **Roslyn analyzers**, which not only fixes many of these issues that were in the previous versions, but also gives us live validation in the IDE. As you type you get issues, and squiggles in the editor, and you can immediately stop introducing architectural flaws.
Weve also renamed layer diagrams to **dependency validation** diagrams to make it clearer what they are for.
## Related Resources
- Read this [Blog Post](https://blogs.msdn.microsoft.com/visualstudioalm/2016/11/30/live-dependency-validation-in-visual-studio-2017/) for a detailed discussion comparing the new experience with the past
## Pre-requisites
- Visual Studio 2017 (download [here](https://www.visualstudio.com/vs/visual-studio-2017-rc/))
- Download the Parts Unlimited project [here](https://github.com/Microsoft/PartsUnlimited/tree/aspnet45)
### Task 1: Real Time Dependency Validation in Visual Studio 2017
1. Download and extract the zip file
2. Open the solution in Visual Studio 2017
3. Right click on the **Parts Unlimited** solution and click **Restore Nuget Packages**. Make sure your project builds locally without any issues
<img src="images/01.png">
4. Now that we have a clean solution, I have opened the solution in my **Visual Studio 2017**. A Dependency Validation diagram was created by a code expert before he left for his retirement, and it describes the design principles he enforced, and want them to be enforced in future changes. I was asked to add a feature, and I understand what to do. I will edit some code to add a feature.
The below diagram indicates **Dependency Validation** for Parts Unlimited
<img src="images/02.png">
5. I'm trying to access **HomeController** under **Controllers**, from the **Category** class under **Models** by instantiating it in the constructor, but I am notified early with a clear message as to what I am trying to do is violating architectural constraints as shown below-
<img src="images/03.png">
This validation is well integrated in the **Error List**, which means I can use all the filters and sorting capabilities. This is implemented as a **static analyzer** and therefore I can change the severity of the error to a warning if I want to.
### Task 2: Creating Validation Diagrams in Visual Studio 2017
Now that we have seen what the developer experience is in the editor, let's see how to create a dependency diagram.
1. Load the Parts Unlimited solution
2. Go to **Architecture** tab in your Visual Studio and select **New Dependency Validation Diagram** as shown below. You should see a new project being added in your **Solution Explorer**
<img src="images/image13.png">
3. You will be prompted with a new window, give the name and select **ok**. You will be prompted with an **update** in your **Solution Explorer**. Update the project to enable **Live Dependency** by clicking on the **update** button
<img src="images/image14.png">
<img src="images/image15.png">
Your Project is amended to enable the **Live Validation**, in particular **Rosyln analyzer** is provisioned as a Nuget package.
4. Open the file **YOURFILENAME.layerdiagram** in your Visual Studio from the Solution Explorer as shown below
<img src="images/image16.png">
5. Let's add layers. A simple way to do this is by drag & drop from **Solution Explorer or Class View**.
Drag and drop the **controllers & models** from the solution explorer and add a **dependency** from the toolbox as shown below
<img src="images/image17.png">
6. Let's test now. Open the file **Category.cs** from **Models** and add the following code
**using PartsUnlimited.Controllers;**
**HomeController c;**
You can see that, I immediately get red squiggly and an error that clearly explains that this reference is not allowed.
<img src="images/image18.png">
7. Now try building the solution you will see that failure of dependency validation gets flagged as build errors.
<img src="images/image19.png">
8. You can convert these **errors** to **warnings** by updating the rule settings. Right click and select **Open Active Rule Set** from the **Analyzers node** under **PartsUnlimitedWebsite** as shown
<img src="images/image20.png">
9. You can now change the error level for all or select a set of dependency validation checks. Let's change the **Invalid Dependency** rule to **Warning** as shown below
<img src="images/image21.png">
10. Now rebuild the solution. You can see that the build succeeds with **warnings**
<img src="images/image22.png">
Once the code is committed to the source control repository, this will enable the whole team to benefit from the dependency validation **(including in Visual Studio Pro and Community where dependency diagrams cannot be created but can be viewed as read-only)**. The dependency validation will also happen during **Continuous Integration** builds and if you install the **[SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube)** plugin for Dependency Validation, you will even see the architectural flaws in SonarQube.

Просмотреть файл

@ -10,29 +10,18 @@ Lab version:15.0.26228.0
Last updated:3/1/2017
<a name="Overview"></a>
## Overview ##
In this lab, you will be introduced to the branching and merging visualization support in Visual Studio Team Foundation Server 2017. This support makes it much easier to understand a solution branch hierarchy and to propagate changes during the merge process.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people, has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Working with Team Foundation Server Code Branches ##
In this exercise, you will learn about some of the code branching features in Team Foundation Server, as well as how to open a solution that corresponds to a specific code branch. In addition, this exercise will serve as the setup for a scenario where production code needs to be updated with changes that are ultimately merged through active branches in the system.
<a name="Ex1Task1"></a>
### Task 1: Updating a Source Control Branch ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -49,7 +38,7 @@ In this exercise, you will learn about some of the code branching features in Te
![](images/002.png)
1. Expand the **Releases** node and right-click **Release1** to select **Advanced |Properties** from the context menu.
1. Expand the **Releases** node and right-click **Release1** to select **Advanced \|Properties** from the context menu.
![](images/003.png)
@ -63,7 +52,7 @@ In this exercise, you will learn about some of the code branching features in Te
![](images/005.png)
1. Rebuild the solution (**Build | Rebuild Solution** from the main menu).
1. Rebuild the solution (**Build \| Rebuild Solution** from the main menu).
1. Ensure that the **FabrikamFiber.Web** project is set as the startup project (**right-click** and select **Set as StartUp Project** in **Solution Explorer**).
@ -97,7 +86,6 @@ In this exercise, you will learn about some of the code branching features in Te
1. In the next task, we will merge the changes to the other branches.
<a name="Ex1Task2"></a>
### Task 2: Branching and Merging Visualization ###
In this task, you will learn how to visualize and track changesets while merging the changes that you made in the previous exercise.
@ -168,7 +156,7 @@ In this task, you will learn how to visualize and track changesets while merging
![](images/025.png)
1. In **Solution Explorer**, navigate to and right-click **_Profile.cshtml** to select **Source Control | Annotate** from the context menu.
1. In **Solution Explorer**, navigate to and right-click **_Profile.cshtml** to select **Source Control \| Annotate** from the context menu.
1. Scroll to the bottom of the annotated **_Profile.cshtml** file and locate the HTML that you previously commented out.

Просмотреть файл

@ -10,29 +10,20 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
In this lab, you will learn how to use the new Team Foundation Build in order to build, test, and deploy your applications. This new scriptable build system is both web-based and cross-platform, and Microsoft recommends using it instead of the XAML build system whenever feasible. Although we wont demonstrate all of the cross-platform possibilities in this lab, it is important to point out that you can also build for iOS, Android, Java (using Ant, Maven, or Gradle), and Linux.
<a name="Prerequisites"></a>
### Prerequisites ###
## Prerequisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Build Agent Pools and Queues ##
In this exercise, you will learn how to create and configure build agent pools and queues in order to support the new agents in Team Foundation Build 2017 (formerly referred to as Build vNext). This new scriptable build system is web-based and cross-platform, and is recommended for all new and existing builds going forward.
<a name="Ex1Task1"></a>
### Task 1: Touring the Build Hub in TFS Web Access ###
1. Log in as **Deniz Ercoskun (VSALM\Deniz)**. All user passwords are **P2ssw0rd**.
@ -53,7 +44,6 @@ In this exercise, you will learn how to create and configure build agent pools a
1. Well return to this view shortly once we are ready to translate the existing XAML build to the new system, but first we need to configure the infrastructure necessary for the new build system.
<a name="Ex1Task2"></a>
### Task 2: Creating an Agent Pool ###
1. The first thing that we need to do is to setup an agent pool for the project. This pool can contain both Windows and cross-platform agents.
@ -80,7 +70,6 @@ In this exercise, you will learn how to create and configure build agent pools a
1. Close the pool management tab. This should leave you with a single queue management tab.
<a name="Ex1Task3"></a>
### Task 3: Creating a Build Queue ###
1. Before we continue with the installation of an agent, lets also ensure that we set up our team project collection with a build **queue** that points to the default agent pool. Since queues are scoped to your team project collection, you can share them across build definitions and team projects.
@ -111,10 +100,8 @@ In this exercise, you will learn how to create and configure build agent pools a
1. Select the **Build and Release** tab. From here, you can specify the default and maximum settings for how long the system retains completed builds. The default retention policy is set at 10 days, with the maximum at 30 days. This means that regardless of what is set on the individual build definition all builds that have not been marked to "Retain indefinitely" will be deleted 30 days after they complete.
<a name="![](images/014.png)"></a>
### ![](images/014.png) ###
![](images/014.png)
<a name="Ex1Task4"></a>
### Task 4: Installing and Configuring an Agent ###
1. Wait for the agent download to finish if it has not already. Unzip it to **c:\agent** when complete.
@ -159,15 +146,13 @@ In this exercise, you will learn how to create and configure build agent pools a
1. Select the **Capabilities** tab to take note of the System Capabilities list shown for the agent. System capabilities are name/value pairs that you can use to ensure that your build definition is only run by build agents that meet specified criteria. Environment variables automatically appear in the list. Some additional capabilities (such as .NET Frameworks) are also added automatically. You can also add your own capabilities to the list based on additional requirements for your builds. Later, when a build is queued, the system sends the job only to agents that have the capabilities demanded by the build definition.
<a name="![](images/018.png)"></a>
## ![](images/018.png) ##
![](images/018.png)
<a name="Exercise2"></a>
## Exercise 2: Build Definitions ##
In this exercise, you will learn how to create a basic build definition from one of the provided templates and then queue the build for execution.
<a name="Ex2Task1"></a>
### Task 1: Creating a Basic Build Definition from Template ###
1. Now it is time to create a new build definition for the Fabrikam Fiber team. Navigate to the web teams section of the portal using the project dropdown.
@ -278,10 +263,8 @@ In this exercise, you will learn how to create a basic build definition from one
1. Click **Save**. Name the new build definition “**Fabrikam Development Build**” and click **OK**.
<a name="![](images/043.png)"></a>
### ![](images/043.png) ###
![](images/043.png)
<a name="Ex2Task2"></a>
### Task 2: Queuing and Executing a Build ###
1. Click **Queue new build**.
@ -294,15 +277,14 @@ In this exercise, you will learn how to create a basic build definition from one
1. Note that once the build starts, you can monitor the real-time build status in the live console view. As the Test step proceeds, you will see some red error text as there are some tests in this project that are designed to fail for demonstration purposes. At the end of the build you should see the message in orange displaying “Build Partially succeeded”. Note that you may need to refresh the browser if the build hasnt started yet.
<a name="![](images/046.png)"></a>
## ![](images/046.png) ##
![](images/046.png)
<a name="Exercise3"></a>
## Exercise 3: Continuous Integration and Deployment ##
In this exercise, you will learn how to modify a build to support continuous integration. In addition, you will also learn about some of the deployment options available.
<a name="Ex3Task1"></a>
### Task 1: Cloning a Build Definition ###
1. Now lets create a similar build definition, but this time include a step to deploy the Fabrikam Fiber website. Imagine that this build definition will be part of a continuous integration scenario.
@ -315,7 +297,7 @@ In this exercise, you will learn how to modify a build to support continuous int
![](images/048.png)
<a name="Ex3Task2"></a>
### Task 2: Adding a Deployment Step and Defining Machine Group ###
1. Click Add build step.
@ -343,10 +325,8 @@ In this exercise, you will learn how to modify a build to support continuous int
1. Select the **Clean Target** option under **Advanced Options** so that the copy location will be cleaned before each deployment.
<a name="![](images/052.png)"></a>
### ![](images/052.png) ###
![](images/052.png)
<a name="Ex3Task3"></a>
### Task 3: Configuring Continuous Integration ###
1. Now lets get the continuous integration functionality hooked up. Select the **Triggers** tab and check the **Continuous integration** option.
@ -365,10 +345,8 @@ In this exercise, you will learn how to modify a build to support continuous int
1. Click **Save**. Name the new build “**Fabrikam Development CI Build**” and then click **OK**.
<a name="![](images/056.png)"></a>
### ![](images/056.png) ###
![](images/056.png)
<a name="Ex3Task4"></a>
### Task 4: Triggering a Continuous Integration Build ###
1. In a new browser window or tab, navigate to the **Code** tab.

Просмотреть файл

@ -10,29 +10,18 @@ Lab version:15.0.26228.0
Last updated:3/1/2017
<a name="Overview"></a>
## Overview ##
The Code Analysis feature of Visual Studio performs static code analysis to help developers identify potential design, globalization, interoperability, performance, security, and a host of other categories of potential problems. Code Analysis can be run manually at any time from within the Visual Studio IDE, or even setup to automatically run as part of a Team Build or check-in policy for Team Foundation Server.
In this lab, you will be introduced to Code Analysis, how to configure rules sets to use, and finally how to suppress specific rules at a project and source code level.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Introduction to Code Analysis ##
<a name="Ex1Task1"></a>
### Task 1: Working with Code Analysis ###
1. In this exercise, you will learn about the Code Analysis features in Visual Studio 2017 by configuring the rule set used, performing code analysis on a sample project, and **addressing** some of the warnings that are raised.
@ -45,7 +34,7 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
![](images/000.png)
1. Select **Build | Rebuild Solution** from the main menu to build the solution.
1. Select **Build \| Rebuild Solution** from the main menu to build the solution.
1. In **Solution Explorer**, right-click the **FabrikamFiber.Web** project node and select **Properties**.
@ -63,7 +52,7 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
> **Note:** If you are interested in learning how to create custom rule sets, please see [this](http://msdn.microsoft.com/en-us/library/dd264974.aspx) MSDN documentation.
1. In **Solution Explorer**, right-click the **FabrikamFiber.Web** project node and select **Analyze** | **Run Code Analysis**.
1. In **Solution Explorer**, right-click the **FabrikamFiber.Web** project node and select **Analyze** \| **Run Code Analysis**.
![](images/004.png)
@ -91,7 +80,6 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
1. Run the code analysis once again to verify that the warning disappears as expected. There should be one less warning than before.
<a name="Ex1Task2"></a>
### Task 2: Suppressing Code Analysis Warnings ###
1. In this exercise, you will learn how to suppress Code Analysis warnings at the project and source level.
@ -100,7 +88,7 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
1. In the **Error List** window, select the first three warnings by clicking the first, holding the **Shift** key, and clicking the third. Imagine that we do not want to address the selected issues and no longer want them to appear when Code Analysis executes.
1. **Right-click** the selected warnings and select **Suppress | In Suppression File** from the context menu. This will add assembly level metadata to a project level **GlobalSuppressions.cs** file.
1. **Right-click** the selected warnings and select **Suppress \| In Suppression File** from the context menu. This will add assembly level metadata to a project level **GlobalSuppressions.cs** file.
![](images/009.png)

Просмотреть файл

@ -2,46 +2,42 @@
title: UI Automation using Coded UI Tests with Visual Studio Enterprise 2017
layout: page
sidebar: tfs
permalink: /labs/tfs/liveunittesting/
folder: /labs/tfs/liveunittesting/
permalink: /labs/tfs/codedui/
folder: /labs/tfs/codedui/
---
Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
Coded UI tests provide a way to create fully automated tests to validate the functionality and behavior of your application's user interface. In this lab, you will gain a basic understanding of coded UI tests by creating a new test and adding validation logic to it.
<a name="Prerequisites"></a>
### Prerequisites ###
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Code Generation using Coded UI Test Builder ##
In this exercise, you will learn how to use the Coded UI Test Builder to generate test code for the Fabrikam Fiber web application.
<a name="Ex1Task1"></a>
### Task 1: Working with the Coded UI Test Builder ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
1. Launch **Visual Studio** from the taskbar.
1. Select **File | New | Project** to create a new testing project.
1. Select **File \| New \| Project** to create a new testing project.
1. In the **New Project** window, select the **Coded UI Test Project** template from **Visual C# | Test**, then click **OK** to create the test project.
1. In the **New Project** window, select the **Coded UI Test Project** template from **Visual C# \| Test**, then click **OK** to create the test project.
![](images/000.png)
@ -101,9 +97,9 @@ In this exercise, you will learn how to use the Coded UI Test Builder to generat
![](images/010.png)
1. Select **Build | Build Solution**.
1. Select **Build \| Build Solution**.
1. Expand the **Test Explorer**. If it's not visible, you can open it from **Test | Windows | Test Explorer**. Click **Run All** to run the test.
1. Expand the **Test Explorer**. If it's not visible, you can open it from **Test \| Windows \| Test Explorer**. Click **Run All** to run the test.
![](images/011.png)

Просмотреть файл

@ -10,24 +10,20 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
Many developers still rely on traditional or live debugging techniques. These are limited in that they only account for your applications current state with limited data about past events. This forces the developer to either guess what happened based on current state or to attempt to recreate these events by re-running the app. Developers then rely on breakpoints to try to capture some of the errors that might appear because of unknown events, but sometimes even a breakpoint wont be able to expose the issue.
IntelliTrace expands this traditional debugging experience by recording specific events and data at these points in time. This lets you see what happened in your application without restarting it, especially if you step past where the bug is. IntelliTrace enables you to seek to a large number of execution points—that occurred in the past—and drill into any of them by comparing variables, call stacks, etc. This makes it much easier to pinpoint the causes of issues without having to restart the application in an attempt to reproduce the problem. IntelliTrace automatically collects various events in your application (e.g. ASP.NET, ADO.NET, etc), which enables you to view the historical state of the application at those points in time.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="Exercise1"></a>
## Exercise 1: Debugging with IntelliTrace ##
In this scenario the business owner has asked us to determine why we are seeing a drop in the sales of particular items from the past few days. We know that the last deployment extended the functionality of the search capabilities of this site. With that hunch in place, well start the investigation there.
<a name="Ex1Task1"></a>
### Task 1: Using IntelliTrace to collect data from production ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -74,16 +70,15 @@ In this scenario the business owner has asked us to determine why we are seeing
```
Stop-IntelliTraceCollection -ApplicationPool PartsUnlimited
```
<a name="Ex1Task2"></a>
### Task 2: Historical debugging ###
1. Open **Windows Explorer** and navigate to **C:\LogFileLocation**. Double-click the **iTrace** file to open it in **Visual Studio 2017**. This file contains all of the IntelliTrace recordings from our session.
![](images/003.png)
1. Since this IntelliTrace session isnt associated with an active solution, youll need to temporarily disable the **Just My Code** feature to get the full experience. From the main menu select **Tools | Options**.
1. Since this IntelliTrace session isnt associated with an active solution, youll need to temporarily disable the **Just My Code** feature to get the full experience. From the main menu select **Tools \| Options**.
1. In the left tree view, locate **Debugging | General** and uncheck the **Enable Just My Code** option in the right panel. Click **OK** to apply.
1. In the left tree view, locate **Debugging \| General** and uncheck the **Enable Just My Code** option in the right panel. Click **OK** to apply.
![](images/004.png)
@ -107,7 +102,7 @@ In this scenario the business owner has asked us to determine why we are seeing
![](images/009.png)
1. In order to better visualize the path that led to this exception, right-click the line of code and select **Code Map | Show Call Stack on Code Map**.
1. In order to better visualize the path that led to this exception, right-click the line of code and select **Code Map \| Show Call Stack on Code Map**.
![](images/010.png)
@ -117,14 +112,13 @@ In this scenario the business owner has asked us to determine why we are seeing
1. We can now tell that the issue here is that were indexing past the end of the query in our call to **Substring**. This could have been a lot harder to find without IntelliSense.
1. Select **Debugging | Stop Debugging** to end the debug session.
1. Select **Debugging \| Stop Debugging** to end the debug session.
1. Select **File | Close Solution** to close all files. Do not save any.
1. Select **File \| Close Solution** to close all files. Do not save any.
<a name="Ex1Task3"></a>
### Task 3: IntelliTrace inside Visual Studio 2017 (“F5” IntelliTrace) ###
1. Select **File | Start Page** to open the **Visual Studio Start Page**.
1. Select **File \| Start Page** to open the **Visual Studio Start Page**.
1. Open the **PartsUnlimited** project.
@ -150,11 +144,11 @@ In this scenario the business owner has asked us to determine why we are seeing
![](images/016.png)
1. If so, it will bring us to the same line. At this point you could optionally export an **iTrace** file for this session that you could share with others via **Debug | IntelliTrace | Save IntelliTrace Session**. This makes it very easy to share the exact circumstances under which an issue occurred so that the developer can easily track it down.
1. If so, it will bring us to the same line. At this point you could optionally export an **iTrace** file for this session that you could share with others via **Debug \| IntelliTrace \| Save IntelliTrace Session**. This makes it very easy to share the exact circumstances under which an issue occurred so that the developer can easily track it down.
![](images/017.png)
1. Select **Debug | Stop Debugging** to end the debug session.
1. Select **Debug \| Stop Debugging** to end the debug session.
1. Update the offending line of code by adding **“- 1”** to the end of **query.Length.**

Просмотреть файл

@ -10,7 +10,6 @@ Lab version:15.0.26228.0
Last updated:3/7/2017
<a name="Overview"></a>
## Overview ##
Visual Studio 2017 introduces a wealth of features and enhancements designed to significantly improve the productivity of developers. Many of these improvements focus on saving time and effort on everyday tasks, such as code navigation, IntelliSense, refactoring, code fixes, and debugging. In this lab, we'll take a quick tour of some of the many benefits.
@ -19,15 +18,12 @@ There are also a wealth of new features and enhancements in Visual Studio 2017 c
For a more exhaustive list of what's new in Visual Studio 2017, please check out the [release notes](https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes).
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="Exercise1"></a>
## Exercise 1: Developer experience enhancements in Visual Studio 2017 ##
<a name="Ex1Task1"></a>
### Task 1: Working with the new modular installer ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -50,7 +46,7 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
![](images/003.png)
1. The new lightweight and componentized installer breaks down Visual Studio into independent workloads that lets you install just what you need, helping you get going much faster. Some workloads have already been installed on the VM, such as **.NET desktop development** and **Web development**. Selecting these workloads ensured that the installer would set up everything needed to perform the task associated with those types of development, which you can view in the **Summary | Individual components** section on the right side.
1. The new lightweight and componentized installer breaks down Visual Studio into independent workloads that lets you install just what you need, helping you get going much faster. Some workloads have already been installed on the VM, such as **.NET desktop development** and **Web development**. Selecting these workloads ensured that the installer would set up everything needed to perform the task associated with those types of development, which you can view in the **Summary \| Individual components** section on the right side.
![](images/004.png)
@ -64,7 +60,6 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. Close all installer windows.
<a name="Ex1Task2"></a>
### Task 2: Boosting your productivity ###
1. Launch **Visual Studio** from the taskbar.

Просмотреть файл

@ -10,29 +10,20 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
In this lab, youll learn about some of the features in Visual Studio 2017 and Team Foundation Server 2017 that enable collaboration experiences for development teams including Team Rooms, Lightweight Code Comments, and CodeLens.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Team Room Collaboration ##
In this exercise, you will learn about the Team Room feature in Team Foundation Server 2017 (and at visualstudio.com). Team Rooms provide a durable collaboration space where members can chat and view pertinent events, thereby allowing them to remain in loose contact throughout the workday.
<a name="Ex1Task1"></a>
### Task 1: Team Rooms Introduction ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -67,10 +58,8 @@ In this exercise, you will learn about the Team Room feature in Team Foundation
1. It appears that we didnt miss anything important in the team room, so we can return to the current date by clicking the **Live** link.
<a name="![](images/007.png)"></a>
### ![](images/007.png) ###
![](images/007.png) ###
<a name="Ex1Task2"></a>
### Task 2: Team Room Mentions and Links ###
1. Now lets take a look at some of the types of mentions and links that can be inserted via team room chat. The first type is the team member mention, which can be inserted anywhere by typing the **@** symbol followed by the name. As Sachin, try this out by typing “**good morning @**” into the textbox at the bottom of the window. Note that a list of room members is presented as soon as you type the @ symbol.
@ -103,7 +92,6 @@ In this exercise, you will learn about the Team Room feature in Team Foundation
![](images/014.png)
<a name="Ex1Task3"></a>
### Task 3: Team Room Events ###
1. Another key feature of team rooms is that various events can be selected and configured to automatically feed in additional information, thereby providing additional context to active and historical team discussions. Click **Manage events…**.
@ -136,19 +124,17 @@ In this exercise, you will learn about the Team Room feature in Team Foundation
1. The Team Room feature has been designed with extensibility in mind, so that will allow development teams to add in custom events and clients in the future. If you are interested in learning more about this extensibility, look at the [Team Rooms REST API](https://www.visualstudio.com/en-us/integrate/api/chat/overview) for more information.
<a name="Exercise2"></a>
## Exercise 2: Lightweight Code Comments ##
In this exercise, you will learn about the Lightweight Code Comment feature (first introduced with Team Foundation Server 2013), that allows team members to comment on code. This enables interactive or time shifted conversations about code, all from a very nice inline experience in the browser.
<a name="Ex2Task1"></a>
### Task 1: Working With Lightweight Code Comments ###
1. Launch **Internet Explorer** from the taskbar and click the **TFS FF Portal** button from the favorites bar at the top.
![](images/022.png)
1. Select **Code | Changesets**.
1. Select **Code \| Changesets**.
![](images/023.png)
@ -196,15 +182,12 @@ In this exercise, you will learn about the Lightweight Code Comment feature (fir
![](images/034.png)
<a name="![](images/035.png)"></a>
## ![](images/035.png) ##
![](images/035.png)
<a name="Exercise3"></a>
## Exercise 3: CodeLens ##
In this exercise, you will learn about the CodeLens feature first introduced with Visual Studio 2013 and Team Foundation Server 2013 that provides code insights about classes, methods, and properties directly within the code editor.
<a name="Ex3Task1"></a>
### Task 1: Working with CodeLens ###
1. Launch **Visual Studio 2017** from the taskbar.
@ -217,7 +200,7 @@ In this exercise, you will learn about the CodeLens feature first introduced wit
![](images/037.png)
1. Select **Build | Rebuild Solution**.
1. Select **Build \| Rebuild Solution**.
1. After loading **CustomersController.cs** in the code editor, note that both the class and its methods show a single line of indicators. These indicators are meant to provide developers a heads-up-display of sorts - with information about how the code is being used, tested, and changed.
@ -231,7 +214,7 @@ In this exercise, you will learn about the CodeLens feature first introduced wit
> **Note:** You can also hold down the **Alt** key and press the number key shown above each indicator as a shortcut.
1. **![](images/040.png)**
![](images/040.png)
1. If you were to double-click on one of the references, you would be taken to the specified location in code. Press **Esc** instead.
@ -291,9 +274,9 @@ In this exercise, you will learn about the CodeLens feature first introduced wit
![](images/052.png)
> **Note:** With all tests passing, nothing stands out visually in the CodeLens indicator line. This demonstrates one of the goals of CodeLens - to provide useful information without getting in the way or being distracting. Nevertheless the feature can be customized or even turned off in **Tools | Options** if desired.
> **Note:** With all tests passing, nothing stands out visually in the CodeLens indicator line. This demonstrates one of the goals of CodeLens - to provide useful information without getting in the way or being distracting. Nevertheless the feature can be customized or even turned off in **Tools \| Options** if desired.
1. **![](images/053.png)**
![](images/053.png)
1. As a final note, CodeLens also supports a number of indicators for Git repositories also. This provides author, change and work item indicators that work very similarly to their Team Foundation Version Control counterparts. Unlike the CodeLens support for TFVC, CodeLens for Git is computed solely on the client side. This means that you can use the feature for any Git repository whether it is local, cloned from TFS Git, cloned from GitHub or another Git source.

Просмотреть файл

@ -10,20 +10,16 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
[EditorConfig](http://editorconfig.org/) is an open source file format that helps developers configure and enforce formatting and code style conventions to achieve consistent, more readable codebases. EditorConfig files are easily checked into source control and are applied at repository and project levels. EditorConfig conventions override their equivalents in your personal settings, such that the conventions of the codebase take precedence over the individual developer. The simplicity and universality of EditorConfig make it an attractive choice for team-based code style settings in Visual Studio 2017.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="Exercise1"></a>
## Exercise 1: Working with EditorConfig ##
<a name="Ex1Task1"></a>
### Task 1: Creating an EditorConfig file ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -34,7 +30,7 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
![](images/000.png)
1. **EditorConfig** files are just ordinary text files that can be added to the project and managed through source control. In **Solution Explorer**, right-click **src** and select **Add | New Item**.
1. **EditorConfig** files are just ordinary text files that can be added to the project and managed through source control. In **Solution Explorer**, right-click **src** and select **Add \| New Item**.
![](images/001.png)
@ -68,13 +64,13 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
![](images/004.png)
1. Press **Ctrl+K** followed by **Ctrl+D**. This is a shortcut that will format the document according to the configured styles. Note that you could alternatively do this from the menu via **Edit | Advanced | Format Document**.
1. Press **Ctrl+K** followed by **Ctrl+D**. This is a shortcut that will format the document according to the configured styles. Note that you could alternatively do this from the menu via **Edit \| Advanced \| Format Document**.
1. Count the indentation now used before the attribute. It should be only two spaces.
![](images/005.png)
1. Lets suppose that the team has decided that the **Controllers** directory needs some special settings for C# code. To help enforce this, you can add an **.editorconfig** file to the folder. In **Solution Explorer**, right-click the **Controllers** folder and select **Add | New Item**.
1. Lets suppose that the team has decided that the **Controllers** directory needs some special settings for C# code. To help enforce this, you can add an **.editorconfig** file to the folder. In **Solution Explorer**, right-click the **Controllers** folder and select **Add \| New Item**.
![](images/006.png)
@ -109,7 +105,6 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. Apply formatting via **Ctrl+K, Ctrl+D** and confirm the extra whitespace has been removed.
<a name="Ex1Task2"></a>
### Task 2: EditorConfig extensions for .NET code style ###
1. In addition to some native EditorConfig properties, Visual Studio extends the standard to support many key elements from **.NET Code Style**. For example, the setting csharp_new_line_before_open_brace can enforce whether braces whether or not braces are put on their own lines. Add the following line to **.editorconfig** to change the default behavior such that braces are always appended to the end of the line before them.

Просмотреть файл

@ -10,27 +10,16 @@ Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
In this lab, you will learn about the exploratory testing and feedback management capabilities provided in the Test & Feedback extension. You will learn about how exploratory testing (also called XT, or agile testing) has become a first-class experience in the toolset. This allows a tester to more flexibly test the underlying software without relying solely on formal test cases. Youll also learn about how you can manage the process of eliciting and managing the customer feedback lifecycle.
<a name="Prerequisites"></a>
### Prerequisites ###
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Exploratory Testing ##
<a name="Ex1Task1"></a>
### Task 1: Installing the Chrome Extension ###
1. Log in as **Deniz Ercoskun (VSALM\Deniz)**. All user passwords are **P2ssw0rd**.
@ -69,10 +58,8 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
1. After connecting to TFS, you will need to select the team you want these efforts associated with. Select the **FabrikamFiberCollection** and type **“web”** to search for the web team. Select the **Fabrikam Fiber Web Team** when available. Now all of your work item creation and searching will be scoped to the area path this team belongs to (**“Development”**). Click **Save** to continue.
<a name="![](images/006.png)"></a>
### ![](images/006.png) ###
![](images/006.png) ###
<a name="Ex1Task2"></a>
### Task 2: Exploratory Testing with the Chrome Extension ###
1. To start an exploratory testing session, click the **Start session** button from the extension toolbar.
@ -123,10 +110,8 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
1. Click on the **View session timeline** button. You can see that all the content – screenshots, notes and videos youve captured are available in the current sessions timeline. You can open the screenshots, read your notes or play the video from here.
<a name="![](images/018.png)"></a>
### ![](images/018.png) ###
![](images/018.png) ###
<a name="Ex1Task3"></a>
### Task 3: Creating Bugs with the Chrome Extension ###
1. Click the **Create bug** icon button followed by the expanded **Create bug** text button.
@ -167,12 +152,10 @@ In this set of hands-on labs, you will take part in a number of scenarios that i
1. Close Chrome.
<a name="Exercise2"></a>
## Exercise 2: Eliciting and Managing Feedback ##
In this exercise, you will learn about managing the feedback lifecycle in TFS. During the course of software development, it is important to capture feedback from project stakeholders (end-users, product owners, and so on) to ensure that the progress the team is making is on track to meet the requirements that the stakeholders have in mind. It enables the capture of audio, video, screenshots, and other attachments to be linked to Team Foundation Server feedback work items.
<a name="Ex2Task1"></a>
### Task 1: Creating Feedback Requests ###
1. In Chrome, navigate to [http://vsalm:8080/tfs](http://vsalm:8080/tfs).
@ -181,7 +164,7 @@ In this exercise, you will learn about managing the feedback lifecycle in TFS. D
![](images/028.png)
1. Select **Work | Backlogs**.
1. Select **Work \| Backlogs**.
![](images/029.png)
@ -205,7 +188,6 @@ In this exercise, you will learn about managing the feedback lifecycle in TFS. D
1. Press **Esc** to close the work item.
<a name="Ex2Task2"></a>
### Task 2: Using the Feedback Client ###
1. Open a remote desktop session to **VSALM** and log in as **Lan Kaim (VSALM\Lan)**. All user passwords are **P2ssw0rd**. Using remote desktop will allow you to easily switch between users within the VM without having to sign in each time.
@ -268,12 +250,11 @@ In this exercise, you will learn about managing the feedback lifecycle in TFS. D
![](images/046.png)
<a name="Ex2Task3"></a>
### Task 3: Collecting and Acting on Feedback ###
1. Return to the **Deniz** account by minimizing the RDP window.
1. Navigate to the **Home | Dashboards** page for **FabrikamFiber**.
1. Navigate to the **Home \| Dashboards** page for **FabrikamFiber**.
![](images/047.png)
@ -293,7 +274,7 @@ In this exercise, you will learn about managing the feedback lifecycle in TFS. D
![](images/051.png)
1. Based on the feedback received, the team can then create additional work items as necessary in order to act upon the feedback. Select **Add link | New item**.
1. Based on the feedback received, the team can then create additional work items as necessary in order to act upon the feedback. Select **Add link \| New item**.
![](images/052.png)

Просмотреть файл

@ -10,29 +10,18 @@ Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
In this lab, youll learn about Git support in Team Foundation Server 2017 and Visual Studio 2017. Git is a distributed version control system. Git repositories can live locally (such as on a developers machine) and can now be hosted by Team Foundation Server. You will learn how to establish a local Git repository, which can easily be synchronized with a centralized Git repository in Team Foundation Server. In addition, you will learn about Git branching and merging support.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Getting Started with Git ##
In this exercise, you will learn how to create, clone, and push commits to a Git repository with Team Foundation Server.
<a name="Ex1Task1"></a>
### Task 1: Creating a Git Repository ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -43,7 +32,7 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
1. There are a few reasons why Fabrikam Fiber might want to use Git as their source control option within Team Foundation Server. One reason could be that they are collaborating with developers using a tool such as Xcode, which supports the Git protocol natively. Another reason could be that they have developers working offline (such as during a commute) who want to commit code locally when they are offline and check this code into Team Foundation Server when they get into the office. Microsoft now offers teams the ability to utilize Git without sacrificing the integrated application lifecycle management capabilities offered by Team Foundation Server. Visual Studio 2017 also provides developers with a great experience for working with any Git repository – whether its hosted by Team Foundation Server, a local repository, or another Git provider.
1. From the **Home** dropdown menu, select **Projects and My Teams | New Team Project**.
1. From the **Home** dropdown menu, select **Projects and My Teams \| New Team Project**.
![](images/001.png)
@ -61,7 +50,6 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
1. After the new Git team project has been created, click **Close** to return to Visual Studio.
<a name="Ex1Task2"></a>
### Task 2: Clone Git Repository ###
1. In **Team Explorer**, click **Clone this repository**.
@ -74,10 +62,8 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
1. Click the **Manage Connections** button and double-click **FabrikamCommunity** to connect to the new team project.
<a name="![](images/007.png)"></a>
### ![](images/007.png) ###
![](images/007.png)
<a name="Ex1Task3"></a>
### Task 3: Commit Code and Link to Work Item ###
1. In **Team Explorer**, click the **Home** button, followed by **Settings**.
@ -96,7 +82,7 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
![](images/011.png)
1. Create a new work item for the product backlog by selecting **Team | New Work Item | Product Backlog Item** from the main menu. This will launch the **New Product Backlog Item** form in TFS via your browser.
1. Create a new work item for the product backlog by selecting **Team \| New Work Item \| Product Backlog Item** from the main menu. This will launch the **New Product Backlog Item** form in TFS via your browser.
1. Enter a title of **“Create new web site”** and then click the **Save** button. Take note of the **ID** once the work item is saved.
@ -106,7 +92,7 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
![](images/013.png)
1. In the **New Project** window, select the **Visual C# | Web | ASP.NET Web Application** template and click **OK**.
1. In the **New Project** window, select the **Visual C# \| Web \| ASP.NET Web Application** template and click **OK**.
![](images/014.png)
@ -140,10 +126,8 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
1. In **Team Explorer – Changes**, enter a commit message and then click **Commit All**. **Save** changes to files when prompted.
<a name="![](images/022.png)"></a>
### ![](images/022.png) ###
![](images/022.png)
<a name="Ex1Task4"></a>
### Task 4: Synchronize Commits with Server ###
1. Navigate to the commits view by clicking **Sync**.
@ -186,15 +170,12 @@ In this exercise, you will learn how to create, clone, and push commits to a Git
1. Although this version happens to be the latest, you would be able to explore or download the version at this particular commit by clicking one of the links.
<a name="![](images/032.png)"></a>
## ![](images/032.png) ##
![](images/032.png)
<a name="Exercise2"></a>
## Exercise 2: Git Branching and Merging ##
In this exercise, you will learn about Git branching and merging support in Visual Studio. In general, branching is often used to help switch development contexts and to isolate risk. Git branching is no different in that regard. Creating a Git branch is a lightweight (and therefore fast) operation, as you are simply creating a new reference to an existing commit. This is very different from Team Foundation Version Control (TFVC) branching where the entire source tree needs to be duplicated server-side. We will also take a quick look at the merging support for Git projects.
<a name="Ex2Task1"></a>
### Task 1: Branching ###
1. Return to Visual Studio and open **Team Explorer – Home**.
@ -223,7 +204,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
![](images/038.png)
1. Right-click somewhere in the whitespace of the editor and select **Source Control | Commit**.
1. Right-click somewhere in the whitespace of the editor and select **Source Control \| Commit**.
![](images/039.png)
@ -243,13 +224,13 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. You dont have to publish the branch to the server yet if you want to continue working locally. As you saw in the previous exercise, you can continue to work locally and add additional commits to the new branch. In **Team Explorer – Branches**, **right-click** the **Development** branch and select **View History**.
![](images/044.png)
![](images/044.png)
![](images/045.png)
1. When you are ready, you can delete the branch, merge it back into your master branch, or push it to the server-side repository so that teammates can access it. Lets go ahead and publish the branch by right-clicking the **Development** branch and selecting the **Push Branch** option.
![](images/046.png)
![](images/046.png)
![](images/047.png)
@ -257,7 +238,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Launch **Visual Studio** from the taskbar.
1. Connect to the **FabrikamCommunity** team project (using the **Manage Connections** button as before, and this time select **Manage Connections | Connect to Team Project**).
1. Connect to the **FabrikamCommunity** team project (using the **Manage Connections** button as before, and this time select **Manage Connections \| Connect to Team Project**).
![](images/048.png)
@ -273,7 +254,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
![](images/051.png)
1. As before, right-click within the whitespace of the code editor and select **Source Control | Commit**.
1. As before, right-click within the whitespace of the code editor and select **Source Control \| Commit**.
1. In **Team Explorer – Changes**, enter a commit message of “**Deniz version**” and then click **Commit All**. Save changes when prompted. Note that Deniz has committed changes to the master branch.
@ -289,7 +270,6 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Switch users back to **Sachin** by minimizing the remote desktop session.
<a name="Ex2Task2"></a>
### Task 2: Merging ###
1. From Sachins perspective, he has so far created a local branch based off the master, made a change to a file, and then published that branch. He would then like to go ahead and merge his **Development** branch back into the **master** branch.
@ -352,7 +332,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
![](images/068.png)
1. Select the **Code | History** from the navigation.
1. Select the **Code \| History** from the navigation.
![](images/069.png)
@ -362,10 +342,8 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Select the **Branches** tab to view all branches published to the repository.
<a name="![](images/071.png)"></a>
### ![](images/071.png) ###
![](images/071.png)
<a name="Ex2Task3"></a>
### Task 3: Managing Security and Permissions ###
1. Now lets take a quick peek at managing security and permissions for Git repositories hosted in Team Foundation Server. Select the **FabrikamCommunity** dropdown and then **Manage Repositories**.
@ -382,10 +360,8 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Select the **Master** branch node. Security level settings that affect only the currently selected branch can be made here, providing fine-grained control for your repository if needed.
<a name="![](images/075.png)"></a>
### ![](images/075.png) ###
![](images/075.png)
<a name="Ex2Task4"></a>
### Task 4: Branch Policies ###
1. When you want people on your team to review code in a Git team project, you can use a pull request to review and merge the code. Pull requests enable developers working in topic branches to get feedback on their changes from other developers prior to submitting the code into the master branch. Any developer participating in the review can see the code changes, leave comments in the code, and give a "thumbs up" approval if they're satisfied with those changes.
@ -422,10 +398,8 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Click **Save Changes** to update the master branch policies. Close the administration browser tab.
<a name="![](images/083.png)"></a>
### ![](images/083.png) ###
![](images/083.png)
<a name="Ex2Task5"></a>
### Task 5: Code Review and Merge using Pull Requests ###
1. Switch back to the **Deniz** RDP session.
@ -494,7 +468,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Switch users back to **Sachin** by minimizing the RDP window.
1. In the web portal, navigate to the **FabrikamCommunity** project and select **Code | Pull Requests** view.
1. In the web portal, navigate to the **FabrikamCommunity** project and select **Code \| Pull Requests** view.
![](images/099.png)
@ -504,7 +478,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
1. Sachin can now review all of the files and commits associated with the pull request and make a decision. It is also possible for Sachin to have a conversation with Deniz (and perhaps other reviewers) in order to help make the decision, or perhaps even request additional work be performed before the pull request will be approved.
1. Lets assume that Sachin is ready to approve the request as-is. There are a couple ways to do this. Select **Complete | Auto-complete**.
1. Lets assume that Sachin is ready to approve the request as-is. There are a couple ways to do this. Select **Complete \| Auto-complete**.
![](images/101.png)
@ -520,7 +494,7 @@ In this exercise, you will learn about Git branching and merging support in Visu
![](images/104.png)
1. Select **Approve | Approve**.
1. Select **Approve \| Approve**.
![](images/105.png)

Просмотреть файл

@ -10,24 +10,20 @@ Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
IntelliTest explores your .NET code to generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis is performed for every conditional branch in the code. For example, if statements, assertions, and all operations that can throw exceptions are analyzed. This analysis is used to generate test data for a parameterized unit test for each of your methods, creating unit tests with high code coverage.
When you run IntelliTest, you can easily see which tests are failing and add any necessary code to fix them. You can select which of the generated tests to save into a test project to provide a regression suite. As you change your code, rerun IntelliTest to keep the generated tests in sync with your code changes.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="Exercise1"></a>
## Exercise 1: Introduction to IntelliTest ##
In practical terms, white box unit test development includes an iterative workflow informed by code coverage - write a unit test, see what parts of the code are not covered by the test, write more tests to cover those parts, repeat until all of the code is covered. This workflow is similar to what we would use while working with IntelliTest, as you will see in this exercise.
<a name="Ex1Task1"></a>
### Task 1: Running IntelliTest ###
1. Log in as **Deniz Ercoskun (VSALM\Deniz)**. All user passwords are **P2ssw0rd.**
@ -44,12 +40,10 @@ In practical terms, white box unit test development includes an iterative workfl
1. Scroll down and locate the **Handle** method that takes a **GameDeletedEvent** parameter (around line 31). When a Game is deleted, this method is responsible for updating the stats of the affected players. As with most real-world code, this code interacts with other objects and layers. Our goal with this demonstration is to enable IntelliTest reach 100% code coverage on the **Handle** method.
1. **Right-click** somewhere within the **Handle** method and then select **IntelliTest | Run IntelliTest**.
1. **Right-click** somewhere within the **Handle** method and then select **IntelliTest \| Run IntelliTest**.
<a name="![](images/002.png)"></a>
### ![](images/002.png) ###
![](images/002.png)
<a name="Ex1Task2"></a>
### Task 2: Understanding IntelliTest Warnings ###
1. After IntelliTest runs, only two tests are generated and there is low coverage of the code (6/42 blocks). In addition, there are 5 warnings reported.
@ -92,7 +86,7 @@ In practical terms, white box unit test development includes an iterative workfl
1. When the number of branches in the code path that IntelliTest is exploring is large, it can trip an internal boundary that has been configured for fast interactive performance. Hence, it raises a warning and stops the exploration.
<a name="Ex1Task3"></a>
### Task 3: Providing Mock Implementations ###
1. To proceed further, we need to answer that first question: _is that the type you want to use?_ To unit test the method, we need to provide a _mock_implementation of **IQueryDataStore**. Browsing through the solution, we can discover a **FakeQueryDataStore**. Lets tell IntelliTest to use that (instead of the **QueryDataStore** that it discovered).
@ -138,10 +132,9 @@ In practical terms, white box unit test development includes an iterative workfl
1. Once the IntelliTest run completes, note that the bounds exceeded warning is gone.
<a name="![](images/018.png)"></a>
### ![](images/018.png) ###
![](images/018.png)
<a name="Ex1Task4"></a>
### Task 4: Focusing on “Just my Code” ###
1. Click the **Warnings** button.
@ -162,7 +155,6 @@ In practical terms, white box unit test development includes an iterative workfl
1. **Run** IntelliTest once again and verify that only the object creation warning remains.
<a name="Ex1Task5"></a>
### Task 5: Modifying the Parameterized Unit Test to Increase Code Coverage ###
In order to exercise the code-under-test further, we need to modify the parameterized unit test method in order to return data from calls to the **GetData** method. In the PUT, the “target” is the object that contains data to be returned by calls to **GetData<T>**. More specifically, T is either a **LookupGamePlayersDto** array or a **GetPlayerStatisticsDto** array. Our task now is to fill up **FakeQueryDataStore** with concrete instances of these types.

Просмотреть файл

@ -10,29 +10,18 @@ Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
IntelliTrace – first released in Visual Studio 2010 – changed the game for debugging by allowing developers to step “back in time” to see how an application got into its current state. By exposing events such as file and registry access, exceptions, and method calls, an IntelliTrace file can provide a detailed view into application behavior. In this lab, you will learn how Visual Studio 2017 extends the capabilities of IntelliTrace beyond the development and testing organizations by providing IT administrators with the ability to capture IntelliTrace files running from production servers. These files can then be analyzed by developers to help diagnose production issues.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Using IntelliTrace in Production ##
In this exercise, you will learn how to deploy and use IntelliTrace in production to capture trace information for an ASP.NET application.
<a name="Ex1Task1"></a>
### Task 1: Discovering a Bug in Production ###
1. Log in as **Brian Keller (VSALM\Brian)**. All user passwords are **P2ssw0rd**.
@ -49,7 +38,6 @@ In this exercise, you will learn how to deploy and use IntelliTrace in productio
1. Typically, the first step in determining the root cause of an error like this would be to check logs and perhaps a stack trace for details. If that does not provide enough information, and the error is not easily reproduced in a development environment the development team may end up taking a long time to determine the root cause and fix the problem. Installing Visual Studio or other debugging tools in a production environment may not be an option.
<a name="Ex1Task2"></a>
### Task 2: Setting Up For IntelliTrace Data Collection in Production ###
1. Now lets look at how to deploy and use IntelliTrace in a production environment to collect historical debugging data. Open a Windows Explorer window and navigate to the root of the C: drive. Note that there are two folders here that were created ahead of time for our use in this lab, **c:\IntelliTrace** is where the standalone IntelliTrace files are placed and **c:\LogFileLocation** is where the IntelliTrace files will be written to later on in this lab.
@ -72,7 +60,6 @@ In this exercise, you will learn how to deploy and use IntelliTrace in productio
> **Note:** For the purpose of this lab, the production system is the same as our development system, but that will not normally be the case.
<a name="Ex1Task3"></a>
### Task 3: Initiating IntelliTrace Collection and Repro ###
1. Now we will start IntelliTrace so that we can gather some diagnostic data from the web application. You have two options here, you can follow steps **2** through **17** or you can run the _StartIntelliTraceDemo.cmd_ file found within the **Scripts** folder on the **Desktop** (run as administrator) and skip ahead to step **18**.
@ -147,7 +134,6 @@ In this exercise, you will learn how to deploy and use IntelliTrace in productio
1. In a real-world scenario, it is at this point that the IntelliTrace file would be sent to a developer or tester for a more detailed look.
<a name="Exercise2"></a>
## Exercise 2: Debugging with IntelliTrace Files from Production ##
In this exercise, you will see how we can use the IntelliTrace file that was generated on a production server to aid in debugging the error that we saw in the previous exercise.
@ -164,9 +150,9 @@ In this exercise, you will see how we can use the IntelliTrace file that was gen
![](images/014.png)
1. Since this IntelliTrace session isnt associated with an active solution, youll need to temporarily disable the **Just My Code** feature to get the full experience. From the main menu select **Tools | Options**.
1. Since this IntelliTrace session isnt associated with an active solution, youll need to temporarily disable the **Just My Code** feature to get the full experience. From the main menu select **Tools \| Options**.
1. In the left tree view, locate **Debugging | General** and uncheck the **Enable Just My Code** option in the right panel. Click **OK** to apply.
1. In the left tree view, locate **Debugging \| General** and uncheck the **Enable Just My Code** option in the right panel. Click **OK** to apply.
![](images/015.png)

Двоичные данные
labs/tfs/liveunittesting/images/000.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 15 KiB

Двоичные данные
labs/tfs/liveunittesting/images/001.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
labs/tfs/liveunittesting/images/002.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 26 KiB

Двоичные данные
labs/tfs/liveunittesting/images/003.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 4.4 KiB

Двоичные данные
labs/tfs/liveunittesting/images/004.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичные данные
labs/tfs/liveunittesting/images/005.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 15 KiB

Двоичные данные
labs/tfs/liveunittesting/images/006.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 24 KiB

Двоичные данные
labs/tfs/liveunittesting/images/007.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 65 KiB

Двоичные данные
labs/tfs/liveunittesting/images/008.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичные данные
labs/tfs/liveunittesting/images/009.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичные данные
labs/tfs/liveunittesting/images/010.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 27 KiB

Двоичные данные
labs/tfs/liveunittesting/images/011.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 30 KiB

Двоичные данные
labs/tfs/liveunittesting/images/012.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 103 KiB

Двоичные данные
labs/tfs/liveunittesting/images/013.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 8.3 KiB

Двоичные данные
labs/tfs/liveunittesting/images/014.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичные данные
labs/tfs/liveunittesting/images/015.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
labs/tfs/liveunittesting/images/016.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 6.7 KiB

Двоичные данные
labs/tfs/liveunittesting/images/017.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 27 KiB

Двоичные данные
labs/tfs/liveunittesting/images/018.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 14 KiB

Двоичные данные
labs/tfs/liveunittesting/images/019.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 9.5 KiB

Двоичные данные
labs/tfs/liveunittesting/images/020.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичные данные
labs/tfs/liveunittesting/images/021.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 72 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image1.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image10.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image11.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.3 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image12.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 31 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image13.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 98 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image14.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.7 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image15.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 24 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image16.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 21 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image17.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.4 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image18.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image19.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.9 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image2.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image20.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image21.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 23 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image22.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 39 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image3.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 30 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image4.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.2 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image5.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image6.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image7.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 29 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image8.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 34 KiB

Двоичные данные
labs/tfs/liveunittesting/media/image9.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 15 KiB

Просмотреть файл

@ -1,154 +1,265 @@
---
title: Live Unit Testing and Live Dependency Validation in Visual Studio 2017
layout: page
layout: page
sidebar: tfs
permalink: /labs/tfs/liveunittesting/
folder: /labs/tfs/liveunittesting/
---
Lab version:15.0.26228.0
Lab version: 15.0.26228.0
Last updated:3/6/2017
Last updated: 3/6/2017
<a name="Overview"></a>
## Overview ##
## Overview
Live Unit Testing is a new feature introduced in Visual Studio 2017. It visualizes unit test results and code coverage live in the editor alongside your code and updates while you are coding. It works with C# and VB projects for the .NET framework and supports three test frameworks: MSTest, xUnit, and NUnit. Live Unit Testing makes it easy to maintain quality and test coverage during rapid development and takes your productivity to a whole new level. Imagine fixing a bug in a code base in which you may not be completely familiar with. With Live Unit Testing, you can know right away-as you are making edits to fix the bug-that you did not break another part of the system. Getting this feedback as you type will help you feel confident that your effort is delivering the results you expect.
Visual Studio also enables teams to validate architectural dependencies in their solutions using the [Layer Designer](https://msdn.microsoft.com/en-us/library/dd465141.aspx), which first shipped in Visual Studio 2010. This feature helps ensure that developers respect the architectural constraints of the application as they edit their code. It has been re-written in Visual Studio 2017 to use Roslyn analyzers for a more robust, reliable experience. Developers now get real-time design feedback in the editor so they can immediately stop introducing architectural flaws. "Layer" diagrams have also been renamed "dependency validation" diagrams to make it clearer what they are for.
Live Unit Testing is a new feature introduced in Visual Studio 2017. It
visualizes unit test results and code coverage live in the editor
alongside your code and updates while you are coding. It works with C\#
and VB projects for the .NET framework and supports three test
frameworks: MSTest, xUnit, and NUnit. Live Unit Testing makes it easy to
maintain quality and test coverage during rapid development and takes
your productivity to a whole new level. Imagine fixing a bug in a code
base in which you may not be completely familiar with. With Live Unit
Testing, you can know right away—as you are making edits to fix the
bug—that you did not break another part of the system. Getting this
feedback as you type will help you feel confident that your effort is
delivering the results you expect.
<a name="Related Resources"></a>
### Related Resources ###
Visual Studio also enables teams to validate architectural dependencies
in their solutions using the [Layer
Designer](https://msdn.microsoft.com/en-us/library/dd465141.aspx), which
first shipped in Visual Studio 2010. This feature helps ensure that
developers respect the architectural constraints of the application as
they edit their code. It has been re-written in Visual Studio 2017 to
use Roslyn analyzers for a more robust, reliable experience. Developers
now get real-time design feedback in the editor so they can immediately
stop introducing architectural flaws. “Layer” diagrams have also been
renamed “dependency validation” diagrams to make it clearer what they
are for.
See this [blog post](https://blogs.msdn.microsoft.com/visualstudio/2016/11/18/live-unit-testing-visual-studio-2017-rc/) for more information on live unit testing.
## Related Resources
See this [blog post](https://blogs.msdn.microsoft.com/visualstudioalm/2016/11/30/live-dependency-validation-in-visual-studio-2017/) for a detailed discussion comparing the new live dependency validation experience with the past.
See this [blog
post](https://blogs.msdn.microsoft.com/visualstudio/2016/11/18/live-unit-testing-visual-studio-2017-rc/)
for more information on live unit testing.
<a name="Prerequisites"></a>
### Prerequisites ###
See this [blog
post](https://blogs.msdn.microsoft.com/visualstudioalm/2016/11/30/live-dependency-validation-in-visual-studio-2017/)
for a detailed discussion comparing the new live dependency validation
experience with the past.
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
## Pre-requisites
<a name="Exercise1"></a>
## Exercise 1: Live Unit Testing in Visual Studio 2017 ##
In order to complete this lab you will need the Visual Studio 2017
virtual machine provided by Microsoft. For more information on acquiring
and using this virtual machine, please see [this blog
post](http://aka.ms/almvm).
Live Unit Testing is a service that watches your codebase for changes. As you edit files, it automatically detects which tests are impacted and runs those tests in the background. The results are provided immediately so that you can get feedback on how your changes affect the overall codebase quality. It also indicates which lines of code have no test coverage so that you can think about testability as you develop.
## Exercise 1: Live Unit Testing in Visual Studio 2017
<a name="Ex1Task1"></a>
### Task 1: Live unit testing ###
Live Unit Testing is a service that watches your codebase for changes.
As you edit files, it automatically detects which tests are impacted and
runs those tests in the background. The results are provided immediately
so that you can get feedback on how your changes affect the overall
codebase quality. It also indicates which lines of code have no test
coverage so that you can think about testability as you develop.
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
### Task 1: Live unit testing
1. Launch **Visual Studio 2017** from the taskbar.
1. Log in as **Sachin Raj (VSALM\\Sachin)**. All user passwords are
**P2ssw0rd**.
1. Open the **PartsUnlimited** solution from the **Start Page**.
2. Launch **Visual Studio 2017** from the taskbar.
![](images/000.png)
3. Open the **PartsUnlimited** solution from the **Start Page**.
1. In **Solution Explorer**, search for **"string"** and double click **StringContainsProductSearch.cs** to open it.
<img src="media/image1.png" width="380" height="223" />
![](images/001.png)
4. In **Solution Explorer**, search for **“string”** and double click
**StringContainsProductSearch.cs** to open it.
1. This class already has some tests written and is currently in pretty good shape. However, suppose you were planning to make some changes and wanted to get an understanding of the quality of the code before you begin. Rather than running all tests, you can now simply enable live unit testing and let it illustrate the coverage.
<img src="media/image2.png" width="346" height="208" />
1. Select **Test | Live Unit Testing | Start** to start live unit testing. After a moment you will see glyphs appear in the left margin of the editor. There are three types of glyphs that indicate that all tests for a line pass (a green check), at least one test fails (a red X), or that the line is not tested (a blue line). In this case, you can see that the code in the constructor and beginning of **Search** pass their tests.
5. This class already has some tests written and is currently in pretty
good shape. However, suppose you were planning to make some changes
and wanted to get an understanding of the quality of the code before
you begin. Rather than running all tests, you can now simply enable
live unit testing and let it illustrate the coverage.
![](images/002.png)
6. Select **Test \| Live Unit Testing \| Start** to start live
unit testing. After a moment you will see glyphs appear in the left
margin of the editor. There are three types of glyphs that indicate
that all tests for a line pass (a green check), at least one test
fails (a red X), or that the line is not tested (a blue line). In
this case, you can see that the code in the constructor and
beginning of **Search** pass their tests.
1. Looking further down, it's clear that the exception case for this method is not tested, which is something you should think about adding later on.
<img src="media/image3.png" width="581" height="330" />
![](images/003.png)
7. Looking further down, its clear that the exception case for this
method is not tested, which is something you should think about
adding later on.
1. Now let's experiment with a change to the code. Delete the .**ToLower()** call in **Search**.
<img src="media/image4.png" width="336" height="77" />
![](images/004.png)
8. Now lets experiment with a change to the code. Delete the
.**ToLower()** call in **Search**.
1. The live unit testing service will immediately detect the change in code and re-run the tests (note the clock element is added to the glyphs). You don't even need to save the file.
<img src="media/image5.png" width="473" height="167" />
![](images/005.png)
9. The live unit testing service will immediately detect the change in
code and re-run the tests (note the clock element is added to
the glyphs). You dont even need to save the file.
1. Since the change above broke some tests, the glyphs are changed to reflect which lines of code are now part of failing tests. It's important to note that these glyphs don't indicate that the error occurred on their respective lines, but rather that those lines are executed by tests that ultimately fail.
<img src="media/image6.png" width="539" height="156" />
![](images/006.png)
10. Since the change above broke some tests, the glyphs are changed to
reflect which lines of code are now part of failing tests. Its
important to note that these glyphs dont indicate that the error
occurred on their respective lines, but rather that those lines are
executed by tests that ultimately fail.
1. Pres **Ctrl+Z** to undo the changes made earlier. You may need to press it multiple times to restore the **.ToLower()** from above. The glyphs should all return to passing.
<img src="media/image7.png" width="553" height="321" />
<a name="Exercise2"></a>
## Exercise 2: Real Time Dependency Validation in Visual Studio 2017 ##
11. Pres **Ctrl+Z** to undo the changes made earlier. You may need to
press it multiple times to restore the **.ToLower()** from above.
The glyphs should all return to passing.
<a name="Ex2Task1"></a>
### Task 1: Creating a dependency diagram ###
## Exercise 2: Real Time Dependency Validation in Visual Studio 2017
1. Press **Ctrl+Shift+B** to rebuild the solution.
### Task 1: Creating a dependency diagram
1. Select **Architecture | New Dependency Validation Diagram** from the main menu.
1. Press **Ctrl+Shift+B** to rebuild the solution.
1. Enter a **Name** of **"PartsUnlimited.Dependencies"** and click **OK**.
2. Select **Architecture \| New Dependency Validation Diagram** from the
main menu.
![](images/007.png)
3. Enter a **Name** of **“PartsUnlimited.Dependencies”** and click
**OK**.
1. If asked to update projects to support dependency validation, click **Update**.
<img src="media/image8.png" width="624" height="350" />
![](images/008.png)
4. If asked to update projects to support dependency validation, click
**Update**.
1. Note that the new project has been added to the solution. Double-click **DependencyValidation1.layerdiagram** to open it.
<img src="media/image9.png" width="349" height="136" />
![](images/009.png)
5. Note that the new project has been added to the solution.
Double-click **DependencyValidation1.layerdiagram** to open it.
1. There are a lot of ways to add layers to the diagram, including from the **Solution Explorer**, **Class View**, and **Object Browser**.
<img src="media/image10.png" width="347" height="205" />
![](images/010.png)
6. There are a lot of ways to add layers to the diagram, including from
the **Solution Explorer**, **Class View**, and **Object Browser**.
1. In this case, we're going to automatically generate a code map and then use that to codify our architecture via the diagram. Select **Architecture | Generate Code Map for Solution**. This code map will pull in everything it can about the project and represent it in a diagram so we can easily walk through the de facto dependencies and relationships each component (class, etc) has.
<img src="media/image11.png" width="624" height="55" />
1. Expand the **PartsUnlimited.dll** component to see the namespaces it contains.
7. In this case, were going to automatically generate a code map and
then use that to codify our architecture via the diagram. Select
**Architecture | Generate Code Map for Solution**. This code map
will pull in everything it can about the project and represent it in
a diagram so we can easily walk through the de facto dependencies
and relationships each component (class, etc) has.
![](images/011.png)
8. Expand the **PartsUnlimited.dll** component to see the namespaces
it contains.
1. It gets a little messy at this point because we have lots of relationships and dependencies mapped across and within the project and its tests. Use **Ctrl+Click** to select **PartsUnlimited.Controllers**, **PartsUnlimited.ViewModels**, and **PartsUnlimited.ProductSearch**. Press **Ctrl+C** to copy them.
<img src="media/image12.png" width="399" height="336" />
![](images/012.png)
9. It gets a little messy at this point because we have lots of
relationships and dependencies mapped across and within the project
and its tests. Use **Ctrl+Click** to select
**PartsUnlimited.Controllers**, **PartsUnlimited.ViewModels**, and
**PartsUnlimited.ProductSearch**. Press **Ctrl+C** to copy them.
1. Switch back to the layer diagram and press **Ctrl+V** to paste the three components from the last step. You may want to rearrange them as shown below to make their relationships easier to understand. Put simply, the controllers namespace depends on the product search and viewmodel namespaces. While these relationships existed before and may have been unofficial while the project was being developed, putting them into the layer diagram makes them official architectural law moving forward.
<img src="media/image13.png" width="624" height="236" />
![](images/013.png)
10. Switch back to the layer diagram and press **Ctrl+V** to paste the
three components from the last step. You may want to rearrange them
as shown below to make their relationships easier to understand. Put
simply, the controllers namespace depends on the product search and
viewmodel namespaces. While these relationships existed before and
may have been unofficial while the project was being developed,
putting them into the layer diagram makes them official
architectural law moving forward.
1. It's important to understand that the rules only exist for layers that exist on the diagram. For example, the **Controllers** namespace can reference the **ProductSearch** or **ViewModels** namespaces because their relationships are explicitly defined. At the same time, those two namespaces may not reference anything from the **Controllers** namespace because the dependency is directional (there are bidirectional dependencies available if two-way references are desired). **ProductSearch** and **ViewModels** may also not reference each other because they do not have an explicit dependency in the diagram. However, a namespace like **PartsUnlimited.Utils** is not used in the layer diagram and therefore is not enforced by the dependency validation engine. It may reference anything and anything may reference it. However, if it were added to the diagram, then all of its dependencies with every other layer in the diagram would be enforced.
<img src="media/image14.png" width="443" height="213" />
![](images/014.png)
11. Its important to understand that the rules only exist for layers
that exist on the diagram. For example, the **Controllers**
namespace can reference the **ProductSearch** or **ViewModels**
namespaces because their relationships are explicitly defined. At
the same time, those two namespaces may not reference anything from
the **Controllers** namespace because the dependency is directional
(there are bidirectional dependencies available if two-way
references are desired). **ProductSearch** and **ViewModels** may
also not reference each other because they do not have an explicit
dependency in the diagram. However, a namespace like
**PartsUnlimited.Utils** is not used in the layer diagram and
therefore is not enforced by the dependency validation engine. It
may reference anything and anything may reference it. However, if it
were added to the diagram, then all of its dependencies with every
other layer in the diagram would be enforced.
1. Press **Ctrl+S** to save the diagram.
12. In addition to the methods discussed earlier, you can also easily
add new layers and dependencies by right-clicking the diagram or
layers and selecting them. The layers can be at any level, whether
its a namespace, class, or even a
method.<img src="media/image15.png" width="563" height="170" />
<a name="Ex2Task2"></a>
### Task 2: Live dependency validation ###
13. Press **Ctrl+S** to save the diagram.
1. Now it's time to break some rules. Press **Ctrl+Shift+B** to rebuild the solution. It should build as expected because we haven't violated any policy...yet.
### Task 2: Live dependency validation
1. In **Solution Explorer**, search for **"string"** and open **StringContainsProductSearch**. This class is a member of the **PartsUnlimited.ProductSearch** namespace, and therefore is not allowed to reference anything from **PartsUnlimited.ViewModels**.
1. Now its time to break some rules. Press **Ctrl+Shift+B** to rebuild
the solution. It should build as expected because we havent
violated any policy…yet.
![](images/015.png)
2. In **Solution Explorer**, search for **“string”** and open
**StringContainsProductSearch**. This class is a member of the
**PartsUnlimited.ProductSearch** namespace, and therefore is not
allowed to reference anything from **PartsUnlimited.ViewModels**.
1. Locate the **Search** method. It currently returns a **Task<IEnumerable<Product>>**. Change it to return a **Task<IEnumerable<ViewModels.ProductViewModel>>**.
<img src="media/image16.png" width="346" height="217" />
![](images/016.png)
3. Locate the **Search** method. It currently returns a
**Task&lt;IEnumerable&lt;Product&gt;&gt;**. Change it to return a
**Task&lt;IEnumerable&lt;ViewModels.ProductViewModel&gt;&gt;**.
1. While this change introduces other errors as well, the key thing to focus on here is that the editor immediately provides a red squiggle indicating that this reference is not allowed based on its defined relationships. This live dependency validation provides immediate feedback to enforce architectural practices so that developers can feel confident that they're following the project rules.
<img src="media/image17.png" width="430" height="42" />
![](images/017.png)
4. While this change introduces other errors as well, the key thing to
focus on here is that the editor immediately provides a red squiggle
indicating that this reference is not allowed based on its
defined relationships. This live dependency validation provides
immediate feedback to enforce architectural practices so that
developers can feel confident that theyre following the
project rules.
1. And even if the developer were to ignore the red squiggle, they would still be unable to build the solution due to error-level enforcement of the policy.
<img src="media/image18.png" width="624" height="51" />
![](images/018.png)
5. And even if the developer were to ignore the red squiggle, they
would still be unable to build the solution due to error-level
enforcement of the policy.
1. However, you can customize exactly how dependency rule violations are treated. In **Solution Explorer**, clear the search box.
<img src="media/image19.png" width="624" height="28" />
![](images/019.png)
6. However, you can customize exactly how dependency rule violations
are treated. In **Solution Explorer**, clear the search box.
1. Under **References**, right-click **Analyzers** and select **Open Active Rule Set**.
<img src="media/image20.png" width="355" height="184" />
![](images/020.png)
7. Under **References**, right-click **Analyzers** and select **Open
Active Rule Set**.
1. Expand the **Microsoft.DependencyValidation.Analyzers** rule set and note how you could change the violation behavior from an **Error** to a **Warning** (or whatever you prefer). There is great flexibility in managing dependency validation.
<img src="media/image21.png" width="353" height="273" />
8. Expand the **Microsoft.DependencyValidation.Analyzers** rule set and
note how you could change the violation behavior from an **Error**
to a **Warning** (or whatever you prefer). There is great
flexibility in managing dependency validation.
<img src="media/image22.png" width="624" height="248" />
![](images/021.png)

Просмотреть файл

@ -10,22 +10,18 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
In this lab, you will be introduced to the [Web performance and Load testing capabilities](https://www.visualstudio.com/en-us/docs/test/performance-testing/getting-started/getting-started-with-performance-testing) provided in Visual Studio Enterprise 2017. You will walk through a scenario using a fictional online storefront where your goal is to model and analyze its performance with a number of simultaneous users. This will involve the definition of web performance tests that represent users browsing and ordering products, the definition of a load test based on the web performance tests, and finally the analysis of the load test results.
<a name="Prerequisites"></a>
### Prerequisites ###
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="Exercise1"></a>
## Exercise 1: Live Unit Testing in Visual Studio 2017 ##
Live Unit Testing is a service that watches your codebase for changes. As you edit files, it automatically detects which tests are impacted and runs those tests in the background. The results are provided immediately so that you can get feedback on how your changes affect the overall codebase quality. It also indicates which lines of code have no test coverage so that you can think about testability as you develop.
<a name="Ex1Task1"></a>
### Task 1: Recording web tests ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -36,11 +32,11 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
![](images/000.png)
1. In **Solution Explorer**, right-click the solution node and select **Add | New Project**.
1. In **Solution Explorer**, right-click the solution node and select **Add \| New Project**.
![](images/001.png)
1. Select the **Visual C# | Test** category and the **Web Performance and Load Test Project** template. Enter a **Name** of **“PULWebTest”** and click **OK**.
1. Select the **Visual C# \| Test** category and the **Web Performance and Load Test Project** template. Enter a **Name** of **“PULWebTest”** and click **OK**.
![](images/002.png)
@ -78,7 +74,6 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. Close the test results.
<a name="Ex1Task2"></a>
### Task 2: Working with web tests ###
1. From **Solution Explorer**, open **WebTest1.webtest** if its not already open.
@ -99,13 +94,11 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. This dialog enables you to configure the **Think Time** to use for each step. **Think Time** simulates the time an end user would stop to read the current page, think about their next action, etc. Here you can manually set how much time to use for each step, as well as to set goals for response time on each navigation. Click **Cancel**.
<a name="![](images/015.png)"></a>
### ![](images/015.png) ###
![](images/015.png)
<a name="Ex1Task3"></a>
### Task 3: Recording sophisticated tests ###
1. Now lets add a more sophisticated test that involves completing a purchase. In **Solution Explorer**, right-click the **PULWebTest** project and select **Add | Web Performance Test**.
1. Now lets add a more sophisticated test that involves completing a purchase. In **Solution Explorer**, right-click the **PULWebTest** project and select **Add \| Web Performance Test**.
![](images/016.png)
@ -155,10 +148,9 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. In **Solution Explorer**, rename **WebTest1.webtest** to **Buying.webtest**.
<a name="![](images/028.png)"></a>
### ![](images/028.png) ###
<a name="Ex1Task4"></a>
![](images/028.png)
### Task 4: Viewing web test result details ###
1. As before, Visual Studio will process the recorded steps and then attempt to execute the test. However, note that it failed this time. Double-click the failed test run to view it.
@ -191,13 +183,13 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. Since were going to use this test as part of a load testing run, lets update the **Think Time** columns with some realistic numbers. Try to have the whole run use around 30 seconds of total think time. For example, you may want the obvious navigations to each have 5 seconds of think time while all the other requests have 0. Click **OK** when done.
<a name="![](images/036.png)"></a>
### ![](images/036.png) ###
<a name="Ex1Task5"></a>
![](images/036.png)
### Task 5: Adding a load test ###
1. Now that we have two tests that cover common scenarios, lets use them as part of a load test to see how the system might perform with a variety of simultaneous users. In **Solution Explorer**, right-click the **PULWebTest** project and select **Add | Load Test**.
1. Now that we have two tests that cover common scenarios, lets use them as part of a load test to see how the system might perform with a variety of simultaneous users. In **Solution Explorer**, right-click the **PULWebTest** project and select **Add \| Load Test**.
![](images/037.png)
@ -259,10 +251,9 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. Select the **Data and Diagnostics** tab to view the available adapters. Options include those for **ASP.NET**, **Event Log**, **IntelliTrace**, **Network Emulation**, and more. No adapters are selected by default because many of them have a significant impact on the machines under test and can generate a large amount of data to be stored over the course of long load tests.
<a name="![](images/052.png)"></a>
### ![](images/052.png) ###
![](images/052.png)
<a name="Ex1Task6"></a>
### Task 6: Configuring the test controller ###
1. **LoadTest1.loadtest** should already be open. Click the **Manage Test Controllers** button.
@ -279,7 +270,6 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. Press **Esc** to close the **Manage Test Controller** dialog.
<a name="Ex1Task7"></a>
### Task 7: Executing, monitoring, and reviewing load tests ###
1. Click the **Run Load Test** button to begin a load test.
@ -308,10 +298,9 @@ Live Unit Testing is a service that watches your codebase for changes. As you ed
1. Click the **Pages/Sec** row from the **Key Indicators** section of the counter grid to highlight it in the graph. In the screenshot shown below we can see that the average number of pages per second over the duration of the test was **1.18** (this may vary for you).
<a name="![](images/062.png)"></a>
### ![](images/062.png) ###
<a name="Ex1Task8"></a>
![](images/062.png)
### Task 8: Generating and viewing load test trend reports ###
1. Even though the initial load test may result in some numbers that dont seem to provide a wealth of information it does provide a good baseline and allow us to make relative measures between test runs to help measure performance impacts of code changes. For example, if we had seen a relatively high level of batch requests per second during our initial load tests, perhaps that could be addressed by adding in some additional caching, and then re-testing to make sure that the request per second goes down.

Просмотреть файл

@ -10,29 +10,24 @@ Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
In this lab, you will learn how to use Microsoft Team Foundation Server 2017 to manage your projects testing lifecycle. This project will guide you through creating test plans designed efficiently validate your software milestones. You will also create and execute manual tests that can be consistently reproduced over the course of each release.
<a name="Prerequisites"></a>
### Prerequisites ###
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Parts Unlimited Scenario"></a>
### About the Parts Unlimited Scenario ###
This set of hands-on-labs uses a fictional company, Parts Unlimited, as a backdrop to the scenarios you are learning about. Parts Unlimited sells automotive products. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to manage their catalog and inventory.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Parts Unlimited. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Managing Test Plans, Suites, and Cases ##
In this exercise, you will learn how to create and manage test plans, test suites, and test cases.
<a name="Ex1Task1"></a>
### Task 1: Understanding Test Plans, Suites, and Cases ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -43,7 +38,7 @@ In this exercise, you will learn how to create and manage test plans, test suite
![](images/000.png)
1. Select **Test | Test Plans** to open the **Test Hub**. The test hub provides a central place for all test planning, execution, and analysis.
1. Select **Test \| Test Plans** to open the **Test Hub**. The test hub provides a central place for all test planning, execution, and analysis.
![](images/001.png)
@ -73,10 +68,8 @@ In this exercise, you will learn how to create and manage test plans, test suite
1. As expected, the user story is present in the **Related Work** section. It really is easy to navigate through any kind of work item and asset to understand the relationships and dependencies present in a given project. You can also see that there are two separate test cases in use to verify the behavior of this bug, which are the test cases we saw in the panel earlier. Press **Esc** to close the bug. Press **Esc** again to close the test case and return to the test suite view.
<a name="![](images/008.png)"></a>
### ![](images/008.png) ###
![](images/008.png) ###
<a name="Ex1Task2"></a>
### Task 2: Managing Tests ###
1. Sometimes a set of test cases should be run in a specific order to maximize efficiency. Click **Order tests** to specify the order these test cases should be run.
@ -131,7 +124,6 @@ In this exercise, you will learn how to create and manage test plans, test suite
![](images/021.png)
<a name="Ex1Task3"></a>
### Task 3: Authoring Tests ###
1. Expand the dropdown next to the **v2.1** test plan and select **New static suite.** A **static suite** of test cases is a suite where the cases have been manually assigned. You can also create suites based on common requirements (**requirement-based suite**) or a query of test cases and/or work items (**query-based suite**).
@ -154,7 +146,7 @@ In this exercise, you will learn how to create and manage test plans, test suite
![](images/026.png)
1. While you can create test cases one at a time, its sometimes easier to use a grid layout to quickly add many test cases. In the test cases panel, select **New | New test case using grid**.
1. While you can create test cases one at a time, its sometimes easier to use a grid layout to quickly add many test cases. In the test cases panel, select **New \| New test case using grid**.
![](images/027.png)
@ -180,12 +172,10 @@ In this exercise, you will learn how to create and manage test plans, test suite
1. Press **Esc** to close the dialog.
<a name="Exercise2"></a>
## Exercise 2: Authoring, Running, and Analyzing Manual Tests ##
In this exercise, you will learn how to create a manual test plan and populate it with steps. The plan can later be run to confirm the expected behavior of your software. In this lab, were going to focus on creating a new manual test case and running it.
<a name="Ex2Task1"></a>
### Task 1: Installing the Test & Feedback Extension ###
1. Install **Google Chrome** from [http://google.com/chrome](http://google.com/chrome). The rest of this exercise will use Chrome as its browser.
@ -220,10 +210,8 @@ In this exercise, you will learn how to create a manual test plan and populate i
1. After connecting to TFS, you will need to select the team you want these efforts associated with. Select the **PartsUnlimitedCollection** and select the **PartsUnlimited Team** at the end of the chain. Click **Save** to continue.
<a name="![](images/039.png)"></a>
### ![](images/039.png) ###
![](images/039.png) ###
<a name="Ex2Task2"></a>
### Task 2: Authoring a Manual Test Plan ###
1. In Chrome, navigate to [http://vsalm:8080/tfs](http://vsalm:8080/tfs).
@ -232,7 +220,7 @@ In this exercise, you will learn how to create a manual test plan and populate i
![](images/040.png)
1. Select **Test | Test Plans**.
1. Select **Test \| Test Plans**.
![](images/041.png)
@ -244,7 +232,7 @@ In this exercise, you will learn how to create a manual test plan and populate i
![](images/043.png)
1. From the **Tests** tab, select **New | New test case** to create a new test case.
1. From the **Tests** tab, select **New \| New test case** to create a new test case.
![](images/044.png)
@ -302,10 +290,8 @@ In this exercise, you will learn how to create a manual test plan and populate i
1. Click **Save & Close** to save the test case.
<a name="![](images/049.png)"></a>
### ![](images/049.png) ###
![](images/049.png) ###
<a name="Ex2Task3"></a>
### Task 3: Running a Manual Test Plan ###
1. In this task, you will learn how to run the manual test plan that we created earlier.
@ -374,7 +360,7 @@ In this exercise, you will learn how to create a manual test plan and populate i
![](images/064.png)
1. The last steps are to log out via **Profile | Log off** and to close the browser window.
1. The last steps are to log out via **Profile \| Log off** and to close the browser window.
![](images/065.png)
@ -412,7 +398,6 @@ In this exercise, you will learn how to create a manual test plan and populate i
1. Close the test browser windows.
<a name="Ex2Task4"></a>
### Task 4: Analyzing Manual Test Results ###
1. In this task, you will learn how to review the results of a manual test run.
@ -441,7 +426,6 @@ In this exercise, you will learn how to create a manual test plan and populate i
![](images/079.png)
<a name="Ex2Task5"></a>
### Task 5: Creating Shared Steps ###
1. In this task, you will learn how to create shared steps. A shared step combines multiple steps that are commonly performed in sequence into a single logical step, which can be shared across tests. If the process defined by the shared steps ever changes in the future, you can update the shared step in one place and it will be reflected in all tests that reference it.

Просмотреть файл

@ -10,20 +10,16 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
Package Management is an extension that makes it easy to discover, install, and publish NuGet and npm packages in Team Foundation Server. It's deeply integrated with other hubs like Build so that package management can become a seamless part of your existing workflows.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="Exercise1"></a>
## Exercise 1: Working with the package management service ##
<a name="Ex1Task1"></a>
### Task 1: Configuring the service ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -56,8 +52,7 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. There are no feeds by default.
<a name="![](images/006.png)"></a>
### ![](images/006.png) ###
![](images/006.png)
<a name="Ex1Task2"></a>
### Task 2: Creating and connecting to a feed ###
@ -80,7 +75,7 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. Launch **Visual Studio** from the taskbar.
1. Select **Tools | NuGet Package Manager | Package Manager Settings**.
1. Select **Tools \| NuGet Package Manager \| Package Manager Settings**.
1. Locate the **Package Sources** section and click the **Add** button to add a new package source.
@ -88,13 +83,11 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. Set the **Name** to **“PartsUnlimitedShared”** and paste the **Source** URL copied earlier. Click **Update** followed by **OK**. Visual Studio is now connected to the new feed.
<a name="![](images/012.png)"></a>
### ![](images/012.png) ###
![](images/012.png)
<a name="Ex1Task3"></a>
### Task 3: Creating and publishing a NuGet package ###
1. From the main menu of **Visual Studio**, select **File | New | Project**. We will now create a shared assembly that will be published as a NuGet package so that other teams can integrate it and stay up to date without having to work directly with the project source.
1. From the main menu of **Visual Studio**, select **File \| New \| Project**. We will now create a shared assembly that will be published as a NuGet package so that other teams can integrate it and stay up to date without having to work directly with the project source.
1. From the **Visual C#** section, select the **Class Library** template and set the **Name** to **“PartsUnlimited.Shared”**. Click **OK** to create the project.
@ -126,7 +119,7 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
![](images/019.png)
1. In the same **Windows Explorer** window, select **File | Open command prompt**.
1. In the same **Windows Explorer** window, select **File \| Open command prompt**.
![](images/020.png)
@ -158,10 +151,8 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. Return to the browser window open to TFS and **refresh** the window. You should now see the organizations NuGet package is published in the feed.
<a name="![](images/025.png)"></a>
### ![](images/025.png) ###
![](images/025.png)
<a name="Ex1Task4"></a>
### Task 4: Importing a NuGet package ###
1. Open a new instance of **Visual Studio** from the taskbar. We will now add a reference to the **PartsUnlimited.Shared** NuGet package to an existing project.
@ -189,7 +180,7 @@ In order to complete this lab you will need the Visual Studio 2017 virtual machi
1. Switch to the instance of **Visual Studio** that has the **PartsUnlimited.Shared** project open (the NuGet source project).
1. In **Solution Explorer**, right-click the **PartsUnlimited.Shared** project node and select **Add | New Item**.
1. In **Solution Explorer**, right-click the **PartsUnlimited.Shared** project node and select **Add \| New Item**.
![](images/030.png)

Просмотреть файл

@ -57,7 +57,6 @@ Lab Name</b>
<tr><td><a href="agile/">Agile Planning and Portfolio Management with Team Foundation Server 2017</a></td></tr>
<tr><td><a href="branchingandmerging/">Branching and Merging Visualization with Visual Studio Team Foundation Server 2017</a></td></tr>
<tr><td><a href="storyboarding/">Building the Right Software - Generating Storyboards and Collecting Stakeholder Feedback with Visual Studio 2017</a></td></tr>
<tr><td><a href="architecturevalidation/">Code Discovery using Live Dependency Validation in Visual Studio Enterprise 2017</a> <span class="label label-success">New</span></td></tr>
<tr><td><a href="devteamcollaboration/">Collaboration Experiences for Development Teams using Team Foundation Server 2017</a></td></tr>
<tr><td><a href="devexp/">Developer experience enhancements in Visual Studio 2017</a> <span class="label label-success">New</span></td></tr>
<tr><td><a href="debugging/">Debugging with IntelliTrace using Visual Studio Enterprise 2017</a></td></tr>
@ -67,7 +66,7 @@ Lab Name</b>
<tr><td><a href="intellitest/">Generate Unit Tests with IntelliTest using Visual Studio Enterprise 2017</a></td></tr>
<tr><td><a href="smartword4tfs/">Introduction to the Modern Requirements Suite4TFS & Team Foundation Server 2017</a></td></tr>
<tr><td><a href="appinsights/">Instrumenting ASP.NET with Application Insights in Visual Studio 2017</a></td></tr>
<tr><td><a href="liveunittesting/">Live Unit Testing in Visual Studio 2017</a> <span class="label label-success">New</span></td></tr>
<tr><td><a href="liveunittesting/">Live Unit Testing and Live Dependency Validation in Visual Studio 2017</a> <span class="label label-success">New</span></td></tr>
<tr><td><a href="vsproductivity/">Making Developers More Productive with Visual Studio Team Foundation Server 2017</a></td></tr>
<tr><td><a href="technicaldebt/">Managing Technical Debt with Team Foundation Server 2017 and SonarQube</a></td></tr>
<tr><td><a href="packagemanagement/">Package Management in Team Foundation Server 2017</a> <span class="label label-success">New</span></td></tr>

Просмотреть файл

@ -10,29 +10,24 @@ Lab version:15.0.26228.0
Last updated:3/3/2017
<a name="Overview"></a>
## Overview ##
## Overview
In this lab, you will learn about the release management features available in Visual Studio 2017 and its suite of release and deployment tools that automate the deployment of applications across the desktop, server, and the cloud. The release management features of Visual Studio 2017 help development and operations teams integrate with Team Foundation Server to configure and automate complex deployments of their automated builds to target environments more easily. Development teams can also model their release processes and track approvals, sign-offs, and visualize their release status.
<a name="Prerequisites"></a>
### Prerequisites ###
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Continuous Release Management ##
In this exercise, you will use the release management features of Team Foundation Server to produce an automated deployment solution. This exercise will take an existing enterprise application and automate its deployment to the development team's testing environment after each source check-in.
<a name="Ex1Task1"></a>
### Task 1: Configuring a continuous build ###
1. Log in as **Brian Keller (VSALM\Brian)**. All user passwords are **P2ssw0rd**.
@ -117,7 +112,6 @@ In this exercise, you will use the release management features of Team Foundatio
1. You don't need to wait for the build to complete to move on to the next step.
<a name="Ex1Task2"></a>
### Task 2: Creating a continuous release ###
1. Now that there is an automatic build that occurs when changes are checked in, it's time to set up a continuous release so that this new build can make its way out to stakeholders. Right-click the **Release** tab and select **Open in new tab**. You should now have three tabs open: Code, Build, and Release. Switch to the Release tab.
@ -216,15 +210,12 @@ In this exercise, you will use the release management features of Team Foundatio
1. Return to the Fabrikam Fiber Dev browser tab and refresh it to confirm the changes have been deployed.
<a name="![](images/036.png)"></a>
## ![](images/036.png) ##
![](images/036.png) ##
<a name="Exercise2"></a>
## Exercise 2: Gated Releases ##
While automated releases are great, sometimes you want to gate their progress by requiring user approval. In this exercise, you will add a second environment to the release process for QA and user acceptance testing. In this scenario, you will allow the release to reach the QA site, but only if it successfully deploys to Dev. Once it's available on QA, it won't be considered "success" until approved manually. Note that it's just as easy to also (or alternatively) have this human approval gate prior to the deployment.
<a name="Ex2Task1"></a>
### Task 1: Adding a QA environment ###
1. Return to the tab with all the releases (probably the third).
@ -281,15 +272,12 @@ While automated releases are great, sometimes you want to gate their progress by
1. Return to the FF QA site (probably the last tab) and confirm the "v3.0" made it through.
<a name="![](images/049.png)"></a>
## ![](images/049.png) ##
![](images/049.png) ##
<a name="Exercise3"></a>
## Exercise 3: Releasing To Azure ##
The release management tools are incredibly flexible. Not only can you automate virtually anything, you can even leverage some of the higher-lever tasks to easily perform complex processes, such as deploying to an Azure web site.
<a name="Ex3Task1"></a>
### Task 1: Creating an Azure Web site and database ###
1. Create an Azure account at [http://azure.com](http://azure.com/) if you don't already have one.
@ -389,10 +377,8 @@ The release management tools are incredibly flexible. Not only can you automate
1. Click **Finish** on the final page of the wizard to deploy the database.
<a name="![](images/070.png)"></a>
### ![](images/070.png) ###
![](images/070.png) ###
<a name="Ex3Task2"></a>
### Task 2: Configuring the build to produce a Web Deploy package ###
1. Return to the browser tabs open to the builds section of the portal.
@ -410,10 +396,8 @@ The release management tools are incredibly flexible. Not only can you automate
1. Click **Save** to save the build definition. It will now produce the web deploy zip needed for publication to Azure.
<a name="![](images/073.png)"></a>
### ![](images/073.png) ###
![](images/073.png) ###
<a name="Ex3Task3"></a>
### Task 3: Creating a release environment for Azure ###
1. Return to the **Releases** tab.
@ -503,10 +487,8 @@ The release management tools are incredibly flexible. Not only can you automate
```
1. Save the release.
<a name="![](images/092.png)"></a>
### ![](images/092.png) ###
![](images/092.png) ###
<a name="Ex3Task4"></a>
### Task 4: Checking in a change to kick off the release workflow ###
1. Return to the code browser tab and locate the path below.
@ -534,10 +516,8 @@ The release management tools are incredibly flexible. Not only can you automate
1. Now everyone can easily see that the most recent release made it all the way through the release pipeline and is live in the cloud.
<a name="![](images/097.png)"></a>
### ![](images/097.png) ###
![](images/097.png) ###
<a name="Ex3Task5"></a>
### Task 5: Deploying to Azure from Visual Studio ###
1. While all of the automation available in **Team Foundation Server** provides a great "continuous integration, continuous deployment" (CICD) experience, sometimes you may still want to manually deploy a build directly from Visual Studio. And thanks to tight integration between Visual Studio and Azure, it's really easy to do.
@ -588,10 +568,8 @@ The release management tools are incredibly flexible. Not only can you automate
1. Upon completion, the integrated browser will open to the public URL. Note the new version number, which confirms the deployment was successful.
<a name="![](images/108.png)"></a>
### ![](images/108.png) ###
![](images/108.png) ###
<a name="Ex3Task6"></a>
### Task 6: Working with deployment slots ###
1. Azure App Services offer **deployment slots**, which are parallel targets for application deployment. The most common scenario for using a deployment slot is to have a staging environment for your application to run against productions services, but without replacing the current production application. If the staging deployment passes review, it can immediately be "swapped" in as the production slot with the click of a button. As an additional benefit, the swap can be quickly reversed in the event an issue is uncovered with the new build.

Просмотреть файл

@ -99,12 +99,12 @@ USB 1.1 interfaces.
<table style="width:100%">
<tr>
<th>Test</th>
<th>Requirement for Hyper-V Host Machine</th>
<th class="text_center">Test</th>
<th class="text_center">Requirement for Hyper-V Host Machine</th>
</tr>
<tr>
<td><p>Operating System</p></td>
<td><p>Microsoft Windows® Server 2008 R2 with the Hyper-V role enabled</p></td>
<td class="text_center"><p>Operating System</p></td>
<td class="text_center"><p>Microsoft Windows® Server 2008 R2 with the Hyper-V role enabled</p></td>
</tr>
<tr>
<td> </td>

Просмотреть файл

@ -10,29 +10,20 @@ Lab version:15.0.26228.0
Last updated:3/2/2017
<a name="Overview"></a>
## Overview ##
How often have you built the software that your users asked for, but not necessarily what they wanted? In a world of increasingly complex software projects, it is critical that we can accurately capture requirements from users, which can then be translated into working software. In this lab, you'll learn how the capabilities of Visual Studio 2017 make it possible to both rapidly storyboard your requirements, and - as your software evolves - get rich, actionable feedback from users of your software which can help shape what you deliver.
<a name="Prerequisites"></a>
### Prerequisites ###
## Pre-requisites ##
In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/almvm).
<a name="About the Fabrikam Fiber Scenario"></a>
### About the Fabrikam Fiber Scenario ###
This set of hands-on-labs uses a fictional company, Fabrikam Fiber, as a backdrop to the scenarios you are learning about. Fabrikam Fiber provides cable television and related services to the United States. They are growing rapidly and have embraced Windows Azure to scale their customer-facing web site directly to end-users to allow them to self-service tickets and track technicians. They also use an on-premises ASP.NET MVC application for their customer service representatives to administer customer orders.
In this set of hands-on labs, you will take part in a number of scenarios that involve the development and testing team at Fabrikam Fiber. The team, which consists of 8-10 people has decided to use Visual Studio application lifecycle management tools to manage their source code, run their builds, test their web sites, and plan and track the project.
<a name="Exercise1"></a>
## Exercise 1: Introduction to Storyboarding ##
In this exercise, you will learn how to use the PowerPoint storyboarding add-in to create application storyboards. This will be accomplished by examining an existing storyboard file and by adding in some additional storyboard slides to address an additional user story.
<a name="Ex1Task1"></a>
### Task 1: Creating a Storyboard Linked to Work Item ###
1. Log in as **Sachin Raj (VSALM\Sachin)**. All user passwords are **P2ssw0rd**.
@ -59,16 +50,14 @@ In this exercise, you will learn how to use the PowerPoint storyboarding add-in
1. At this point, the new storyboard can be created from scratch using the full power of PowerPoint, including the tooling found in the **Storyboarding** tab. For the purposes of this lab, however, we will jump ahead to a storyboard that is already in progress. Close the PowerPoint window without saving any changes.
1. As an aside, you also have the ability to link to an existing storyboard, such as one that might be stored in SharePoint or elsewhere. Select the **Links** tab and then click **Add link | Existing item**.
1. As an aside, you also have the ability to link to an existing storyboard, such as one that might be stored in SharePoint or elsewhere. Select the **Links** tab and then click **Add link \| Existing item**.
![](images/005.png)
1. This **Location** would be to a location that is accessible to all team members. Click **Cancel**.
<a name="![](images/006.png)"></a>
### ![](images/006.png) ###
![](images/006.png) ###
<a name="Ex1Task2"></a>
### Task 2: Creating Storyboards in PowerPoint ###
1. Open the PowerPoint file at **C:\Samples\FF Storyboard - Start.pptx**.
@ -197,5 +186,5 @@ In this exercise, you will learn how to use the PowerPoint storyboarding add-in
1. Press the **F5** key to view the storyboard in presentation mode. Press the right arrow key to start the mouse cursor animation. When it reaches the hyperlink for the service ticket, press the right arrow key to navigate to the second slide. Press the **Esc** key when finished.
1. Close PowerPoint without saving changes.
1. Close PowerPoint without saving changes.

Просмотреть файл

@ -14,7 +14,7 @@ Technical debt is the set of problems in a development effort that make forward
> SonarQube is an open source platform for understanding and managing technical debt, it provides different ways to analyze and measure technical quality from project portfolio to method.
### Prerequisites
## Pre-requisites
1- In order to complete this lab you will need the Visual Studio 2017 virtual machine provided by Microsoft. For more information on acquiring and using this virtual machine, please see [this blog post](http://aka.ms/ALMVM).
@ -24,16 +24,6 @@ Technical debt is the set of problems in a development effort that make forward
4- Complete
### Exercises
This hands-on lab includes the following exercises:
* Install and configure SonarQube Server and Extensions.
* Analyzing Projects with SonarQube Extension for VSTS/TFS.
Estimated time to complete this lab: **45 minutes**.
## Exercise 1: Install and Configure SonarQube Server and Extensions
In this exercise, you will learn about the main installation and configuration points required to install and configure SonarQube for demo purposes
@ -41,45 +31,45 @@ In this exercise, you will learn about the main installation and configuration p
### Task 1: Install and Configure SonarQube Server
1. Download **SonarQube** Server from the SonarQube downloads.
1. Download **SonarQube** Server from the SonarQube downloads.
<img src="./media/techdebt_img1.png" />
<img src="./media/techdebt_img1.png" />
2. Download **Java SE Runtime Environment (JRE)** from the Oracle Jave SE downloads page. Select the Download under JRE. Select Accept License Agreement and click the Windows x64 that points to exe file.
2. Download **Java SE Runtime Environment (JRE)** from the Oracle Jave SE downloads page. Select the Download under JRE. Select Accept License Agreement and click the Windows x64 that points to exe file.
<img src="./media/techdebt_img2.png" />
<img src="./media/techdebt_img2.png" />
3. Download the latest [**SonarC#** ](https://docs.sonarqube.org/pages/viewpage.action?pageId=1441900)sonar-csharp-plugin-X.Y.jar available from the SonarQube plugin library
3. Download the latest [**SonarC#** ](https://docs.sonarqube.org/pages/viewpage.action?pageId=1441900)sonar-csharp-plugin-X.Y.jar available from the SonarQube plugin library
<img src="./media/techdebt_img3.png" />
<img src="./media/techdebt_img3.png" />
4. Download **SonarQube** extension from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube).
4. Download **SonarQube** extension from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube).
<img src="./media/techdebt_img4.png" />
<img src="./media/techdebt_img4.png" />
5. Log in as <b>Sachin Raj</b> (VSALM\\Sachin)</b>. All user passwords are <b>P2ssw0rd</b>
5. Log in as <b>Sachin Raj</b> (VSALM\\Sachin)</b>. All user passwords are <b>P2ssw0rd</b>
6. Copy **sonarqube-x.x.zip**, **jre-XuXXX-windows-x64.exe**, **sonar-csharp-plugin-X.Y.jar** and **SonarSource.sonarqube-X.X.X.vsix** to the virtual machine.
6. Copy **sonarqube-x.x.zip**, **jre-XuXXX-windows-x64.exe**, **sonar-csharp-plugin-X.Y.jar** and **SonarSource.sonarqube-X.X.X.vsix** to the virtual machine.
7. Install Java SE Runtime Environment on the VM.
7. Install Java SE Runtime Environment on the VM.
8. Right-click on sonarqube-x.x.x.zip, select Properties and then click on the Unblock button
8. Right-click on sonarqube-x.x.x.zip, select Properties and then click on the Unblock button
9. Unzip SonarQube-x.x.zip on to a folder, for example use C:\SonarQube\SonarQube-x.x.x.
9. Unzip SonarQube-x.x.zip on to a folder, for example use C:\SonarQube\SonarQube-x.x.x.
10. In the extracted folder navigate to **Conf** folder, edit **sonar.properties** file to change the default web port for example **9090**.
`By default, SonarQube uses port **9000** which is currently being used in the virtual machine for FabrikamFiber QA web site (FF QA). For the purpose of this lab you can provide port 9090.`
`By default, SonarQube uses port **9000** which is currently being used in the virtual machine for FabrikamFiber QA web site (FF QA). For the purpose of this lab you can provide port 9090.`
11. Copy **sonar-csharp-plugin-X.Y.jar** to SonarQube directory (C:\SonarQube\SonarQube-x.x.x\) under **extensions\plugins\** subdirectory.
13. Run SonarQube by opening a **command prompt** and change the directory to SonarQube extracted folder cd C:\SonarQube\SonarQube-x.x.x\bin\windows-x86-64 and Run **StartSonar.bat**. Wait until you get a confirmation on the command prompt that the process is up and running.
<img src="./media/techdebt_img5.png"/>
<img src="./media/techdebt_img5.png"/>
14. Open you browser and navigate to http://vsalm:9090 to access the SonarQube portal
<img src="./media/techdebt_img6.png" />
<img src="./media/techdebt_img6.png" />
### Task 2: Install and Configure SonarQube Extension
@ -87,23 +77,23 @@ In this exercise, you will learn about the main installation and configuration p
2. Browse for your downloaded TFS extensions (https://vsalm:8080/tfs/_gallery) by clicking **Browse TFS extensions**
<img src="./media/techdebt_img7.png" />
<img src="./media/techdebt_img7.png" />
3. Click **Manage your extensions**.
<img src="./media/techdebt_img8.png" />
<img src="./media/techdebt_img8.png" />
4. Click **Upload new extension** to upload SonarQube extension that you downloaded.
<img src="./media/techdebt_img9.png" />
<img src="./media/techdebt_img9.png" />
5. Install the SonarQube extension in your team project collection, by click **Install**
<img src="./media/techdebt_img10.png" />
<img src="./media/techdebt_img10.png" />
6. Choose the team project collection where you want to install the extension and click **Confirm**
<img src="./media/techdebt_img11.png" />
<img src="./media/techdebt_img11.png" />
## Exercise 2: Analyzing Projects with SonarQube Extension for VSTS/TFS
In this exercise, you will learn about the main configuration points that are needed to integrate Team Foundation Server build with SonarQube, performing code analysis on a sample project, and access the analysis result from build summary and SonarQube project dashboard.
@ -117,7 +107,7 @@ In this exercise, you will learn about the main configuration points that are ne
2. Return to the main Build view by selecting the **Builds** tab.
<img src="./media/image57.png" />
<img src="./media/image57.png" />
3. Select the **Ellipses** drop-down just to the right of the
**Fabrikam Development Build** definition to load the associated
@ -129,73 +119,76 @@ In this exercise, you will learn about the main configuration points that are ne
In this case, click **Clone** to create a copy of the
current definition.
<img src="./media/image58.png" />
<img src="./media/image58.png" />
### Task 2: Adding SonarQube Build Steps and Service Endpoint
1. Click **Add build step...**
<img src="./media/image59.png" />
<img src="./media/image59.png" />
2. Under Build category select **SonarQube Scanner for MSBuild - Begin Analysis (new)** and click **Add**
3. Select **SonarQube Scanner for MSBuild - End Analysis (new)** and click **Add**
<img src="./media/techdebt_img14.png" />
<img src="./media/techdebt_img14.png" />
4. Reorder the tasks to respect the following order:
* **SonarQube Scanner for MSBuild - Begin Analysis (new)** task before any MSBuild or Visual Studio Build task.
* **SonarQube Scanner for SonarQube Scanner for MSBuild - End Analysis (new)** task after the Visual Studio Test task.
<img src="./media/techdebt_img13.png" />
<img src="./media/techdebt_img13.png" />
5. Click on the **SonarQube Scanner for MSBuild - End Analysis (new)** step to configure it:
* Add a new **SonarQube Endpoint** by click **Manage**
* Add a new **SonarQube Endpoint** by click **Manage**
<img src="./media/techdebt_img15.png" />
<img src="./media/techdebt_img15.png" />
* In **Services** page click **New Service Endpoint** and select **SonarQube**
* In **Services** page click **New Service Endpoint** and select **SonarQube**
<img src="./media/techdebt_img16.png" />
<img src="./media/techdebt_img16.png" />
* In **Add new SonarQube Connection** dialog provide the following details:
* **Connection Name**: example SonarQube
* **Server Url**: Url for the SonarQube Server to connect to, this should be the SonarQube Server we setup in the previous exercise: **http://vsalm:9090**
* **Token**: Authentication token generated by SonarQube.
* In **Add new SonarQube Connection** dialog provide the following details:
<img src="./media/techdebt_img17.png" />
* **Connection Name**: example SonarQube
* **Server Url**: Url for the SonarQube Server to connect to, this should be the SonarQube Server we setup in the previous exercise: **http://vsalm:9090**
* **Token**: Authentication token generated by SonarQube.
* In the build definition page, click refresh and select the newly added service endpoint **SonarQube**
<img src="./media/techdebt_img17.png" />
<img src="./media/techdebt_img18.png" />
* In the build definition page, click refresh and select the newly added service endpoint **SonarQube**
* While still in **SonarQube Scanner for MSBuild - Begin Analysis (new)** provide the following information under The **SonarQube Project Settings** section:
* **Project Key** - the unique project key in SonarQube, example **FFDev**
* **Project Name** - the name of the project in SonarQube, example **FFDev**
* **Project Version** - the version of the project in SonarQube, exmaple **1.0**
<img src="./media/techdebt_img18.png" />
<img src="./media/techdebt_img19.png" />
* While still in **SonarQube Scanner for MSBuild - Begin Analysis (new)** provide the following information under The **SonarQube Project Settings** section:
6. Click **Save**. Name the new build definition "FabrikamFiber.Dev.Quality" and click **OK**.
* **Project Key** - the unique project key in SonarQube, example **FFDev**
* **Project Name** - the name of the project in SonarQube, example **FFDev**
* **Project Version** - the version of the project in SonarQube, exmaple **1.0**
<img src="./media/techdebt_img20.png" />
<img src="./media/techdebt_img19.png" />
6. Click **Save**. Name the new build definition "FabrikamFiber.Dev.Quality" and click **OK**.
<img src="./media/techdebt_img20.png" />
### Task 3: Queuing and Executing a Build
1. Click **Queue new build**.
<img src="./media/image83.png" />
<img src="./media/image83.png" />
2. Note that the **Queue Build dialog** allows you to configure the queue, optionally select a shelveset, variable values, and demands. Use the defaults presented by clicking **OK**.
<img src="./media/image84.png" />
<img src="./media/image84.png" />
3. Note that once the build starts, you can monitor the real-time build status in the live console view. It will take some time for SonarQube analysis to complete, so please expect **SonarQube Scanner for MSBuild - End Analysis (new)** to take sometime.
4. Once the build completed, in the build summary report, youll be able see a new summary section entitled **SonarQube Analysis Report**.
<img src="./media/techdebt_img21.png" />
<img src="./media/techdebt_img21.png" />
5. Click **Detailed SonarQube report** hyperlink to navigate to SonarQube dashboard.
<img src="./media/techdebt_img22.png" />
<img src="./media/techdebt_img22.png" />

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше