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

post request zentao with some useful data

上级 b73534b5
......@@ -17,5 +17,5 @@ func RunUnitTest(cmdStr string) {
report := testingService.GenUnitTestReport(cases, classNameMaxWidth, startTime, endTime)
zentaoService.CommitTestResult(report)
zentaoService.CommitTestResult(report, 0)
}
package zentaoService
import (
"encoding/json"
"github.com/bitly/go-simplejson"
"github.com/easysoft/zentaoatf/src/model"
"github.com/easysoft/zentaoatf/src/service/client"
......@@ -27,6 +28,9 @@ func CommitTestResult(report model.TestReport, testTaskId int) {
url := conf.Url + zentaoUtils.GenApiUri("unittest", "commitResult", "")
logUtils.Screen(url)
reportJson, _ := json.Marshal(report)
logUtils.Screen(string(reportJson))
resp, ok := client.PostObject(url, report)
if ok {
......
文件模式从 100644 更改为 100755
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册