Errthquake Quick Start
Test Assets
Errthquake uses three kinds of test assets:
- Configuration files: The http request structure and test sequence
- Input files: The values each test sequence execution uses
- Object files: Images, movies, json files, etc. available to use in http requests
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:
GlobalInitSeq
: Run once at the beginning of a test executionInitSequence
: Run once at the beginning of each test input's executionLoopSequence
: Run for each test input, multiple times as specifiedLoopCount
: Number of times to run the LoopSequenceCommands
: HTTP requests identified by names that are referenced by the command sequences
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:
- Duration Test: Specify the input file, configuration file, simultaneous user count, and the duration of the test. The test will run for the duration specified. If it uses all test inputs before the requested duration, it will begin reusing inputs.
- Benchmark Test: Specify the input file, configuration file, and simultaneous user count only. The test configuration will be run once for each input.
- Interactive Test: Specify the input file, configuration file, and an initial simultaneous user count. Once the test has started, it will accept updates to the user count while the test is running. All tests can be stopped early, but interactive tests run until explicitly stopped.
Test Execution Parameters
- Test Input: Choose from the uploaded test input CSV files
- Test Configuration: Choose from the uploaded test configuration YAML files
- Test Location: Choose from the available cloud compute locations
- Test Duration (required for duration tests): The duration time for test execution
- Ramp-Up Time (optional for all tests): The time that should be taken to ramp the test up to the simultaneous user count. The ramp-up time is taken within the test duration time rather than prior to the test duration time.
- Simultaneous Users: The number of virtual users simultaneously running the configured test
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:
- HTTP request volume
- HTTP response volume grouped by response code
- Network I/O
- Response time: lowest / median / 90th percentile / highest
Metrics included for the test host:
- Memory used and available
- System and user CPU percentage
- Disk I/O