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

At a previous job, with a huge C++ codebase and ~100 developers over 20 years, many platforms supported, a build could take hours, and the test suite took so long to run that it would take several days or weeks of real time to get through it all.

This cycle time combined with occasional unexpected interactions between components meant that in every release cycle, there were dozens of complicated failing tests where it was not obvious which code change was responsible.

`bisect` here was extremely helpful: instead of having to pore over commit history and think very hard, I could bisect with a small wrapper script that would build and run the failing test in question. Builds still took hours, but I could usually autonatically pinpoint the responsible code change for one of the tests overnight.

(This was not using Git, but Perforce, for which I had to write `p4-bisect`. Alas, it's not open-source...)



> in every release cycle, there were dozens of complicated failing tests

Sorry if this is a dumb question, perhaps I'm not understanding what you mean by every release cycle, but does this mean nobody in the team/company ran tests until it was time for release? That sounds like a really big everlasting wound to put a tiny git-bisect bandage on!


About a dozen OSes / configurations were supported, and the entire test suite would take a few days to run on each such configuration.

This was native desktop+server software, not a hosted SaaS thing.

Major releases were put out every few months.

Developers did run tests regularly with every change they would make, but it was infeasible to run all the tests in every configuration for each change. So they would try to choose tests to run that seemed most relevant to the code they had changed.

The entire test suite would run more or less constantly on shared machines, and every few days some new tricky failure would be detected. The tricky failures were almost always the result of some unanticipated interaction of features, frequently on the more obscure configurations (like IBM z/OS).

The problem was not that developers were not testing, but that the tests were infeasible to run every time. So instead, testing became an optimization problem.


Gotcha, thank you for the explanation! Indeed it sounds like something git bisect is perfect for, when you're in these sorts of situations!


> does this mean nobody in the team/company ran tests until it was time for release?

The OP wrote “many platforms supported, a build could take hours, and the test suite took so long to run that it would take several days or weeks of real time to get through it all”

⇒ I think they did run tests, but typically not all of them on all platforms.


At least in my "Agile" experience, it is always time for release.




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

Search: