I talk about code and stuff
Getting started with anything is hard, but writing the first test for any project? Daunting.
When do you run your first test on a new project? When do you write your first test? When do you set it up to run automatically in CI?
It’s tempting to wait until you’ve got something to test before you tackle any of this, the TDD mindset doesn’t vibe with everyone, but there are some wins to be had from running tests early - even just as a vague way to prove parts of your application are working.
setUp
and tearDown
methods to build an environment for your tests to run in. This means it executes your service providers, loads config, and a whole lot more without you realising it. Even if your test does nothing!I don’t advocate for this as a replacement for writing tests, but when it comes time to take that first step and write your first real test, well the first step is easier to take when it’s not the first.