Steve Lange @ Work

Steve Lange's thoughts on application lifecycle management, Visual Studio, and Team Foundation Server

June, 2014

  • Steve Lange @ Work

    Microsoft Test Case Management – Handling Test Steps with Multiple Expected Results

    • 0 Comments

    I’ve been asked by a few customers about this topic in the past week, so I thought I’d generalize my response into this post.  I hope others will find this helpful as well!

    Sometimes when building a test case in Microsoft Test Manager or Web Access, you will have a test step with more than one expected result.  Perhaps you need to verify several fields on a form, or that multiple things happen as a result of your action. 

    If you encounter this scenario from time to time, you can handle it a couple different ways.

    Using this very generic example (you may or may not recognize this test case from my previous blog post):

    clip_image002

    Note that step 2 has two expected results.

    Single-step, multiple expected results, single pass/fail

    As-is, you can run this test case without issue. The small challenge with this is handling a failure with one expected result and a pass with another. Is the step a pass or fail? Chances are you want to fail the step so it’s recorded, but note somehow that one result did pass. To accommodate this, you would fail the step but capture a comment:

    clip_image003

    The secondary challenge with this is reporting. Since I told the tool that this was a failure, any reporting I do will show it as a failure, ignoring the fact that one result did pass.

    Single-action step, multiple expected results, individual pass/fail

    As an alternative, the tool will let you mimic multiple expected results by adding an additional step, but without an action. For example:

    clip_image005

    Now when you execute this, you can mark individual expected results as pass/fail:

    clip_image006

    This will make it easier to interrogate test results to see exactly where the failure occurred. Additionally, if you use Microsoft Test Manager, it has the ability to create an action recording to let you fast-forward through specific steps in subsequent test runs. Breaking up the results into individual steps will make this recording/playback experience more accurate.

    Thanks for reading!

  • Steve Lange @ Work

    FREE Imaginet ALM Webinars: June through Dec 2014

    • 0 Comments

    clip_image001Here is an updated listing of upcoming ALM webinars from our partner Imaginet.  They’re FREE, so you might as well check them out!

    Enhance Productivity with Distributed Version Control Using Git and Visual Studio 2013

    Register

    Microsoft’s release of Team Foundation 2013 enables you to work locally with a Git (distributed version control) repository and then “sync up” with a central TFS repository. In this session, we will discuss and demonstrate how this new integration works and the advantages that it will provide for your teams. Get best of both distributed version control system (DVCS) and Team Foundation Server with the TFS-Git integration. Come join us for this free webcast!

    Date

    June 26, 2014 12:00 PM

     

    Deliver Higher Quality Software with Automated Coded UI Testing

    Register

    In this webinar, Imaginet will demonstrate how to record tests run against various types of application user interfaces using Microsoft Visual Studio's Coded UI Tests and how to replay them at any time. Additionally, we will explore how to embed validations, either simple or elaborate, to ensure your application is producing the correct results. Learn how to improve the quality of your applications by having a repeatable set of Microsoft Coded UI Tests available to ensure defects don’t go unnoticed!

    Date

    July 17, 2014 12:00 PM CST

     

    Discover the Top Business Benefits of Application Lifecycle Management (ALM)

    Register

    Why should your business focus on Application Lifecycle Management? What benefits will you see to your overall business? How does ALM impact your bottom line? Come attend this free webinar to discover all the answers!

    Date

    July 24, 2014 12:00 PM CST

     

    How to Get Control Over Your Portfolio of Projects with Agile and TFS

    Register

    Scrum and agile management methodologies focus on iterative planning, development and release. This session will demonstrate how agile planning, management, and tracking are streamlined with Visual Studio 2013. In addition, this session will review and demonstrate the new Enterprise Agile Management capabilities, which enable larger organizations to effectively manage their Agile projects across all their teams. Come join us for this free webcast!

    Date

    August 7, 2014 12:00 PM CST

     

    How to Improve Your Software Deployments with Release Management and TFS 2013

    Register

    As teams try to meet the demand for a more rapid release cadence, one of the biggest pain points they are hitting is managing the releases and creating reliable, repeatable automated deployment. In addition, it is increasingly hard to manage the number of simultaneously in-flight releases. With Team Foundation Server (TFS) 2103, Microsoft now provides new release tooling to help you manage your in-flight releases. In this session, Imaginet will explore and demonstrate this new release management capabilities that will greatly improve your team’s release management experience.

    Date

    August 21, 2014 12:00 PM CST

     

    Enhance Productivity with Distributed Version Control Using Git and Visual Studio 2013

    Register

    Microsoft’s release of Team Foundation 2013 enables you to work locally with a Git (distributed version control) repository and then “sync up” with a central TFS repository. In this session, we will discuss and demonstrate how this new integration works and the advantages that it will provide for your teams. Get best of both distributed version control system (DVCS) and Team Foundation Server with the TFS-Git integration. Come join us for this free webcast!

    Date

    September 4, 2014 12:00 PM CST

     

    Enterprise UX: Project Success with User Experience Design

    Register

    Find out why User Experience Design is the most important process that your development practice needs to adopt to stay ahead of the game. We will identify the fundamentals of UX and explain how you can succeed on your next project.

    Date

    September 18, 2014 12:00 PM CST

     

    Discover the Top Business Benefits of Application Lifecycle Management (ALM)

    Register

    Why should your business focus on Application Lifecycle Management? What benefits will you see to your overall business? How does ALM impact your bottom line? Come attend this free webinar to discover all the answers!

    Date

    October 2, 2014 12:00 PM CST

     

    Discover How the Kanban Method Can Kick Start a Culture of Continuous Improvement for Your Organization

    Register

    Kanban was originally created as a scheduling system to help manufacturing organizations determine what to produce, when to produce it, and how much to produce. Although this may not sound like software development, these lean principles can be successfully applied to development teams to improve the delivery of value through better visibility and limits on work in process. This webinar will provide an overview of the Kanban method, including the history and motivation, the core principles and practices, and how these apply to efficiency and process improvement in software development.

    Date

    October 16, 2014 12:00 PM CST

     

    How To Manage Your Test Labs Without The Headaches

    Register

    Several years ago, Microsoft released a bold new feature to support management of virtual test environments. "Lab Management" provided the ability to easily spin up test environments, perform automated build and deployments, run automated tests, and collect diagnostic data. Unfortunately, many teams were discouraged by the infrastructure requirements. With the newest version of Visual Studio and standard environments, even small teams or groups who can't use Microsoft's Hyper-V can still benefit from lab management. This session will demonstrate how to configure your existing environments for many of the same compelling features formerly available only with Hyper-V. Come join us for this free webinar!

    Date

    October 30, 2014 12:00 PM CST

     

    Deliver Higher Quality Software with Automated Coded UI Testing

    Register

    In this webinar, Imaginet will demonstrate how to record tests run against various types of application user interfaces using Microsoft Visual Studio's Coded UI Tests and how to replay them at any time. Additionally, we will explore how to embed validations, either simple or elaborate, to ensure your application is producing the correct results. Learn how to improve the quality of your applications by having a repeatable set of Microsoft Coded UI Tests available to ensure defects don’t go unnoticed!

    Date

    November 13, 2014 12:00 PM CST

     

    Enhance Productivity with Distributed Version Control Using Git and Visual Studio 2013

    Register

    Microsoft’s newest release of Team Foundation 2013 enables you to work locally with a Git (distributed version control) repository and then “sync up” with a central TFS repository. In this session, we will discuss and demonstrate how this new integration works and the advantages that it will provide for your teams. Get best of both distributed version control system (DVCS) and Team Foundation Server with the TFS-Git integration. Come join us for this free webcast!

    Date

    November 20, 2014 12:00 PM CST

     

    Enterprise UX: Project Success with User Experience Design

    Register

    Find out why User Experience Design is the most important process that your development practice needs to adopt to stay ahead of the game. We will identify the fundamentals of UX and explain how you can succeed on your next project.

    Date

    December 4, 2014 12:00 PM CST

     

    Discover How the Kanban Method Can Kick Start a Culture of Continuous Improvement for Your Organization

    Register

    Kanban was originally created as a scheduling system to help manufacturing organizations determine what to produce, when to produce it, and how much to produce. Although this may not sound like software development, these lean principles can be successfully applied to development teams to improve the delivery of value through better visibility and limits on work in process. This webinar will provide an overview of the Kanban method, including the history and motivation, the core principles and practices, and how these apply to efficiency and process improvement in software development.

    Date

    December 18, 2014 12:00 PM CST

  • Steve Lange @ Work

    Microsoft Test Manager – Working Across Projects: Adding an Existing Test Case vs.Cloning/Copying

    • 0 Comments

    You’ve probably noticed that for the most part, managing multiple test plans and test cases are more convenient when they’re part of the same Team Project in TFS/VSO.  For one thing, area paths and iteration paths just work much more cleanly.

    If you’re working across multiple Team Projects, though, the story changes slightly.  Things can still work just fine, but you need to be even more aware of the differences between working with existing test cases, and copying them.

    Let’s look at the differences.

    Using an Existing Test Case (by reference)

    When adding test cases that exist in another TFS/VSO Project entirely (not just another test plan in the same project), you are basically creating a reference back to the main test case, not a copy. That is, you can’t modify the area or iteration fields to represent the target project. Because it is a reference, when the test case is opened it is opened as it resides in the source test plan/project. You can’t modify the area or iteration fields because they are scoped to the project in which the test case resides.

    Consider this example:

    I have two projects: Project A and Project B. I created a test plan in Project A called “Master Test Plan”, and inside that plan created a test case named “Test Case from Master Test Plan in Project A” (just to make it easy to reference). It has an ID of 13.

    clip_image002

    In Project B, I create a test plan named “Project B Test Plan”. In this plan, I want to reference the test case from Project A. So I select “Add existing” from the toolbar, and query VSO for the test case.

    clip_image003

    I select the test case and click “Add test cases”, which adds it to my plan in Project B, as seen below:

    clip_image005

    If I open the test case, I am only able to set the iteration path (and the area path for that matter) to a value that is within the scope of the plan which we referenced.

    clip_image006

    Because we are referencing the test case, any changes made here will be reflected back in the Master Test Plan in Project A. This is because we are working with a single instance of the test case, we’re just referencing it from a different location.

    Copying a Test Case across Projects

    If you wish to have a discrete copy of a test case, test cases, or test suites across projects (to a test plan that resides in a different project), you can perform a “clone” across projects via the command line (tcm.exe).

    The TCM tool contains various options to control what gets copied, and new values to set (i.e. area and iteration). (It can also be used to run automated tests)

    For this example, I’ll copy/clone my test cases (in the root test suite) of Project A to a newly-created project, Project C (in which I have a test plane named “Project C Test Plan”). Since this is a basic example, all that exists is that single test case.

    Here is the command line I will run:

    tcm suites /clone

    /collection:https://<myVSO>.visualstudio.com/DefaultCollection

    /teamproject:”Project A”

    /suiteid:1

    /destinationteamproject:”Project C”

    /destinationsuiteid:3

    /overridefield:”IterationPath”=”Project C\Release 1\Sprint 1”

    /overridefield:”Area Path”=”Project C”

    When I execute this for the current scenario, I’m telling the tool to copy the test suite (with ID: 1, the root test suite in my “Master Test Plan”) from Project A to Project C (to the suite with ID: 3, the root test suite in Project C’s test plan (named “Project C Test Plan”)). I’m also instructing to the tool to set the Iteration Path of the copied test cases to “Project C\Release 1\Sprint 1”, and the Area Path to “Project C”.

    After running this, if I look at my test plan in Project C, I see this:

    clip_image008

    I can see the copied test suite (“Master Test Plan”), and the test case it contains. If I open that test case, note the new values of Area and Iteration:

    clip_image010

    Also note the new ID (14) as a sign that this is an actual copy of the original test case (ID 13).

    Because I’ve actually made a copy of this test case (not a reference, as in the first scenario), any changes I make to this test case will NOT affect the original from Project A. To illustrate this, I modified the title of the test case in (Project C) to reflect that it has been changed in Project C. Compare that change (top) with the original test case back in Project A (bottom):

    clip_image012

    clip_image014

    To help with reference, the command line tool created a link between the two so users can see where the test case came from, and gain context as to why it’s there.

    clip_image016

    Additional notes

    Thanks for reading!

  • Steve Lange @ Work

    Panels vs. Context: A Tale of Two Visual Studios and a Practical Explanation of the Value of CodeLens

    • 15 Comments

    If you have Visual Studio 2013 Ultimate, you know CodeLens is amazing.  If you don’t know what CodeLens is, I hope this helps.  I have a lot of customers who ask me about CodeLens, what it is, and how valuable I think it is for an organization.  Here’s my response.

    It’s really a tale of two Visual Studios, if you think about.

    A Visual Studio Full of Panels

    Let’s say you’re looking at a code file, specifically a method.  Your Visual Studio environment may look like this:

    image

    I’m looking at the second Create method (the one that takes a Customer).  If I want to know where this method may be referenced, I can “Find All References”, either by selecting it from the context menu, or using Shift + F12. Now I have this:

    image

    Great!  Now, if I decide to change this code, will it will work?  Will my tests still work?  In order for me to figure that out, I need open my Test Explorer window.

    image

    Which gives me a slightly more cluttered VS environment:

    image

    (Now I can see my tests, but I still need to try and identify which tests actually exercise my method.)

    Another great point of context to have is knowing if I’m looking at the latest version of my code.  I’d hate to make changes to an out-of-date version and grant myself a merge condition.  So next I need to see the history of the file.

    image

    Cluttering my environment even more (because I don’t want to take my eyes of my code, I need to snap it somewhere else), I get this:

    image

    Okay, time out. 

    Yes, this looks pretty cluttered, but I can organize my panels better, right?  I can move some panels to a second monitor if I want, right?  Right on both counts.  By doing so, I can get a multi-faceted view of the code I’m looking at.  However, what if I start looking at another method, or another file?  The “context” of those other panels don’t follow what I’m doing.  Therefore, if I open the EmployeesController.cs file, my “views” are out of sync!

    image

    That’s not fun.

    A Visual Studio Full of Context

    So all of the above illustrates two main benefits of something like CodeLens.  CodeLens inserts easy, powerful, at-a-glance context for the code your looking at.  If it’s not turned on, do so in Options:

    image

    While you’re there, look at all the information it’s going to give you!

    Once you’ve enabled CodeLens, let’s reset to the top of our scenario and see what we have:

    image

    Notice an “overlay” line of text above each method.  That’s CodeLens in action. Each piece of information is called a CodeLens Indicator, and provides specific contextual information about the code you’re looking at.  Let’s look more closely.

    image

    References

    image

    References shows you exactly that – references to this method of code.  Click on that indicator and you can see and do some terrific things:

    image

    It shows you the references to this method, where those references are, and even allows you to display those references on a Code Map:

    image

    Tests

    image

    As you can imagine, this shows you tests for this method.  This is extremely helpful in understanding the viability of a code change.  This indicator lets you view the tests for this method, interrogate them, as well as run them.

    image

    As an example, if I double-click the failing test, it will open the test for me.  In that file, CodeLens will inform me of the error:

    image

    Dramatic pause: This CodeLens indicator is tremendously valuable in a TDD (Test Driven Development). Imagine sitting your test file and code file side-by-side, turning on “Run Tests After Build”, and using the CodeLens indicator to get immediate feedback about your progress.

    Authors

    image

    This indicator gives you very similar information as the next one, but list the authors of this method for at-a-glance context.  Note that the latest author is the one noted in the CodeLens overlay.  Clicking on this indicator provides several options, which I’ll explain in the next section.

    image

    Changes

    image

    The Changes indicator tells you information about the history of the file at it exists in TFS, specifically Changesets.  First, the overlay tells you how many recent changes there are to this method in the current working branch.  Second, if you click on the indicator you’ll see there are several valuable actions you can take right from that context:

    image

    What are we looking at?

    • Recent check-in history of the file, including Changeset ID, Branch, Changeset comments, Changeset author, and Date/time.
    • Status of my file compared to history (notice the blue “Local Version” tag telling me that my code is 1 version behind current).
    • Branch icons tell me where each change came from (current/parent/child/peer branch, farther branch, or merge from parent/child/unrelated (baseless)).

    Right-clicking on a version of the file gives you additional options:

    image

    • I can compare my working/local version against the selected version
    • I can open the full details of the Changeset
    • I can track the Changeset visually
    • I can get a specific version of the file
    • I can even email the author of that version of the file
    • (Not shown) If I’m using Lync, I can also collaborate with the author via IM, video, etc.

    This is a heck of a lot easier way to understand the churn or velocity of this code.

    Incoming Changes

    image

    The Incoming Changes indicator was added in 2013 Update 2, and gives you a heads up about changes occurring in other branches by other developers.  Clicking on it gives you information like:

    image

    Selecting the Changeset gives you the same options as the Authors and Changes indicators.

    This indicator has a strong moral for anyone who’s ever been burned by having to merge a bunch of stuff as part of a forward or reverse integration exercise:  If you see an incoming change, check in first!

    Work Items (Bugs, Work Items, Code Reviews)

    image

    I’m lumping these last indicators together because they are effectively filtered views of the same larger content: work items.  Each of these indicators give you information about work items linked to the code in TFS.

    image

    image

    Knowing if/when there were code reviews performed, tasks or bugs linked, etc., provides fantastic insight about how the code came to be.  It answers the “how” and “why” of the code’s current incarnation.

     

    A couple final notes:

    • The indicators are cached so they don’t put unnecessary load on your machine.  As such they are scheduled to refresh at specific intervals.  If you don’t want to wait, you can refresh the indicators yourself by right-clicking the indicators and choosing “Refresh CodeLens Team Indicators”

    image

    • There is an additional CodeLens indicator in the Visual Studio Gallery – the Code Health Indicator. It gives method maintainability numbers so you can see how your changes are affecting the overall maintainability of your code.
    • You can dock the CodeLens indicators as well – just know that if they dock, they act like other panels and will be static.  This means you’ll have to refresh them manually (this probably applies most to the References indicator).
    • If you want to adjust the font colors and sizes (perhaps to save screen real estate), you can do so in Tools –> Options –> Fonts and Colors.  Choose “Show settings for” and set it to “CodeLens”.

     

    I hope you find this helpful!

  • Steve Lange @ Work

    Jump in the Deep End with Visual Studio "14" CTP

    • 0 Comments

    3399096196_cf820fdb84On Soma’s blog, today he announced the availability of the first CTP for Visual Studio “14”, the next major release of Visual Studio.

    Early?  Yep!  Still kinda exciting?  Definitely!

    Please note that is a very early build, and is by no means meant to be used in production.  It’s more simply a way to get feedback from the community.  It is English-only, and not officially supported.

    Soma noted that this next big release of Visual Studio “will most likely be available sometime in 2015, with a more complete preview release and final naming available later this year.  Given that this is a very early build, please install in a test environment with no earlier versions of Visual Studio installed.”

    That said, there are some cool capabilities packed into this CTP:

    You can download the CTP from here.  Oh, also be sure to read the release notes containing information about the new features and known issues in the CTP.

    And please, please, provide feedback! (That’s the purpose of this CTP release anyway)

    Submit bugs through Connect, suggestions on UserVoice and quick thoughts via Send-a-Smile in the Visual Studio IDE.

    Enjoy!

Page 1 of 1 (5 items)