SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
4.
Every minute
spent in the debugger
is a minute squandered
5.
The two most common ways to use a debugger:
1. Wasting time
2. Quality time
6.
Wasting time:
Not knowing what your hypothesis is at any given time
Getting into a rot mindlessly hitting F10
Quality time:
Apply the Scientific Method, religiously
Simplify the scenario, then write a test!
The Debugging Process Overview
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10.
UI
System/
Subcutaneous
Unit
Automation
Harder
Easier
Exploration
Mike Cohn’s Test
Automation Pyramid
Writing test at the right level of granularity
11.
UI
System/
Subcutaneous
Unit
Exploration
Writing test at the right level of granularity
Microsoft/VisualStudio-TestHost/TestUtilities , PTVS
JaredPar/VsVim/Test
OzCode/VSIntegrationTestSamples
12.
• Synthesis and refinement of practices stemming from TDD & ATDD
• User story:
"As a [role] I want [feature] so that [benefit]”
• Acceptance Criteria
Given [initial context]
When [event occurs]
Then [ensure some outcome]
What’s this BDD thing?
13.
Create living, executable
Specification.
New feature?
Can I see the
requirements doc
please?
What’s BDD all about?
14.
• Use natural language to express intentions (Given…When…Then)
• Use a general purpose programming language
to express test mechanics
• Use a tool that will let you operate in either domain seamlessly
BDD offers a solution
15.
Michael WhelanMehdi Khalili Jake Ginnivan Jason Roberts
PM> Install-Package TestStack.BDDfy
16.
• Works with any testing framework
• Does not require its own test runner
• Creates Humanized, story-like error messages
A few quick BDDfy facts:
19.
Having flakey tests is a lot worse than having no tests at all.
A flakey test is like a virus –
quarantine it, then triage.
Visual Studio Integration Tests Pro-Tip
28.
Visual Studio 2017 will warn users about extensions that are slowing things down.
Performance as a Feature
29.
1. Delay loading your extension as much as possible (using UIContextRule)
2. When you do load, load in the background. (using AsyncPackage)
Performance as a Feature
32.
Memory Leaks vs. GC Pressure
GC Pressure:
Memory Leak:
33.
Memory Leaks vs. GC Pressure
Pro-Tip: Don’t Close your Diagnostics Tools Window!
34.
Dealing with GC Pressure
Memory Leaks vs. GC Pressure
• Always be measuring (allocations, % time spent in GC)
• Watch out for duplicate strings
• Use object pooling / a string intern pool
• Use Roslyn Heap Allocation Analyzer
37.
Which means…
…a business sponsor could request that the current
development version of the software can be deployed
into production at a moment's notice - and nobody
would bat an eyelid, let alone panic.
Got good Subcutaneous Tests?
Start practicing True Continuous Delivery!
Martin Fowler