SlideShare a Scribd company logo
1 of 82
A bug’s life Testing with VS 2010
Testing the world with Visual Studio 2010 How often do you get a bug report that you can’t reproduce? How often do you struggle to find the source of the bug in your code? How can you streamline the testing process and make sure you don’t repeat the same bugs? With Visual Studio 2010 & Team Foundation Server (TFS) 2010 there are a lot of new features for testers and developers that will solve these problems.  In this session you will learn how to: automate more, reproduce bugs easier, maintain your tests and configuration and discover problems sooner. Abstract
In every day software development, we often encounter bugs that are difficult to reproduce and even more difficult to find. This problem is accentuated when it’s a reoccurring bug in the system. Visual Studio 2010 & Team Foundation Server (TFS) 2010 introduces heaps of new features that will help testers and developers in squashing these bugs once and for all. In this session you will learn how to: Reproduce bugs  Automate your tests to find reoccurring bugs  Maintain your tests and configuration  Discover problems sooner  Abstract
SSA @ SSW Loves C# and .NET (Java not anymore) Specializes in  Windows Forms ASP.NET TFS testing Automated tests Peter Gfader
How to report bugs What to test to find bugs? Tests Unit tests Integration test Testing, reporting bugs and fixing bugs Test & Lab Manager (MTLM) VS2010 Missing in VS2010 Agenda
“Pass by my office then I show you”
Email  Web application TFS web access How do you report bugs?
[object Object]
And we love emailsTeamCompanion glues those worlds together http://www.ssw.com.au/ssw/standards/rules/rulestobetterprojectmanagementwithtfs.aspx#TeamCompanionWorkItem How we report bugs
Instructions to tester Reproduce steps Screen captures Stacktrace (Windows Forms, WPF, ASP.NET, Silverlight) Win7 Recorder? How do you report bugs (Instructions)?
Reproduce steps Screen captures Stacktrace (Windows Forms, WPF, ASP.NET, Silverlight) Win7 Recorder  ??? URL (Page) Version number Browser (Firefox or IE) http://www.ssw.com.au/ssw/standards/Support/BugReportOrEnhancement.aspx Instructions to tester
[object Object]
Application.ThreadException
Global.asax
** JavaScriptCapturing unreported bugs #2
[object Object]
LadyLoghttp://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterErrorHandling.aspx We suggest to use
** Triaging rule Runtime error  this release Suggestions / feature  next release Little UI ones  this release ** RULE Do you have rules on triaging?
** add pix Ryan His favourite quote “Test failed – 5 critical bugs found” Do you have a dedicated tester?
Code UI DB Deployment Reports Performance Security Whole system User requirements fulfilled What do we want to test?
Theory
What is the problem here? 1. What are we testing? [TestMethod] publicvoidTestCalculation() { varorderManager = newOrderManager(); using (var db = newNorthwindDataContext())     { var order = db.Orders.FirstOrDefault(); var actual = orderManager.GetTotalIncGST(order); var expected = order.OrderItems.Sum(oi => oi.Qty * price) * 1.1; Assert.AreEqual(actual, expected);     } } 2.
“A unit test is a fast, in-memory, consistent, automated and repeatable test of a functional unit-of-work in the system.” “A unit of work is any functional scenario in the system that contains logic. It can be as short as a function, or it can span multiple classes and functions, and it provides internal or business value to the system under test.” “Art of Unit Testing” Roy Osherove What is a Unit test?
It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your environment Configuration files, registry, ... Michael Feathers What is NOT a Unit test?
Integrates different pieces UI Business Layer Database Not in memory Touches  File system Registry  Database Other shared resources Integration test
Run much slower  not run in-memory Less consistent Dependent from external resources Has side effects Harder to prepare  E.g. Database setup Integration test
Unit tests – ALWAYS Integration tests – “allow” to be red Why is this important?
Readable Understand! What? Scenario? Expectation? Maintainable We change our application Trustworthy All           We are bug free Attributes of a good Unit test
Exam!
[TestMethod] publicvoidActualEndTime_PlusOvertimeHardcoded_Valid() { // Arrange EmployeeShiftnewShift=newEmployeeShift(); newShift.EndTime=newDateTime(2000, 01, 01, 8, 0, 0); newShift.OvertimeAfter= 1.5; // Act DateTime actual = newShift.ActualEndTime; // Assert Assert.IsTrue(actual ==  newDateTime(2000, 01, 01, 9, 30, 0)); }
[TestMethod] publicvoidGetDirtyObjects_Insert2Shifts_DirtyObjectsFound() { using (var db = newNorthwindDataContext())     {        // Arrange db.CreateNewEmployeeShift( 1 // EmployeeId "01/01/2000 02:00", "01/01/2000 10:00“); db.CreateNewEmployeeShift(             2  // EmployeeId            "01/01/2000 15:00", "01/01/2000 19:00”); // Act vardirtyObjects =  db.GetDirtyObjects(empShiftIdToVerify); // Assert Assert.IsTrue(dirtyObjects.Count() > 0);      } }
        [TestMethod]         publicvoidAlwaysTrueRuleTest()         {         //Arrange             var rules = newList<IRule<Shift>>             {                 newWorkflowRule<Shift>()                 {                     Name = "Rule 1",                     Description = "This rule will always pass",                     Condition = "true",                     ErrorMessage = "This will never be shown"                 }             };             var shift = newShift()             {                 ShiftID = Guid.NewGuid(),                 StartTime = DateTime.Now,                 EndTime = DateTime.Now             };           //Act             var results = RuleManager.Execute<Shift>(shift, rules);           //Assert             Assert.IsTrue(results.Count == 0);             Assert.IsTrue(results.IsValid);         }
[TestMethod] publicvoidTestCalculation() { varnorthWindDataContextFake =  MockRepository.GenerateStub<INorthwindDataContext>(); varorderitemsFake = Helper.CreateListOfOrders(); varorderFake = Helper.CreateNewOrder(); northWindDataContextFake.Stub(               d => d.Orders.FirstOrDefault()).Return(orderFake); northWindDataContextFake.Stub(               d => d.OrderItems).Return(orderitemsFake); varorderManager = newOrderManager(); using (var db = northWindDataContextFake)    { var order = db.Orders.FirstOrDefault(); var actual = orderManager.GetTotalIncGST(order); var expected = order.OrderItems.Sum( oi => oi.Qty * oi.Price) * 1.1; Assert.AreEqual(actual, expected);    } }
[TestMethod] publicvoidPresenter_Request_ReturnsRequestFromHttpContext() { // Arrange var view = MockRepository.GenerateStub<IView>(); varhttpContext =  MockRepository.GenerateStub<HttpContextBase>(); var request = MockRepository.GenerateStub<HttpRequestBase>(); httpContext.Stub(h => h.Request).Return(request); // Act var presenter = newTestPresenter(view); presenter.HttpContext = httpContext; // Assert Assert.AreSame(request, presenter.Request); } http://webformsmvp.codeplex.com/
[TestMethod] publicvoidRedirectPresenterRedirectsOnActionAccepted() { // Arrange var view = MockRepository.GenerateMock<IRedirectView>(); varhttpContext = MockRepository.GenerateMock<HttpContextBase>(); varhttpResponse = MockRepository.GenerateMock<HttpResponseBase>(); httpContext.Expect(h => h.Response).Return(httpResponse); httpResponse.Expect(r => r.Redirect("~/RedirectTo.aspx")); var presenter = newRedirectPresenter(view)     { HttpContext = httpContext     }; // Act view.Raise(v => v.Load += null, view, newEventArgs()); view.Raise(v => v.ActionAccepted += null, view, newEventArgs()); presenter.ReleaseView(); // Assert httpContext.VerifyAllExpectations(); httpResponse.VerifyAllExpectations(); } http://webformsmvp.codeplex.com/
[TestMethod] publicvoid DataContextSubmitChangesValidateDirtyObjects_RuleResultSavedMeasureTime_RunProcessorAfterInsert5Shifts() { for (inti = 0; i < 5; i++)    { //dummy entries DbHelper.CreateNewEmployeeShift(            DbHelper.EmployeeId1SouthSuperIntendentEast, "01/01/2000 15:00“, "01/01/2000 16:00“, true);    }    Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); RuleProcessor.Default.Start(); System.Threading.Thread.Sleep(2000); RuleProcessor.Default.Stop(); stopwatch.Stop(); // no dirty object left vardirtyObjects = DbHelper.GetDirtyObjects(); Assert.IsTrue(dirtyObjects.Count() == 0,"Dirty objects found"); }
Hard to see Naming convention Unit test Test single small “unit of work” Integration test Test integration, functionality Unit test vs. Integration test
Test & Lab Manager (MTLM) VS2010 TestingReporting bugsFixing bugs
VS2008Scenario #1 Coding done Internal testing done Deploy to staging “Test please” to Tester…
No plan (no user stories) Lucky to find bugs Waste a lot of time on irrelevant things This is called “Exploratory testing” Tester tests
Subject: Bug found!! “I cant quite remember what I did but I got this after a while”
Hi Ryan The developer tests and replies...
Bug never gets fixed
Dev: We have 2 additionally reported bugs PM: No time to fix bugs... We must SHIP!  We call this the “Vista method” Finally at the end of Test phase
2 weeks development  BANG Tester has no plan – Exploratory testing Tester tests everything “Unable to reproduce” = “Works on my machine” Bug never gets fixed Ship a buggy product Problems
VS2010#1 Tester uses Test Lab Manager
Add screenshot
#2 Tester files bug
#3 Dev sees bug Start VS2010 Open “My work items”
More details...
Bug in TFS Video.wmv Detailed steps IntelliTrace (drill through to Visual Studio) Automated recording Lots of details (you don’t need if you get intelliTrace) Stack trace System info What’s good?
#4 Dev rewinds debugging session     Dev spots bugs
From recorded test we create an automated test Don’t fix bug yet#5 Create automated test
Changes to the test //Arrange ApplicationUnderTestappUT =  ApplicationUnderTest.Launch(@”bin86ebugvalonCalculator2.exe"); //Act   // SNIP SNIPSNIP //Assert Assert.IsTrue(appUT.Process.Responding,  "App not responding");
#6 Dev fixes bug
VS2008: Developer tests manually his bug fix VS2010: Replay coded UI test #7 Dev verifies bug fix
Automated test is GREEN
Easy to reproduce the bug Create functional test (coded UI test) Automate the test from recording Good for future changes (Regression testing) What’s good with coded UI tests
[object Object],IntelliTrace
[object Object]
Suddenly wake up because of a surprise!IntelliTrace
[object Object]
Suddenly wake up because of a surprise!
Rewind back to see what happened...IntelliTrace
Was called “Historical Debugging” Easy to spot the bug Record method calls with parameters Advanced call stack Get intellitrace logs from your testers  Record / Trace testers execution  Use same source code to debug as the tester had to test Get intellitrace logs from your build server  What’s good in IntelliTrace
Hi Ryan 	Done – Fixed and test added 	PS: you don’t need to test this again  	PPS: testers are becoming less useful with 2010 Peter #8 Email to tester

More Related Content

What's hot

C++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkC++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkHumberto Marchezi
 
JAVASCRIPT Test Driven Development & Jasmine
JAVASCRIPT Test Driven Development & JasmineJAVASCRIPT Test Driven Development & Jasmine
JAVASCRIPT Test Driven Development & JasmineAnup Singh
 
Test Infected Presentation
Test Infected PresentationTest Infected Presentation
Test Infected Presentationwillmation
 
Pruebas en Plone: conceptos básicos y ejemplos
Pruebas en Plone: conceptos básicos y ejemplosPruebas en Plone: conceptos básicos y ejemplos
Pruebas en Plone: conceptos básicos y ejemplosHéctor Velarde
 
Sample Chapter of Practical Unit Testing with TestNG and Mockito
Sample Chapter of Practical Unit Testing with TestNG and MockitoSample Chapter of Practical Unit Testing with TestNG and Mockito
Sample Chapter of Practical Unit Testing with TestNG and MockitoTomek Kaczanowski
 
GeeCON 2012 Bad Tests, Good Tests
GeeCON 2012 Bad Tests, Good TestsGeeCON 2012 Bad Tests, Good Tests
GeeCON 2012 Bad Tests, Good TestsTomek Kaczanowski
 
Confitura 2012 Bad Tests, Good Tests
Confitura 2012 Bad Tests, Good TestsConfitura 2012 Bad Tests, Good Tests
Confitura 2012 Bad Tests, Good TestsTomek Kaczanowski
 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSJim Lynch
 
JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJohn Ferguson Smart Limited
 
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit TestingAdvanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit TestingLars Thorup
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database TestingChris Oldwood
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaChristopher Bartling
 
"Unit Testing for Mobile App" by Fandy Gotama (OLX Indonesia)
"Unit Testing for Mobile App" by Fandy Gotama  (OLX Indonesia)"Unit Testing for Mobile App" by Fandy Gotama  (OLX Indonesia)
"Unit Testing for Mobile App" by Fandy Gotama (OLX Indonesia)Tech in Asia ID
 
Tech In Asia PDC 2017 - Best practice unit testing in mobile apps
Tech In Asia PDC 2017 - Best practice unit testing in mobile appsTech In Asia PDC 2017 - Best practice unit testing in mobile apps
Tech In Asia PDC 2017 - Best practice unit testing in mobile appsFandy Gotama
 
Advanced PHPUnit Testing
Advanced PHPUnit TestingAdvanced PHPUnit Testing
Advanced PHPUnit TestingMike Lively
 
2013 DevFest Vienna - Bad Tests, Good Tests
2013 DevFest Vienna - Bad Tests, Good Tests2013 DevFest Vienna - Bad Tests, Good Tests
2013 DevFest Vienna - Bad Tests, Good TestsTomek Kaczanowski
 
JUnit & Mockito, first steps
JUnit & Mockito, first stepsJUnit & Mockito, first steps
JUnit & Mockito, first stepsRenato Primavera
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummiesHarry Potter
 

What's hot (20)

C++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing FrameworkC++ Unit Test with Google Testing Framework
C++ Unit Test with Google Testing Framework
 
JAVASCRIPT Test Driven Development & Jasmine
JAVASCRIPT Test Driven Development & JasmineJAVASCRIPT Test Driven Development & Jasmine
JAVASCRIPT Test Driven Development & Jasmine
 
Test Infected Presentation
Test Infected PresentationTest Infected Presentation
Test Infected Presentation
 
Pruebas en Plone: conceptos básicos y ejemplos
Pruebas en Plone: conceptos básicos y ejemplosPruebas en Plone: conceptos básicos y ejemplos
Pruebas en Plone: conceptos básicos y ejemplos
 
Unit Testing in iOS
Unit Testing in iOSUnit Testing in iOS
Unit Testing in iOS
 
Sample Chapter of Practical Unit Testing with TestNG and Mockito
Sample Chapter of Practical Unit Testing with TestNG and MockitoSample Chapter of Practical Unit Testing with TestNG and Mockito
Sample Chapter of Practical Unit Testing with TestNG and Mockito
 
GeeCON 2012 Bad Tests, Good Tests
GeeCON 2012 Bad Tests, Good TestsGeeCON 2012 Bad Tests, Good Tests
GeeCON 2012 Bad Tests, Good Tests
 
Confitura 2012 Bad Tests, Good Tests
Confitura 2012 Bad Tests, Good TestsConfitura 2012 Bad Tests, Good Tests
Confitura 2012 Bad Tests, Good Tests
 
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJSIntro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
 
JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit Tests
 
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit TestingAdvanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit Testing
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database Testing
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
"Unit Testing for Mobile App" by Fandy Gotama (OLX Indonesia)
"Unit Testing for Mobile App" by Fandy Gotama  (OLX Indonesia)"Unit Testing for Mobile App" by Fandy Gotama  (OLX Indonesia)
"Unit Testing for Mobile App" by Fandy Gotama (OLX Indonesia)
 
Tech In Asia PDC 2017 - Best practice unit testing in mobile apps
Tech In Asia PDC 2017 - Best practice unit testing in mobile appsTech In Asia PDC 2017 - Best practice unit testing in mobile apps
Tech In Asia PDC 2017 - Best practice unit testing in mobile apps
 
Advanced PHPUnit Testing
Advanced PHPUnit TestingAdvanced PHPUnit Testing
Advanced PHPUnit Testing
 
2013 DevFest Vienna - Bad Tests, Good Tests
2013 DevFest Vienna - Bad Tests, Good Tests2013 DevFest Vienna - Bad Tests, Good Tests
2013 DevFest Vienna - Bad Tests, Good Tests
 
JUnit & Mockito, first steps
JUnit & Mockito, first stepsJUnit & Mockito, first steps
JUnit & Mockito, first steps
 
Google mock for dummies
Google mock for dummiesGoogle mock for dummies
Google mock for dummies
 

Viewers also liked

Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlightrsnarayanan
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Peter Gfader
 
Innovation durch Scrum und Continuous Delivery
Innovation durch Scrum und Continuous DeliveryInnovation durch Scrum und Continuous Delivery
Innovation durch Scrum und Continuous DeliveryPeter Gfader
 
What makes a good bug report?
What makes a good bug report?What makes a good bug report?
What makes a good bug report?Rahul Premraj
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingAnna Russo
 
Reports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesReports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesPeter Gfader
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code DevelopmentPeter Gfader
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployPeter Gfader
 
OLAP – Creating Cubes with SQL Server Analysis Services
OLAP – Creating Cubes with SQL Server Analysis ServicesOLAP – Creating Cubes with SQL Server Analysis Services
OLAP – Creating Cubes with SQL Server Analysis ServicesPeter Gfader
 
SSAS - Other Cube Browsers
SSAS - Other Cube BrowsersSSAS - Other Cube Browsers
SSAS - Other Cube BrowsersPeter Gfader
 
Full Testing Experience - Visual Studio and TFS 2010
 Full Testing Experience - Visual Studio and TFS 2010 Full Testing Experience - Visual Studio and TFS 2010
Full Testing Experience - Visual Studio and TFS 2010Ed Blankenship
 
Don't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsDon't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsStoyan Stefanov
 

Viewers also liked (13)

Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlight
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
Innovation durch Scrum und Continuous Delivery
Innovation durch Scrum und Continuous DeliveryInnovation durch Scrum und Continuous Delivery
Innovation durch Scrum und Continuous Delivery
 
Testing in TFS
Testing in TFSTesting in TFS
Testing in TFS
 
What makes a good bug report?
What makes a good bug report?What makes a good bug report?
What makes a good bug report?
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
 
Reports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesReports with SQL Server Reporting Services
Reports with SQL Server Reporting Services
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
 
OLAP – Creating Cubes with SQL Server Analysis Services
OLAP – Creating Cubes with SQL Server Analysis ServicesOLAP – Creating Cubes with SQL Server Analysis Services
OLAP – Creating Cubes with SQL Server Analysis Services
 
SSAS - Other Cube Browsers
SSAS - Other Cube BrowsersSSAS - Other Cube Browsers
SSAS - Other Cube Browsers
 
Full Testing Experience - Visual Studio and TFS 2010
 Full Testing Experience - Visual Studio and TFS 2010 Full Testing Experience - Visual Studio and TFS 2010
Full Testing Experience - Visual Studio and TFS 2010
 
Don't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsDon't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web Applications
 

Similar to Testing with VS2010 - A Bugs Life

1 aleksandr gritsevski - attd example using
1   aleksandr gritsevski - attd example using1   aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example usingIevgenii Katsan
 
Automated Unit Testing
Automated Unit TestingAutomated Unit Testing
Automated Unit TestingMike Lively
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptdavejohnson
 
Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And DrupalPeter Arato
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Comunidade NetPonto
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2Tricode (part of Dept)
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETBen Hall
 
Unit testing for WordPress
Unit testing for WordPressUnit testing for WordPress
Unit testing for WordPressHarshad Mane
 
Developer Tests - Things to Know (Vilnius JUG)
Developer Tests - Things to Know (Vilnius JUG)Developer Tests - Things to Know (Vilnius JUG)
Developer Tests - Things to Know (Vilnius JUG)vilniusjug
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitJames Fuller
 
Unit testing @ WordPress Meetup Tilburg 7 januari 2014
Unit testing @ WordPress Meetup Tilburg 7 januari 2014Unit testing @ WordPress Meetup Tilburg 7 januari 2014
Unit testing @ WordPress Meetup Tilburg 7 januari 2014Barry Kooij
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentAll Things Open
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testingpleeps
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testingAdam Stephensen
 
2010 07-28-testing-zf-apps
2010 07-28-testing-zf-apps2010 07-28-testing-zf-apps
2010 07-28-testing-zf-appsVenkata Ramana
 

Similar to Testing with VS2010 - A Bugs Life (20)

1 aleksandr gritsevski - attd example using
1   aleksandr gritsevski - attd example using1   aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example using
 
Automated Unit Testing
Automated Unit TestingAutomated Unit Testing
Automated Unit Testing
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And Drupal
 
Php tests tips
Php tests tipsPhp tests tips
Php tests tips
 
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...Testes? Mas isso não aumenta o tempo de projecto? Não quero...
Testes? Mas isso não aumenta o tempo de projecto? Não quero...
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 
Junit_.pptx
Junit_.pptxJunit_.pptx
Junit_.pptx
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
 
Unit testing for WordPress
Unit testing for WordPressUnit testing for WordPress
Unit testing for WordPress
 
Developer Tests - Things to Know (Vilnius JUG)
Developer Tests - Things to Know (Vilnius JUG)Developer Tests - Things to Know (Vilnius JUG)
Developer Tests - Things to Know (Vilnius JUG)
 
Fighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnitFighting Fear-Driven-Development With PHPUnit
Fighting Fear-Driven-Development With PHPUnit
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Unit testing @ WordPress Meetup Tilburg 7 januari 2014
Unit testing @ WordPress Meetup Tilburg 7 januari 2014Unit testing @ WordPress Meetup Tilburg 7 januari 2014
Unit testing @ WordPress Meetup Tilburg 7 januari 2014
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End Development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
 
2010 07-28-testing-zf-apps
2010 07-28-testing-zf-apps2010 07-28-testing-zf-apps
2010 07-28-testing-zf-apps
 
Unit test
Unit testUnit test
Unit test
 

More from Peter Gfader

Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Peter Gfader
 
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019Peter Gfader
 
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)Peter Gfader
 
How to make more impact as an engineer
How to make more impact as an engineerHow to make more impact as an engineer
How to make more impact as an engineerPeter Gfader
 
13 explosive things you should try as an agilist
13 explosive things you should try as an agilist13 explosive things you should try as an agilist
13 explosive things you should try as an agilistPeter Gfader
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucksPeter Gfader
 
Use Scrum and Continuous Delivery to innovate like crazy!
Use Scrum and Continuous Delivery to innovate like crazy!Use Scrum and Continuous Delivery to innovate like crazy!
Use Scrum and Continuous Delivery to innovate like crazy!Peter Gfader
 
Qcon london2012 recap
Qcon london2012 recapQcon london2012 recap
Qcon london2012 recapPeter Gfader
 
Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Peter Gfader
 
Business Intelligence with SQL Server
Business Intelligence with SQL ServerBusiness Intelligence with SQL Server
Business Intelligence with SQL ServerPeter Gfader
 
SQL Server - Full text search
SQL Server - Full text searchSQL Server - Full text search
SQL Server - Full text searchPeter Gfader
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesPeter Gfader
 
Work with data in ASP.NET
Work with data in ASP.NETWork with data in ASP.NET
Work with data in ASP.NETPeter Gfader
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsPeter Gfader
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityPeter Gfader
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NETPeter Gfader
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5Peter Gfader
 
.NET and C# introduction
.NET and C# introduction.NET and C# introduction
.NET and C# introductionPeter Gfader
 

More from Peter Gfader (20)

Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity
 
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
 
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
 
How to make more impact as an engineer
How to make more impact as an engineerHow to make more impact as an engineer
How to make more impact as an engineer
 
13 explosive things you should try as an agilist
13 explosive things you should try as an agilist13 explosive things you should try as an agilist
13 explosive things you should try as an agilist
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
 
Use Scrum and Continuous Delivery to innovate like crazy!
Use Scrum and Continuous Delivery to innovate like crazy!Use Scrum and Continuous Delivery to innovate like crazy!
Use Scrum and Continuous Delivery to innovate like crazy!
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 
Qcon london2012 recap
Qcon london2012 recapQcon london2012 recap
Qcon london2012 recap
 
Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Data Mining with SQL Server 2008
Data Mining with SQL Server 2008
 
Business Intelligence with SQL Server
Business Intelligence with SQL ServerBusiness Intelligence with SQL Server
Business Intelligence with SQL Server
 
SQL Server - Full text search
SQL Server - Full text searchSQL Server - Full text search
SQL Server - Full text search
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET Features
 
Work with data in ASP.NET
Work with data in ASP.NETWork with data in ASP.NET
Work with data in ASP.NET
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows Forms
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and Security
 
Better User Experience with .NET
Better User Experience with .NETBetter User Experience with .NET
Better User Experience with .NET
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5
 
.NET and C# introduction
.NET and C# introduction.NET and C# introduction
.NET and C# introduction
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Testing with VS2010 - A Bugs Life

  • 1. A bug’s life Testing with VS 2010
  • 2. Testing the world with Visual Studio 2010 How often do you get a bug report that you can’t reproduce? How often do you struggle to find the source of the bug in your code? How can you streamline the testing process and make sure you don’t repeat the same bugs? With Visual Studio 2010 & Team Foundation Server (TFS) 2010 there are a lot of new features for testers and developers that will solve these problems. In this session you will learn how to: automate more, reproduce bugs easier, maintain your tests and configuration and discover problems sooner. Abstract
  • 3. In every day software development, we often encounter bugs that are difficult to reproduce and even more difficult to find. This problem is accentuated when it’s a reoccurring bug in the system. Visual Studio 2010 & Team Foundation Server (TFS) 2010 introduces heaps of new features that will help testers and developers in squashing these bugs once and for all. In this session you will learn how to: Reproduce bugs Automate your tests to find reoccurring bugs Maintain your tests and configuration Discover problems sooner Abstract
  • 4. SSA @ SSW Loves C# and .NET (Java not anymore) Specializes in Windows Forms ASP.NET TFS testing Automated tests Peter Gfader
  • 5. How to report bugs What to test to find bugs? Tests Unit tests Integration test Testing, reporting bugs and fixing bugs Test & Lab Manager (MTLM) VS2010 Missing in VS2010 Agenda
  • 6. “Pass by my office then I show you”
  • 7.
  • 8.
  • 9. Email Web application TFS web access How do you report bugs?
  • 10.
  • 11.
  • 12. And we love emailsTeamCompanion glues those worlds together http://www.ssw.com.au/ssw/standards/rules/rulestobetterprojectmanagementwithtfs.aspx#TeamCompanionWorkItem How we report bugs
  • 13. Instructions to tester Reproduce steps Screen captures Stacktrace (Windows Forms, WPF, ASP.NET, Silverlight) Win7 Recorder? How do you report bugs (Instructions)?
  • 14. Reproduce steps Screen captures Stacktrace (Windows Forms, WPF, ASP.NET, Silverlight) Win7 Recorder ??? URL (Page) Version number Browser (Firefox or IE) http://www.ssw.com.au/ssw/standards/Support/BugReportOrEnhancement.aspx Instructions to tester
  • 15.
  • 19.
  • 21. ** Triaging rule Runtime error  this release Suggestions / feature  next release Little UI ones  this release ** RULE Do you have rules on triaging?
  • 22. ** add pix Ryan His favourite quote “Test failed – 5 critical bugs found” Do you have a dedicated tester?
  • 23. Code UI DB Deployment Reports Performance Security Whole system User requirements fulfilled What do we want to test?
  • 25. What is the problem here? 1. What are we testing? [TestMethod] publicvoidTestCalculation() { varorderManager = newOrderManager(); using (var db = newNorthwindDataContext()) { var order = db.Orders.FirstOrDefault(); var actual = orderManager.GetTotalIncGST(order); var expected = order.OrderItems.Sum(oi => oi.Qty * price) * 1.1; Assert.AreEqual(actual, expected); } } 2.
  • 26. “A unit test is a fast, in-memory, consistent, automated and repeatable test of a functional unit-of-work in the system.” “A unit of work is any functional scenario in the system that contains logic. It can be as short as a function, or it can span multiple classes and functions, and it provides internal or business value to the system under test.” “Art of Unit Testing” Roy Osherove What is a Unit test?
  • 27. It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your environment Configuration files, registry, ... Michael Feathers What is NOT a Unit test?
  • 28. Integrates different pieces UI Business Layer Database Not in memory Touches File system Registry Database Other shared resources Integration test
  • 29. Run much slower not run in-memory Less consistent Dependent from external resources Has side effects Harder to prepare E.g. Database setup Integration test
  • 30. Unit tests – ALWAYS Integration tests – “allow” to be red Why is this important?
  • 31. Readable Understand! What? Scenario? Expectation? Maintainable We change our application Trustworthy All  We are bug free Attributes of a good Unit test
  • 32. Exam!
  • 33. [TestMethod] publicvoidActualEndTime_PlusOvertimeHardcoded_Valid() { // Arrange EmployeeShiftnewShift=newEmployeeShift(); newShift.EndTime=newDateTime(2000, 01, 01, 8, 0, 0); newShift.OvertimeAfter= 1.5; // Act DateTime actual = newShift.ActualEndTime; // Assert Assert.IsTrue(actual == newDateTime(2000, 01, 01, 9, 30, 0)); }
  • 34. [TestMethod] publicvoidGetDirtyObjects_Insert2Shifts_DirtyObjectsFound() { using (var db = newNorthwindDataContext()) { // Arrange db.CreateNewEmployeeShift( 1 // EmployeeId "01/01/2000 02:00", "01/01/2000 10:00“); db.CreateNewEmployeeShift( 2 // EmployeeId "01/01/2000 15:00", "01/01/2000 19:00”); // Act vardirtyObjects = db.GetDirtyObjects(empShiftIdToVerify); // Assert Assert.IsTrue(dirtyObjects.Count() > 0); } }
  • 35.         [TestMethod]         publicvoidAlwaysTrueRuleTest()         { //Arrange             var rules = newList<IRule<Shift>>             {                 newWorkflowRule<Shift>()                 {                     Name = "Rule 1",                     Description = "This rule will always pass",                     Condition = "true",                     ErrorMessage = "This will never be shown"                 }             };             var shift = newShift()             {                 ShiftID = Guid.NewGuid(),                 StartTime = DateTime.Now,                 EndTime = DateTime.Now             }; //Act             var results = RuleManager.Execute<Shift>(shift, rules); //Assert             Assert.IsTrue(results.Count == 0);             Assert.IsTrue(results.IsValid);         }
  • 36. [TestMethod] publicvoidTestCalculation() { varnorthWindDataContextFake = MockRepository.GenerateStub<INorthwindDataContext>(); varorderitemsFake = Helper.CreateListOfOrders(); varorderFake = Helper.CreateNewOrder(); northWindDataContextFake.Stub( d => d.Orders.FirstOrDefault()).Return(orderFake); northWindDataContextFake.Stub( d => d.OrderItems).Return(orderitemsFake); varorderManager = newOrderManager(); using (var db = northWindDataContextFake) { var order = db.Orders.FirstOrDefault(); var actual = orderManager.GetTotalIncGST(order); var expected = order.OrderItems.Sum( oi => oi.Qty * oi.Price) * 1.1; Assert.AreEqual(actual, expected); } }
  • 37. [TestMethod] publicvoidPresenter_Request_ReturnsRequestFromHttpContext() { // Arrange var view = MockRepository.GenerateStub<IView>(); varhttpContext = MockRepository.GenerateStub<HttpContextBase>(); var request = MockRepository.GenerateStub<HttpRequestBase>(); httpContext.Stub(h => h.Request).Return(request); // Act var presenter = newTestPresenter(view); presenter.HttpContext = httpContext; // Assert Assert.AreSame(request, presenter.Request); } http://webformsmvp.codeplex.com/
  • 38. [TestMethod] publicvoidRedirectPresenterRedirectsOnActionAccepted() { // Arrange var view = MockRepository.GenerateMock<IRedirectView>(); varhttpContext = MockRepository.GenerateMock<HttpContextBase>(); varhttpResponse = MockRepository.GenerateMock<HttpResponseBase>(); httpContext.Expect(h => h.Response).Return(httpResponse); httpResponse.Expect(r => r.Redirect("~/RedirectTo.aspx")); var presenter = newRedirectPresenter(view) { HttpContext = httpContext }; // Act view.Raise(v => v.Load += null, view, newEventArgs()); view.Raise(v => v.ActionAccepted += null, view, newEventArgs()); presenter.ReleaseView(); // Assert httpContext.VerifyAllExpectations(); httpResponse.VerifyAllExpectations(); } http://webformsmvp.codeplex.com/
  • 39. [TestMethod] publicvoid DataContextSubmitChangesValidateDirtyObjects_RuleResultSavedMeasureTime_RunProcessorAfterInsert5Shifts() { for (inti = 0; i < 5; i++) { //dummy entries DbHelper.CreateNewEmployeeShift( DbHelper.EmployeeId1SouthSuperIntendentEast, "01/01/2000 15:00“, "01/01/2000 16:00“, true); } Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); RuleProcessor.Default.Start(); System.Threading.Thread.Sleep(2000); RuleProcessor.Default.Stop(); stopwatch.Stop(); // no dirty object left vardirtyObjects = DbHelper.GetDirtyObjects(); Assert.IsTrue(dirtyObjects.Count() == 0,"Dirty objects found"); }
  • 40. Hard to see Naming convention Unit test Test single small “unit of work” Integration test Test integration, functionality Unit test vs. Integration test
  • 41. Test & Lab Manager (MTLM) VS2010 TestingReporting bugsFixing bugs
  • 42. VS2008Scenario #1 Coding done Internal testing done Deploy to staging “Test please” to Tester…
  • 43. No plan (no user stories) Lucky to find bugs Waste a lot of time on irrelevant things This is called “Exploratory testing” Tester tests
  • 44. Subject: Bug found!! “I cant quite remember what I did but I got this after a while”
  • 45. Hi Ryan The developer tests and replies...
  • 46. Bug never gets fixed
  • 47. Dev: We have 2 additionally reported bugs PM: No time to fix bugs... We must SHIP!  We call this the “Vista method” Finally at the end of Test phase
  • 48. 2 weeks development  BANG Tester has no plan – Exploratory testing Tester tests everything “Unable to reproduce” = “Works on my machine” Bug never gets fixed Ship a buggy product Problems
  • 49. VS2010#1 Tester uses Test Lab Manager
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 57.
  • 58. #3 Dev sees bug Start VS2010 Open “My work items”
  • 59.
  • 61. Bug in TFS Video.wmv Detailed steps IntelliTrace (drill through to Visual Studio) Automated recording Lots of details (you don’t need if you get intelliTrace) Stack trace System info What’s good?
  • 62. #4 Dev rewinds debugging session Dev spots bugs
  • 63.
  • 64.
  • 65. From recorded test we create an automated test Don’t fix bug yet#5 Create automated test
  • 66.
  • 67.
  • 68.
  • 69. Changes to the test //Arrange ApplicationUnderTestappUT = ApplicationUnderTest.Launch(@”bin86ebugvalonCalculator2.exe"); //Act // SNIP SNIPSNIP //Assert Assert.IsTrue(appUT.Process.Responding, "App not responding");
  • 70.
  • 72. VS2008: Developer tests manually his bug fix VS2010: Replay coded UI test #7 Dev verifies bug fix
  • 74. Easy to reproduce the bug Create functional test (coded UI test) Automate the test from recording Good for future changes (Regression testing) What’s good with coded UI tests
  • 75.
  • 76.
  • 77. Suddenly wake up because of a surprise!IntelliTrace
  • 78.
  • 79. Suddenly wake up because of a surprise!
  • 80. Rewind back to see what happened...IntelliTrace
  • 81. Was called “Historical Debugging” Easy to spot the bug Record method calls with parameters Advanced call stack Get intellitrace logs from your testers Record / Trace testers execution Use same source code to debug as the tester had to test Get intellitrace logs from your build server What’s good in IntelliTrace
  • 82. Hi Ryan Done – Fixed and test added PS: you don’t need to test this again PPS: testers are becoming less useful with 2010 Peter #8 Email to tester
  • 84. They destroy things They break our code “Developers hate testers”
  • 85. VS2010 – New dev joins team
  • 86. Dependency graphs Get an overview
  • 87. TODO Insert image Assembly dependency
  • 88. Create sequence diagram -> context menu on method What happens when?
  • 90. Call hierarchy (not just debugging) View  Code definition window Navigate To Ctrl+comma Reference highlighting - select and wait Code navigation
  • 92.
  • 93. Test impact analysis The developer sees that his code affected other tests (Test Impact analysis) Saves time on running tests Running a lot of tests is slow
  • 95. Many test cases Start application Login to application Browse to start page  Annoying! What are shared steps?
  • 96. Re-use test steps over different test cases Record once Play back in other tests Use shared steps
  • 98. Tester: I want to test that specific build
  • 100. Tip: Why do I have this toolbar?
  • 101. Let your Knowledge workers know of this tool! Sending you problems in a standardized way With Win7 --> use recorder
  • 105. Label breakpoints Searching in the Breakpoints window Export and Import of Breakpoints and Data Tips (put under source control for all devs) Breakpoints Window
  • 106. MTLMHow can I get it?
  • 107. Email Web application TFS web access Test & Lab Manager Which one would you use now?
  • 108.
  • 109. When you get a bug report! Create test Test is RED Fix bug Test is GREEN Send a “Done - Test created” When do you create a test?
  • 110. Reproduce bug Spot bug “Works on my machine” Bug never gets fixed Generate test from bug Dev uses “Re-play” button instead of manual test Recap Scenario
  • 111.
  • 112. Every time I change something I want to test (verify) that I didn’t introduce a bug Deployment Bug fix New feature New report added I love automated tests
  • 113. Integrated web UI tests Windows UI tests, when they do it for Web, they can do it for Windows apps (Windows Forms, WPF) RowTests Data driven tests with attributes next to the test What I want in VS2012
  • 114. [TestMethod] [DeploymentItem(@"TestDataalidConditions.txt")] [DataSource("System.Data.OleDb", "Provider=Microsoft.Jet.OLEDB.4.0; DataSource=|DataDirectory|; Extended Properties='text;FMT=TabDelimited;HDR=YES'", @"validConditions#txt", DataAccessMethod.Sequential)] publicvoidCodeParserTryParseCondition_Valid_ValidConditionsFromFile() { // Arrange string condition = TestContext.DataRow[0].ToString(); CodeParsercodeParser = new CodeParser(); // Act boolsuccessFul = codeParser.TryParseCondition(condition); // Assert Assert.IsTrue(successFul); }
  • 115. [TestMethod] [Row("Target.IsDirty")] [Row("Target.IsValid“)] [Row("(1 != 2)")] publicvoidCodeParserTryParseCondition_Valid_ValidConditionsFromFile( stringcondition) { // Arrange CodeParsercodeParser = new CodeParser(); // Act boolsuccessFul = codeParser.TryParseCondition(condition); // Assert Assert.IsTrue(successFul); }
  • 116. Roy Osherove Book http://www.artofunittesting.com/ Blog http://weblogs.asp.net/ROsherove/ Unit test definitionhttp://weblogs.asp.net/ROsherove/archive/2009/09/28/unit-test-definition-2-0.aspx Michael Feathers Bloghttp://www.artima.com/weblogs/index.jsp?blogger=mfeathers What is not a unit test?http://www.artima.com/weblogs/viewpost.jsp?thread=126923 Resources
  • 117. Compare Visual Studio editionshttp://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx#compare Visual Studio pricing optionshttp://arstechnica.com/microsoft/news/2009/10/visual-studio-2010-simplified-to-four-skus-beta-2-arrives.ars Resources
  • 118. Good blog about VS2010http://blogs.msdn.com/habibh/ How Does VS2010 Historical Debugging Work?http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/06/16/how-does-vs2010-historical-debugging-work.aspx Resources
  • 120. Thank You! Gateway Court Suite 10 81 - 91 Military Road Neutral Bay, Sydney NSW 2089 AUSTRALIA ABN: 21 069 371 900 Phone: + 61 2 9953 3000 Fax: + 61 2 9953 3105 info@ssw.com.auwww.ssw.com.au

Editor's Notes

  1. Peter Gfader Testing with VS2010
  2. Java current version 1.6 Update 171.7 released next year 2010Dynamic languages Parallel computingMaybe closures
  3. The silliest bug report ever seen ...“The worst bug report I ever seen... And actually I wrote it”
  4. Not everyone in GermanyThis is already quite good...Stacktrace, Exception, Screenshot ...Automated exception handlerNo steps to reproduceUnable to reproduce without customer...Not easy to fix, until I know This is the answer to the problem... But I don’t know what the question is...I want steps to reproduce...You could to a lot of Trace.Writelines or use log4net or some other logging framework...I save you from all these! 
  5. Windows app?
  6. This is another way of sending a bug. Its OKTFS web accessTester and Client can directly enter bugs into your bug tracking system
  7. TFS + Emails + TeamCompanion
  8. Windows app?We take that a bit further as well...Is there anything else you want to have in your bug reports?Sys infoScreen size...MHTML, short for MIMEHTML, is a web page archive format used to bind resources that are typically represented by external links (such as images, Flash animations, Java applets, audio files) together with HTML code into a single file. The content of an MHTML file is encoded as if it were an HTML e-mail message, using the MIME type multipart/related.
  9. Do all these things....
  10. App.xaml
  11. SKIP THIS
  12. We have RyanDo you have a dedicated tester?That does just testing? No coding? Not on the same project...
  13. Integrate the whole system
  14. Relies on entries in the database, should use in memory/mock objectsWhat are we testing here?Naming of Test should reflect: What are we testing? Scenario: Input values, Behaviour,
  15. Tests that span multiple layers (for example business logic, view, and controller) are also not considered unit tests You have to do special things to your environment (such as editing config files) to run it.
  16. how is it different that an integration test?An integration test usually is not in-memory: it may touch the disk file system, databases, registry or other shared resources.  It may read or need a configuration file of the file system, wheas a unit test can be fully configured in-memory, for example.An integration test will usually run much slower because it does not run in-memory.An integration test can be less consistent – it may use threads or random number generators so that the result of the test is not always consistent.---
  17. An integration test will usually run much slower because it does not run in-memory.An integration test can be less consistent – it may use threads or random number generators so that the result of the test is not always consistent.---– it may use threads or random number generators so that the result of the test is not always consistent.
  18. Integration test: Test on physical serverIntegration tests: Should be setup env. Themselves and tear down afterwardsDateTime.Now Moq:MDateTime
  19. Readable: Easy to understand, see what we are testing, why, expectMaintainable: If they are to hard to maintain they’ll get stale, and your investment in writing them was wasted. Trustworthy: If you can’t trust your tests to find bugs (and especially if you don’t know you can’t trust them), then the opposite may be true — you may be confident you don’t have bugs when you do.
  20. Don’t repeat the same logic in the test!Bug is reproduced in test!
  21. ** Find better example for DB mocking
  22. WebFormsMvp.UnitTestshttp://webformsmvp.codeplex.com/
  23. WebFormsMvp.UnitTestshttp://webformsmvp.codeplex.com/
  24. This is the old way!!!
  25. No detailed planCreate click sequence that is out of the mainstream
  26. Magic moment when we close tasks:Dev: “Should be fine now”“Unable to reproduce” = “Works on my machine”“Unable to reproduce” is just as silly as “works on my mach”Every time you choose that, the screen should come up
  27. No time to fix all bugs --> We must SHIP (we call this the “Vista method”) #8
  28. How often do you get a bug report that you can’t reproduce? How often do you struggle to find the source of the bug in your code?
  29. Start up “Microsoft Test and LabManager”
  30. ONLY IN Visual Studio Ultimate edition
  31. Tester sees tests to doWe pick test division by 0
  32. “Create action recording” - To reproduce steps
  33. TestCaseCollectorErrorWarning.xml =WarningErrors from MTLM<?xml version="1.0" encoding="UTF-8"?><DataCollectionLogxmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> <DataCollectorMessages> <DataCollectorExceptionMessage timestamp="2009-11-14T22:26:52.7623220+11:00" dataCollectorUri="datacollector://microsoft/VideoRecorder/1.0" dataCollectorFriendlyName="Video Recorder" agentName="WIN-M3V9YMSUKRG" level="Error"> <Text>A video recording cannot be created</Text> <ExceptionType>Microsoft.VisualStudio.TestTools.Execution.WindowsMediaEncoderNotInstalledException</ExceptionType> <ExceptionMessage>To create a video recording, follow the instructions on the following link to install any necessary software:http://go.microsoft.com/fwlink/?LinkId=154778</ExceptionMessage> </DataCollectorExceptionMessage> <DataCollectorMessage timestamp="2009-11-14T22:29:45.6272345+11:00" dataCollectorUri="datacollector://microsoft/TraceDebugger/1.0" dataCollectorFriendlyName="IntelliTrace" agentName="WIN-M3V9YMSUKRG" level="Warning"> <Text>No Microsoft .NET applications were launched during the test run. Launch applications from Explorer or a new command prompt after a test case has started. If no .NET application is being tested, disable the Test Impact and IntelliTrace Data Collectors.</Text> </DataCollectorMessage> <DataCollectorMessage timestamp="2009-11-14T22:29:45.6321170+11:00" dataCollectorUri="datacollector://microsoft/TraceDebugger/1.0" dataCollectorFriendlyName="IntelliTrace" agentName="WIN-M3V9YMSUKRG" level="Warning"> <Text>The data collector is configured to collect data from IIS, but no web request was intercepted during the test. Ensure that the "ASP.NET Client Proxy for IntelliTrace and Test Impact" is enabled in the client test settings and that "localhost" or "127.0.0.1" is not being used to contact the server. This warning is expected if the test is not testing a web application or web service on the IIS server.</Text> </DataCollectorMessage> </DataCollectorMessages></DataCollectionLog> ActionLog.txt Log fileUse this to create a test
  34. What does the dev get?BAD: the tdlog (intelliTrace) is huge > 10MB of this exception
  35. Trace (intelliTrace) is there in this bug (All Links)Uitest is there as well
  36. Stacktrace is good...We don’t need it anymore...We see the error in yellow!!** Balloons over this
  37. Balloon on exception on the transitionHOVER OVER d and see NAN: NOT POSSIBLE?
  38. From my tester
  39. http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.uitesting.applicationundertest%28VS.100%29.aspx
  40. [TestMethod] public void CodedUITestMethod1() {ApplicationUnderTestappUT = ApplicationUnderTest.Launch(@"c:DataPeterGfaderProjectsTFSPeter-Gfader-Calculator runkWPFCalculatorcsharpinx86DebugAvalonCalculator2.exe"); // To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items. this.UIMap.Press2();this.UIMap.PressDivide(); this.UIMap.Press0();this.UIMap.PressEquals();Assert.IsTrue(appUT.Process.Responding, "App not responding"); // cleanupappUT.Close(); }
  41. Bug can be fixed directly in debugging session – since on same machine...Not sure if that’s the case when tester is on another machine...
  42. BAD: the tdlog (intelliTrace) is huge > 10MB for this exception (1minute)
  43. Think of falling asleep during a movie... Then you wake up suddenly because a shot happened in the movie. Now you rewind back to see what happened...Now imagine this with an exception (=shot)
  44. Think of falling asleep during a movie... Then you wake up suddenly because a shot happened in the movie. Now you rewind back to see what happened...Now imagine this with an exception (=shot)
  45. Think of falling asleep during a movie... Then you wake up suddenly because a shot happened in the movie. Now you rewind back to see what happened...Now imagine this with an exception (=shot)
  46. Dev shouldn’t close the bugDev just says: Resolved
  47. nDepend
  48. Create sequence diagram -> context menu on method
  49. "That is all I have for today. I appreciate you giving me your time. Thank you very much and have a great day." Peter Gfader
  50. Menu doesn’t hop up and down on switching projects...
  51. Adding more values (including notes) to data tipsIs this in source control? otherwise ???
  52. Searching in the Breakpoints windowLabel breakpointsImport and export breakpoints (put under source control for all devs)String comparison for breakpoint conditions in native debuggingExport and Import of Breakpoints and Data Tips
  53. Windows app?
  54. Similar to TDD...
  55. Click to add notesPeter Gfader Testing with VS2010