mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-06 20:32:44 +08:00
docs: update hrp cmd docs
This commit is contained in:
@@ -57,5 +57,5 @@ func getAndroidDevices() (devices []*gadb.Device, err error) {
|
||||
}
|
||||
|
||||
func init() {
|
||||
androidRootCmd.AddCommand(listAndroidDevicesCmd)
|
||||
CmdAndroidRoot.AddCommand(listAndroidDevicesCmd)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
var serial string
|
||||
|
||||
var androidRootCmd = &cobra.Command{
|
||||
var CmdAndroidRoot = &cobra.Command{
|
||||
Use: "adb",
|
||||
Short: "simple utils for android device management",
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {},
|
||||
@@ -22,7 +22,3 @@ func getDevice(serial string) (*uixt.AndroidDevice, error) {
|
||||
}
|
||||
return device, nil
|
||||
}
|
||||
|
||||
func Init(rootCmd *cobra.Command) {
|
||||
rootCmd.AddCommand(androidRootCmd)
|
||||
}
|
||||
|
||||
@@ -66,5 +66,5 @@ func init() {
|
||||
installCmd.Flags().BoolVarP(&replace, "replace", "r", false, "replace existing application")
|
||||
installCmd.Flags().BoolVarP(&downgrade, "downgrade", "d", false, "allow version code downgrade (debuggable packages only)")
|
||||
installCmd.Flags().BoolVarP(&grant, "grant", "g", false, "grant all runtime permissions")
|
||||
androidRootCmd.AddCommand(installCmd)
|
||||
CmdAndroidRoot.AddCommand(installCmd)
|
||||
}
|
||||
|
||||
@@ -46,5 +46,5 @@ var screencapAndroidDevicesCmd = &cobra.Command{
|
||||
|
||||
func init() {
|
||||
screencapAndroidDevicesCmd.Flags().StringVarP(&serial, "serial", "s", "", "filter by device's serial")
|
||||
androidRootCmd.AddCommand(screencapAndroidDevicesCmd)
|
||||
CmdAndroidRoot.AddCommand(screencapAndroidDevicesCmd)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/internal/sdk"
|
||||
)
|
||||
|
||||
var buildCmd = &cobra.Command{
|
||||
var CmdBuild = &cobra.Command{
|
||||
Use: "build $path ...",
|
||||
Short: "build plugin for testing",
|
||||
Long: `build python/go plugin for testing`,
|
||||
@@ -33,7 +33,5 @@ var buildCmd = &cobra.Command{
|
||||
var output string
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(buildCmd)
|
||||
|
||||
buildCmd.Flags().StringVarP(&output, "output", "o", "", "funplugin product output path, default: cwd")
|
||||
CmdBuild.Flags().StringVarP(&output, "output", "o", "", "funplugin product output path, default: cwd")
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/cmd"
|
||||
"github.com/spf13/cobra/doc"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
// run this test to generate markdown docs for hrp command
|
||||
func TestGenMarkdownTree(t *testing.T) {
|
||||
err := doc.GenMarkdownTree(rootCmd, "../../docs/cmd")
|
||||
addAllCommands()
|
||||
err := doc.GenMarkdownTree(cmd.RootCmd, "../../docs/cmd")
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
@@ -7,8 +7,25 @@ import (
|
||||
"github.com/getsentry/sentry-go"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/cmd"
|
||||
"github.com/httprunner/httprunner/v5/cmd/adb"
|
||||
"github.com/httprunner/httprunner/v5/cmd/ios"
|
||||
"github.com/httprunner/httprunner/v5/code"
|
||||
)
|
||||
|
||||
func addAllCommands() {
|
||||
// adds all child commands to the root command and sets flags appropriately.
|
||||
cmd.RootCmd.AddCommand(cmd.CmdBuild)
|
||||
cmd.RootCmd.AddCommand(cmd.CmdConvert)
|
||||
cmd.RootCmd.AddCommand(cmd.CmdPytest)
|
||||
cmd.RootCmd.AddCommand(cmd.CmdRun)
|
||||
cmd.RootCmd.AddCommand(cmd.CmdScaffold)
|
||||
cmd.RootCmd.AddCommand(cmd.CmdServer)
|
||||
cmd.RootCmd.AddCommand(cmd.CmdWiki)
|
||||
|
||||
cmd.RootCmd.AddCommand(ios.CmdIOSRoot)
|
||||
cmd.RootCmd.AddCommand(adb.CmdAndroidRoot)
|
||||
}
|
||||
|
||||
func main() {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
@@ -21,6 +38,9 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
exitCode := cmd.Execute()
|
||||
addAllCommands()
|
||||
|
||||
err := cmd.RootCmd.Execute()
|
||||
exitCode := code.GetErrorCode(err)
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/internal/builtin"
|
||||
)
|
||||
|
||||
var convertCmd = &cobra.Command{
|
||||
var CmdConvert = &cobra.Command{
|
||||
Use: "convert $path...",
|
||||
Short: "convert multiple source format to HttpRunner JSON/YAML/gotest/pytest cases",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
@@ -105,18 +105,16 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(convertCmd)
|
||||
CmdConvert.Flags().BoolVar(&fromJSONFlag, "from-json", true, "load from json case format")
|
||||
CmdConvert.Flags().BoolVar(&fromYAMLFlag, "from-yaml", false, "load from yaml case format")
|
||||
CmdConvert.Flags().BoolVar(&fromHARFlag, "from-har", false, "load from HAR format")
|
||||
CmdConvert.Flags().BoolVar(&fromPostmanFlag, "from-postman", false, "load from postman format")
|
||||
CmdConvert.Flags().BoolVar(&fromCurlFlag, "from-curl", false, "load from curl format")
|
||||
|
||||
convertCmd.Flags().BoolVar(&fromJSONFlag, "from-json", true, "load from json case format")
|
||||
convertCmd.Flags().BoolVar(&fromYAMLFlag, "from-yaml", false, "load from yaml case format")
|
||||
convertCmd.Flags().BoolVar(&fromHARFlag, "from-har", false, "load from HAR format")
|
||||
convertCmd.Flags().BoolVar(&fromPostmanFlag, "from-postman", false, "load from postman format")
|
||||
convertCmd.Flags().BoolVar(&fromCurlFlag, "from-curl", false, "load from curl format")
|
||||
CmdConvert.Flags().BoolVar(&toJSONFlag, "to-json", true, "convert to JSON case scripts")
|
||||
CmdConvert.Flags().BoolVar(&toYAMLFlag, "to-yaml", false, "convert to YAML case scripts")
|
||||
CmdConvert.Flags().BoolVar(&toPyTestFlag, "to-pytest", false, "convert to pytest scripts")
|
||||
|
||||
convertCmd.Flags().BoolVar(&toJSONFlag, "to-json", true, "convert to JSON case scripts")
|
||||
convertCmd.Flags().BoolVar(&toYAMLFlag, "to-yaml", false, "convert to YAML case scripts")
|
||||
convertCmd.Flags().BoolVar(&toPyTestFlag, "to-pytest", false, "convert to pytest scripts")
|
||||
|
||||
convertCmd.Flags().StringVarP(&outputDir, "output-dir", "d", "", "specify output directory")
|
||||
convertCmd.Flags().StringVarP(&profilePath, "profile", "p", "", "specify profile path to override headers and cookies")
|
||||
CmdConvert.Flags().StringVarP(&outputDir, "output-dir", "d", "", "specify output directory")
|
||||
CmdConvert.Flags().StringVarP(&profilePath, "profile", "p", "", "specify profile path to override headers and cookies")
|
||||
}
|
||||
|
||||
@@ -71,5 +71,5 @@ var appType string
|
||||
func init() {
|
||||
listAppsCmd.Flags().StringVarP(&udid, "udid", "u", "", "specify device by udid")
|
||||
listAppsCmd.Flags().StringVarP(&appType, "type", "t", "user", "filter application type [user|system|internal|all]")
|
||||
iosRootCmd.AddCommand(listAppsCmd)
|
||||
CmdIOSRoot.AddCommand(listAppsCmd)
|
||||
}
|
||||
|
||||
@@ -74,5 +74,5 @@ var listDevicesCmd = &cobra.Command{
|
||||
var udid string
|
||||
|
||||
func init() {
|
||||
iosRootCmd.AddCommand(listDevicesCmd)
|
||||
CmdIOSRoot.AddCommand(listDevicesCmd)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/uixt/option"
|
||||
)
|
||||
|
||||
var iosRootCmd = &cobra.Command{
|
||||
var CmdIOSRoot = &cobra.Command{
|
||||
Use: "ios",
|
||||
Short: "simple utils for ios device management",
|
||||
}
|
||||
@@ -19,7 +19,3 @@ func getDevice(udid string) (*uixt.IOSDevice, error) {
|
||||
}
|
||||
return device, nil
|
||||
}
|
||||
|
||||
func Init(rootCmd *cobra.Command) {
|
||||
rootCmd.AddCommand(iosRootCmd)
|
||||
}
|
||||
|
||||
@@ -49,5 +49,5 @@ var installCmd = &cobra.Command{
|
||||
func init() {
|
||||
installCmd.Flags().StringVarP(&udid, "udid", "u", "", "filter by device's serial")
|
||||
|
||||
iosRootCmd.AddCommand(installCmd)
|
||||
CmdIOSRoot.AddCommand(installCmd)
|
||||
}
|
||||
|
||||
@@ -79,5 +79,5 @@ func init() {
|
||||
mountCmd.Flags().BoolVar(&unmountDeveloperDiskImage, "reset", false, "unmount developer disk images")
|
||||
mountCmd.Flags().StringVarP(&developerDiskImageDir, "dir", "d", defaultDeveloperDiskImageDir, "specify developer disk image directory")
|
||||
mountCmd.Flags().StringVarP(&udid, "udid", "u", "", "specify device by udid")
|
||||
iosRootCmd.AddCommand(mountCmd)
|
||||
CmdIOSRoot.AddCommand(mountCmd)
|
||||
}
|
||||
|
||||
@@ -46,5 +46,5 @@ var isAll bool
|
||||
func init() {
|
||||
psCmd.Flags().StringVarP(&udid, "udid", "u", "", "specify device by udid")
|
||||
psCmd.Flags().BoolVarP(&isAll, "all", "a", false, "print all processes including system processes")
|
||||
iosRootCmd.AddCommand(psCmd)
|
||||
CmdIOSRoot.AddCommand(psCmd)
|
||||
}
|
||||
|
||||
@@ -40,5 +40,5 @@ var rebootCmd = &cobra.Command{
|
||||
|
||||
func init() {
|
||||
rebootCmd.Flags().StringVarP(&udid, "udid", "u", "", "specify device by udid")
|
||||
iosRootCmd.AddCommand(rebootCmd)
|
||||
CmdIOSRoot.AddCommand(rebootCmd)
|
||||
}
|
||||
|
||||
@@ -36,5 +36,5 @@ var tunnelCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
iosRootCmd.AddCommand(tunnelCmd)
|
||||
CmdIOSRoot.AddCommand(tunnelCmd)
|
||||
}
|
||||
|
||||
@@ -56,5 +56,5 @@ func init() {
|
||||
uninstallCmd.Flags().StringVarP(&udid, "udid", "u", "", "filter by device's serial")
|
||||
uninstallCmd.Flags().StringVarP(&bundleId, "bundleId", "b", "", "bundleId to uninstall")
|
||||
|
||||
iosRootCmd.AddCommand(uninstallCmd)
|
||||
CmdIOSRoot.AddCommand(uninstallCmd)
|
||||
}
|
||||
|
||||
@@ -52,5 +52,5 @@ func init() {
|
||||
xctestCmd.Flags().StringVarP(&bundleID, "bundleID", "b", "com.gtf.wda.runner.xctrunner", "specify ios bundleID")
|
||||
xctestCmd.Flags().StringVarP(&testRunnerBundleID, "testRunnerBundleID", "t", "com.gtf.wda.runner.xctrunner", "specify ios testRunnerBundleID")
|
||||
xctestCmd.Flags().StringVarP(&xctestConfig, "xctestConfig", "x", "GtfWdaRunner.xctest", "specify ios xctestConfig")
|
||||
iosRootCmd.AddCommand(xctestCmd)
|
||||
CmdIOSRoot.AddCommand(xctestCmd)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/internal/sdk"
|
||||
)
|
||||
|
||||
var pytestCmd = &cobra.Command{
|
||||
var CmdPytest = &cobra.Command{
|
||||
Use: "pytest $path ...",
|
||||
Short: "run API test with pytest",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
@@ -38,10 +38,6 @@ var pytestCmd = &cobra.Command{
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(pytestCmd)
|
||||
}
|
||||
|
||||
func runPytest(args []string) error {
|
||||
args = append([]string{"run"}, args...)
|
||||
return myexec.ExecPython3Command("httprunner", args...)
|
||||
|
||||
21
cmd/root.go
21
cmd/root.go
@@ -4,14 +4,11 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
hrp "github.com/httprunner/httprunner/v5"
|
||||
"github.com/httprunner/httprunner/v5/cmd/adb"
|
||||
"github.com/httprunner/httprunner/v5/cmd/ios"
|
||||
"github.com/httprunner/httprunner/v5/code"
|
||||
"github.com/httprunner/httprunner/v5/internal/version"
|
||||
)
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
var rootCmd = &cobra.Command{
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "hrp",
|
||||
Short: "All-in-One Testing Framework for API, UI and Performance",
|
||||
Long: `
|
||||
@@ -62,16 +59,8 @@ var (
|
||||
venv string
|
||||
)
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
||||
func Execute() int {
|
||||
rootCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "l", "INFO", "set log level")
|
||||
rootCmd.PersistentFlags().BoolVar(&logJSON, "log-json", false, "set log to json format (default colorized console)")
|
||||
rootCmd.PersistentFlags().StringVar(&venv, "venv", "", "specify python3 venv path")
|
||||
|
||||
ios.Init(rootCmd)
|
||||
adb.Init(rootCmd)
|
||||
|
||||
err := rootCmd.Execute()
|
||||
return code.GetErrorCode(err)
|
||||
func init() {
|
||||
RootCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "l", "INFO", "set log level")
|
||||
RootCmd.PersistentFlags().BoolVar(&logJSON, "log-json", false, "set log to json format (default colorized console)")
|
||||
RootCmd.PersistentFlags().StringVar(&venv, "venv", "", "specify python3 venv path")
|
||||
}
|
||||
|
||||
19
cmd/run.go
19
cmd/run.go
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// runCmd represents the run command
|
||||
var runCmd = &cobra.Command{
|
||||
var CmdRun = &cobra.Command{
|
||||
Use: "run $path...",
|
||||
Short: "run API test with go engine",
|
||||
Long: `run yaml/json testcase files for API test`,
|
||||
@@ -38,15 +38,14 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(runCmd)
|
||||
runCmd.Flags().BoolVarP(&continueOnFailure, "continue-on-failure", "c", false, "continue running next step when failure occurs")
|
||||
runCmd.Flags().BoolVar(&requestsLogOff, "log-requests-off", false, "turn off request & response details logging")
|
||||
runCmd.Flags().BoolVar(&httpStatOn, "http-stat", false, "turn on HTTP latency stat (DNSLookup, TCP Connection, etc.)")
|
||||
runCmd.Flags().BoolVar(&pluginLogOn, "log-plugin", false, "turn on plugin logging")
|
||||
runCmd.Flags().StringVarP(&proxyUrl, "proxy-url", "p", "", "set proxy url")
|
||||
runCmd.Flags().BoolVarP(&saveTests, "save-tests", "s", false, "save tests summary")
|
||||
runCmd.Flags().BoolVarP(&genHTMLReport, "gen-html-report", "g", false, "generate html report")
|
||||
runCmd.Flags().Float32Var(&caseTimeout, "case-timeout", 3600, "set testcase timeout (seconds)")
|
||||
CmdRun.Flags().BoolVarP(&continueOnFailure, "continue-on-failure", "c", false, "continue running next step when failure occurs")
|
||||
CmdRun.Flags().BoolVar(&requestsLogOff, "log-requests-off", false, "turn off request & response details logging")
|
||||
CmdRun.Flags().BoolVar(&httpStatOn, "http-stat", false, "turn on HTTP latency stat (DNSLookup, TCP Connection, etc.)")
|
||||
CmdRun.Flags().BoolVar(&pluginLogOn, "log-plugin", false, "turn on plugin logging")
|
||||
CmdRun.Flags().StringVarP(&proxyUrl, "proxy-url", "p", "", "set proxy url")
|
||||
CmdRun.Flags().BoolVarP(&saveTests, "save-tests", "s", false, "save tests summary")
|
||||
CmdRun.Flags().BoolVarP(&genHTMLReport, "gen-html-report", "g", false, "generate html report")
|
||||
CmdRun.Flags().Float32Var(&caseTimeout, "case-timeout", 3600, "set testcase timeout (seconds)")
|
||||
}
|
||||
|
||||
func makeHRPRunner() *hrp.HRPRunner {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/internal/scaffold"
|
||||
)
|
||||
|
||||
var scaffoldCmd = &cobra.Command{
|
||||
var CmdScaffold = &cobra.Command{
|
||||
Use: "startproject $project_name",
|
||||
Aliases: []string{"scaffold"},
|
||||
Short: "create a scaffold project",
|
||||
@@ -49,10 +49,9 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(scaffoldCmd)
|
||||
scaffoldCmd.Flags().BoolVarP(&force, "force", "f", false, "force to overwrite existing project")
|
||||
scaffoldCmd.Flags().BoolVar(&genPythonPlugin, "py", true, "generate hashicorp python plugin")
|
||||
scaffoldCmd.Flags().BoolVar(&genGoPlugin, "go", false, "generate hashicorp go plugin")
|
||||
scaffoldCmd.Flags().BoolVar(&ignorePlugin, "ignore-plugin", false, "ignore function plugin")
|
||||
scaffoldCmd.Flags().BoolVar(&empty, "empty", false, "generate empty project")
|
||||
CmdScaffold.Flags().BoolVarP(&force, "force", "f", false, "force to overwrite existing project")
|
||||
CmdScaffold.Flags().BoolVar(&genPythonPlugin, "py", true, "generate hashicorp python plugin")
|
||||
CmdScaffold.Flags().BoolVar(&genGoPlugin, "go", false, "generate hashicorp go plugin")
|
||||
CmdScaffold.Flags().BoolVar(&ignorePlugin, "ignore-plugin", false, "ignore function plugin")
|
||||
CmdScaffold.Flags().BoolVar(&empty, "empty", false, "generate empty project")
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// serverCmd represents the server command
|
||||
var serverCmd = &cobra.Command{
|
||||
var CmdServer = &cobra.Command{
|
||||
Use: "server start",
|
||||
Short: "start hrp server",
|
||||
Long: `start hrp server, call httprunner by HTTP`,
|
||||
@@ -29,7 +29,6 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(serverCmd)
|
||||
serverCmd.Flags().IntVarP(&port, "port", "p", 8082, "port to run the server on")
|
||||
serverCmd.Flags().StringVarP(&mcpConfigPath, "mcp-config", "c", "$HOME/.hrp/mcp.json", "path to the MCP config file")
|
||||
CmdServer.Flags().IntVarP(&port, "port", "p", 8082, "port to run the server on")
|
||||
CmdServer.Flags().StringVarP(&mcpConfigPath, "mcp-config", "c", "$HOME/.hrp/mcp.json", "path to the MCP config file")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/internal/wiki"
|
||||
)
|
||||
|
||||
var wikiCmd = &cobra.Command{
|
||||
var CmdWiki = &cobra.Command{
|
||||
Use: "wiki",
|
||||
Aliases: []string{"info", "docs", "doc"},
|
||||
Short: "visit https://httprunner.com",
|
||||
@@ -26,7 +26,3 @@ var wikiCmd = &cobra.Command{
|
||||
return wiki.OpenWiki()
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(wikiCmd)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## hrp
|
||||
|
||||
Next-Generation API Testing Solution.
|
||||
All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
### Synopsis
|
||||
|
||||
@@ -12,30 +12,52 @@ Next-Generation API Testing Solution.
|
||||
██║ ██║ ██║ ██║ ██║ ██║ ██║╚██████╔╝██║ ╚████║██║ ╚████║███████╗██║ ██║
|
||||
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝
|
||||
|
||||
HttpRunner is an open source API testing tool that supports HTTP(S)/HTTP2/WebSocket/RPC
|
||||
network protocols, covering API testing, performance testing and digital experience
|
||||
monitoring (DEM) test types. Enjoy! ✨ 🚀 ✨
|
||||
HttpRunner: Enjoy your All-in-One Testing Solution ✨ 🚀 ✨
|
||||
|
||||
License: Apache-2.0
|
||||
💡 Simple Yet Powerful
|
||||
- Natural language driven test scenarios powered by LLM
|
||||
- User-friendly SDK API with IDE auto-completion
|
||||
- Intuitive GoTest/YAML/JSON/Text testcase format
|
||||
|
||||
📌 Comprehensive Testing Capabilities
|
||||
- UI Automation: Android/iOS/Harmony/Browser
|
||||
- API Testing: HTTP(S)/HTTP2/WebSocket/RPC
|
||||
- Load Testing: run API testcase concurrently with boomer
|
||||
|
||||
🧩 High Scalability
|
||||
- Plugin system for custom functions
|
||||
- Distributed testing support
|
||||
- Cross-platform: macOS/Linux/Windows
|
||||
|
||||
🛠 Easy Integration
|
||||
- CI/CD friendly with JSON logs and HTML reports
|
||||
- Rich ecosystem tools
|
||||
|
||||
Learn more:
|
||||
Website: https://httprunner.com
|
||||
Github: https://github.com/httprunner/httprunner
|
||||
Copyright 2017 debugtalk
|
||||
GitHub: https://github.com/httprunner/httprunner
|
||||
|
||||
Copyright © 2017-present debugtalk. Apache-2.0 License.
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for hrp
|
||||
-h, --help help for hrp
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp boom](hrp_boom.md) - run load test with boomer
|
||||
* [hrp adb](hrp_adb.md) - simple utils for android device management
|
||||
* [hrp build](hrp_build.md) - build plugin for testing
|
||||
* [hrp convert](hrp_convert.md) - convert multiple source format to HttpRunner JSON/YAML/gotest/pytest cases
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
* [hrp pytest](hrp_pytest.md) - run API test with pytest
|
||||
* [hrp run](hrp_run.md) - run API test with go engine
|
||||
* [hrp server](hrp_server.md) - start hrp server
|
||||
* [hrp startproject](hrp_startproject.md) - create a scaffold project
|
||||
* [hrp wiki](hrp_wiki.md) - visit https://httprunner.com
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
26
docs/cmd/hrp_adb.md
Normal file
26
docs/cmd/hrp_adb.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## hrp adb
|
||||
|
||||
simple utils for android device management
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for adb
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
* [hrp adb devices](hrp_adb_devices.md) - List all Android devices
|
||||
* [hrp adb install](hrp_adb_install.md) - push package to the device and install them automatically
|
||||
* [hrp adb screencap](hrp_adb_screencap.md) - Start android screen capture
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
27
docs/cmd/hrp_adb_devices.md
Normal file
27
docs/cmd/hrp_adb_devices.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## hrp adb devices
|
||||
|
||||
List all Android devices
|
||||
|
||||
```
|
||||
hrp adb devices [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for devices
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp adb](hrp_adb.md) - simple utils for android device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
31
docs/cmd/hrp_adb_install.md
Normal file
31
docs/cmd/hrp_adb_install.md
Normal file
@@ -0,0 +1,31 @@
|
||||
## hrp adb install
|
||||
|
||||
push package to the device and install them automatically
|
||||
|
||||
```
|
||||
hrp adb install [flags] PACKAGE
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-d, --downgrade allow version code downgrade (debuggable packages only)
|
||||
-g, --grant grant all runtime permissions
|
||||
-h, --help help for install
|
||||
-r, --replace replace existing application
|
||||
-s, --serial string filter by device's serial
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp adb](hrp_adb.md) - simple utils for android device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
28
docs/cmd/hrp_adb_screencap.md
Normal file
28
docs/cmd/hrp_adb_screencap.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## hrp adb screencap
|
||||
|
||||
Start android screen capture
|
||||
|
||||
```
|
||||
hrp adb screencap [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for screencap
|
||||
-s, --serial string filter by device's serial
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp adb](hrp_adb.md) - simple utils for android device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
@@ -24,8 +24,16 @@ hrp build $path ... [flags]
|
||||
-o, --output string funplugin product output path, default: cwd
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
@@ -22,8 +22,16 @@ hrp convert $path... [flags]
|
||||
--to-yaml convert to YAML case scripts
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
32
docs/cmd/hrp_ios.md
Normal file
32
docs/cmd/hrp_ios.md
Normal file
@@ -0,0 +1,32 @@
|
||||
## hrp ios
|
||||
|
||||
simple utils for ios device management
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for ios
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
* [hrp ios apps](hrp_ios_apps.md) - List all iOS installed apps
|
||||
* [hrp ios devices](hrp_ios_devices.md) - List all iOS devices
|
||||
* [hrp ios install](hrp_ios_install.md) - push package to the device and install them automatically
|
||||
* [hrp ios mount](hrp_ios_mount.md) - A brief description of your command
|
||||
* [hrp ios ps](hrp_ios_ps.md) - show running processes
|
||||
* [hrp ios reboot](hrp_ios_reboot.md) - reboot ios device
|
||||
* [hrp ios tunnel](hrp_ios_tunnel.md) - tunnel start
|
||||
* [hrp ios uninstall](hrp_ios_uninstall.md) - uninstall package automatically
|
||||
* [hrp ios xctest](hrp_ios_xctest.md) - run xctest
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
29
docs/cmd/hrp_ios_apps.md
Normal file
29
docs/cmd/hrp_ios_apps.md
Normal file
@@ -0,0 +1,29 @@
|
||||
## hrp ios apps
|
||||
|
||||
List all iOS installed apps
|
||||
|
||||
```
|
||||
hrp ios apps [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for apps
|
||||
-t, --type string filter application type [user|system|internal|all] (default "user")
|
||||
-u, --udid string specify device by udid
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
27
docs/cmd/hrp_ios_devices.md
Normal file
27
docs/cmd/hrp_ios_devices.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## hrp ios devices
|
||||
|
||||
List all iOS devices
|
||||
|
||||
```
|
||||
hrp ios devices [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for devices
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
28
docs/cmd/hrp_ios_install.md
Normal file
28
docs/cmd/hrp_ios_install.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## hrp ios install
|
||||
|
||||
push package to the device and install them automatically
|
||||
|
||||
```
|
||||
hrp ios install [flags] PACKAGE
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for install
|
||||
-u, --udid string filter by device's serial
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
31
docs/cmd/hrp_ios_mount.md
Normal file
31
docs/cmd/hrp_ios_mount.md
Normal file
@@ -0,0 +1,31 @@
|
||||
## hrp ios mount
|
||||
|
||||
A brief description of your command
|
||||
|
||||
```
|
||||
hrp ios mount [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-d, --dir string specify developer disk image directory (default "/Users/debugtalk/.devimages")
|
||||
-h, --help help for mount
|
||||
--list list developer disk images
|
||||
--reset unmount developer disk images
|
||||
-u, --udid string specify device by udid
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
29
docs/cmd/hrp_ios_ps.md
Normal file
29
docs/cmd/hrp_ios_ps.md
Normal file
@@ -0,0 +1,29 @@
|
||||
## hrp ios ps
|
||||
|
||||
show running processes
|
||||
|
||||
```
|
||||
hrp ios ps [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-a, --all print all processes including system processes
|
||||
-h, --help help for ps
|
||||
-u, --udid string specify device by udid
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
28
docs/cmd/hrp_ios_reboot.md
Normal file
28
docs/cmd/hrp_ios_reboot.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## hrp ios reboot
|
||||
|
||||
reboot ios device
|
||||
|
||||
```
|
||||
hrp ios reboot [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for reboot
|
||||
-u, --udid string specify device by udid
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
27
docs/cmd/hrp_ios_tunnel.md
Normal file
27
docs/cmd/hrp_ios_tunnel.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## hrp ios tunnel
|
||||
|
||||
tunnel start
|
||||
|
||||
```
|
||||
hrp ios tunnel [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for tunnel
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
29
docs/cmd/hrp_ios_uninstall.md
Normal file
29
docs/cmd/hrp_ios_uninstall.md
Normal file
@@ -0,0 +1,29 @@
|
||||
## hrp ios uninstall
|
||||
|
||||
uninstall package automatically
|
||||
|
||||
```
|
||||
hrp ios uninstall [flags] PACKAGE
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-b, --bundleId string bundleId to uninstall
|
||||
-h, --help help for uninstall
|
||||
-u, --udid string filter by device's serial
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
31
docs/cmd/hrp_ios_xctest.md
Normal file
31
docs/cmd/hrp_ios_xctest.md
Normal file
@@ -0,0 +1,31 @@
|
||||
## hrp ios xctest
|
||||
|
||||
run xctest
|
||||
|
||||
```
|
||||
hrp ios xctest [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-b, --bundleID string specify ios bundleID (default "com.gtf.wda.runner.xctrunner")
|
||||
-h, --help help for xctest
|
||||
-t, --testRunnerBundleID string specify ios testRunnerBundleID (default "com.gtf.wda.runner.xctrunner")
|
||||
-u, --udid string specify ios device's UDID
|
||||
-x, --xctestConfig string specify ios xctestConfig (default "GtfWdaRunner.xctest")
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp ios](hrp_ios.md) - simple utils for ios device management
|
||||
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
@@ -12,8 +12,16 @@ hrp pytest $path ... [flags]
|
||||
-h, --help help for pytest
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
@@ -32,8 +32,16 @@ hrp run $path... [flags]
|
||||
-s, --save-tests save tests summary
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
@@ -4,7 +4,7 @@ start hrp server
|
||||
|
||||
### Synopsis
|
||||
|
||||
start hrp server. exec automation by http
|
||||
start hrp server, call httprunner by HTTP
|
||||
|
||||
```
|
||||
hrp server start [flags]
|
||||
@@ -13,12 +13,21 @@ hrp server start [flags]
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for server
|
||||
-p, --port int Port to run the server on (default 8082)
|
||||
-h, --help help for server
|
||||
-c, --mcp-config string path to the MCP config file (default "$HOME/.hrp/mcp.json")
|
||||
-p, --port int port to run the server on (default 8082)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
@@ -17,8 +17,16 @@ hrp startproject $project_name [flags]
|
||||
--py generate hashicorp python plugin (default true)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
@@ -12,8 +12,16 @@ hrp wiki [flags]
|
||||
-h, --help help for wiki
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
--log-json set log to json format (default colorized console)
|
||||
-l, --log-level string set log level (default "INFO")
|
||||
--venv string specify python3 venv path
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance
|
||||
|
||||
###### Auto generated by spf13/cobra on 9-Nov-2024
|
||||
###### Auto generated by spf13/cobra on 24-Apr-2025
|
||||
|
||||
@@ -1 +1 @@
|
||||
v5.0.0-beta-2504242112
|
||||
v5.0.0-beta-2504242231
|
||||
|
||||
Reference in New Issue
Block a user