Unit Testing has settled into the mainstream. As developers, we write code that checks code, ensuring that the outcome matches some expected result. But, are we really? As end-users (which includes each one of us from time to time), when we ask a question, we don't just expect our answer to be right, we expect it to be right now. So as developers, why are we only validating for accuracy? Why aren't we going for speed? During this session we'll discuss meeting the performance needs of an application, including developing a performance specification, measuring application performance from stand-alone testing through unit testing, using tools ranging from Team Foundation Server to the command line, and asserting on these measurements to ensure that all expectations are met. Your application does "right." Let's focus on "right now."
30. unit analysis
//MSTest Example
[TestMethod]
public void ShouldDoThisInUnder100ms()
{
var stopwatch = Stopwatch.StartNew();
// Test Functionality
stopwatch.Stop();
int elapsedMs = stopwatch
.ElapsedMilliseconds;
Assert.True(elapsedMs <= 100);
}
49. Microsoft Debug Diagnostics Tool
tinyurl.com/DebugDiag
tinyurl.com/DebugDiagWP (Whitepaper)
Web Capacity Analysis Tool (WCAT)
bit.ly/ffq6dD
JetBrains dotTrace
jetbrains.com
Red Gate ANTS Performance and Memory Profilers
red-gate.com
HP LoadRunner
tinyurl.com/LoadRunner
50. Performance Testing Guidelines
for Web Applications
Microsoft Patterns & Practices
perftestingguide.codeplex.com
J.D Meier, Carlos Farre, Prashant Bansode,
Scott Barber, Dennis Rea
Unit Testing has settled into the mainstream. As developers, we write code that checks code, ensuring that the outcome matches some expected result. But, are we really? As end-users (which includes each one of us from time to time), when we ask a question, we don't just expect our answer to be right, we expect it to be right now. So as developers, why are we only validating for accuracy? Why aren't we going for speed? During this session we'll discuss meeting the performance needs of an application, including developing a performance specification, measuring application performance from stand-alone testing through unit testing, using tools ranging from Team Foundation Server to the command line, and asserting on these measurements to ensure that all expectations are met. Your application does &quot;right.&quot; Let's focus on &quot;right now.&quot;
Jay Harris is a .NET developer in Southeast Michigan and an independent software consultant at Arana Software ( http://www.aranasoft.com ). He has been developing on the web for 15 years, since he abandoned VB3 for JavaScript because he didn't have to wait for a compile. With a career focus on end-user experience, he is a strong advocate of practices and processes that improve quality through code, ranging from automated testing, continuous integration, and performance analysis, to designing applications from the perspective of the user instead of the database. Jay is also active in the developer community beyond speaking, including serving as President of Ann Arbor .Net Developers ( http://www.aadnd.org ) an d as an organizer fo r Lansing Give Camp. When not coding, he is usually blogging to http://www.cptloadtest.com or playing games on his Xbox 360.
Presentation agenda: Justifying Performance Testing, Determining Performance Goals, Identifying Existing Issues, Testing a Unit of Code for Performance, andTesting an Application for Performance.