Errthquake Quick Start


Test Assets

Errthquake uses three kinds of test assets:

Test Configuration Quick Start

Upload test configuration YAML files at https://portal.errthquake.com/test_assets.

GlobalInitSeq: "authcmd,pause-500ms,admincleanup,pause-500ms"

InitSequence: "authcmd,pause-500ms,upload,pause-2s"

LoopSequence: "view,pause-200ms"

LoopCount: 20

Commands:
  adminauth:
    Url:  https://auth.myservice.com/token
    Method: POST
    Headers:
      Content-Type: "application/x-www-form-urlencoded"
    BodyText: 'username={$ADMINUSER}&password={$ADMINPASS}&grant_type=password&audience=my-app'
    RegexVals:
      TOKEN: '"id_token":"(\S+?)"'

  admincleanup:
    Url: https://api.myservice.com/content
    Headers:
        Authorization: "Bearer {%TOKEN}"
    Method: DELETE

  userauth:
    Url:  https://auth.myservice.com/token
    Method: POST
    Headers:
      Content-Type: "application/x-www-form-urlencoded"
    BodyText: 'username={$1}&password={$2}&grant_type=password&audience=my-app'
    RegexVals:
      TOKEN: '"id_token":"(\S+?)"'

  upload:
    Url:  https://api.myservice.com/content
    Headers:
      Authorization: "Bearer {%TOKEN}"
    Method: POST
    BodyText: '{ "permalink": "{$3}", "title": "{$4}", "description": "{$5}", "price": "{$6}" }'

  view:
    Url: https://api.myservice.com/content/{$3}

Test configuration files are YAML formatted and accommodate the nested structure of an http request. Test configuration sections:

The example includes {$VAR} references to environment variables and secrets, {$n} numeric references to test input, and values assigned by regular expression matching.

Test Input Quick Start

Upload test input CSV files at https://portal.errthquake.com/test_assets.

user1,password1,abbeyroad,The Beatles,Abbey Road,42.58
user2,password2,thriller,Michael Jackson,Thriller,25.71
user3,password3,nightattheopera,Queen,A Night at the Opera,39.23
user4,password4,darksideofthemoon,Pink Floyd,The Dark Side of the Moon,48.99
user5,password5,ziggystartdust,David Bowie,Ziggy Stardust,31.84
user6,password6,somegirls,The Rolling Stones,Some Girls,37.62
user7,password7,hwy61revisited,Bob Dylan,Highway 61 Revisited,29.38
user8,password8,purplerain,Prince,Purple Rain,21.97

Test input is managed in CSV files. The CSV fields are referenced by the {$n} references in the test configuration. In the example configuration above, the BodyText in the upload command expands to:

{ "permalink": "abbeyroad", "title": "The Beatles", "description": "Abbey Road", "price": "42.58"}

A Note on Security

Errthquake stores assets on encrypted file systems, but test configurations and inputs are viewable as plain text in the web portal.

Users in a load test typically access accounts in test tier applications rather than production, and typically control disposable resources. Password security may be a secondary concern if an account's scope is sufficiently limited.

When load test passwords need to be secured, defining several passwords in Errthquake Secrets and using them for test accounts is a better strategy.

Variables and Secrets Quick Start

Set environment variables and secrets in the Errthquake portal and reference them in test configuration files. A variable or secret named AUTHUSER would be referenced by {$AUTHUSER} in a test configuration.

Variables and secrets are managed the same way in the Errthquake portal, but variable values are displayed onscreen and secret values are not.

Test Execution Quick Start

Errthquake has three kinds of tests available:

Test Execution Parameters

Test Metrics Quick Start

When a test is submitted the "Start Test" button will change to a "View Test" button, where test metrics will be displayed.

Metrics included for each test command:

Metrics included for the test host: