Not necessary to write a test, but builds should be part of your continuous integration process, after all the unit tests are run, and if build fails it just won't move from dev to UAT release.
If your builds aren't deterministic there's something wrong with the build tool, your configuration, or the build machine. That definitely needs to be fixed.
11
u/rangeDSP Jul 20 '18
If your testing can't catch errors like these it implies that at least one of the following is truel:
The tests are badly written
The code isn't easily testable
if(2==true), then there are messy dependency issues in the code