expect statement. It specifies which part of the HTTP response to validate.
status
The HTTP response status code as an integer.duration
The response time in milliseconds (float). Measured from the start of the request to the end of the response.Percentile Subjects
For stress testing, percentile subjects represent latency distribution:For single (non-stress) requests,
p50, p95, and p99 all equal the duration value. These subjects are most useful in stress testing mode.header
Response header values. Useheader <name> to access a specific header.
header without a name returns all headers as an object:
body
The full response body. If the response is JSON,body gives you the parsed JSON value. Otherwise, it returns the raw body as a string.
JSON Path Access
Use dot notation to access nested JSON fields:Array Index Access
Use bracket notation for array indices:Nested Paths
Combine dot and bracket notation for deep access:Implicit body Prefix
When the subject doesn’t match a known keyword (status, duration, header, jsonpath, etc.), hitspec treats it as a body path. These are equivalent: