Skip to content

Instantly share code, notes, and snippets.

@kirksl
Created November 30, 2018 18:49
Show Gist options
  • Save kirksl/04af538299bd824baacab2d9e914a311 to your computer and use it in GitHub Desktop.
Save kirksl/04af538299bd824baacab2d9e914a311 to your computer and use it in GitHub Desktop.
config:
target: https://maps.googleapis.com/maps/api
payload:
path: "happy.csv"
fields:
- "description"
- "querystring"
- "lat"
- "lng"
order: sequence
http:
timeout: 60
phases:
- duration: 1
arrivalRate: 1
ensure:
p99: 10000
median: 5000
plugins:
datadog:
host: ""
prefix: "artillery."
tags:
- "mode:test"
expect: {}
scenarios:
- flow:
- log: "/geocode happy test --> {{ description }}"
- get:
url: "/geocode/{{ querystring }}&key={{ $processEnvironment.GOOGLE_API_KEY }}"
capture:
json: "$.results[0].geometry.location"
as: "location"
log: "{{ location.lat }}"
expect:
- statusCode: 200
- contentType: json
- equals:
- "{{ location.lat }}"
- "{{ lat }}"
- equals:
- "{{ location.lng }}"
- "{{ lng }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment