Skip to content

Instantly share code, notes, and snippets.

@mat3u
Created January 25, 2017 12:06
Show Gist options
  • Save mat3u/9282728827f0720e6483eb7844759593 to your computer and use it in GitHub Desktop.
Save mat3u/9282728827f0720e6483eb7844759593 to your computer and use it in GitHub Desktop.
Media LoadTests
config:
target: "http://127.0.0.1:3005"
phases:
-
duration: 10
arrivalRate: 100
payload:
path: "data.csv"
fields:
- "externalId"
scenarios:
-
name: "Create MEDIA and add RA"
flow:
-
post:
url: "/v1/identificationMedia"
headers:
Content-Type: "application/ld+json"
body: "{\"@context\": {\"sp\": \"https://schema.parkeon.com/\"}, \"sp:externalMediaId\": \"{{ externalId }}\", \"sp:mediaType\": { \"@id\": \"sp:BankCard\" } }"
capture:
-
header: "location"
as: "location"
-
header: "etag"
as: "etag"
-
think: 3
-
post:
url: "{{ location }}/resourceAssociations"
headers:
Content-Type: "application/ld+json"
If-Match: "*"
body: "{\"@context\": {\"sp\": \"https://schema.parkeon.com/\"},\"sp:park\": { \"@id\":\"https://example.com/parks/1\" },\"sp:resource\": {\"sp:plate\": \"SMT0001L\" }, \"sp:resourceAssociationName\": \"some name\", \"sp:resourceType\": { \"@id\":\"sp:LicensePlateResourceType\" } }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment