提交 636654e1 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

support set more than one id for unit testcase

上级 6f517b2f
......@@ -25,7 +25,7 @@ func (s *ProductApiSuite) BeforeEach(t provider.T) {
}
func (s *ProductApiSuite) TestProductListApi(t provider.T) {
t.ID("7620")
t.ID("7639")
//t.ID("1")
token := httpHelper.Login()
......@@ -40,7 +40,7 @@ func (s *ProductApiSuite) TestProductListApi(t provider.T) {
}
func (s *ProductApiSuite) TestProductDetailApi(t provider.T) {
t.ID("7621")
t.ID("7640")
//t.ID("2")
token := httpHelper.Login()
......
......@@ -48,7 +48,7 @@ func (s *ResultApiSuite) TestResultSubmitZtfResultApi(t provider.T) {
// check case result
latestIdNew := getCaseResult(config.CaseId)["latestId"].(int64)
t.Require().Equal(latestIdNew, latestId+1, "submit result failed")
t.Require().Greater(latestIdNew, latestId, "submit result failed")
// check task record
tasksBytes := listTask(token)
......
......@@ -100,21 +100,23 @@ func doTest(testToRun string) (err error) {
req := serverDomain.TestSet{
WorkspacePath: testPath,
Cmd: fmt.Sprintf("go test restapi/%s -v", testToRun),
Cmd: fmt.Sprintf("go test %s -v", testToRun),
TestTool: commConsts.GoTest,
}
fmt.Println(testPath, req.Cmd)
// exec testing
report := execSuite(req, "restapi")
report.ProductId = 82
// submit result for test
if runFrom != "jenkins" {
config := commDomain.WorkspaceConf{
Url: "http://110.42.146.127:50080",
Username: "admin",
Password: "P2ssw0rd"}
err = zentaoHelper.CommitResult(report, 1, 0, config, nil)
Url: "https://back.zcorp.cc/pms",
Username: "chenqi",
Password: "th2ISxOVXcoUiMLazk1b"}
err = zentaoHelper.CommitResult(report, report.ProductId, 0, config, nil)
}
return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册