I'd love to see an article on unit testing that gives reasons they add business value, so hackers like us can convince pointy headed bosses that we should be allowed the budget to write them. "Improving the quality of our software" is the one I tend to use, but it's so vague. How will unit testing convert into cold, hard cash is what upper management want to know.
Why To Write Tests For Your Code
11–20 of 32 posts
Re: Why To Write Tests For Your Code
#12Earlier quoted context omitted.
Can anyone tell me why they would not want to write tests? Laziness, ignorance, rapid prototyping, no budget, more important problems... all the obvious reasons. I can't think of any "good" reasons from an engineering perspective, only business.
Rapid prototyping is the best anti-testing reason I've heard yet. I even halfway agree with it. But in my experience, even prototypes can benefit from it. For me, testing actually makes the whole thing go faster. I spend less time worrying and more time developing, because I have the confidence that the rest of my code works exactly like I want it to.
Re: Why To Write Tests For Your Code
#13I am relatively new to HN and have _read about_ but not _seen_ an anti-testing mindset around here. I imagine this article will stir that debate if it exists. Can anyone tell me why they would not want to write tests? I have no biases here.
You can write tests for the core algorithms and data structures but that is often only around 10%.
Re: Why To Write Tests For Your Code
#14I am relatively new to HN and have _read about_ but not _seen_ an anti-testing mindset around here. I imagine this article will stir that debate if it exists. Can anyone tell me why they would not want to write tests? I have no biases here.
Can anyone tell me why they would not want to write tests? Laziness, ignorance, rapid prototyping, no budget, more important problems... all the obvious reasons. I can't think of any "good" reasons from an engineering perspective, only business.
Re: Why To Write Tests For Your Code
#15I'd love to see an article on unit testing that gives reasons they add business value, so hackers like us can convince pointy headed bosses that we should be allowed the budget to write them. "Improving the quality of our software" is the one I tend to use, but it's so vague. How will unit testing convert into cold, hard cash is what upper management want to know.
You don't give reasons for using an ORM in your code, do you? You just do it as part of your development work. It's nothing that's being questioned by PHB's.
Writing tests is (or should be) part of your development work.
Make sure you include the time it takes to write the tests in your "time estimate".
Re: Why To Write Tests For Your Code
#16I am relatively new to HN and have _read about_ but not _seen_ an anti-testing mindset around here. I imagine this article will stir that debate if it exists. Can anyone tell me why they would not want to write tests? I have no biases here.
Re: Why To Write Tests For Your Code
#17I'd love to see an article on unit testing that gives reasons they add business value, so hackers like us can convince pointy headed bosses that we should be allowed the budget to write them. "Improving the quality of our software" is the one I tend to use, but it's so vague. How will unit testing convert into cold, hard cash is what upper management want to know.
Re: Why To Write Tests For Your Code
#18There are obviously many reasons, but to add a couple; Fight regression You don't want to fix the same bug several times, do you? When a bug is found, I first write a test to repeat the bug. Then I fix the code. Now every time I want to release a new version, that particular bug is tested yet again. The 'quick fix' 5 minutes before launch You're approaching deadline, everything is looking fine. Then, just before laun…
Re: Why To Write Tests For Your Code
#19I am relatively new to HN and have _read about_ but not _seen_ an anti-testing mindset around here. I imagine this article will stir that debate if it exists. Can anyone tell me why they would not want to write tests? I have no biases here.
Re: Why To Write Tests For Your Code
#20I am relatively new to HN and have _read about_ but not _seen_ an anti-testing mindset around here. I imagine this article will stir that debate if it exists. Can anyone tell me why they would not want to write tests? I have no biases here.
I do not have a solid stance, but I am inconsistent on writing tests. I like to differentiate between the notions of hand-testing code and automated-testing code. I firmly believe code written should be verified somehow. I have not totally bought into writing tests. Right now, there is a lot of snake oil about what is better than what, and I would like to see good scientific studies that point in solid directions. So…
What I really like is Selenium test that work like manual testing and I thus feel they just automate something I would need to do in any case.