The games industry often lags behind the rest of the software industry when it comes to best practices. Even today, many teams approach testing as a largely manual affair, conducted ad nauseum by engineers who could be better deployed elsewhere.
Manual testing is wasteful. And wasted time means wasted money. Some teams spend hundreds or even thousands of hours on tests that could and should be automated.
We all start a project full of enthusiasm, but that can wane after months of mindlessly play-testing the same features. Automating your testing frees your developers up to do what they love and what they do best: create great new experiences.
Video games are complex, highly connected environments. A suite of tests gives you the confidence to make changes in one area without breaking something in another. And when it comes to porting to a new platform, your test suite acts as the first smoke test to catch platform-specific anomalies.
A suite of tests acts as a living catalogue of your feature specification. This can serve as a big productivity boost! Newcomers to the team can ramp up faster just by looking over the tests: their names, their code, and how they look when they run.
The curriculum, delivered through a series of practical hands-on coding exercises, will cover the following topics.
The first line of defence in any project, your unit tests form a suite of atomic tests that ensure correctness at all times. They enable you to work more efficiently because you achieve logical correctness faster. They are always active because they are fast and efficient enough to run frequently on every developer's machine.
Unit tests are valuable, but they will only get you so far. If you want to be sure that a behaviour works in game, you need to test that behaviour holistically.
Test scenarios should be as close to real-world scenarios as possible. You'll learn how to programatically invoke your inputs (such as keyboard and controller input) and verify you outputs (such as audio and video) so you'll be confident that if it works in the test, it works in the game.
Tests are only useful if they are consistent and repeatable. Your game engine is a complex environment, and it needs to run deterministically for you to have a reliable suite of tests. You will learn how to enable that, how it works and what the implications are.
The value of your test suite grows incrementally as you add to it. Once you've written a test, it becomes a living record of a feature and its expected behaviour. Running your tests regularly - both on developer workstations and build servers - enables you to identify regressions early and fix them quickly. We'll look at how to run your game engine's tests "headless" (without a UI) and remotely (with a service account).
Optionally, you can add Test Driven Development (TDD) to help create fluent interfaces to your code. TDD helps guide your design process to create code that is cleaner and more minimal. And it's fun too! Enjoy the little dopamine rush of seeing all those lights turn green.
Let's be realistic: you will never have 100% coverage of all scenarios in your tests. We'll look at what's easy to test, what's hard, and what - if anything - is impossible. We'll explore the implications of that, how to mitigate it, and how you can establish a good relationship between your automated and manual QA processes.
Anyone in a technical role can benefit from this course. It is primarily aimed at those who are writing production code on a regular basis.
Yes, the course is effective when delivered remotely or in-person.
If you're short of time, we can adapt the material into a half-day course. There will be less time for the hands-on work that helps to cement the ideas.
The course has been created with examples in Unity. If your team uses Unreal (or another engine!) we would love to tailor the material to suit you - please get in touch!
Pricing is £1000 for up to 5 participants, then £200 for each additional participant. Costs exclude travel expenses which we will always try to keep to a minimum.
All participants receive a copy of the course slides and code examples for their personal use.
Please get in touch: workshops@swervegames.co.uk
Michael Lewin has over 20 years' experience as a software engineer, both in and outside the games industry.
He began his career at Sony Computer Entertainment, working as an AI Programmer on titles including Eyepet and This Is Football.
Seeking to broaden his experience and skills, he went on to roles at Barclays, Palantir and Improbable, working in fast-paced, customer-centric environments that demanded a smart blend of efficiency and quality.
In 2021 Mike returned to the games industry, founding his own company, Swerve Games. Their debut title, Twin Jet Racer, is scheduled for release in 2024.
See more on LinkedIn