SlideShare a Scribd company logo
1 of 47
Download to read offline
Quality Coding: What's New with Visual
              Studio 2012




  The newest release of Visual Studio 2012 is rich with new tools
  that enhance standard developer activities. In this session, we'll
  review and demonstrate some of these new features, such as
  Unit Testing, Code Reviews, Code Clones, and other developer
  tools. Come join us for this free Webinar!
Agenda
•   ALM and Quality

•   Quality in Requirements

•   Quality in Development
    –   Unit Testing
    –   Fakes
    –   Code Reviews
    –   Code Analysis
    –   Code Clones


•   Quality in Test
    –   Manual Testing
    –   Exploratory Testing
    –   Automated Testing
    –   Lab Environments


•   Conclusion
Recognizing the Iterative Nature of Applications

Initial Project Portfolio                                                                                                     Retire



                        Operate                                              Define
                        •Monitor                                             •Requirements
                        •Support                                             •Validation
                        •Upgrade                                             •Prioritization
                                                                             •Release Plan




                                          Develop
                                          •Iteration Plan
                                          •Develop                                                              Plan


                            Plan          •Test
                                                                                                         Done          Work
                                                                                           Plan
                                                 Plan
                     Done          Work
                                                                      Plan

                                                                                    Done          Work
                                          Done          Work

                                                               Done          Work
New ALM Capabilities in Visual Studio 2012




       Operate                Define
       •Monitor               •Requirements
       •Support               •Validation
       •Upgrade               •Prioritization
                              •Release Plan




            Develop
            •Iteration Plan
            •Develop
            •Test
Quality in Requirements: Storyboarding
•   Tighter loop between the Business
    Stakeholders and Development Team

•   Graphical design tools built in
    PowerPoint

•   Embed other content including
    context slides

•   Capture screen shots and create
    lightweight animations

•   Store common elements within a
    shape library

•   Create master templates to simplify
    multiple similar views

•   Get feedback to others
     –   Email, print and version control the
         document
     –   leverage collaborative tools
     –   leverage web viewing tools
     –   Integration with TFS
Agenda
•   ALM and Quality

•   Quality in Requirements

•   Quality in Development
    –   Unit Testing
    –   Fakes
    –   Code Reviews
    –   Code Analysis
    –   Code Clones


•   Quality in Test
    –   Manual Testing
    –   Exploratory Testing
    –   Automated Testing
    –   Lab Environments


•   Conclusion
Why invest in quality?

• Quality is an expensive (and painful) afterthought




                  30

                  25

                  20
 Relative Cost
 To Fix Bugs...   15

                  10

                  5




                       Courtesy of the
                       National Institute of Software and Technology (NIST)
Problems...

• It is expensive to find and fix bugs that get past daily
  development practices
• It is hard to diagnose errors at runtime
• Why does an application run slowly?
• Individual Developers and Testers need to know if
  they are on track
• Test and development are often out of synch
• Final test phase for shipping is often ad-hoc
• How much testing is enough?
Approach for Development Quality

• Use 'defence in depth' strategy
  –   Unit testing
  –   Code reviews
  –   Continuous integration builds / Gated Check-ins
  –   Static Code Analysis
  –   Education / Patterns / Best Practices
Unit Testing Runner
New Test Runner:
• Tests run in background
• Run automatically on build
• Support for multiple unit
  testing frameworks:
   –   MS Test
   –   xUnit
   –   nUnit
   –   And More!
• Deep integration in the
  IDE
• Supports native C++ code
• Multiple run options
   – Failed Tests
   – Not-run Tests
   – All Tests
• Easy code coverage access
Unit Testing

• Diagnostic checks during development
  – Automated test script for methods on a type
  – Basic sanity checking
  – Useful for regression testing




     public double MethodA() { ... }




                                                                 test methods
                                                                 corresponding
                                                                 one or more
                                                                 Each method has
      public void TestMethodA()
      {
         SomeClass c = new SomeClass();   // Arrange
         double d = c.MethodA();                   // Act
         Assert.AreEqual(expected, d);             // Assert
      }
Use the framework you want to use


• In the box support for
  – .NET
  – Native C/C++


• Third party plugins
  –   NUnit
  –   xUnit.net
  –   MbUnit
  –   QUnit/Jasmine
  –   SQL Server Unit Testing
       (Under development)
MS-Test Improvements

• Many performance and scale improvements
  – Especially when you stick to “classic” unit testing


• Support for testing Async
  [TestMethod]
  public async Task MyAsyncTest()
  {
    var result = await SomeLongRunningOperation();
    Assert.IsTrue( result );
  }


• Proper support for 64-bit and .Net multi-targeting
• Available in Express!
Continuous Testing


• “If you aren‟t running your unit tests, you are just
  compiling. You are not building.”
•      Chris Patterson
       Program Manager
       Team Foundation Build

• Run Tests After Build option
  in Visual Studio 2012 will run
  your Unit Tests after each
  successful build of your
  solution
Code coverage in VS 2012


• Analyze your code
  coverage with a single
  click

• Analyze for selected
  tests to help find how
  specific tests are
  covering your system

• Supports all managed &
  native frameworks
DEMONSTRATION


• Unit Test Basics

• Unit Test Explorer

• Framework Plug-Ins

• Continuous Testing

• Code Coverage

• Play Lists (Update 2)
What‟s missing?

• Test Lists
   – Legacy mode only


• Test Impact
   – Works on the server, not in
     the VS client


• Private Accessors
   – Deprecated in VS 2010,
     removed in VS 2012


• Generate Unit Test
   – Didn‟t actually generate a
     unit test
Unit Testing and Isolation

• Unit Tests verify the smallest testable „unit‟ of code
• Target code should be isolated from external
  influences
• Unit Test frameworks can perform integration testing

Unit Test Pseudo-Code:        Target Pseudo-Code:
  T = new SomeClass()         Function DoSomething(a)                 Response
  result = T.DoSomething(1)     x = LookupInDatabase(a)               controlled
  Assert.AreEqual(2,result)     y = ProcessWithWebService(x)
