we have quite a huge number of eventtrackings using the jquery onhandler extension. It's hard to keep an overview and sometimes html or class names change in the frontend. In that case, we lose the tracking and in worst case we don't even realize until someone needs a report for the respective event.
I wonder if other TiQ users have similar issues. Has anybody set up an automated testing environment?
Things I've already checked:
Looking forward to hearing your thoughts! Any idea is welcome!
I can suggest the following E2E (End-to-End) testing JS library https://www.cypress.io/
We have used this library with great success for testing out GTM setup. Now we are in the process of setting up automated tests using Cypress for Tealium iQ as well.
Cypress can imitate user journeys on the website, load pages, click buttons, submit forms etc. and at the same time it can verify if the data layer gets populated correctly as well as it can intercept "Networks" tab to validate if tags are firing correctly and events are sent to vendors.
We have been implementing automated Cypress tests for tracking directly into CI/CD deployment pipelines of our WEB products, so tracking tests would run during the deployment process. If tracking tests fail, then the WEBsite deployment gets automatically canceled and developers have to fix tracking before they can redeploy.
You can also create Cypress tests outside CI/CD and run them on a scheduled basis my e.g. using GitHu Actions. However, this will be a reactive way of testing and I would recommend a proactive approach instead and put your tests into CI/CD.
PS: There are also other tools similar to Cypress that can do the same job, but they require JS knowledge on a quite good level. But there are also a lot of low/no code testing toold such as e.g. Leapwork. Just keep in mind that low/no code testing tools usually come with limitations, while JS based frameworks like Cypress can do pretty much anything you want :)