提交 2ef5fe08 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

support set more than one id for unit testcase

上级 76f297fc
......@@ -90,11 +90,11 @@ func main() {
flagSet.BoolVar(&commConsts.AutoCommitBug, "cb", false, "")
flagSet.IntVar(&commConsts.BatchCount, "C", 1, "")
flagSet.BoolVar(&noNeedConfirm, "y", false, "")
flagSet.BoolVar(&commConsts.Verbose, "verbose", false, "")
flagSet.BoolVar(&commConsts.AutoExtract, "ext", true, "")
flagSet.BoolVar(&withCode, "withCode", false, "")
flagSet.StringVar(&commConsts.AllureReportDir, "allureReportDir", "", "")
flagSet.BoolVar(&commConsts.Verbose, "verbose", false, "")
if len(os.Args) == 1 {
os.Args = append(os.Args, "run", ".")
......
......@@ -46,6 +46,8 @@ func main() {
flagSet.StringVar(&testToRun, "testToRun", "", "")
flagSet.StringVar(&testToRun, "t", "", "")
flagSet.BoolVar(&commConsts.Verbose, "verbose", false, "")
testing.Init()
flagSet.Parse(os.Args[1:])
......@@ -106,7 +108,10 @@ func doTest(testToRun string) (err error) {
report := execSuite(req, "restapi")
// submit result
config := commDomain.WorkspaceConf{Url: constTestHelper.ZentaoSiteUrl + "/", Password: constTestHelper.ZentaoPassword, Username: constTestHelper.ZentaoUsername}
config := commDomain.WorkspaceConf{
Url: "http://110.42.146.127:50080",
Username: "admin",
Password: "P2ssw0rd"}
err = zentaoHelper.CommitResult(report, 1, 0, config, nil)
return
......@@ -139,8 +144,5 @@ func execSuite(req serverDomain.TestSet, unitType string) (report commDomain.Ztf
report = execHelper.GenUnitTestReport(req, startTime.Unix(), entTime.Unix(), nil, nil)
fmt.Printf("执行:%v, 成功:%v,失败:%v \n", report.Total, report.Pass, report.Fail)
config := commDomain.WorkspaceConf{Url: constTestHelper.ZentaoSiteUrl + "/", Password: constTestHelper.ZentaoPassword, Username: constTestHelper.ZentaoUsername}
zentaoHelper.CommitResult(report, 1, 0, config, nil)
return report
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册