[environment] base = "http://localhost:5000" [[tests]] description = "status only, no headers or body" http = "GET {{base}}/200" assertions = """ {{status}} == 200 """ [[tests]] description = "status + json body, no headers" http = "GET {{base}}/message" assertions = """ {{status}} == 200 {{body | message}} == "hello world!" """ [[tests]] description = "post message w/ header" http = "POST {{base}}/message" assertions = """ {{status}} == 200 {{body | id}} == 2 {{headers | content-type}} == "application/json" {{body | message}} == "hello, a second time" {{body | next_route}} == "posts" """ [tests.outputs] messageId = "{{body | id}}" nextRoute = "{{body | next_route}}" [[tests]] description = "show example of querying arrays in response" http = "GET {{base}}/{{nextRoute}}" assertions = """ {{status}} == 200 {{headers | content-length}} > 0 {{body | 0}} == "how to build a CLI program in rust" {{body | 1}} == "why you might need a vacation after build a CLI program in rust" {{body | 2}} == "reasons for drinking beer while writing a rust CLI program" """ [[tests]] description = "text body works" http = "GET {{base}}/posts/1" assertions = """ {{status}} == 200 {{body}} == "how to build a CLI program in rust" """ [[tests]] description = "show example of querying arrays in response" http = "example/local/create-post.http" assertions = """ {{status}} == 201 """