Testing μέσα από το Visual Studio!

17
Testing μέσα από το Visual Studio! 31/5/2012

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 Presentation

Transcript of Testing μέσα από το Visual Studio!

Page 1: Testing  μέσα από το  Visual  Studio!

Testing μέσα από το Visual Studio!

31/5/2012

Page 2: Testing  μέσα από το  Visual  Studio!

Testing για τον Προγραμματιστή

31/5/2012

Γιώργος ΚαρκαλήςSafeCape Software Solutions

Page 3: Testing  μέσα από το  Visual  Studio!

Agenda− Unit testing− Code coverage− Profiling / Performance− VS11 – what’s new− Exploratory testing− Azure for testing− Tips & tricks

Page 4: Testing  μέσα από το  Visual  Studio!

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!

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!

DemoUnit Testing

Page 7: Testing  μέσα από το  Visual  Studio!

Code Coverage− Τι ποσοστό του κώδικα καλύπτουν τα

unit tests που έχω φτιάξει− Code Instrumentation− Block-based statement coverage− Line-based coverage− Source code color highlighting

Page 8: Testing  μέσα από το  Visual  Studio!

DemoCode Coverage

Page 9: Testing  μέσα από το  Visual  Studio!

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!

DemoProfiler – Performance

Analysis

Page 11: Testing  μέσα από το  Visual  Studio!

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!

DemoVS 11 Exploratory Testing

Page 13: Testing  μέσα από το  Visual  Studio!

Azure as testing rig

Page 14: Testing  μέσα από το  Visual  Studio!

DemoAzure testing rig

Page 15: Testing  μέσα από το  Visual  Studio!

DemoTesting tips & tricks

Page 16: Testing  μέσα από το  Visual  Studio!

Ερωτήσεις