OK, so there has been a slight pause between posts, in the run up to and actually going on holiday I didn’t manage to get a post in.
I was then hoping to spend some time sorting things out while I was away, however, due to the fact it was a trip to Disney World with small children (which includes me) and also the lack of Internet available to me (don’t get me started on that one), I was unable to.
So, in the week before I went away I spent the time getting to grips with Unit Testing and the associated frameworks. I chose to use MbUnit in the end as it came with the parameterised testing, which basically allows you to specify multiple input cases for a test. If you tried to do that in Nunit you would have to write either lots of little tests for each set of inputs or one large test that basically loops.
I am not going to go into the ins and outs of it here, as there are much better places on the web that can show how to do it. I found this article to be of help when I was working out how to do it. The hardest part is that I am adding this to an existing codebase, so I am having to write tests after code has been written, and as I am just picking this project up from a developer that has left and didn’t write any documentation it makes it harder as I don’t know 100% that the code I am testing is actually working.
All new code will have Unit Tests written before the code is implemented and eventually I hope to have the complete project covered to best extent it can be with tests.
I got all of this ready before I went away, and was meant to give an overview to the entire company, but due to company politics that didn’t happen and only one other developer saw it. They were suitably impressed, however, and have asked for some assistance with adding testing to their new project too.
As if to underline the importance of testing; whilst I was away one of our developers who is currently working in India sent over some updates for a product which were taken down and installed at a client without any testing being carried out at all, rather unsurprisingly the code failed with a load of bugs which could have been picked up at both the Unit and Functional testing level. All I can say is that the developer is now no longer working for us.
So it has taken a while to get back into the swing of things since I came back as other people have moved jobs while I was away so I had to pick up several things that needed finishing off when I returned. I am working off-site (not at this very moment obviously) on a project with the country’s largest phone/adsl/cell provider.
It is slightly bizarre to be able to work for the leading banks and other infrastructure providers on the island, you actually get to see what goes on to make the country work.
Anyway, hopefully when I am back in the office I will be able to update this blog a bit more frequently with my further adventures in Software Engineering!!