What Is Sanity?

Geeks Sanity is a browser automated testing framework that enables you to write and run test scripts using a simple programming language. The automation of Sanity enables many tests to be executed in a short space of time, allowing faster and more efficient testing while still maintaining reliability and accuracy.

The Language

This is a programming language that consists of basic commands that can simulate different user actions in a browser such as clicking buttons and menus, filling out input fields, ticking checkboxes and radio buttons.

Why use Sanity?

Test scripts can be written in Sanity. This intelligent text editor can help you out by:
  • Providing syntax-highlighting to improve readability of the scripts
  • Providing word auto-completion to speed up writing your code and also to help you with the correct syntax of commands
  • Auto-completion is available for command names and also HTML element names (e.g. buttons, input fields, and drop down options) by pressing Ctrl+Space keys in the text editor
In the editor, each user action must be written in a new line. Sanity runs the script from top to bottom
  • The end of script (all lines are marked with a green circle)
  • The line before the cursor (if the cursor is not at the end of script)
  • The line that has failed to run (a red square icon)
There are numerous commands available to you as a tester built into Sanity. Please see the Sanity - Commands reference