about me about me
photography photography
software projects software projects
contact me contact me

When writing unit tests, it’s often useful to know the code coverage you’ve achieved to see what proportion of your code you’re exercising. Typically you have to commit your code to version control, so your CI server can pull in your updates and produce coverage reports. This means you sometimes commit incomplete tests, where you might forget to test failure branches (throwing exceptions for example).

code coverage report

Read the rest of this entry »

If you work with git as your version control system and don’t use a GUI app in your workflow, this one liner in your ~/.profile (or ~/.bashrc on Linux) will display the active branch you’re working on when you cd to a git repo path. Read the rest of this entry »