update docs

This commit is contained in:
debugtalk
2022-05-24 22:26:11 +08:00
parent 9f48fd1d60
commit 63dc9696df
12 changed files with 35 additions and 11 deletions

View File

@@ -35,5 +35,6 @@ Copyright 2017 debugtalk
* [hrp pytest](hrp_pytest.md) - run API test with pytest
* [hrp run](hrp_run.md) - run API test with go engine
* [hrp startproject](hrp_startproject.md) - create a scaffold project
* [hrp wiki](hrp_wiki.md) - visit https://httprunner.com
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -42,4 +42,4 @@ hrp boom [flags]
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -18,4 +18,4 @@ hrp convert $path... [flags]
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -24,4 +24,4 @@ hrp har2case $har_path... [flags]
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -16,4 +16,4 @@ hrp pytest $path ... [flags]
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -35,4 +35,4 @@ hrp run $path... [flags]
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -20,4 +20,4 @@ hrp startproject $project_name [flags]
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 20-May-2022
###### Auto generated by spf13/cobra on 24-May-2022

19
docs/cmd/hrp_wiki.md Normal file
View File

@@ -0,0 +1,19 @@
## hrp wiki
visit https://httprunner.com
```
hrp wiki [flags]
```
### Options
```
-h, --help help for wiki
```
### SEE ALSO
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 24-May-2022

View File

@@ -1,6 +1,6 @@
{
"project_name": "demo-with-go-plugin",
"project_path": "/Users/debugtalk/MyProjects/HttpRunner-dev/httprunner/examples/demo-with-go-plugin",
"create_time": "2022-05-24T22:21:23.330967+08:00",
"create_time": "2022-05-24T22:23:19.739989+08:00",
"hrp_version": "v4.1.0-beta"
}

View File

@@ -1,6 +1,6 @@
{
"project_name": "demo-with-py-plugin",
"project_path": "/Users/debugtalk/MyProjects/HttpRunner-dev/httprunner/examples/demo-with-py-plugin",
"create_time": "2022-05-24T22:21:30.722372+08:00",
"create_time": "2022-05-24T22:23:27.199105+08:00",
"hrp_version": "v4.1.0-beta"
}

View File

@@ -1,6 +1,6 @@
{
"project_name": "demo-without-plugin",
"project_path": "/Users/debugtalk/MyProjects/HttpRunner-dev/httprunner/examples/demo-without-plugin",
"create_time": "2022-05-24T22:21:31.676833+08:00",
"create_time": "2022-05-24T22:23:27.955511+08:00",
"hrp_version": "v4.1.0-beta"
}

View File

@@ -289,7 +289,11 @@ func (r *testCaseRunner) parseConfig() error {
// merge config environment variables with base_url
// priority: env base_url > base_url
r.parsedConfig.Env = cfg.Env
if cfg.Env != nil {
r.parsedConfig.Env = cfg.Env
} else {
r.parsedConfig.Env = make(map[string]string)
}
if value, ok := r.parsedConfig.Env["base_url"]; !ok || value == "" {
r.parsedConfig.Env["base_url"] = r.parsedConfig.BaseURL
}