Learning to testPosted: Tags: code,python,django,testing
I started programming in C. Then moved to VB and VC++. Then I moved to packaged software solutions like Vantive and Peoplesoft. In all these days, I managed not to write automated test cases. It is not that I didn't want to, but it wasn't the practice. I spent most of my time, learning and programming tools, languages and other similar aspects but never concentrated on automated testing.
But when one starts to write an application on their own, their perspective differ. More so when it is an open source. Now I want to test my software enough to avoid embarrassment in the community. I don't want to release a (open-source) software without testing. It is not that the application will not contain any bugs; but I've taken all the steps that I know to make the application bug-free.
When one treads on an unknown territory any kind of hand-holding is appreciated. With detailed documentation, Django makes it easier to get into testing territory. Because of the fear of unknown, I've been postponing writing test cases for days. Then one evening, I sat down, read through Django's documentation on test cases, browsed few more sample test cases (that is the beauty of open source) and I started to write test cases. It wasn't scared of writing test cases any more. It came in so easily!
Okay! I haven't yet done the full test suite. I've understood and managed to write test cases to test the views alone (Django Test Client). I still need to write detailed unit test cases and in-browser testing.
But at least this is a good start.
P.S: You can browse the the tests as part of http://repos.jjude.com/jjude/sol