Here in Investec-land, we're beavering away on a new Business Banking platform. It's so new and shiny it doesn't even have an official name yet. But what we have got is the beginnings of our platform.
Tech-wise we're running on ASP.Net Core on the back-end, with a front end written in React with TypeScript. Because we don't like to find bugs in Production, we invest in automated testing. Every change we make to the codebase only gets to be merged when it has run the gauntlet of our automated test suites.
XUnit tests for ASP.Net Core, check. End-to-end tests for APIs, check. Database tests, check. Jest unit tests for TypeScript and React, complete with snapshots, check. We had this all plugged into our CI pretty early. But there was hesitancy about what to do about UI testing, UI testing is famously slow.
It's not unusual to have a UI test suite that takes 8 hours+ to run. What we really wanted was UI tests that could run as part of our CI flow.
We now have a rather beautiful development approach for our front end code
Around this time, we happened upon the very talented Zoltan, a dev that truly groks automated testing. He plugged Cypress into our dev workflow and our CI server and the rest is automated history.
Thanks to his work, we now have a rather beautiful development approach for our front end code. We fire up our application in dev mode, which includes spinning up our Cypress test suite. We can write Cypress tests at the same time as we're implementing the actual code.
As we make a change, we can re-run our relevant Cypress test in seconds without breaking out of our dev setup. To be clear; we're writing our test at the same time as we're implementing our code, and changes we make to the codebase are repeatedly checked by the tests being re-run again and again.
This is a productivity boost which leaves you with automated tests and implementation at the point you're ready to submit your pull request. Let me emphasise this point as I think it's super important. At the point when you want to add code to the codebase, you already have automated tests that will from that time forwards, be executed when any further changes to the codebase are attempted.
Hence protecting that functionality from day 1, and automating the process of regression testing. It helps you ship quickly and with confidence. This is a massive Wynne.