Ask HN: Single Programmer Testing

2 points by dlytle ↗ HN
I really need to find a better test method than I have currently, which amounts to "list potential disasters on paper and prevent them".

My problem is that most of the testing methodologies I've seen have been based around a team. I'm the only developer at a help desk consulting company, managing their Service-Now instance. I don't have any users I can reliably get assistance from, so I need something that works well for a single developer.

Could I get some recommendations for what I should research? Anything to narrow the field of possibilities would be awesome.

4 comments

[ 3.3 ms ] story [ 20.3 ms ] thread
You can (and should) write unit tests for every new function, even as a single developer.

Here's an article you might find helpful: http://www.ibm.com/developerworks/library/j-test.html

Also, wikipedia has a list of unit testing frameworks by language: http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks

That IBM article was really informative; thanks for the recommendation! I'm going to have to run without a unit testing framework, as (to my knowledge) the platform I'm using doesn't support it. Doesn't seem like one is required, though. I'll pick up a unit testing book and start reading.
One thing about a lot of Unit Test frameworks, is that there's hardly anything to them! SUnit, which is literally the granddaddy of a lot of the unit test frameworks basically consists of:

    - two exception handlers
    - a superclass that you can subclass to have a place to 
      park your test code
    - a reflective thingy that looks on those test classes 
      for methods that start with "test" and executes them.
The above was probably less than 40 lines of code. If you're competent, you should be able to roll your own.
Check the book Test Driven Development by Example (Kent Beck) the second part of the book walks you on to How to build your own testing framework.

Good read