Testing in Unity3d – Part 1

I don’t like writing tests. Do you? Well, ok, what I actually mean is that I don’t like writing unit tests. In one of my projects the assumption (and TeamCity setting) was that we’ll have 100% test coverage. There was no .net core yet, so we couldn’t write functional tests actually checking the integrations between different parts of the system and therefore we had to mock them. Oh boy, and we mocked them hard! Because of the requirement to have 100% of the code covered by tests, we had many tests doing no more than checking those mocks, because some methods were only reaching to multiple microservices and the results aggregation was done one layer above that. That’s what you get in most big enough codebases and our client wasn’t really keen on refactoring. So yep, I hated that period of time in my career (it’s actually just a tip of an iceberg, but that would be a topic for another, long post 😉 ).

Continue reading “Testing in Unity3d – Part 1”