Unit testing in.Net. Copyright 2007 Tikal Knowledge, Ltd. | 2 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Ernst Oberortner Vienna University of Technology.
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
2017/3/25 Test Case Upgrade from “Test Case-Training Material v1.4.ppt” of Testing basics Authors: NganVK Version: 1.4 Last Update: Dec-2005.
Advanced Piloting Cruise Plot.
1 IST 410/420 Software Version Control 2 DevelopmentIntegration Test System Test User Acceptance Testing ProductionArchive DEVELOPMENTUSERS - Developers.
1 Introduction to Software Engineering Rajkumar Buyya Grid Computing and Distributed Systems Lab Dept. of Computer Science and Software Engineering University.
The 4 T’s of Test Automation:
Chapter 6 Cost and Choice. Copyright © 2001 Addison Wesley LongmanSlide 6- 2 Figure 6.1 A Simplified Jam-Making Technology.
Copyright © 2002 Pearson Education, Inc. Slide 1.
Copyright © 2002 Pearson Education, Inc. Slide 1.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Year 6 mental test 5 second questions
Making the System Operational
ZMQS ZMQS
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
Configuration management
Software change management
Automated Testing Ted Driggs (tdriggs). What Verify program behavior without human interaction Programmatically load and run test code on a wide array.
ABC Technology Project
1 Computer Programming Boolean Logic Copyright © Texas Education Agency, 2013.
© S Haughton more than 3?
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
VOORBLAD.
Chapter 5 Microsoft Excel 2007 Window
Linking Verb? Action Verb or. Question 1 Define the term: action verb.
Squares and Square Root WALK. Solve each problem REVIEW:
British Library document Supply Service. 2 Building the future service Live November 2011 £6m project over 2 years Replace ALL of the current technology.
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
1. 2 Captaris Workflow Microsoft SharePoint User Group 16 May 2006.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
SIMOCODE-DP Software.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
1 First EMRAS II Technical Meeting IAEA Headquarters, Vienna, 19–23 January 2009.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Week 1.
We will resume in: 25 Minutes.
A SMALL TRUTH TO MAKE LIFE 100%
1 Unit 1 Kinematics Chapter 1 Day
Chapter 11: Systems Development and Procurement Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chapter
Chapter 20 The ISLM Model. Copyright © 2007 Pearson Addison-Wesley. All rights reserved Determination of Aggregate Output.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 20 Systems Operations and Support.
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
How Cells Obtain Energy from Food
0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp.
Presentation transcript:

Unit testing in.Net

Copyright 2007 Tikal Knowledge, Ltd. | 2 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together Unit testing in real life Summary

Copyright 2007 Tikal Knowledge, Ltd. | 3 | Introduction: importance of unit testing Better software quality Faster development cycles Easier refactoring Finer granularity of commits Easier measurement of progress

Copyright 2007 Tikal Knowledge, Ltd. | 4 | Challenges of Unit Testing Why did not you create (enough) unit test in your last project? We barely have time to write code, no spare time to waste on tests Our code runs in a complicated container and cannot be tested alone Input format is complex and it's hard to create one for a test Output format is complex and it's hard to verify one for a test

Copyright 2007 Tikal Knowledge, Ltd. | 5 | Challenges of Unit Testing Why did not you create (enough) unit test in your last project? We barely have time to write code, no spare time to waste on tests Our code runs in a complicated container and cannot be tested alone Input format is complex and it's hard to create one for a test Output format is complex and it's hard to verify one for a test We have enough open bugs already, didn't want to find even more with new tests

Copyright 2007 Tikal Knowledge, Ltd. | 6 | Importance of tools We barely have time to write code, no spare time to waste on tests [Test] is easier than main! Our code runs in a complicated container and cannot be tested alone Input format is complex and it's hard to create one for a test Output format is complex and it's hard to verify one for a test We have enough open bugs already, didn't want to find even more with new tests

Copyright 2007 Tikal Knowledge, Ltd. | 7 | Importance of tools [Test] is easier than main! Our code runs in a complicated container and cannot be tested alone Simulate container! Input format is complex and it's hard to create one for a test Output format is complex and it's hard to verify one for a test We have enough open bugs already, didn't want to find even more with new tests

Copyright 2007 Tikal Knowledge, Ltd. | 8 | Importance of tools [Test] is easier than main! Simulate container! Input format is complex and it's hard to create one for a test Record actual input! Output format is complex and it's hard to verify one for a test We have enough open bugs already, didn't want to find even more with new tests

Copyright 2007 Tikal Knowledge, Ltd. | 9 | Importance of tools [Test] is easier than main! Simulate container! Record actual input! Output format is complex and it's hard to verify one for a test Use sophisticated verifiers! We have enough open bugs already, didn't want to find even more with new tests

Copyright 2007 Tikal Knowledge, Ltd. | 10 | Importance of tools [Test] is easier than main! Simulate container! Record actual input! Use sophisticated verifiers! We have enough open bugs already, didn't want to find even more with new tests Not all bugs have to be fixed!

Copyright 2007 Tikal Knowledge, Ltd. | 11 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together Unit testing in real life Summary

Copyright 2007 Tikal Knowledge, Ltd. | 12 | Visual Studion built-in support Attribute based » [TestClass] » [TestMethod] Classic Assert syntax » AssertEquals(4, 2+2) Data driven tests » [DataSource]

Copyright 2007 Tikal Knowledge, Ltd. | 13 | Demo

Copyright 2007 Tikal Knowledge, Ltd. | 14 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together Unit testing in real life Summary

Copyright 2007 Tikal Knowledge, Ltd. | 15 | NUnit Proven technology since 2002 Categories Classic and constraint based asserts » Demo User created contstraints » Demo Data-driven tests » Demo pNUnit for parallel execution » Demo

Copyright 2007 Tikal Knowledge, Ltd. | 16 | Other.Net open source test frameworks mbUnit aka Gallio xUnit.net csUnit

Copyright 2007 Tikal Knowledge, Ltd. | 17 | Working together: MSTest and NUnit cooperation MSTest cases can run under Nunit » NUnit tests can run under Team Foundation » Demo

Copyright 2007 Tikal Knowledge, Ltd. | 18 | Unit testing in real life: how to start? Selecting framework Creating comfortable environment Writing first tests Improving the coverage Performance testing

Copyright 2007 Tikal Knowledge, Ltd. | 19 | ALM and Unit Testing Build without tests is next to nonsense Refactoring without tests is disaster Merge without tests is gambling Last known good without tests is not known

Copyright 2007 Tikal Knowledge, Ltd. | 20 | Maintaining test suites Before the release » Bad tests may be ignored » Known bugs are reassigned to the next version » Hopefully, some bugs will be fixed After the release » Fix bad tests » Review known bugs, separate complex bugs into simpler ones » Check coverage Mid-cycle » Improve test infrastructure to lower false positives » Adopt/develop measurement tools to track team bottlenecks

Copyright 2007 Tikal Knowledge, Ltd. | 21 | Summary Unit tests are essential With appropriate infrastructure and tools they are fun to create and maintain Unit tests can and should speed up development Non technical reasons to use unit tests

Copyright 2007 Tikal Knowledge, Ltd. | 22 | Q & A

Copyright 2007 Tikal Knowledge, Ltd. | 23 | Thank you