• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Unit testing with visual studio 2012
 

Unit testing with visual studio 2012

on

  • 2,414 views

 

Statistics

Views

Total Views
2,414
Views on SlideShare
1,971
Embed Views
443

Actions

Likes
0
Downloads
16
Comments
0

3 Embeds 443

http://www.imentor.co.in 312
http://www.i-softindia.com 121
http://imentor.co.in 10

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Unit testing with visual studio 2012 Unit testing with visual studio 2012 Presentation Transcript

    • Unit Testing with Visual Studio 2012
    • The Visual Studio 2012 Unit Testing experience is focused ondevelopers writing and running unit tests while they write their code.
    • Years of customer feedback• MS-Test Framework Issues • MS-Test too slow • Bad C/C++ support • MS-Test missing new features• Experience Issues • Designed for testers not developers • Not good for Agile & TDD
    • Quick overview of the new Unit TestExplorer window
    • Developer Focused Unit Test Experience
    • Architecture
    • 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!
    • Unit testing async methods with MS-Test
    • Isolating code for better testing• The new VS11 Fakes framework lets you isolate almost ANYTHING in .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
    • Using Fakes to create fast-running, isolated unit tests
    • Code coverage in VS 2012Analyze your codecoverage with asingle clickAnalyze for selectedtests to help findhow specific testsare covering yoursystemSupports allmanaged & nativeframeworks
    • Code Coverage
    • Team Foundation Build• If it works in Visual Studio, it works on Team Foundation Build • 3rd party frameworks • Visual Studio Fakes Isolation Framework • Code Coverage• Plus… • Hosted Build (Team Build in the Cloud) • Test Impact Analysis
    • 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
    • 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
    • The Visual Studio 2012 Unit Testing experience is focused ondevelopers writing and running unit tests while they write their code.