From 773aa19a948270db4fc759f2f6d484bf1e6a7a85 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 8 Aug 2023 23:03:33 +0100 Subject: [PATCH] daily-email: add 2023-08-07 Tests make upgrades less risky --- src/content/daily-email/2023-08-07.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/content/daily-email/2023-08-07.md diff --git a/src/content/daily-email/2023-08-07.md b/src/content/daily-email/2023-08-07.md new file mode 100644 index 00000000..3efabb69 --- /dev/null +++ b/src/content/daily-email/2023-08-07.md @@ -0,0 +1,26 @@ +--- +title: > + Tests make upgrades less risky +pubDate: 2023-08-07 +permalink: > + archive/2023/08/07/tests-make-upgrades-less-risky +tags: + - automated-testing + - test-driven-development +--- + +I recently reviewed a client's Drupal 9 website to gather information about upgrading it to Drupal 10. + +The site has a number of custom modules. They all require changes to make them Drupal 10-compatible - some are a `core_version_requirement` update, and some are more complex. + +None of these modules have automated tests. + +If they did, I'd be able to run them and see if they pass, make my changes, and rerun the tests to verify they still pass, and the module works as it did previously. + +But I can't. + +I'd need to test each module beforehand to understand what it does manually and again after making the changes. + +This is more time-consuming, riskier, and easier for me to introduce regressions or new bugs. + +Whether it's a major CMS version upgrade, updating a contrib module or refactoring custom code, having a passing test suite you can use and rely on makes updates easier and less risky.