End Function                    LogToFile(“Processing complete”)
                                                                      by test
                              End Function




                                                                   Response
                                                                   controlled by test
                                                   Response
                                                   controlled
                                                   by test
What is un-testable code?

Where do we find it?                       Common indicators

•    “Get „er done” code                   •   Complex test setup and teardown
      –   Business logic in code-behind    •   Environmental dependencies
      –   Classes with too many            •   Public static methods
          dependencies
                                           •   Hidden object creation
      –   Database logic mixed with
          business logic                   •   Complex external frameworks
•    Testability was not a                 •   No tests at all!
     consideration
      –   Or was explicitly avoided
•    Monolithic, highly-coupled designs



      Any system where the tests require complex setup or
    where the tests run very slowly is unsuitable for the kind of
             developer testing we really care about.
A simple test setup example



The method we want to unit test

   bool IsFileEmpty(string file) {
       var content = File.ReadAllText(file);
       return content.Length == 0;
   }



   void FileExistsTest() {
       File.Write("foo.txt", "");
       var result = IsFileEmpty("foo.txt")
       Assert.IsTrue(result);
   }
Environmental Dependencies



Consider the following Y2K code:

  public void ThrowIfEndOfTheWorld()
  {
      if (DateTime.Now == new DateTime(2000,1,1))
          throw new Y2KBugException();
  }
Environmental Dependencies



How about this? Why is this bad?

  [DllImport("kernel32.dll")]
  extern static bool SetSystemTime(ref SystemTime time);

  [TestMethod]
  public void Y2KTest()
  {
      SetSystemTime(2000,1,1,0,0,0);
      Assert.Throws( () => ThrowIfEndOfTheWorld() );
  }
Isolating code with Microsoft Fakes


• Visual Studio 2012 Fakes lets
  you isolate almost any .NET

• Fakes come in two flavors

  – Stubs: concrete implementations
    of interfaces or abstract classes

  – Shims: run-time interception lets
    you replace calls, even those
    from the .NET BCL
Visual Studio 2012 Shims – Be Cautious

• Runtime interception of any .NET
  method
  – Uses the profiler to detour calls
  – “Monkey patching” for .NET


• Use it when you…
  – Have external components that cannot be
    refactored
     • SharePoint, ASP.NET, Office, etc.
  – Need to override non-virtual methods
     • Static methods, constructors, sealed types,
       properties
  – Have legacy code with untestable designs
SharePoint Development Enhancements

• SharePoint improvements (Update 2)
  –   Unit test emulator
  –   Coded UI test support
  –   Web Performance test support
  –   Load test support
  –   IntelliTrace collection plan
SharePoint and Unit Testing
[TestMethod]
public void ScheduleAppointmentReturnsTrueWhenNewAppointmentIsCreated()
{
    using (new SharePointEmulationScope(EmulationMode.Enabled))
    {
        //Arrange
        SPSite site = new SPSite("http://localhost");
        string listName = String.Format("List{0}", Guid.NewGuid());
        // create a new temporary list
        Guid listId = site.RootWeb.Lists.Add listName, listName, SPListTemplateType.GenericList);
        SPList list = site.RootWeb.Lists[listId];
        Assert.IsNotNull(list);
        // add fields to list
        list.Fields.Add("Name", SPFieldType.Text, true);
        list.Fields.Add("Date", SPFieldType.Text, false);
        list.Update();
        // prepare
        string errorMsg = string.Empty;
        DateTime date = DateTime.Now;
        BookAnAppointmentWebPart webPart = new BookAnAppointmentWebPart();

        // Act
        bool success = webPart.ScheduleAppointment(site.RootWeb, list.Title, "My Name",
                       "888-888-8888", "My.Name@contoso.com", "23", date, out errorMsg);
        // Assert
        Assert.IsTrue(success);

        // cleanup
        list.Delete();
        site.Dispose();
    }
}
Code Reviews


Purpose:
  – Find and fix bugs early in the process
    (much cheaper and easier than later)
  – Adherence to development standards
  – Improve consistency
  – Improve comments and maintainability
  – Share best practices across the team
  – Educate both experienced and new team
    members

  – Improve overall structural quality of the code and skillset of
    the team!
Integrated Code Review
• Provides
  feedback from
  other team
  members

• Shared
  knowledge
  across team

• Code reviews
  can be set as a
  quality gate

• Source changes
  highlighted and
  comments about
  the changes.
Automated Reviews?

• Static Code Analysis:
  – Analyze code (MSIL/SQL) based
    on best practices (rules)
  – Rules created by and used at Microsoft
  – Rulesets:
     • Selectable groups of rules allow tailoring to your environment
     • Rulesets can be further customized for the exact rules you need
  – Can support both T-SQL and .NET
  – Can be „enforced‟ using check-in policies
  – Can be reported during the build (including CI and Gated)


• Still not the same as manual/peer reviews
Code Clone Detection
•   Reviews common code
    blocks exposing
    refactoring
    opportunities

•   Detect code blocks with
    common structure and
    approach

•   Search is semantic, not
    just literal

•   Detects „copy and
    paste‟ errors

•   Detects code fragments
    with a common logical
    structure

•   Review common code
    and decide how to
    proceed
DEMONSTRATION



Code Reviews

Code Comparison

Static Analysis
Agenda
•   ALM and Quality

•   Quality in Requirements

•   Quality in Development
    –   Unit Testing
    –   Fakes
    –   Code Reviews
    –   Code Analysis
    –   Code Clones


•   Quality in Test
    –   Manual Testing
    –   Exploratory Testing
    –   Automated Testing
    –   Lab Environments


•   Conclusion
Tester Enhancements in Visual Studio 2012

•   Microsoft Test Manager
    –   Performance
    –   Exploratory Testing
    –   Clone test suites via command line ("versioning")
    –   Multi-line test steps
    –   Rich-text in test steps
    –   Improved Test Step grid usability
    –   Read-only test case access from within Test Runner
    –   Pass/Fail test cases without using Test Runner
    –   Enhanced view of results for Test Plan
    –   Manual testing for Metro-style applications
    –   Code Coverage for Manual Testing (Update 1)
    –   Suspend/Resume testing for test case development

