Tuesday, March 15, 2016

Pics from .Net Users Group - Barrett Simms on Unit Testing

 Barrett Simms spoke to 80 people at the Austin .Net Users Group about Unit testing and tools.
Here's a few pics of what a users group looks like.  Join us next month.




 My notes:

His Toolset includes
MSTest
ProjectRoller - a github project to get the initial setup

BaseAspNetAngularUnity - initial "project zero" code

 Unity for Dependency Injection

Simian to find duplicate code
Angular 1.5
Ncover - he uses desktop version, comments were made about how expensive it is
Moq - for mock object

command line to start:   ProjectRoller.exe ADNUG
testfast.bat - runs tests code in command window (used ConEmu, my fav shell replacement)

Branch Coverage is the one to pay attention to.  Try to keep above 94%.
Write a unit test for every conditional branch
Restricted access to constructors so we have to use DI
If you use "new" on an important object its an anti-pattern, use DI




No comments: