Ruby on rails generates tests for you. Do those give a false sense of a safety net?
- by Hamish Grubijan
Disclaimer: I have not used RoR, and I have not generated tests. But, I will still dare to post this question.
Quality Assurance is theoretically impossible to get 100% right in general (Undecidable problem ;), and it is hard in practice.
So many developers do not understand that writing good automated tests is an art, and it is hard.
When I hear that RoR generates the tests for you, I get very skeptical. It cannot be that easy.
Testing is a general concept; it applies across languages. So does the concept of code contracts, it is similar for languages that support it. Code contracts do not generate themselves. The programmer must add the requirements and the promises manually, after doing some thinking about the algorithm / function. If a human gets it wrong, then the tools will propagate the error. Similarly with testing - it takes human judgement about what should happen. Tests do not write themselves, and we are far from the day when a business analyst can just have a conversation with a computer and tell it informally what the requirements are and have the computer do all the work.
There is no magic ... how can RoR generate good tests for you?
Please shed some light on this. Opinions are ok, for this is a community wiki. Thanks!