Unit testing generated code -- an Antipattern

We have a module at work that for better or worse is a package that is a hibernate object relational mapping layer.Now, in this case for the worse, the database has been generated from the hibernate classes themselves.This is kinda sucky, but that's where we are.

- = -

There's the folks out there that measure code quality based on unit test coverage. I measure code quality on quality and eschew the proxy that is the number.

- = -

This package has had unit tests built for the generated code.The way I look at things you either trust your tools or you don't. If you trust your tools you don't need tests. If you don't trust your tools you need to get new tools.

Previous
Previous

Summer Trip 2014

Next
Next

The Öhlins at Work - Video!