21.11.11

Testing Techniques - Part 1 - Not Writing Tests | Javalobby

Testing Techniques - Part 1 - Not Writing Tests | Javalobby





  • Unbelievably, some people and organisations still do this. They write their code, deploy it to the web server and open a page. If the page opens then they ship the code, if it doesn’t then they fix the code, compile it redeploy it, reload the web browser and retest.
  • The original author started out by writing a few tests, but then passed the code on to other inexperienced team members. When the code changed and a test broke, they simply switched off all the tests. 
  • You may say that an end to end test like this isn't too bad, BUT to deploy the MDB and to run the test took just over an HOUR: in a working day, that's 8 code changes. Not exactly rapid development!
  • My job? To fix the process and the code. The solution? Write tests, run tests and refactor the code. The module went from having zero tests to about 40 unit tests and a few integration tests and it was improved and finally delivered. Done, done.




No comments: