...
When you first access the Hurricane service you will see the list of previously created test definitions.
...
Let’s create a new test:
Enter a name for your test in the Name field at the bottom of the page
Click the “Add Test Definition” button
Your test is created using the name you provided and you are redirected to the Edit Test Definition page.
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "",
"type": "Request",
"method": "GET",
"url": "",
"headers": [],
"body": null,
"actions":
[
]
}
]
} |
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "Hello World",
"type": "Request",
"method": "GET",
"url": "http://localhost/hello",
"headers": [],
"body": null,
"actions":
[
]
}
]
} |
...
Let’s add a property to our test that will hold the protocol and server information for our API request. To add a test property:
Click on the “Add” button in the Test Properties section of the Edit Test Definition page. This adds an empty property entry to the page
Provide a name for the property. For this tutorial we’ll use “ServerDomain”. The name will be used as part of the placeholder and can only contain letters, numbers, ‘-', and '_’
Optionally provide a default value to use for this property if a specific value isn’t given during test scheduling. For this tutorial we use our current server address: “http://localhost”
Once added, click the “Save” button at the bottom of the page
Reference a Test Property
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "Hello World",
"type": "Request",
"method": "GET",
"url": "{{ServerDomain}}/hello",
"body": null,
"actions":
[
]
}
]
} |
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "Echo",
"type": "Request",
"method": "POST",
"url": "{{ServerDomain}}/echo",
"headers": [],
"body":
{
"text": "My text content"
},
"actions":
[
]
}
]
} |
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "Echo",
"type": "Request",
"method": "POST",
"url": "{{ServerDomain}}/echo",
"headers":
[
{
"name": "Content-Type",
"value": "application/json"
}
],
"body": "{\r\n\"text\": \"My text content\"\r\n}",
"actions":
[
]
}
]
} |
...
Code Block | ||
---|---|---|
| ||
{ "headers": [], "steps": [ { "name": "Hello World", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/hello", "body": null, "actions": [ ] }, { "name": "Echo", "type": "Request", "method": "POST", "url": "{{ServerDomain}}/echo", "headers": [ { "name": "Content-Type", "value": "application/json" } ], "body": "{\r\n\"text\": \"My text content\"\r\n}", "actions": [ ] } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "headers": [], "steps": [ { "name": "Hello World", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/hello", "body": null, "actions": [ { "name": "Capture Result", "type": "json", "extractionPairs": [ { "jsonPath": "text", "variableName": "myvar" } ] } ] }, { "name": "Echo", "type": "Request", "method": "POST", "url": "{{ServerDomain}}/echo", "headers": [], "body": { "text": "My text content" }, "actions": [ ] } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "headers": [], "steps": [ { "name": "Hello World", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/hello", "body": null, "actions": [ { "name": "Capture Result", "type": "json", "extractionPairs": [ { "jsonPath": "text", "variableName": "myvar" } ] } ] }, { "name": "Echo", "type": "Request", "method": "POST", "url": "{{ServerDomain}}/echo", "headers": [], "body": { "text": "[[myvar]]" }, "actions": [ ] } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "headers": [], "steps": [ { "name": "Hello and Echo", "type": "Sequence", "headers": [], "steps": [ { "name": "Hello World", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/hello", "body": null, "actions": [ { "name": "Capture Result", "type": "json", "extractionPairs": [ { "jsonPath": "text", "variableName": "myvar" } ] } ] }, { "name": "Echo", "type": "Request", "method": "POST", "url": "{{ServerDomain}}/echo", "headers": [], "body": { "text": "[[myvar]]" }, "actions": [ ] } ] } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "headers": [], "steps": [ { "name": "Pick One", "type": "Random", "headers": [], "steps": [ { "name": "Call 1", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/call1", "body": null, "actions": [ ] }, { "name": "Call 2", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/call2", "headers": [], "body": null, "actions": [ ] } ] }, { "name": "Hello World", "type": "Request", "method": "GET", "url": "{{ServerDomain}}/hello", "body": null, "actions": [ ] } ] } |
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "Authenticate",
"type": "Request",
"method": "POST",
"url": "{{ServerDomain}}/login",
"body":
{
"username": "{{username}}",
"password": "{{password}}"
},
"actions":
[
]
}
]
} |
...
Code Block | ||
---|---|---|
| ||
{
"headers": [],
"steps":
[
{
"name": "Refresh Authentication",
"type": "Request",
"method": "GET",
"url": "{{ServerDomain}}/refreshlogin",
"body": null,
"actions":
[
]
}
]
} |
...