Monday, July 8, 2013

Changing a bit of unittests around the WTF project

Just a short update on WTF.  I've been updating the automated tests on the WTFramework project.  I'm pretty excited in getting CI up and running for WTF all out in the open.  You'll probably noticed, I've recently got WTF on Travis-CI running all it's integration tests upon every push.

Also, under the hood, I have changed the test case base to Unittest2, and Nose2 as the test runner.  I feel this will make it more extensible for Python 2.7+ users going forward.  It'll allow you to use various Nose2 plugins, and Unittest2 goodies.

I've also changed the Mocking framework from Mox to Mockito. I feel Mox causes too much implementation level dependencies with it's syntax of having to pass not only the expected returns, but also the expected order of the calls and number of times it needs to get called.  This creations a situation where my unit test will need to know what's going on under the hood, which sort of kills off a true TDD workflow.  Not having to worry about the order of my calls and how many times things get called allows my unit test to be less dependent on the underlying implementation.

You'll probably start seeing code that's tested by the new changes in WTF versions 0.2.25 and up.  If you're forking the WTF code, you can see these cool green checkmarks on the branches page to see which branches are safe for pulling.




No comments: