Published on February 28, 2014
Unit Testing and Tools @wbsimms @southshorenet
Vocabulary Unit test • Code you write to test your code Coverage • Measure of how much code is tested Mock • Replacement for something else Dependency Injection (DI) • • Builder design pattern Object and dependencies are created for you Continuous Integration (CI) • Responds to checkins, builds code, and generates code metrics (coverage, unit test pass fail, etc.)
Why Unit Test? Which would you rather do? Write Tests Fix Production Bugs
That’s cute… but really… why? 1) Catches regression bugs at the developers desk 2) Documents how code works 3) Catalog of the business rules
What makes a good unit test? • • • • Repeatable Fast Test by layers Good Coverage
Layers? Web • Controllers • ViewModels • Helpers DataAccessLayer • Repositories (or what ever) • Models • Helpers Other Libraries • Rules Logic • Etc…
Test documentation? 1. public void MethodName_Case_ExpectedResultTest() 2. [Description(“Your text here”)] public void MethodNameCaseTest()
When to run your test? All tests all the time! After pull / sync Before commits During CI builds Before you merge After you merge
So… the tools? • MSTest • Unit testing framework • Moq • Creating mock objects from interfaces • Unity • Dependency Injection • MSBuild • Build automation • DotCover/Ncover • For coverage analysis
Demo time… Deep breath….
PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
What Is NUnit? NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current production release, version 3.0, has ...
Hitex bietet einen Unit-Testing-Service für Quellcode von C/C++ Anwendungen unter Einsatz des bewährten Test-Tools von TESSY.
Testing tools like QuickCheck exist to generate test inputs for PUTs. ... The objective in unit testing is to isolate a unit and validate its correctness.
The unit test tools include: Test Explorer. Test Explorer lets you run unit tests and view their results. ... Unit testing managed code:
A unit testing framework is presented with general introduction into Unit Testing, API documetation, downloads, guide and plugin links.
Certified Unit & Integration Test Tool - Embedded Safety Standards Compliance. Easy To Use Eclipse GUI Integrated With Requirements & Development Tools.
Software testing is an investigation ... This method of test can be applied to all levels of software testing: unit, ... Software testing tools and ...
Tools; Projects; Events; Sign In / Sign Up; Welcome to the uTest Community! A confirmation email has been sent to . Please click the link in the email when ...