testing μέσα από το visual studio!
DESCRIPTION
31/5/2012. Testing μέσα από το Visual Studio!. 31/5/2012. Testing για τον Προγραμματιστή. Γιώργος Καρκαλής SafeCape Software Solutions. Agenda. Unit testing Code coverage Profiling / Performance VS11 – what’s new Exploratory testing Azure for testing Tips & tricks. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/1.jpg)
Testing μέσα από το Visual Studio!
31/5/2012
![Page 2: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/2.jpg)
Testing για τον Προγραμματιστή
31/5/2012
Γιώργος ΚαρκαλήςSafeCape Software Solutions
![Page 3: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/3.jpg)
Agenda− Unit testing− Code coverage− Profiling / Performance− VS11 – what’s new− Exploratory testing− Azure for testing− Tips & tricks
![Page 4: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/4.jpg)
Unit testing− Primary goal :
− take the smallest piece of testable software
− isolate it from the remainder of the code− determine whether it behaves exactly as
expected
int c = Add(1, 2)Assert.AreEqual(3, c);
![Page 5: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/5.jpg)
Unit testing in VS− VS2010 : Microsoft Unit Testing
Framework− Based on Attributes
− [TestClass]− [TestInitialize]− [TestMethod]− ...
− VS11: Support for any Unit Testing framework− xUnit, nUnit...− Common Unit Test Explorer
![Page 6: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/6.jpg)
DemoUnit Testing
![Page 7: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/7.jpg)
Code Coverage− Τι ποσοστό του κώδικα καλύπτουν τα
unit tests που έχω φτιάξει− Code Instrumentation− Block-based statement coverage− Line-based coverage− Source code color highlighting
![Page 8: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/8.jpg)
DemoCode Coverage
![Page 9: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/9.jpg)
Profiler – Performance Analysis− Identify appl hotspots and memory
leaks− Tier Interaction profiling
− Database / ADO.NET− Modes:
− CPU Sampling− Instrumentation− Concurrency− .NET Memory Allocation
− Integration with Web tests – Load tests
− Reports comparison
![Page 10: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/10.jpg)
DemoProfiler – Performance
Analysis
![Page 11: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/11.jpg)
Visual Studio 11 – what’s new− Customer Feedback− Exploratory testing (TFS)− Unit test explorer− 3rd party frameworks− Performance improvements (test
execution)− 64-bit test execution− Async Unit Test support (.NET 4.5)− Fakes & Shims− Continuous run tests after build
![Page 12: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/12.jpg)
DemoVS 11 Exploratory Testing
![Page 13: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/13.jpg)
Azure as testing rig
![Page 14: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/14.jpg)
DemoAzure testing rig
![Page 15: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/15.jpg)
DemoTesting tips & tricks
![Page 16: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/16.jpg)
Ερωτήσεις
![Page 17: Testing μέσα από το Visual Studio!](https://reader033.vdocuments.pub/reader033/viewer/2022050821/5681622e550346895dd25ce5/html5/thumbnails/17.jpg)
Usefull resources− Content Index for Unit Test
− http://blogs.msdn.com/b/mathew_aniyan/archive/2012/05/17/content-index-for-unit-test.aspx
− Content Index for Coded UI Test− http://
blogs.msdn.com/b/mathew_aniyan/archive/2010/02/11/content-index-for-coded-ui-test.aspx
− Content Index for Web Tests and Load Tests− http://blogs.msdn.com/b/edglas/archive/2007/12/17/content-inde
x-for-web-tests-and-load-tests.aspx− Using Visual Studio Load Tests in
Windows Azure Roles− http://msdn.microsoft.com/en-us/library/windowsazure/hh
674491.aspx