Your SlideShare is downloading. ×
ALM@Work - Unit testing in Visual studio 2012
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

ALM@Work - Unit testing in Visual studio 2012


Published on

Sessione "

Sessione "

Published in: Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Unit testing in VS2012 Ricci Gian Maria @alkampfer
  • 2. Agenda• A new shiny test runner• Continuous test and code coverage made super-easy• Real or fake? A world of shims.• Coded-Ui test and Testing Team• Visual Studio Specific tests• Running test in a Build
  • 3. A new shiny test runner• Integrated in VS• Pluggable test framework• Simpler to use• Faster than older runner Test Runner• More agile-tester-oriented Agile Tester
  • 4. Most important features on front• One click Code coverage• Continuous test runner
  • 5. New features, revamp of older onesand dropped functionalitiesOne-click code coverage No more oscure settings No more needs of test configuration for basic runNew features Continuous test (aka run test after builds) Agile test runner C++ unit test frameworkRemoved features No more dev test impact (only available on builds) No more tests lists Old test runner is gone
  • 6. Compatibility with VS2010Support for VS2010 test project fileNew format of test project No need of .testsettings file New test project templatesSettings are obsolete and deprecated Used only for specific scenario like remote execution To use Diagnostic data adapter
  • 7. Some missing feature for old MsTestusers• Test Lists –deprecated in 2010 no more supported• Still no ability to group tests in test runner• Run test by category only with command line test runner • Vstest.console Calculator.test.dll /UseVsixExtensions:true /TestCaseFilter: « TestCategory=xxx» • Works only for MSTest (or for provider that willingly parse the TestCategory attribute)
  • 8. Isolation library – Visual Studio fakes• A Stub is a Test Double with behavior set in the test to make test repeatable• A shim or shiv is a small library that transparently interceps an API.. (Wikipedia)• They makes untestable code testable• Only available in VS Ultimate• Is the last resort to test legacy code for refactoring/update/upgrade
  • 9. Coded UI tests• Record User – Software interaction• Playback the application replaying user action• Based on «pluggable» component • Use better technology when possible • Permits to third party company to support theirs controls (Es. Telerik)• Records high level interation when possible • Does not record mouse clicks or keyboard strokes only • Try to understand what the user does • Aggregates operations• Collaboration with Test Teams using Microsoft Test Manager
  • 10. Coded UI New features• Support for IE9/IE10 (HTML5 support)• New api focusing on hand-code CUIT• Description and assertion message in CUIT test recorder• News
  • 11. Coded UI Test Compatibility withVS2010• No Silverlight support (use VS2010 feature pack 2 unit test project)• No Firefox support (use VS2010 feature pack 2 unit test project)• New API (can be used only in VS2012 CUIT test project• Cannot add CUIT to VS2010 test project that has not already a CUIT in it (create a CUIT with vs2010, then open in VS2012 to do repair process)
  • 12. Web Performance tests• Available since VS 2005 and evolved through each VS upgrade• Request/replay based test • Record in IE • Manipulation from a specific editor in VS • Advanced request/response correlation feature • Advanced extraction rules to grab content from responses • Easy to write plugin • Advanced feature es. cycles
  • 13. Run test in builds• The new test engine is integrated with TFS2012 builds • Faster runner • Supports test impact • Supports third party framework• Run Nunit, xUnit, etc in a build and have results automatically stored with the build• Unit test in build indicates health of the project• Is the grounding for Continuous Delivery
  • 14. Grazie agli sponsor