•   Coded UI Testing
    – UI Map Access
    – Cross Browser UI Testing (Update 1)
    – Test data reduction through test settings configuration

•   Team Web Access - Test Hub
Web Access – Test Hub
Initiating Exploratory Testing



                             or no work item.




Explore based on specific work
          item(s)…
Performing Exploratory Testing


• Familiar Test Runner interface customized
  for exploratory testing

• Free-form comment area allows tester to
  record suggestions and problems
  encountered during the session

• Comment area allows for rich-text,
  attachments, and easy insertion of
  screenshot

• Session can be paused to perform activities
  outside of the Test Runner

• Bug and Test Case work items can readily
  be created during the exploratory testing
  session
Coded UI – UI Map Editor




It‟s in the box now!
DEMONSTRATION



Exploratory Testing

Cross-browser
Coded UI Testing
Questions?
Want to know more...?
Imaginet‟s New Blog Keeps You In The Know
Stay up to speed on the latest news from Imaginet, Microsoft,
Visual Studio, and the entire software development world.

                 http://blog.imaginet.com
More Webcasts on ALM / TFS / Visual Studio 2012

  •   Quality Coding: What’s New with Visual Studio 2012
       • April 18 (1:00-2:30pm CT)
       • May 9 (1:00-2:30pm CT)
       • May 23 (1:00-2:30pm CT)

  •   Getting Started With Coded UI testing: Building Your First
      Automated Test
       • April 11 (1:00-2:30pm CT)
       • April 25 (1:00-2:30pm CT)
       • June 13 (1:00-2:30pm CT)
       • June 27 (1:00-2:30pm CT)

  •   The How, What, and Why of Performance Testing Your
      Applications
       • May 2 (1:00-2:30pm CT)

  •   Top Business Benefits of Application Lifecycle Management
      (ALM)
        • June 3 (1:00-2:00pm CT)

  •   Managing Test Labs Without the Headaches
       • June 6 (1:00-2:30pm CT)
       • June 20 (1:00-2:30pm CT)
Free Services from Imaginet & Microsoft

There are a number of different Microsoft Programs that you
might be able to leverage to get some free services from
Imaginet:

•    Deployment Planning Services (DPS) – You can trade in your
     Microsoft Software Assurance credits to receive some free
     TFS/ALM Deployment Planning Services days with Imaginet

•    Partner Services Credit (PSC) – Have you or are you about to
     spend money with Microsoft on Visual Studio 2012 products? If
     so, Microsoft may kick in some funding to help you successfully
     adopt.

•    Virtual Technical Specialist (VTS) hours –You may be eligible
     to receive some free remote consulting/training hours with
     Imaginet through the Microsoft Virtual Technical Specialist
     program.

    For more information, email bmadison@imaginet.com.
Need Help with YOUR Automated Testing?

   Imaginet’s Visual Studio 2012
 Automated Testing 5-day Quickstart

• Learn best practices for test selection, extension, data
  binding, maintenance, frameworks, community extensions
  (such as the CUITe and the UI Map Toolbox), and other
  real-world scenarios.

• Includes automated test development & execution for YOUR
  application

• Support and training for your team

• Includes a high-level ALM assessment

Interested? Just email us at info@imaginet.com.
ALM Planning & Implementation Services
ALM Planning                                     Testing
•  ALM Assessment & Envisioning Workshops        •  Manual Testing with Test Manager Quick
   (3 or 5 days)                                    Start (5 days)
•  VS & TFS Migration Planning Workshop (5       •  Visual Studio Testing Tools Quick Start (10
   days)                                            days)
•  TFS Deployment Planning* (5 days)             •  Visual Studio Automated Testing Quick Start
•  Visual SourceSafe to TFS Migration               (5 days)
   Planning* (3 Days)                            •  Visual Studio Load Testing Quick Start (5 or
•  Visual Studio Quality Tools Deployment           10 Days)
   Planning* (5 days)
                                                 Builds
Upgrade                                          •  Automated Build & Release Management
•  TFS 2010   Adoption Quick Start (5 or 10         Quick Start (5 days)
   days)                                         •  Automated Build Center of Excellence (CoE)
•  TFS 2012   Adoption Quick Start (5 or 10
   days)
                                                 Database
•  TFS 2010   Upgrade Quick Start (10 days)
                                                 •  Visual Studio Database Tools Quick Start
•  TFS 2012   Upgrade Quick Start (10 days)         (10 days)

Remote Support                                   Integrations
• Remote Support for TFS & Visual Studio         •  Team Foundation Server (TFS) & Project
                                                    Server Integration Quick Start (10 days)
Lab                                              •  TFS & Quality Center Integration/Migration
•  Visual Studio Lab Management Quick Start         Quick Start (10 days)
   (10 days)                      Email us at:
For questions or more information,
       please contact us at:

 info@imaginet.com or (972)607-4830


 Remember to add http://blog.imaginet.com to your favorite reader!
http://www.imaginet.com

More Related Content

What's hot

Upgrading to TFS 2012: What You Need to Know!
Upgrading to TFS 2012: What You Need to Know!Upgrading to TFS 2012: What You Need to Know!
Upgrading to TFS 2012: What You Need to Know!Imaginet
 
Agile Testing Introduction
Agile Testing IntroductionAgile Testing Introduction
Agile Testing IntroductionHai Tran Son
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграцииSQALab
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentationrhofkens
 
Shirly Ronen - User story testing activities
Shirly Ronen - User story testing activitiesShirly Ronen - User story testing activities
Shirly Ronen - User story testing activitiesAgileSparks
 
Performance Testing in Continous Delivery
Performance Testing in Continous DeliveryPerformance Testing in Continous Delivery
Performance Testing in Continous DeliveryPablo Gallego Hermann
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automationsadams22
 
Shirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defectShirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defectAgileSparks
 

What's hot (14)

Vaidyanathan Ramalingam Agile Conference Speech
Vaidyanathan Ramalingam Agile Conference SpeechVaidyanathan Ramalingam Agile Conference Speech
Vaidyanathan Ramalingam Agile Conference Speech
 
Vaidyanathan Ramalingam Rca In Agile Conference Speech
Vaidyanathan Ramalingam Rca In Agile Conference SpeechVaidyanathan Ramalingam Rca In Agile Conference Speech
Vaidyanathan Ramalingam Rca In Agile Conference Speech
 
Vaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 Speech
Vaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 SpeechVaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 Speech
Vaidyanathan Ramalingam Silicon India Testing Conference 2 July2011 Speech
 
Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011
Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011
Vaidyanathan Ramalingam Agile Testing Leadership Lessons Softec 2 July2011
 
Vaidyanathan Ramalingam Agile Testing Conference Speech
Vaidyanathan Ramalingam Agile Testing Conference SpeechVaidyanathan Ramalingam Agile Testing Conference Speech
Vaidyanathan Ramalingam Agile Testing Conference Speech
 
Upgrading to TFS 2012: What You Need to Know!
Upgrading to TFS 2012: What You Need to Know!Upgrading to TFS 2012: What You Need to Know!
Upgrading to TFS 2012: What You Need to Know!
 
Agile Testing Introduction
Agile Testing IntroductionAgile Testing Introduction
Agile Testing Introduction
 
test
testtest
test
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
PowerPoint Presentation
PowerPoint PresentationPowerPoint Presentation
PowerPoint Presentation
 
Shirly Ronen - User story testing activities
Shirly Ronen - User story testing activitiesShirly Ronen - User story testing activities
Shirly Ronen - User story testing activities
 
Performance Testing in Continous Delivery
Performance Testing in Continous DeliveryPerformance Testing in Continous Delivery
Performance Testing in Continous Delivery
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automation
 
Shirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defectShirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defect
 

Viewers also liked

Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...Imaginet
 
Managing Test Labs Without the Headaches
Managing Test Labs Without the HeadachesManaging Test Labs Without the Headaches
Managing Test Labs Without the HeadachesImaginet
 
Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012Imaginet
 
Top Business Benefits of Application Lifecycle Management (ALM)
Top Business Benefits of Application Lifecycle Management (ALM)Top Business Benefits of Application Lifecycle Management (ALM)
Top Business Benefits of Application Lifecycle Management (ALM)Imaginet
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...Imaginet
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to KanbanImaginet
 
How Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineHow Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineImaginet
 
Managing Test Labs Without the Headaches
Managing Test Labs Without the HeadachesManaging Test Labs Without the Headaches
Managing Test Labs Without the HeadachesImaginet
 
New SharePoint Developer Tools in Visual Studio 2012
New SharePoint Developer Tools in Visual Studio 2012New SharePoint Developer Tools in Visual Studio 2012
New SharePoint Developer Tools in Visual Studio 2012Imaginet
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to KanbanImaginet
 
Getting Started With Coded UI testing: Building Your First Automated Test
Getting Started With Coded UI testing: Building Your First Automated TestGetting Started With Coded UI testing: Building Your First Automated Test
Getting Started With Coded UI testing: Building Your First Automated TestImaginet
 
Industry 4.0 Changes Everything
Industry 4.0 Changes Everything Industry 4.0 Changes Everything
Industry 4.0 Changes Everything Imaginet
 

Viewers also liked (12)

Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
Getting Started with Visual Studio’s Coded UI Testing: Building Your First Au...
 
Managing Test Labs Without the Headaches
Managing Test Labs Without the HeadachesManaging Test Labs Without the Headaches
Managing Test Labs Without the Headaches
 
Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012
 
Top Business Benefits of Application Lifecycle Management (ALM)
Top Business Benefits of Application Lifecycle Management (ALM)Top Business Benefits of Application Lifecycle Management (ALM)
Top Business Benefits of Application Lifecycle Management (ALM)
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
 
How Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom LineHow Microsoft ALM Tools Can Improve Your Bottom Line
How Microsoft ALM Tools Can Improve Your Bottom Line
 
Managing Test Labs Without the Headaches
Managing Test Labs Without the HeadachesManaging Test Labs Without the Headaches
Managing Test Labs Without the Headaches
 
New SharePoint Developer Tools in Visual Studio 2012
New SharePoint Developer Tools in Visual Studio 2012New SharePoint Developer Tools in Visual Studio 2012
New SharePoint Developer Tools in Visual Studio 2012
 
Introduction to Kanban
Introduction to KanbanIntroduction to Kanban
Introduction to Kanban
 
Getting Started With Coded UI testing: Building Your First Automated Test
Getting Started With Coded UI testing: Building Your First Automated TestGetting Started With Coded UI testing: Building Your First Automated Test
Getting Started With Coded UI testing: Building Your First Automated Test
 
Industry 4.0 Changes Everything
Industry 4.0 Changes Everything Industry 4.0 Changes Everything
Industry 4.0 Changes Everything
 

Similar to Quality Coding: What's New with Visual Studio 2012

Streamlining Testing with Visual Studio 2012
Streamlining Testing with Visual Studio 2012Streamlining Testing with Visual Studio 2012
Streamlining Testing with Visual Studio 2012Imaginet
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automationEran Kinsbrunner
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategytharindakasun
 
Formulating Agile Testing Strategy
Formulating Agile Testing StrategyFormulating Agile Testing Strategy
Formulating Agile Testing StrategyTharinda Liyanage
 
Definition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinementDefinition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinementChristian Vos
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Delta-N
 
The QA/Testing Process
The QA/Testing ProcessThe QA/Testing Process
The QA/Testing ProcessSynerzip
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Jacinto Limjap
 
A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012Imaginet
 
The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012Imaginet
 
The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012Imaginet
 
Quality Management Introduction
Quality Management IntroductionQuality Management Introduction
Quality Management IntroductionDuy Tan Geek
 
Design For Testability
Design For TestabilityDesign For Testability
Design For TestabilityWill Iverson
 
Lanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMLanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMDebora Di Piano
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updatedTharinda Liyanage
 

Similar to Quality Coding: What's New with Visual Studio 2012 (20)

Streamlining Testing with Visual Studio 2012
Streamlining Testing with Visual Studio 2012Streamlining Testing with Visual Studio 2012
Streamlining Testing with Visual Studio 2012
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
Agile Testing Strategy
Agile Testing StrategyAgile Testing Strategy
Agile Testing Strategy
 
Formulating Agile Testing Strategy
Formulating Agile Testing StrategyFormulating Agile Testing Strategy
Formulating Agile Testing Strategy
 
Definition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinementDefinition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinement
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
 
Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012Introductie Visual Studio ALM 2012
Introductie Visual Studio ALM 2012
 
The QA/Testing Process
The QA/Testing ProcessThe QA/Testing Process
The QA/Testing Process
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
 
Kku2011
Kku2011Kku2011
Kku2011
 
A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012
 
Testing banking apps
Testing banking appsTesting banking apps
Testing banking apps
 
The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012
 
The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012The Newest of the New with Visual Studio and TFS 2012
The Newest of the New with Visual Studio and TFS 2012
 
test
testtest
test
 
Quality Management Introduction
Quality Management IntroductionQuality Management Introduction
Quality Management Introduction
 
Iterative software development
Iterative software developmentIterative software development
Iterative software development
 
Design For Testability
Design For TestabilityDesign For Testability
Design For Testability
 
Lanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMLanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALM
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 

More from Imaginet

Lean, Kanban and TFS
Lean, Kanban and TFSLean, Kanban and TFS
Lean, Kanban and TFSImaginet
 
Using Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your OrganizationUsing Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your OrganizationImaginet
 
Lean, Kanban, and TFS
Lean, Kanban, and TFSLean, Kanban, and TFS
Lean, Kanban, and TFSImaginet
 
Getting Started with Coded UI Testing: Building Your First Automated Test
Getting Started with Coded UI Testing: Building Your First Automated TestGetting Started with Coded UI Testing: Building Your First Automated Test
Getting Started with Coded UI Testing: Building Your First Automated TestImaginet
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!Imaginet
 
Top 10 Business Reasons for ALM
Top 10 Business Reasons for ALMTop 10 Business Reasons for ALM
Top 10 Business Reasons for ALMImaginet
 
Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20Imaginet
 
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012Imaginet
 
Using the Kanban Method with Team Foundation Server
Using the Kanban Method with Team Foundation ServerUsing the Kanban Method with Team Foundation Server
Using the Kanban Method with Team Foundation ServerImaginet
 
Branching and Merging and Bears, Oh My!
Branching and Merging and Bears, Oh My!Branching and Merging and Bears, Oh My!
Branching and Merging and Bears, Oh My!Imaginet
 
Managing Test Labs Without the Headaches
Managing Test Labs Without the HeadachesManaging Test Labs Without the Headaches
Managing Test Labs Without the HeadachesImaginet
 
Quality Coding with Visual Studio 2012
Quality Coding with Visual Studio 2012Quality Coding with Visual Studio 2012
Quality Coding with Visual Studio 2012Imaginet
 

More from Imaginet (12)

Lean, Kanban and TFS
Lean, Kanban and TFSLean, Kanban and TFS
Lean, Kanban and TFS
 
Using Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your OrganizationUsing Lean and Kanban to Revolutionize Your Organization
Using Lean and Kanban to Revolutionize Your Organization
 
Lean, Kanban, and TFS
Lean, Kanban, and TFSLean, Kanban, and TFS
Lean, Kanban, and TFS
 
Getting Started with Coded UI Testing: Building Your First Automated Test
Getting Started with Coded UI Testing: Building Your First Automated TestGetting Started with Coded UI Testing: Building Your First Automated Test
Getting Started with Coded UI Testing: Building Your First Automated Test
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know!
 
Top 10 Business Reasons for ALM
Top 10 Business Reasons for ALMTop 10 Business Reasons for ALM
Top 10 Business Reasons for ALM
 
Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20Approaches to Kanban using Team Foundation Server - Dec 20
Approaches to Kanban using Team Foundation Server - Dec 20
 
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012Approaches to Kanban with Microsoft Team Foundation Server (TFS)  Dec 6-2012
Approaches to Kanban with Microsoft Team Foundation Server (TFS) Dec 6-2012
 
Using the Kanban Method with Team Foundation Server
Using the Kanban Method with Team Foundation ServerUsing the Kanban Method with Team Foundation Server
Using the Kanban Method with Team Foundation Server
 
Branching and Merging and Bears, Oh My!
Branching and Merging and Bears, Oh My!Branching and Merging and Bears, Oh My!
Branching and Merging and Bears, Oh My!
 
Managing Test Labs Without the Headaches
Managing Test Labs Without the HeadachesManaging Test Labs Without the Headaches
Managing Test Labs Without the Headaches
 
Quality Coding with Visual Studio 2012
Quality Coding with Visual Studio 2012Quality Coding with Visual Studio 2012
Quality Coding with Visual Studio 2012
 

Recently uploaded

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 

Recently uploaded (20)

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 

