How it works #

Instead of describing “what good looks like” in terms of fixed test cases, you express general properties of your system, defining how it should behave in all cases. Bombadil checks each property as it explores your system in its chaotic ways, reporting back any violations.

To test a web application using Bombadil, you write a specification in TypeScript that exports properties and action generators. These can be domain-specific — to exercise and validate your system’s logic in custom ways — or be imported from Bombadil’s defaults. Bombadil tests anything that uses the DOM, no matter how it’s built. This includes single-page apps, server-side rendered apps, and even static HTML.

Conceptually, it runs in a loop doing the following:

  1. Extracts the current state from the browser
  2. Checks all properties against the current state, recording violations1
  3. Selects the next action based on the current state, and performs it
  4. Waits for the next event (page navigation, DOM mutation, or timeout)
  5. Returns to step 1

Bombadil itself decides what is an interesting event and when to capture state. You provide the properties and actions, Bombadil does the rest!


  1. You can also configure Bombadil to exit on the first found violation.↩︎