Get Started

YAML Reference

Here is a list of all available properties in Watchtower’s YAML files.

version: 1 # Optional, only version currently supported

variables: # Variables to use below
  email: <$#fake$><$/fake$> # Generate fake data each test run with faker.js (

merge: # Optional YAML merge keys (
  - &OK
    jsonPath: response.status
    equal: 200

checks: # Checks to run
  example1: # Name of check
    request: # Request information, follows HAR 1.2 Spec (
      url: <$ baseUrl $>/ # URL to call using variable from above
      headers: # List of headers
        - name: Content-Type
          value: application/json
      method: POST # Defaults to GET
      postData: # Data to post
        mimeType: application/json # Mime type of posted data
        text: # Required unless params provided, data to post
          email: <$ email $>
        params: # Required unless text provided, URL encoded data to post
          - name: email
            value: <$ email $>
      queryString: # List of query parameters
        - name: limit
          value: 10
    auth: # HTTP Basic auth credentials
        username: john
        password: root
    assertions: # Assertions to run on response, follows HAR 1.2 Spec (
      - <<: *OK # Using merge key from above
      - jsonPath: time
        lessThan: 12000 # Also supports greaterThan
      - jsonPath: response.content.text.access_token
        type: [string] # Also supports boolean, object, array, number, null
        regex: ^[a-zA-Z0-9]{50}$
      - jsonPath: response.headers.location
        type: [string]

      url: <$ example1.response.content.text.links.self $> # Use value in previous request's response

      url: <$#jsonPath$>example1.response.content.text.items[0].links.self<$/jsonPath$> # Use JSONPath to extract value from first item of list in previous request's response