Quality Coding: What's New with Visual Studio 2012

  • 1. Quality Coding: What's New with Visual Studio 2012 The newest release of Visual Studio 2012 is rich with new tools that enhance standard developer activities. In this session, we'll review and demonstrate some of these new features, such as Unit Testing, Code Reviews, Code Clones, and other developer tools. Come join us for this free Webinar!
  • 2. Agenda • ALM and Quality • Quality in Requirements • Quality in Development – Unit Testing – Fakes – Code Reviews – Code Analysis – Code Clones • Quality in Test – Manual Testing – Exploratory Testing – Automated Testing – Lab Environments • Conclusion
  • 3. Recognizing the Iterative Nature of Applications Initial Project Portfolio Retire Operate Define •Monitor •Requirements •Support •Validation •Upgrade •Prioritization •Release Plan Develop •Iteration Plan •Develop Plan Plan •Test Done Work Plan Plan Done Work Plan Done Work Done Work Done Work
  • 4. New ALM Capabilities in Visual Studio 2012 Operate Define •Monitor •Requirements •Support •Validation •Upgrade •Prioritization •Release Plan Develop •Iteration Plan •Develop •Test
  • 5. Quality in Requirements: Storyboarding • Tighter loop between the Business Stakeholders and Development Team • Graphical design tools built in PowerPoint • Embed other content including context slides • Capture screen shots and create lightweight animations • Store common elements within a shape library • Create master templates to simplify multiple similar views • Get feedback to others – Email, print and version control the document – leverage collaborative tools – leverage web viewing tools – Integration with TFS
  • 6. Agenda • ALM and Quality • Quality in Requirements • Quality in Development – Unit Testing – Fakes – Code Reviews – Code Analysis – Code Clones • Quality in Test – Manual Testing – Exploratory Testing – Automated Testing – Lab Environments • Conclusion
  • 7. Why invest in quality? • Quality is an expensive (and painful) afterthought 30 25 20 Relative Cost To Fix Bugs... 15 10 5 Courtesy of the National Institute of Software and Technology (NIST)
  • 8. Problems... • It is expensive to find and fix bugs that get past daily development practices • It is hard to diagnose errors at runtime • Why does an application run slowly? • Individual Developers and Testers need to know if they are on track • Test and development are often out of synch • Final test phase for shipping is often ad-hoc • How much testing is enough?
  • 9. Approach for Development Quality • Use 'defence in depth' strategy – Unit testing – Code reviews – Continuous integration builds / Gated Check-ins – Static Code Analysis – Education / Patterns / Best Practices
  • 10. Unit Testing Runner New Test Runner: • Tests run in background • Run automatically on build • Support for multiple unit testing frameworks: – MS Test – xUnit – nUnit – And More! • Deep integration in the IDE • Supports native C++ code • Multiple run options – Failed Tests – Not-run Tests – All Tests • Easy code coverage access
  • 11. Unit Testing • Diagnostic checks during development – Automated test script for methods on a type – Basic sanity checking – Useful for regression testing public double MethodA() { ... } test methods corresponding one or more Each method has public void TestMethodA() { SomeClass c = new SomeClass(); // Arrange double d = c.MethodA(); // Act Assert.AreEqual(expected, d); // Assert }
  • 12. Use the framework you want to use • In the box support for – .NET – Native C/C++ • Third party plugins – NUnit – xUnit.net – MbUnit – QUnit/Jasmine – SQL Server Unit Testing (Under development)
  • 13. MS-Test Improvements • Many performance and scale improvements – Especially when you stick to “classic” unit testing • Support for testing Async [TestMethod] public async Task MyAsyncTest() { var result = await SomeLongRunningOperation(); Assert.IsTrue( result ); } • Proper support for 64-bit and .Net multi-targeting • Available in Express!
  • 14. Continuous Testing • “If you aren‟t running your unit tests, you are just compiling. You are not building.” • Chris Patterson Program Manager Team Foundation Build • Run Tests After Build option in Visual Studio 2012 will run your Unit Tests after each successful build of your solution
  • 15. Code coverage in VS 2012 • Analyze your code coverage with a single click • Analyze for selected tests to help find how specific tests are covering your system • Supports all managed & native frameworks
  • 16. DEMONSTRATION • Unit Test Basics • Unit Test Explorer • Framework Plug-Ins • Continuous Testing • Code Coverage • Play Lists (Update 2)
  • 17. What‟s missing? • Test Lists – Legacy mode only • Test Impact – Works on the server, not in the VS client • Private Accessors – Deprecated in VS 2010, removed in VS 2012 • Generate Unit Test – Didn‟t actually generate a unit test
  • 18. Unit Testing and Isolation • Unit Tests verify the smallest testable „unit‟ of code • Target code should be isolated from external influences • Unit Test frameworks can perform integration testing Unit Test Pseudo-Code: Target Pseudo-Code: T = new SomeClass() Function DoSomething(a) Response result = T.DoSomething(1) x = LookupInDatabase(a) controlled Assert.AreEqual(2,result) y = ProcessWithWebService(x) End Function LogToFile(“Processing complete”) by test End Function Response controlled by test Response controlled by test
  • 19. What is un-testable code? Where do we find it? Common indicators • “Get „er done” code • Complex test setup and teardown – Business logic in code-behind • Environmental dependencies – Classes with too many • Public static methods dependencies • Hidden object creation – Database logic mixed with business logic • Complex external frameworks • Testability was not a • No tests at all! consideration – Or was explicitly avoided • Monolithic, highly-coupled designs Any system where the tests require complex setup or where the tests run very slowly is unsuitable for the kind of developer testing we really care about.
  • 20. A simple test setup example The method we want to unit test bool IsFileEmpty(string file) { var content = File.ReadAllText(file); return content.Length == 0; } void FileExistsTest() { File.Write("foo.txt", ""); var result = IsFileEmpty("foo.txt") Assert.IsTrue(result); }
  • 21. Environmental Dependencies Consider the following Y2K code: public void ThrowIfEndOfTheWorld() { if (DateTime.Now == new DateTime(2000,1,1)) throw new Y2KBugException(); }
  • 22. Environmental Dependencies How about this? Why is this bad? [DllImport("kernel32.dll")] extern static bool SetSystemTime(ref SystemTime time); [TestMethod] public void Y2KTest() { SetSystemTime(2000,1,1,0,0,0); Assert.Throws( () => ThrowIfEndOfTheWorld() ); }
  • 23. Isolating code with Microsoft Fakes • Visual Studio 2012 Fakes lets you isolate almost any .NET • Fakes come in two flavors – Stubs: concrete implementations of interfaces or abstract classes – Shims: run-time interception lets you replace calls, even those from the .NET BCL
  • 24. Visual Studio 2012 Shims – Be Cautious • Runtime interception of any .NET method – Uses the profiler to detour calls – “Monkey patching” for .NET • Use it when you… – Have external components that cannot be refactored • SharePoint, ASP.NET, Office, etc. – Need to override non-virtual methods • Static methods, constructors, sealed types, properties – Have legacy code with untestable designs
  • 25. SharePoint Development Enhancements • SharePoint improvements (Update 2) – Unit test emulator – Coded UI test support – Web Performance test support – Load test support – IntelliTrace collection plan
  • 26. SharePoint and Unit Testing [TestMethod] public void ScheduleAppointmentReturnsTrueWhenNewAppointmentIsCreated() { using (new SharePointEmulationScope(EmulationMode.Enabled)) { //Arrange SPSite site = new SPSite("http://localhost"); string listName = String.Format("List{0}", Guid.NewGuid()); // create a new temporary list Guid listId = site.RootWeb.Lists.Add listName, listName, SPListTemplateType.GenericList); SPList list = site.RootWeb.Lists[listId]; Assert.IsNotNull(list); // add fields to list list.Fields.Add("Name", SPFieldType.Text, true); list.Fields.Add("Date", SPFieldType.Text, false); list.Update(); // prepare string errorMsg = string.Empty; DateTime date = DateTime.Now; BookAnAppointmentWebPart webPart = new BookAnAppointmentWebPart(); // Act bool success = webPart.ScheduleAppointment(site.RootWeb, list.Title, "My Name", "888-888-8888", "My.Name@contoso.com", "23", date, out errorMsg); // Assert Assert.IsTrue(success); // cleanup list.Delete(); site.Dispose(); } }
  • 27. Code Reviews Purpose: – Find and fix bugs early in the process (much cheaper and easier than later) – Adherence to development standards – Improve consistency – Improve comments and maintainability – Share best practices across the team – Educate both experienced and new team members – Improve overall structural quality of the code and skillset of the team!
  • 28. Integrated Code Review • Provides feedback from other team members • Shared knowledge across team • Code reviews can be set as a quality gate • Source changes highlighted and comments about the changes.
  • 29. Automated Reviews? • Static Code Analysis: – Analyze code (MSIL/SQL) based on best practices (rules) – Rules created by and used at Microsoft – Rulesets: • Selectable groups of rules allow tailoring to your environment • Rulesets can be further customized for the exact rules you need – Can support both T-SQL and .NET – Can be „enforced‟ using check-in policies – Can be reported during the build (including CI and Gated) • Still not the same as manual/peer reviews
  • 30. Code Clone Detection • Reviews common code blocks exposing refactoring opportunities • Detect code blocks with common structure and approach • Search is semantic, not just literal • Detects „copy and paste‟ errors • Detects code fragments with a common logical structure • Review common code and decide how to proceed
  • 32. Agenda • ALM and Quality • Quality in Requirements • Quality in Development – Unit Testing – Fakes – Code Reviews – Code Analysis – Code Clones • Quality in Test – Manual Testing – Exploratory Testing – Automated Testing – Lab Environments • Conclusion
  • 33. Tester Enhancements in Visual Studio 2012 • Microsoft Test Manager – Performance – Exploratory Testing – Clone test suites via command line ("versioning") – Multi-line test steps – Rich-text in test steps – Improved Test Step grid usability – Read-only test case access from within Test Runner – Pass/Fail test cases without using Test Runner – Enhanced view of results for Test Plan – Manual testing for Metro-style applications – Code Coverage for Manual Testing (Update 1) – Suspend/Resume testing for test case development • Coded UI Testing – UI Map Access – Cross Browser UI Testing (Update 1) – Test data reduction through test settings configuration • Team Web Access - Test Hub
  • 34. Web Access – Test Hub
  • 35. Initiating Exploratory Testing or no work item. Explore based on specific work item(s)…
  • 36. Performing Exploratory Testing • Familiar Test Runner interface customized for exploratory testing • Free-form comment area allows tester to record suggestions and problems encountered during the session • Comment area allows for rich-text, attachments, and easy insertion of screenshot • Session can be paused to perform activities outside of the Test Runner • Bug and Test Case work items can readily be created during the exploratory testing session
  • 37. Coded UI – UI Map Editor It‟s in the box now!
  • 40. Want to know more...?
  • 41. Imaginet‟s New Blog Keeps You In The Know Stay up to speed on the latest news from Imaginet, Microsoft, Visual Studio, and the entire software development world. http://blog.imaginet.com
  • 42. More Webcasts on ALM / TFS / Visual Studio 2012 • Quality Coding: What’s New with Visual Studio 2012 • April 18 (1:00-2:30pm CT) • May 9 (1:00-2:30pm CT) • May 23 (1:00-2:30pm CT) • Getting Started With Coded UI testing: Building Your First Automated Test • April 11 (1:00-2:30pm CT) • April 25 (1:00-2:30pm CT) • June 13 (1:00-2:30pm CT) • June 27 (1:00-2:30pm CT) • The How, What, and Why of Performance Testing Your Applications • May 2 (1:00-2:30pm CT) • Top Business Benefits of Application Lifecycle Management (ALM) • June 3 (1:00-2:00pm CT) • Managing Test Labs Without the Headaches • June 6 (1:00-2:30pm CT) • June 20 (1:00-2:30pm CT)
  • 43. Free Services from Imaginet & Microsoft There are a number of different Microsoft Programs that you might be able to leverage to get some free services from Imaginet: • Deployment Planning Services (DPS) – You can trade in your Microsoft Software Assurance credits to receive some free TFS/ALM Deployment Planning Services days with Imaginet • Partner Services Credit (PSC) – Have you or are you about to spend money with Microsoft on Visual Studio 2012 products? If so, Microsoft may kick in some funding to help you successfully adopt. • Virtual Technical Specialist (VTS) hours –You may be eligible to receive some free remote consulting/training hours with Imaginet through the Microsoft Virtual Technical Specialist program. For more information, email bmadison@imaginet.com.
  • 44. Need Help with YOUR Automated Testing? Imaginet’s Visual Studio 2012 Automated Testing 5-day Quickstart • Learn best practices for test selection, extension, data binding, maintenance, frameworks, community extensions (such as the CUITe and the UI Map Toolbox), and other real-world scenarios. • Includes automated test development & execution for YOUR application • Support and training for your team • Includes a high-level ALM assessment Interested? Just email us at info@imaginet.com.
  • 45. ALM Planning & Implementation Services ALM Planning Testing • ALM Assessment & Envisioning Workshops • Manual Testing with Test Manager Quick (3 or 5 days) Start (5 days) • VS & TFS Migration Planning Workshop (5 • Visual Studio Testing Tools Quick Start (10 days) days) • TFS Deployment Planning* (5 days) • Visual Studio Automated Testing Quick Start • Visual SourceSafe to TFS Migration (5 days) Planning* (3 Days) • Visual Studio Load Testing Quick Start (5 or • Visual Studio Quality Tools Deployment 10 Days) Planning* (5 days) Builds Upgrade • Automated Build & Release Management • TFS 2010 Adoption Quick Start (5 or 10 Quick Start (5 days) days) • Automated Build Center of Excellence (CoE) • TFS 2012 Adoption Quick Start (5 or 10 days) Database • TFS 2010 Upgrade Quick Start (10 days) • Visual Studio Database Tools Quick Start • TFS 2012 Upgrade Quick Start (10 days) (10 days) Remote Support Integrations • Remote Support for TFS & Visual Studio • Team Foundation Server (TFS) & Project Server Integration Quick Start (10 days) Lab • TFS & Quality Center Integration/Migration • Visual Studio Lab Management Quick Start Quick Start (10 days) (10 days) Email us at:
  • 46. For questions or more information, please contact us at: info@imaginet.com or (972)607-4830 Remember to add http://blog.imaginet.com to your favorite reader!

Editor's Notes

  1. This is the teaser for the class – we will preview (in slides) many of the topics that we’ll dive into deeply as part of this training class…
  2. This is the teaser for the class – we will preview (in slides) many of the topics that we’ll dive into deeply as part of this training class…
  3. Speaker notes:1. While we are expanding support for 3rd party frameworks, we have lots of customers who are on MSTest and we will continue investing in it for them2. Potential rude QA, Mstest sucks because….Where is Assert.Throws?Where is DataRow support?Answer: We are fully aware that we are behind on some key features, we are not done yet and will keep working to close the gap here
  4. As needed, use this as an opportunity to demonstrate work items in general. For an upgrade class, hopefully this is minimized.
  5. Peter – fix the final sentence this time. 
  6. Image source: http://www.sxc.hu/photo/1125087
  7. Maybe retitle this?
  8. BHARRY: Unit testing – One of the big problems with unit testing SharePoint is that most code requires SharePoint to be running and trying to run tests against a live SharePoint instance is a pain.  So we’ve built a SharePoint “emulator” using our new VS 2012 Fakes & Stubs capability.  This will make unit testing of SharePoint components WAY easier.Coded UI support – Our 2012 product was pretty close to supporting this but there were a few SharePoint specific issues that we weren’t able to address that made CodedUI (functional testing) not work well for SharePoint.  In our first update, we will have addressed those issues.Workarounds documented for Excel on Sharepoint 2010, Visio\\Powerpoint controls, and SharePoint Silverlight controlsLoad testing – We now support load testing for SharePoint out of the box.  This is more involved than you might imagine due to how dynamic SharePoint is.  You can’t just record a script and play it back – it won’t work because SharePoint generates and expects dynamic data (like GUIDs).  We’ve built the extensions to our load testing solution to parse the dynamic SharePoint data and include it appropriately in subsequent requests.  So now you can record a script and play it back and we will dynamically adjust it to match what SharePoint expects.IntelliTrace collection plan – While this won’t be in the first CTP, we’re building a custom IntelliTrace collection plan for SharePoint that helps filter out a bunch of the SharePoint “infrastructure noise” and lets you focus on events related to your components that are the likely cause of problems you are seeing.SOMA: SharePoint Development. Beyond the core platform support for SharePoint development available via “Napa” and the Office Developer Tools for Visual Studio, with Visual Studio 2012 Update 1 we’ve invested in building out significant new application lifecycle management (ALM) capabilities for SharePoint applications.  This work is primarily centered around multiple forms of testing: from load testing that enables the stressing of SharePoint applications with simulated load and network conditions; to performance testing that enables recording and running performance suites against SharePoint solutions; to unit testing that enables coded UI tests for simulating user interaction and that enables using the Microsoft Fakes Framework for stubbing out SharePoint dependencies in unit tests.  Update 1 also updates IntelliTrace to capture SharePoint logging information, in order to provide a rich analysis experience for SharePoint applications.
  9. VS Blog:SharePoint Emulators provide a system of Fakes based shims implementing the basic behaviors of the SharePoint 2010 server object model. SharePoint Emulators are available today through a NuGet package feed. Perform a simple search of the NuGet official feed for “SharePoint Emulators”.SharePoint Emulators are easy to incorporate into existing tests. You can write tests against the SharePoint Emulators using only the SharePoint API. All that is needed is the wrapping of test code in a SharePointEmulationScope.
  10. There are also things like JSLint, etc. for other platforms
  11. As needed, use this as an opportunity to demonstrate work items in general. For an upgrade class, hopefully this is minimized.
  12. This is the teaser for the class – we will preview (in slides) many of the topics that we’ll dive into deeply as part of this training class…
  13. Source: http://blogs.msdn.com/b/visualstudioalm/archive/2012/02/29/what-s-new-for-microsoft-test-manager-in-visual-studio-11-beta.aspx?PageIndex=2#comments
  14. As needed, use this as an opportunity to demonstrate work items in general. For an upgrade class, hopefully this is minimized.
  15. Want to know more?
  16. Want to know more?