update docs

This commit is contained in:
debugtalk
2022-02-22 15:54:26 +08:00
parent f8c4716d5b
commit 4992e2e87b
7 changed files with 279 additions and 279 deletions
+1 -1
View File
@@ -33,4 +33,4 @@ Copyright 2021 debugtalk
* [hrp run](hrp_run.md) - run API test * [hrp run](hrp_run.md) - run API test
* [hrp startproject](hrp_startproject.md) - create a scaffold project * [hrp startproject](hrp_startproject.md) - create a scaffold project
###### Auto generated by spf13/cobra on 15-Feb-2022 ###### Auto generated by spf13/cobra on 22-Feb-2022
+1 -1
View File
@@ -39,4 +39,4 @@ hrp boom [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing. * [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 15-Feb-2022 ###### Auto generated by spf13/cobra on 22-Feb-2022
+3 -3
View File
@@ -15,12 +15,12 @@ hrp har2case $har_path... [flags]
``` ```
-h, --help help for har2case -h, --help help for har2case
-d, --output-dir string specify output directory, default to the same dir with har file -d, --output-dir string specify output directory, default to the same dir with har file
-j, --to-json convert to JSON format (default) -j, --to-json convert to JSON format (default true)
-y, --to-yaml convert to JSON format -y, --to-yaml convert to YAML format
``` ```
### SEE ALSO ### SEE ALSO
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing. * [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 15-Feb-2022 ###### Auto generated by spf13/cobra on 22-Feb-2022
+1 -1
View File
@@ -33,4 +33,4 @@ hrp run $path... [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing. * [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 15-Feb-2022 ###### Auto generated by spf13/cobra on 22-Feb-2022
+1 -1
View File
@@ -16,4 +16,4 @@ hrp startproject $project_name [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing. * [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 15-Feb-2022 ###### Auto generated by spf13/cobra on 22-Feb-2022
+168 -168
View File
@@ -1,169 +1,169 @@
{ {
"config": { "config": {
"name": "demo with complex mechanisms", "name": "demo with complex mechanisms",
"base_url": "https://postman-echo.com", "base_url": "https://postman-echo.com",
"variables": { "variables": {
"a": "${sum(10, 2.3)}", "a": "${sum(10, 2.3)}",
"b": 3.45, "b": 3.45,
"n": "${sum_ints(1, 2, 2)}", "n": "${sum_ints(1, 2, 2)}",
"varFoo1": "${gen_random_string($n)}", "varFoo1": "${gen_random_string($n)}",
"varFoo2": "${max($a, $b)}" "varFoo2": "${max($a, $b)}"
} }
}, },
"teststeps": [ "teststeps": [
{ {
"name": "transaction 1 start", "name": "transaction 1 start",
"transaction": { "transaction": {
"name": "tran1", "name": "tran1",
"type": "start" "type": "start"
} }
}, },
{ {
"name": "get with params", "name": "get with params",
"request": { "request": {
"method": "GET", "method": "GET",
"url": "/get", "url": "/get",
"params": { "params": {
"foo1": "$varFoo1", "foo1": "$varFoo1",
"foo2": "$varFoo2" "foo2": "$varFoo2"
}, },
"headers": { "headers": {
"User-Agent": "HttpRunnerPlus" "User-Agent": "HttpRunnerPlus"
} }
}, },
"variables": { "variables": {
"b": 34.5, "b": 34.5,
"n": 3, "n": 3,
"varFoo2": "${max($a, $b)}" "varFoo2": "${max($a, $b)}"
}, },
"extract": { "extract": {
"varFoo1": "body.args.foo1" "varFoo1": "body.args.foo1"
}, },
"validate": [ "validate": [
{ {
"check": "status_code", "check": "status_code",
"assert": "equals", "assert": "equals",
"expect": 200, "expect": 200,
"msg": "check response status code" "msg": "check response status code"
}, },
{ {
"check": "headers.\"Content-Type\"", "check": "headers.\"Content-Type\"",
"assert": "startswith", "assert": "startswith",
"expect": "application/json" "expect": "application/json"
}, },
{ {
"check": "body.args.foo1", "check": "body.args.foo1",
"assert": "length_equals", "assert": "length_equals",
"expect": 5, "expect": 5,
"msg": "check args foo1" "msg": "check args foo1"
}, },
{ {
"check": "$varFoo1", "check": "$varFoo1",
"assert": "length_equals", "assert": "length_equals",
"expect": 5, "expect": 5,
"msg": "check args foo1" "msg": "check args foo1"
}, },
{ {
"check": "body.args.foo2", "check": "body.args.foo2",
"assert": "equals", "assert": "equals",
"expect": "34.5", "expect": "34.5",
"msg": "check args foo2" "msg": "check args foo2"
} }
] ]
}, },
{ {
"name": "transaction 1 end", "name": "transaction 1 end",
"transaction": { "transaction": {
"name": "tran1", "name": "tran1",
"type": "end" "type": "end"
} }
}, },
{ {
"name": "post json data", "name": "post json data",
"request": { "request": {
"method": "POST", "method": "POST",
"url": "/post", "url": "/post",
"body": { "body": {
"foo1": "$varFoo1", "foo1": "$varFoo1",
"foo2": "${max($a, $b)}" "foo2": "${max($a, $b)}"
} }
}, },
"validate": [ "validate": [
{ {
"check": "status_code", "check": "status_code",
"assert": "equals", "assert": "equals",
"expect": 200, "expect": 200,
"msg": "check status code" "msg": "check status code"
}, },
{ {
"check": "body.json.foo1", "check": "body.json.foo1",
"assert": "length_equals", "assert": "length_equals",
"expect": 5, "expect": 5,
"msg": "check args foo1" "msg": "check args foo1"
}, },
{ {
"check": "body.json.foo2", "check": "body.json.foo2",
"assert": "equals", "assert": "equals",
"expect": 12.3, "expect": 12.3,
"msg": "check args foo2" "msg": "check args foo2"
} }
] ]
}, },
{ {
"name": "post form data", "name": "post form data",
"request": { "request": {
"method": "POST", "method": "POST",
"url": "/post", "url": "/post",
"headers": { "headers": {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
}, },
"body": { "body": {
"foo1": "$varFoo1", "foo1": "$varFoo1",
"foo2": "${max($a, $b)}", "foo2": "${max($a, $b)}",
"time": "${get_timestamp()}" "time": "${get_timestamp()}"
} }
}, },
"extract": { "extract": {
"varTime": "body.form.time" "varTime": "body.form.time"
}, },
"validate": [ "validate": [
{ {
"check": "status_code", "check": "status_code",
"assert": "equals", "assert": "equals",
"expect": 200, "expect": 200,
"msg": "check status code" "msg": "check status code"
}, },
{ {
"check": "body.form.foo1", "check": "body.form.foo1",
"assert": "length_equals", "assert": "length_equals",
"expect": 5, "expect": 5,
"msg": "check args foo1" "msg": "check args foo1"
}, },
{ {
"check": "body.form.foo2", "check": "body.form.foo2",
"assert": "equals", "assert": "equals",
"expect": "12.3", "expect": "12.3",
"msg": "check args foo2" "msg": "check args foo2"
} }
] ]
}, },
{ {
"name": "get with timestamp", "name": "get with timestamp",
"request": { "request": {
"method": "GET", "method": "GET",
"url": "/get", "url": "/get",
"params": { "params": {
"time": "$varTime" "time": "$varTime"
} }
}, },
"validate": [ "validate": [
{ {
"check": "body.args.time", "check": "body.args.time",
"assert": "length_equals", "assert": "length_equals",
"expect": 13, "expect": 13,
"msg": "check extracted var timestamp" "msg": "check extracted var timestamp"
} }
] ]
} }
] ]
} }
+104 -104
View File
@@ -1,106 +1,106 @@
{ {
"config": { "config": {
"name": "run request with functions", "name": "run request with functions",
"base_url": "https://postman-echo.com", "base_url": "https://postman-echo.com",
"variables": { "variables": {
"a": 12.3, "a": 12.3,
"b": 3.45, "b": 3.45,
"n": 5 "n": 5
}, },
"parameters_setting": { "parameters_setting": {
"strategy": "Sequential", "strategy": "Sequential",
"parameterIterator": [ "parameterIterator": [
{} {}
] ]
} }
}, },
"teststeps": [ "teststeps": [
{ {
"name": "waiting for all users in the beginning", "name": "waiting for all users in the beginning",
"rendezvous": { "rendezvous": {
"name": "rendezvous0" "name": "rendezvous0"
} }
}, },
{ {
"name": "rendezvous before get", "name": "rendezvous before get",
"rendezvous": { "rendezvous": {
"name": "rendezvous1", "name": "rendezvous1",
"number": 50, "number": 50,
"timeout": 3000 "timeout": 3000
} }
}, },
{ {
"name": "get with params", "name": "get with params",
"request": { "request": {
"method": "GET", "method": "GET",
"url": "/get", "url": "/get",
"params": { "params": {
"foo1": "foo1", "foo1": "foo1",
"foo2": "foo2" "foo2": "foo2"
}, },
"headers": { "headers": {
"User-Agent": "HttpRunnerPlus" "User-Agent": "HttpRunnerPlus"
} }
}, },
"extract": { "extract": {
"varFoo1": "body.args.foo1" "varFoo1": "body.args.foo1"
}, },
"validate": [ "validate": [
{ {
"check": "status_code", "check": "status_code",
"assert": "equals", "assert": "equals",
"expect": 200, "expect": 200,
"msg": "check status code" "msg": "check status code"
} }
] ]
}, },
{ {
"name": "rendezvous before post", "name": "rendezvous before post",
"rendezvous": { "rendezvous": {
"name": "rendezvous2", "name": "rendezvous2",
"number": 20, "number": 20,
"timeout": 2000 "timeout": 2000
} }
}, },
{ {
"name": "post json data with functions", "name": "post json data with functions",
"request": { "request": {
"method": "POST", "method": "POST",
"url": "/post", "url": "/post",
"headers": { "headers": {
"User-Agent": "HttpRunnerPlus" "User-Agent": "HttpRunnerPlus"
}, },
"body": { "body": {
"foo1": "foo1", "foo1": "foo1",
"foo2": "foo2" "foo2": "foo2"
} }
}, },
"validate": [ "validate": [
{ {
"check": "status_code", "check": "status_code",
"assert": "equals", "assert": "equals",
"expect": 200, "expect": 200,
"msg": "check status code" "msg": "check status code"
}, },
{ {
"check": "body.json.foo1", "check": "body.json.foo1",
"assert": "length_equals", "assert": "length_equals",
"expect": 4, "expect": 4,
"msg": "check args foo1" "msg": "check args foo1"
}, },
{ {
"check": "body.json.foo2", "check": "body.json.foo2",
"assert": "equals", "assert": "equals",
"expect": "foo2", "expect": "foo2",
"msg": "check args foo2" "msg": "check args foo2"
} }
] ]
}, },
{ {
"name": "waiting for all users in the end", "name": "waiting for all users in the end",
"rendezvous": { "rendezvous": {
"name": "rendezvous3" "name": "rendezvous3"
} }
} }
] ]
} }