refactor: hrp convert

This commit is contained in:
buyuxiang
2022-05-24 13:36:34 +08:00
parent f19492c3f0
commit d0b2568797
37 changed files with 2245 additions and 626 deletions

View File

@@ -9,6 +9,7 @@
- fix: step request elapsed timing should contain ContentTransfer part
- fix #1288: unable to go get httprunner v4
- feat: support converting Postman collection to HttpRunner testcase
- refactor: improve the extensibility of `hrp convert` using interface `ICaseConverter`
**python version**

View File

@@ -30,10 +30,10 @@ Copyright 2017 debugtalk
### SEE ALSO
* [hrp boom](hrp_boom.md) - run load test with boomer
* [hrp convert](hrp_convert.md) - convert JSON/YAML testcases to pytest/gotest scripts
* [hrp convert](hrp_convert.md) - convert external cases to JSON/YAML/gotest/pytest testcases
* [hrp har2case](hrp_har2case.md) - convert HAR to json/yaml testcase files
* [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
###### Auto generated by spf13/cobra on 9-May-2022
###### Auto generated by spf13/cobra on 23-May-2022

View File

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

View File

@@ -1,6 +1,6 @@
## hrp convert
convert JSON/YAML testcases to pytest/gotest scripts
convert external cases to JSON/YAML/gotest/pytest testcases
```
hrp convert $path... [flags]
@@ -9,13 +9,17 @@ hrp convert $path... [flags]
### Options
```
--gotest convert to gotest scripts (TODO)
-h, --help help for convert
--pytest convert to pytest scripts (default true)
-h, --help help for convert
-d, --output-dir string specify output directory, default to the same dir with har file
-p, --profile string specify profile path to override headers (except for auto-generated headers) and cookies
--to-gotest convert to gotest scripts (TODO)
--to-json convert to JSON scripts (default)
--to-pytest convert to pytest scripts
--to-yaml convert to YAML scripts
```
### SEE ALSO
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 9-May-2022
###### Auto generated by spf13/cobra on 23-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 9-May-2022
###### Auto generated by spf13/cobra on 23-May-2022

View File

@@ -1,26 +0,0 @@
## hrp postman2case
convert postman collection to json/yaml testcase files
### Synopsis
convert postman collection to json/yaml testcase files
```
hrp postman2case $postman_path... [flags]
```
### Options
```
-h, --help help for postman2case
-d, --output-dir string specify output directory, default to the same dir with postman collection file
-j, --to-json convert to JSON format (default true)
-y, --to-yaml convert to YAML format
```
### SEE ALSO
* [hrp](hrp.md) - Next-Generation API Testing Solution.
###### Auto generated by spf13/cobra on 12-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 9-May-2022
###### Auto generated by spf13/cobra on 23-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 9-May-2022
###### Auto generated by spf13/cobra on 23-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 9-May-2022
###### Auto generated by spf13/cobra on 23-May-2022