Starting with a Canary Test
Explore the concept of a canary test in Kotlin unit testing. Learn to create a simple test suite using KotlinTest to verify your testing environment is correctly configured before progressing to real tests.
We'll cover the following...
Canary test
A canary test is a test that asserts that true is equal to true. That sounds silly, as it appears that such a test isn’t doing much, but starting with a canary test is a good way to verify that the project is set up properly with the necessary tools. If we run into any errors at this stage, it’s easier to ask for help, in a team setting, from just about anyone who knows the tools.
From the design diagram we saw in the previous lesson (The Code Under Test), the AirportTest is a good starting point. Let’s create a test suite, using KotlinTest, with just one test in it.
Practice Along by Starting with a Sample Project ...