Skip to content

Instantly share code, notes, and snippets.

@sebdeckers
Last active December 14, 2015 01:19
Show Gist options
  • Save sebdeckers/5005207 to your computer and use it in GitHub Desktop.
Save sebdeckers/5005207 to your computer and use it in GitHub Desktop.
Thoughts on creating a pre-flight testing tool for web app CI.

Preflight testing

Because "looks good to me" should not be famous last words.

Use Cases

Eyeballing

Check if a page loads without script or network errors.

Army of click monkeys

Click on any button or a[href="#"] and expect something to happen like DOM change or XHR call.

Follow all the things

Check if all links work (respect robots.txt) when loaded as new page. This recurses over internal pages and validates external links.

Grunt API

{
  "^/UrlRegex": {
    options: {
      loadTimeout: Number,
      clickTimeout: Number,
      interactiveElements: Array(DOMQuerySelector...),
      followInternalLinks: Boolean,
      followExternalLinks: Boolean,
      networkLog: String,
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment