Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not really a developer here, more of the wedge between the customer and developer when things go wrong, but don't these tests cover the continuous updating of the application as specifications change? Especially as multiple people are working on the code and may have different ideas of what's going on. May not catch everything, but can trigger a warning in many cases.


Exactly this. Also in codebases where the authors seemed opposed to writing good comments, tests are extremely useful in documenting expected behavior in edge cases, how an optional argument is supposed to be dealt with when missing, etc.

Not to mention that people are often a lot less rigorous with "manual testing" than they should be. They don't think of scenarios, they skip scenarios, because nobody's checking on them. While when you write tests, you're creating a permanent record where you can be held accountable if you miss something.


>They don't think of scenarios, they skip scenarios,

Bane of my life.

Me: "Hey, this big customer we're not going to tell to change their behaviors and pays us a lot of money is using this product in this particular way. We should put in a functional test case to ensure that we don't mess this up"

Dev/QA: "Eh, no"

This generally leads to a support call half a year later with the customer panicking, support groaning, and the developers panicking because they 'could have never predicted the customer using the application in this manner'.


> in codebases where the authors seemed opposed to writing good comments, tests are extremely useful in documenting expected behavior in edge cases

In other words, tests are useful in teams with awful engineering culture. I tend to agree, in my experience they are almost synonymous.

If you treat engineering culture as weather (i.e. something you have no control over), then tests are a good tool to address your problems.

> you're creating a permanent record where you can be held accountable if you miss something

Bureaucracy is another word for it. You know who excels at it? Government. And you know what government is really bad at? Running business and innovating.


unit tests are comments that are forced to stay up to date and attached to the code they are for.


Ah - I can see those kinds of tests as useful. I guess they are something like "integration tests" or something like that which tests the user-visible outputs of the system. My comment was about very low-level unit testing, where it's literally every function of code must be covered, isolated from other parts of code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: