An automated testing tool for Tealium Implementation Engineers

It can make sense to automate your integration tests for customer builds.

The tool can help with that - it's intended to be used by Tealium Implementation Engineers (IEs) to test customer configurations before taking them live.


Features

  • Modern Node.js automation with WebdriverIO

  • Produces polished HTML reports, designed to be both engineer- and customer-friendly

  • Enables succinct Mocha- and Chai-based assertions on:

    • Trace logs
    • Network requests (captured using mitmproxy, running locally in Docker)
    • Browser DOM / JS
  • Cross-browser testing with (Sauce Labs), including the latest few versions of:

    • Safari
    • Chrome
    • Edge
    • Firefox
  • Optional Tealium Trace integration, including:

    • Automatic trace_id generation for each run of each test
    • End current visit functionality
    • Mid-journey access to Trace records
    • Guaranteed fresh Trace records (even if the system is a little delayed)
  • Optional (but very useful) Proxy integration (for network request capture, uses mitmproxy under the hood)

    • Capture all outgoing requests to allow assertions
    • Built-in support for URL rewriting and blocking (including TiQ environment switching and much more)
    • Support for all mitmproxy commands for advanced use cases
    • Automatically adds trace_id to outgoing Collect requests (no need to set cookie manually), if you enable the proxy feature:
      • /2/i.gif for Collect (POST requests)
      • /vdata/i.gif for cookie sync capture (GET requests)
      • /event for Consent logging (POST requests)

What to Expect

This is a Node.js tool that runs automated integration tests:

  • locally in Chrome (with significant feature limitations, including no network capture support at all)
  • remotely on Sauce Labs, in a single browser (with full features)
  • remotely on Sauce Labs, cross-browser (full features)

It uses Mocha and Chai with WebdriverIO, which makes navigation and the tests pretty succinct and intuitive, and there are growing resources to help you get started.

The tests can be configured to generate a Tealium Trace ID as well, and you can make assertions against that Trace at any point in the Journey, though it's slow to fetch it (~30s each time).

Tests can also use proxy-based network capture, which uses mitmproxy) locally in Docker Desktop, and includes support for custom URL rewrites, URL blocking and much more to make your testing much more flexible. Those network logs can also be retrieved (quickly) at any point in the Journey for assertions.

Trace cookies are set automatically if you use both Trace and the proxy (cookies are injected into outgoing requests by the proxy).

It generates detailed, polished reports that can be shared directly with stakeholders.

See the this doc for more detailed information about specific components, as well as links to their more technical documentation.


Example Reports


Install

You should fork and clone the git repo locally, then install the npm packages and run the integration test.

Detailed instructions here.


Getting Started

This is a good place to start after installing.


Testing the Tester

Just use this in the command line on the root of the repo to run all the tests (includes Sauce Connect, so you need Docker Desktop installed and running).

$ npm test

For more details, see this doc

JavaScript Style Guide