New toys in dev's

testing toolbelt

Paweł Łukasik

(Octal Solutions)

LoGeek Night - Wrocław, 22.05.2014

TESTS

...  and 

problems I have 

with them

About.me

  • passionate-programmer
  • Wroc.NET organizer & UG speaker
  • > 10 yrs writing code
  • almost 5 yrs with my own company

Problems with
TESTS

1

TESTS

kills 

the flow

Testing process today (TDD style)

  • Write the test
  • Stop and run the test
  • Write the code under test
  • Stop and run tests
  • Refactor the code under test
  • Stop and run tests
  • Drink some coffee and repeat

2

TESTS

are PITA

... 
to write 
a good one

Good test does not:

  • test a green path
  • test .NET framework (get/set)

3

TESTS

are important


Is

there

any hope?

nCRUNCH

NCrunch is an automated concurrent testing tool for Visual Studio.

Testing process with nCrunch

  • Write the test
  • Write the code under test
  • Refactor the code under test
  • Be happy, drink some coffee and repeat!

Last but not least...


Über-nCrunch

TESTS

no longer

breaks

our flow

What about PITA?

PEX

Automated white-box testing for .NET




What it 
doesn't do?


How does PEX works?

  • Chooses a branch that was not covered previously.
  • Builds a constraint system that describes how to reach that branch.
  • Uses a constraint solver to determine new test inputs that fulfill the constraints, if any exist.

TESTS
no longer
PITA

(to write a good one)

TESTS 
are still 

important :)

.SUM()


  • No, I'm not selling those products :)
  • Yes, nCrunch is pricey - if you like the idea - try MightyMoose
  • PEX has it drawbacks but they working on them - new code name: "Code Digger"
  • If you like puzzles - try pexforfun.com

I should test where I'm likely make mistake, and not things that always work.

Kent Beck

Questions?

Thank you!

Feedback:
Twitter: @pawel_lukasik
mail: pawel@octal.pl
blog: http://blog.octal.pl
Sources: