refactor: commands

This commit is contained in:
debugtalk
2022-01-08 15:10:37 +08:00
parent 2598691c69
commit 2ec2b86c05
18 changed files with 45 additions and 27 deletions

View File

@@ -1,17 +0,0 @@
package cmd
import (
"testing"
"github.com/spf13/cobra/doc"
"github.com/httprunner/hrp/hrp/cmd"
)
// run this test to generate markdown docs
func TestGenMarkdownTree(t *testing.T) {
err := doc.GenMarkdownTree(cmd.RootCmd, "./")
if err != nil {
t.Fatal(err)
}
}

View File

@@ -31,5 +31,6 @@ Copyright 2021 debugtalk
* [hrp boom](hrp_boom.md) - run load test with boomer
* [hrp har2case](hrp_har2case.md) - Convert HAR to json/yaml testcase files
* [hrp run](hrp_run.md) - run API test
* [hrp startproject](hrp_startproject.md) - Create a scaffold project
###### Auto generated by spf13/cobra on 7-Jan-2022
###### Auto generated by spf13/cobra on 8-Jan-2022

View File

@@ -38,4 +38,4 @@ hrp boom [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 7-Jan-2022
###### Auto generated by spf13/cobra on 8-Jan-2022

View File

@@ -7,7 +7,7 @@ Convert HAR to json/yaml testcase files
Convert HAR to json/yaml testcase files
```
hrp har2case harPath... [flags]
hrp har2case $har_path... [flags]
```
### Options
@@ -23,4 +23,4 @@ hrp har2case harPath... [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 7-Jan-2022
###### Auto generated by spf13/cobra on 8-Jan-2022

View File

@@ -7,7 +7,7 @@ run API test
run yaml/json testcase files for API test
```
hrp run path... [flags]
hrp run $path... [flags]
```
### Examples
@@ -31,4 +31,4 @@ hrp run path... [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 7-Jan-2022
###### Auto generated by spf13/cobra on 8-Jan-2022

View File

@@ -0,0 +1,19 @@
## hrp startproject
Create a scaffold project
```
hrp startproject $project_name [flags]
```
### Options
```
-h, --help help for startproject
```
### SEE ALSO
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 8-Jan-2022