April 18th, 2008Testing before you have the code

If normal application code can fail and so requires testers, then what is stopping the code that testers develop to automate their testing from doing the same? You cannot have a string of testers each testing each others code until you get to the end of the chain and finally to the development code! It would certainly make a good comedy scetch, but laughter would be the only thing good you would ever get out of it.
It may be that the code written by the testers is simple and in easy to manage blocks, in which case seeing any errors would be a simple task and any errors may be quickly noticed, in theory. It may however be that the code written by the testers is just as complex as the code being tested. This will certainly be the case once you start to build up a large testing engine handling not only the full testing of the software but your own reporting and recording routines. All practices of good software development will of course be used, so possibly an OO approach, small chunks of code to build up to a complete testing app. With this, bugs and just things that don’t work as you would expect - what then to do?
I am a great fan of creating tests and automation way before the final build of developement software has been written. Using specifications and requirements it should be enough to get a good understanding of what the sofware is going to do and so be able to not only write formal test cases but also create automation. Certainly, these should be the same specs that the developers themselves will be using.
Create your tests and execute them from day one. In true Extreme Programming style, see your tests fail in the early days due to the software under testing not working correctly or simply not yet being available. Once you have seen your tests fail a number of times you understand more your test and the software under test. By the time you get a formal test release of software you know how your test fails, now it is time to see it pass, and if it does then possibly bingo. If it doesn’t, then it will either be your test code or the application under test that is at fault, but at this point you have indeed found a fault that must be fixed. If you were to run your automation against software not yet finished or not available and it passes… then either your tests are not complete or your test code is buggy.
It is then always working with the “negative”, everything fails until something in the development code allows it to pass. The number of test runs on pre-alpha releases allows you to “test” your own code before the formal release. Any pass by that time should be a result of code testing code and complient software under test.
