I’ve recently been adding some integration tests into a project I’m doing at work.
We use Cucumber to write our high-level tests and run the tests against a Docker Compose
network spun up during the GitLab build pipeline (at the moment, while they don’t take too
long to run).
I wanted to write a test something like this:
Scenario My Awesome Service gets some data on startup
Given My Awesome Service is running
And It's set up with the test settings
Then The data it holds is not empty
And The data has 3 parts containing 1, 2, 3
And The data for part 1 contains "Kirk", "Bones" and "Spock"
(Obviously not the real test!)
But the last two steps are not possible to generate in a general way, without using custom types.
Read more...