There are all sorts of reasons why it might be hard to get test automation set up on your build server - maybe the tech team don't have time to integrate a plugin or set up any hooks, maybe you don't have the resources to write many tests - but there's still some useful things you can get done.
Lots of teams use FMOD with Unity now, since their licensing is quite nice for smaller teams. But if you rename or accidentally delete an FMOD event, Unity will still produce a build, it just won't play a sound. While the sound designer might spot the problem instantly, you can imagine, especially if it's a subtle sound effect, that it could hang around in a build for a while.
While the build still gets produced, the log will contain a line about the problem - it'll mention "invalid event reference in field" along with the problem object. What if we could just scan the log and fail the build if we saw it?
We can do this with just a simple python or shell one-liner, or we can use a plugin like Text Finder for Jenkins, but we didn't need hooks in the game and we didn't need plugins integrated into source code.
In fact, there's a bunch of interesting things you can easily add to a "log scanner" setup like this:
- "Main Object Name X does not match filename"
- Shader errors, which don't normally fail a build
- "Missing or no valid script attached" warnings from deleted/renamed monobehaviours
- Mecanim ignored transitions, from code or debug changes
These are all minor issues that could have large player-facing effects, and they're all super cheap to fix if you catch them early. A project that doesn't let these warnings reach a build can avoid suffering whole families of bugs!
Have a look at your recent builds today, and see if you can spot log entries that you could elevate into errors using log scanning.
Happy testing!