"Continuously" testing with Visual Studio 2010

I used the following notes as guide line for my talk Sydney ALT.NET, and just post them here for future reference…
Had a great night @ the user group and interesting insights into stackoverflow from Sam Saffron.


An important aspect of Agile is the feedback loop or in other words: We want short feedback cycles.
Check out Scott Ambler post for why those feedback loops are so important in Agile http://www.ambysoft.com/essays/whyAgileWorksFeedback.html


We want quick feedback

  1. 2 weekly reviews
  2. weekly deploys
  3. daily stand ups
  4. pair programming
  5. code reviews
  6. automated tests


The pain with VS2010 … if you write tests, and yes you should…

  1. Write test
  2. Stop coding
  3. Run tests
  4. Write code
  5. Stop coding
  6. Run tests
  7. Refactor code
  8. Run tests



Running tests with vanilla Visual Studio is slow




Better with Resharper




Better with TestDriven.NET and shortcut Ctrl+R, T




Even better with Giles http://codereflection.github.com/Giles/

On File save, Auto build & test in the background



We can go 1 step further with nCrunch



  1. Write test
  2. Write code
  3. Refactor code

nCrunch takes care of running the tests!



What else you get?

  • No need to save files
  • Code coverage
    * Black
    * Green - Which test covers this line
    * Red
  • Parallel execution
  • Intelligent Execution 
    * Slow tests not affecting the fast ones



What is missing?    As per today end of July 2011 Winking smile

  1. Why #fail?
  2. How to find the failing test?
  3. How to spot the broken code?
  4. Test impact analysis?



Now you

1. Download Giles

2. Download nCrunch

3. Have fun and let me know what you think


No comments:

Post a Comment

Latest Posts

Popular Posts