hurl/integration/tests_ok/variables.hurl

36 lines
760 B
Plaintext
Raw Normal View History

2022-09-02 11:50:43 +03:00
# Variables can be set from:
# - an external properties file
# - at the command-line with the --variable option
2022-09-07 20:12:25 +03:00
# - with HURL_xxx environment variable
2022-09-02 11:50:43 +03:00
# - in the Hurl File in the [Options] section
2021-01-09 12:25:01 +03:00
POST http://localhost:8000/variables
2021-09-10 18:35:23 +03:00
Name: {{name}}
Age: {{age}}
Height: {{height}}
Female: {{female}}
Id: {{my-id}}
A_Null: {{a_null}}
2022-09-02 11:50:43 +03:00
Country: {{country}}
[Options]
variable: country=Italy
2021-01-09 12:25:01 +03:00
{
"name": "{{name}}",
"age": {{age}},
2021-02-25 22:33:14 +03:00
"height": {{height}},
"female": {{female}},
2021-09-10 18:35:23 +03:00
"id": "{{my-id}}",
2022-09-02 11:50:43 +03:00
"a_null": {{a_null}},
"country": "{{country}}"
2021-01-09 12:25:01 +03:00
}
2021-02-25 22:33:14 +03:00
HTTP/* 200
[Asserts]
variable "name" == "Jennifer"
variable "female" == true
variable "age" == 30
variable "height" == 1.70
variable "a_null" == null
variable "my-id" == "123"
variable "country" == "Italy"