mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-07 05:53:00 +08:00
feat: add MCP config support to hrp run command with priority handling
This commit is contained in:
@@ -35,6 +35,7 @@ var (
|
||||
saveTests bool
|
||||
genHTMLReport bool
|
||||
caseTimeout float32
|
||||
runMCPConfigPath string // MCP config path for run command
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -46,6 +47,7 @@ func init() {
|
||||
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)")
|
||||
CmdRun.Flags().StringVar(&runMCPConfigPath, "mcp-config", "", "path to the MCP config file")
|
||||
}
|
||||
|
||||
func makeHRPRunner() *hrp.HRPRunner {
|
||||
@@ -71,5 +73,8 @@ func makeHRPRunner() *hrp.HRPRunner {
|
||||
if proxyUrl != "" {
|
||||
runner.SetProxyUrl(proxyUrl)
|
||||
}
|
||||
if runMCPConfigPath != "" {
|
||||
runner.SetMCPConfigPath(runMCPConfigPath)
|
||||
}
|
||||
return runner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user