提交 c36f7ca9 编写于 作者: Z zhaoke

fix unit test issue.

上级 7436d66e
......@@ -25,7 +25,7 @@ type CbSuite struct {
func (s *CbSuite) BeforeEach(t provider.T) {
t.ID("1591")
t.AddSubSuite("命令行-提交失败结果为禅道中缺陷")
commonTestHelper.ReplaceLabel(t, "命令行-提交失败结果为禅道中缺陷")
}
func (s *CbSuite) TestCbSuite(t provider.T) {
t.Require().Equal("Success", testCb())
......
......@@ -33,7 +33,7 @@ type CiSuite struct {
func (s *CiSuite) BeforeEach(t provider.T) {
t.ID("5431")
t.AddSubSuite("命令行-同步用例信息到禅道")
commonTestHelper.ReplaceLabel(t, "命令行-同步用例信息到禅道")
}
func (s *CiSuite) TestCiSuite(t provider.T) {
t.Require().Equal("Success", testCi())
......
......@@ -2,13 +2,14 @@ package main
import (
"fmt"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
"os"
"regexp"
"runtime"
"testing"
"time"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
expect "github.com/easysoft/zentaoatf/pkg/lib/expect"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
......@@ -24,7 +25,7 @@ type CleanSuite struct {
func (s *CleanSuite) BeforeEach(t provider.T) {
t.ID("1595")
t.AddSubSuite("命令行-清除测试日志")
commonTestHelper.ReplaceLabel(t, "命令行-清除测试日志")
}
func (s *CleanSuite) TestCleanSuite(t provider.T) {
t.Require().Equal("Success", testClean())
......
......@@ -56,7 +56,7 @@ type CoSuite struct {
func (s *CoSuite) BeforeEach(t provider.T) {
t.ID("1580")
t.AddSubSuite("命令行-co")
commonTestHelper.ReplaceLabel(t, "命令行-从禅道同步用例")
if runtime.GOOS == "windows" {
productDir = ".\\product1"
......
......@@ -28,12 +28,11 @@ type CrSuite struct {
func (s *CrSuite) BeforeEach(t provider.T) {
t.ID("1590")
t.AddSubSuite("命令行-提交测试结果到禅道")
commonTestHelper.ReplaceLabel(t, "命令行-提交测试结果到禅道")
}
func (s *CrSuite) TestAutoCr(t provider.T) {
t.ID("7558")
t.AddSubSuite("命令行-提交测试结果到禅道免确认")
caseInfo := apiTest.GetCaseResult(1)
lastId := caseInfo["Id"].(int64)
......@@ -60,7 +59,6 @@ func (s *CrSuite) TestAutoCr(t provider.T) {
func (s *CrSuite) TestCr(t provider.T) {
t.ID("1590")
t.AddSubSuite("命令行-提交测试结果到禅道")
caseInfo := apiTest.GetCaseResult(1)
lastId := caseInfo["Id"].(int64)
......
......@@ -26,7 +26,7 @@ type ExpectSuite struct {
func (s *ExpectSuite) BeforeEach(t provider.T) {
t.ID("5429")
t.AddSubSuite("命令行-生成独立的期待结果文件")
commonTestHelper.ReplaceLabel(t, "命令行-生成独立的期待结果文件")
}
func (s *ExpectSuite) TestExpectSuite(t provider.T) {
t.Require().Equal("Success", testExpect())
......
......@@ -26,7 +26,7 @@ type ExtractSuite struct {
func (s *ExtractSuite) BeforeEach(t provider.T) {
t.ID("5430")
t.AddSubSuite("命令行-提取分散在脚本中的注释")
commonTestHelper.ReplaceLabel(t, "命令行-提取分散在脚本中的注释")
}
func (s *ExtractSuite) TestExtractSuite(t provider.T) {
t.Require().Equal("Success", testExtract())
......
......@@ -22,7 +22,7 @@ type HelpSuite struct {
func (s *HelpSuite) BeforeEach(t provider.T) {
t.ID("1578")
t.AddSubSuite("命令行-查看帮助")
commonTestHelper.ReplaceLabel(t, "命令行-查看帮助")
}
func (s *HelpSuite) TestHelpSuite(t provider.T) {
t.Require().Equal("Success", testHelp())
......
......@@ -19,7 +19,7 @@ type ListSuite struct {
func (s *ListSuite) BeforeEach(t provider.T) {
t.ID("1592")
t.AddSubSuite("命令行-查看脚本列表")
commonTestHelper.ReplaceLabel(t, "命令行-查看脚本列表")
}
func (s *ListSuite) TestListSuite(t provider.T) {
t.Require().Equal("Success", testLs(commonTestHelper.GetZtfPath()+fmt.Sprintf(" list %scmd/test/demo", constTestHelper.RootPath), regexp.MustCompile("Found 7 test cases|发现7个用例")))
......
......@@ -41,7 +41,7 @@ func (s *RunSuite) BeforeEach(t provider.T) {
} else {
os.RemoveAll(fmt.Sprintf("%s/cmd/test/demo/php/product1", constTestHelper.RootPath))
}
t.AddSubSuite("命令行-run")
commonTestHelper.ReplaceLabel(t, "命令行-运行脚本")
}
func (s *RunSuite) TestRunZtfFile(t provider.T) {
......
......@@ -14,6 +14,7 @@ import (
"strings"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
fileUtils "github.com/easysoft/zentaoatf/pkg/lib/file"
"github.com/go-git/go-git/v5"
......@@ -31,7 +32,7 @@ func (s *RunUnitSuit) BeforeEach(t provider.T) {
} else {
os.RemoveAll(fmt.Sprintf("%s/cmd/test/demo/php/product1", constTestHelper.RootPath))
}
t.AddSubSuite("命令行-run")
commonTestHelper.ReplaceLabel(t, "命令行-运行单元测试")
}
func (s *RunUnitSuit) TestRunTestng(t provider.T) {
......
......@@ -46,7 +46,7 @@ type SetSuite struct {
func (s *SetSuite) BeforeEach(t provider.T) {
t.ID("1579")
t.AddSubSuite("命令行-set")
commonTestHelper.ReplaceLabel(t, "命令行-设置")
}
func (s *SetSuite) TestChSetSuite(t provider.T) {
......@@ -110,7 +110,7 @@ func testSet(language string) (ret string) {
for _, lang := range langArray {
out, err := child.Expect(regexp.MustCompile("Please set script|请设置"), time.Second*5)
if err != nil {
return fmt.Sprintf("expect %s, actual %s", lang, err.Error())
return fmt.Sprintf("expect Please set script|请设置%s, actual %s", lang, err.Error())
}
sendMsg := ""
......
......@@ -22,7 +22,7 @@ type VersionSuite struct {
func (s *VersionSuite) BeforeEach(t provider.T) {
t.ID("7534")
t.AddSubSuite("命令行-查看ZTF版本")
commonTestHelper.ReplaceLabel(t, "命令行-查看ZTF版本")
}
func (s *VersionSuite) TestVersionSuite(t provider.T) {
t.Require().Equal("Success", testVersion())
......
......@@ -19,7 +19,7 @@ type ViewSuite struct {
func (s *ViewSuite) BeforeEach(t provider.T) {
t.ID("1593")
t.AddSubSuite("命令行-查看脚本详情")
commonTestHelper.ReplaceLabel(t, "命令行-查看脚本详情")
}
func (s *ViewSuite) TestViewSuite(t provider.T) {
t.Require().Equal("Success", testView(commonTestHelper.GetZtfPath()+fmt.Sprintf(" view %scmd/test/demo/1_string_match_fail.php", constTestHelper.RootPath), regexp.MustCompile("check string matches pattern")))
......
package commonTestHelper
import (
"github.com/ozontech/allure-go/pkg/allure"
"github.com/ozontech/allure-go/pkg/framework/provider"
)
func ReplaceLabel(t provider.T, value string) {
label := allure.Label{Name: "suite", Value: value}
t.ReplaceLabel(&label)
}
......@@ -2,6 +2,9 @@ package main
import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -10,7 +13,6 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"github.com/tidwall/gjson"
"testing"
)
const (
......@@ -28,7 +30,7 @@ type BugApiSuite struct {
func (s *BugApiSuite) BeforeEach(t provider.T) {
t.ID("0")
t.AddSubSuite("BugApi")
commonTestHelper.ReplaceLabel(t, "BugApi")
}
func (s *BugApiSuite) TestBugListApi(t provider.T) {
......
......@@ -4,6 +4,7 @@ import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -25,7 +26,7 @@ type CaseApiSuite struct {
}
func (s *CaseApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("CaseApi")
commonTestHelper.ReplaceLabel(t, "CaseApi")
}
func (s *CaseApiSuite) TestCaseListApi(t provider.T) {
......
......@@ -2,6 +2,9 @@ package main
import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -9,7 +12,6 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"github.com/tidwall/gjson"
"testing"
)
func TestModuleApi(t *testing.T) {
......@@ -21,7 +23,7 @@ type ModuleApiSuite struct {
}
func (s *ModuleApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("ModuleApi")
commonTestHelper.ReplaceLabel(t, "ModuleApi")
}
func (s *ModuleApiSuite) TestModuleListForCaseApi(t provider.T) {
......
......@@ -2,6 +2,9 @@ package main
import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -9,7 +12,6 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"github.com/tidwall/gjson"
"testing"
)
func TestProductApi(t *testing.T) {
......@@ -21,7 +23,7 @@ type ProductApiSuite struct {
}
func (s *ProductApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("ProductApi")
commonTestHelper.ReplaceLabel(t, "ProductApi")
}
func (s *ProductApiSuite) TestProductListApi(t provider.T) {
......
......@@ -3,6 +3,10 @@ package main
import (
"encoding/json"
"fmt"
"log"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -12,8 +16,6 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"github.com/tidwall/gjson"
"log"
"testing"
)
func TestResultApi(t *testing.T) {
......@@ -25,7 +27,7 @@ type ResultApiSuite struct {
}
func (s *ResultApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("SuiteApi")
commonTestHelper.ReplaceLabel(t, "SuiteApi")
}
func (s *ResultApiSuite) TestResultSubmitZtfResultApi(t provider.T) {
......
......@@ -2,6 +2,9 @@ package main
import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -9,7 +12,6 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"github.com/tidwall/gjson"
"testing"
)
func TestSuiteApi(t *testing.T) {
......@@ -21,7 +23,7 @@ type SuiteApiSuite struct {
}
func (s *SuiteApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("SuiteApi")
commonTestHelper.ReplaceLabel(t, "SuiteApi")
}
func (s *SuiteApiSuite) TestSuiteListApi(t provider.T) {
......
......@@ -2,6 +2,9 @@ package main
import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/easysoft/zentaoatf/cmd/test/restapi/config"
......@@ -9,7 +12,6 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"github.com/tidwall/gjson"
"testing"
)
func TestTaskApi(t *testing.T) {
......@@ -21,7 +23,7 @@ type TaskApiSuite struct {
}
func (s *TaskApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("TaskApi")
commonTestHelper.ReplaceLabel(t, "TaskApi")
}
func (s *TaskApiSuite) TestTaskListApi(t provider.T) {
......
package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
httpHelper "github.com/easysoft/zentaoatf/cmd/test/helper/http"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"testing"
)
func TestTokenApi(t *testing.T) {
......@@ -16,7 +18,7 @@ type TokenApiSuite struct {
}
func (s *TokenApiSuite) BeforeEach(t provider.T) {
t.AddSubSuite("TokenApi")
commonTestHelper.ReplaceLabel(t, "TokenApi")
}
func (s *TokenApiSuite) TestTokenApi(t provider.T) {
......
......@@ -4,6 +4,7 @@ import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
"github.com/easysoft/zentaoatf/cmd/test/ui/conf"
......@@ -15,7 +16,7 @@ import (
func ScriptBug(t provider.T) {
t.ID("5747")
t.AddParentSuite("查看bug列表")
commonTestHelper.ReplaceLabel(t, "客户端-查看bug列表")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -44,7 +45,7 @@ func ScriptBug(t provider.T) {
func ScriptsBug(t provider.T) {
t.ID("5748")
t.AddParentSuite("查看bug列表")
commonTestHelper.ReplaceLabel(t, "客户端-查看bug列表")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -3,6 +3,7 @@ package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
plwConf "github.com/easysoft/zentaoatf/cmd/test/ui/conf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -13,7 +14,7 @@ import (
func CreateInterpreter(t provider.T) {
t.ID("5744")
t.AddParentSuite("管理解析器")
commonTestHelper.ReplaceLabel(t, "客户端-管理解析器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -50,7 +51,7 @@ func CreateInterpreter(t provider.T) {
func EditInterpreter(t provider.T) {
t.ID("5745")
t.AddParentSuite("管理解析器")
commonTestHelper.ReplaceLabel(t, "客户端-管理解析器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -71,7 +72,7 @@ func EditInterpreter(t provider.T) {
func DeleteInterpreter(t provider.T) {
t.ID("5465")
t.AddParentSuite("管理解析器")
commonTestHelper.ReplaceLabel(t, "客户端-管理解析器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -3,6 +3,7 @@ package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
"github.com/ozontech/allure-go/pkg/framework/provider"
......@@ -11,7 +12,7 @@ import (
func SwitchLanguage(t provider.T) {
t.ID("5464")
t.AddParentSuite("设置界面语言")
commonTestHelper.ReplaceLabel(t, "客户端-设置界面语言")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -3,6 +3,7 @@ package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
plwConf "github.com/easysoft/zentaoatf/cmd/test/ui/conf"
......@@ -13,7 +14,7 @@ import (
func CollapseLog(t provider.T) {
t.ID("5502")
t.AddParentSuite("脚本执行日志")
commonTestHelper.ReplaceLabel(t, "客户端-管理脚本执行日志")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -42,7 +43,7 @@ func CollapseLog(t provider.T) {
func FullScreenLog(t provider.T) {
t.ID("5749")
t.AddParentSuite("脚本执行日志")
commonTestHelper.ReplaceLabel(t, "客户端-管理脚本执行日志")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -63,7 +64,7 @@ func FullScreenLog(t provider.T) {
func ClearLog(t provider.T) {
t.ID("7540")
t.AddParentSuite("清除测试执行日志")
commonTestHelper.ReplaceLabel(t, "客户端-管理脚本执行日志")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -83,6 +84,6 @@ func ClearLog(t provider.T) {
func TestUiLog(t *testing.T) {
runner.Run(t, "客户端-展开折叠执行日志", CollapseLog)
runner.Run(t, "客户端-最大化脚本执行日志", FullScreenLog)
runner.Run(t, "客户端-最大化管理脚本执行日志", FullScreenLog)
runner.Run(t, "客户端-清空执行日志", ClearLog)
}
......@@ -4,6 +4,7 @@ import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -14,7 +15,7 @@ import (
func SwitchProduct(t provider.T) {
t.ID("5496")
t.AddParentSuite("切换禅道产品")
commonTestHelper.ReplaceLabel(t, "客户端-切换禅道产品")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -3,6 +3,7 @@ package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
plwConf "github.com/easysoft/zentaoatf/cmd/test/ui/conf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -13,7 +14,7 @@ import (
func CreateProxy(t provider.T) {
t.ID("5740")
t.AddParentSuite("设置界面语言")
commonTestHelper.ReplaceLabel(t, "客户端-管理代理服务器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -50,7 +51,7 @@ func CreateProxy(t provider.T) {
}
func EditProxy(t provider.T) {
t.ID("5741")
t.AddParentSuite("设置界面语言")
commonTestHelper.ReplaceLabel(t, "客户端-管理代理服务器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -72,7 +73,7 @@ func EditProxy(t provider.T) {
}
func DeleteProxy(t provider.T) {
t.ID("5742")
t.AddParentSuite("设置界面语言")
commonTestHelper.ReplaceLabel(t, "客户端-管理代理服务器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -6,6 +6,7 @@ import (
"testing"
"time"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
apiTest "github.com/easysoft/zentaoatf/cmd/test/helper/zentao/api"
ztfTest "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
......@@ -19,11 +20,11 @@ import (
func Detail(t provider.T) {
t.ID("5489")
t.AddParentSuite("测试结果")
commonTestHelper.ReplaceLabel(t, "客户端-管理测试结果")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
ztfTest.SelectSite(webpage)
ztfTest.SelectSite(webpage, "")
ztfTest.ExpandWorspace(webpage)
ztfTest.RunScript(webpage, "1_string_match.php")
......@@ -55,7 +56,7 @@ func Detail(t provider.T) {
func SubmitResult(t provider.T) {
t.ID("5499")
t.AddParentSuite("测试结果")
commonTestHelper.ReplaceLabel(t, "客户端-管理测试结果")
caseInfo := apiTest.GetCaseResult(1)
lastId := caseInfo["Id"].(int64)
......@@ -86,7 +87,7 @@ func SubmitResult(t provider.T) {
func SubmitBug(t provider.T) {
t.ID("5500")
t.AddParentSuite("测试结果")
commonTestHelper.ReplaceLabel(t, "客户端-管理测试结果")
lastId := apiTest.GetLastBugId()
......@@ -108,7 +109,7 @@ func SubmitBug(t provider.T) {
func SubmitBugTwoStep(t provider.T) {
t.ID("5500")
t.AddParentSuite("测试结果")
commonTestHelper.ReplaceLabel(t, "客户端-管理测试结果")
lastId := apiTest.GetLastBugId()
......@@ -134,8 +135,8 @@ func SubmitBugTwoStep(t provider.T) {
}
func TestUiResult(t *testing.T) {
runner.Run(t, "客户端-查看测试结果详情", Detail)
runner.Run(t, "客户端-提交禅道用例脚本测试结果", SubmitResult)
runner.Run(t, "客户端-查看管理测试结果详情", Detail)
runner.Run(t, "客户端-提交禅道用例脚本管理测试结果", SubmitResult)
runner.Run(t, "客户端-提交禅道失败用例为缺陷", SubmitBug)
runner.Run(t, "客户端-提交禅道部分失败用例为缺陷", SubmitBugTwoStep)
}
......@@ -4,6 +4,7 @@ import (
"strings"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -13,7 +14,7 @@ import (
func RunReExecFailCase(t provider.T) {
t.ID("5491")
t.AddParentSuite("测试结果页面执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-结果中重新执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -54,7 +55,7 @@ func RunReExecFailCase(t provider.T) {
func RunReExecAllCase(t provider.T) {
t.ID("5750")
t.AddParentSuite("测试结果页面执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-结果中重新执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -4,6 +4,7 @@ import (
"strconv"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -16,7 +17,7 @@ var runStatisticPage playwright.Page
func RunFailStatistic(t provider.T) {
t.ID("5487")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行统计信息")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -52,7 +53,7 @@ func RunFailStatistic(t provider.T) {
func RunSuccessStatistic(t provider.T) {
t.ID("5487")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行统计信息")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -93,7 +94,7 @@ func RunSuccessStatistic(t provider.T) {
func RunBugStatistic(t provider.T) {
t.ID("5487")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行统计信息")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -19,7 +19,7 @@ import (
func RunScript(t provider.T) {
t.ID("5743")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -52,7 +52,7 @@ func RunScript(t provider.T) {
func CheckStep(t provider.T) {
t.ID("7609")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -89,7 +89,7 @@ func CheckStep(t provider.T) {
func RunScriptByRightClick(t provider.T) {
t.ID("5479")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -120,7 +120,7 @@ func RunScriptByRightClick(t provider.T) {
func RunNoInterpreterScript(t provider.T) {
t.ID("5501")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -135,7 +135,7 @@ func RunNoInterpreterScript(t provider.T) {
func RunSelectedScripts(t provider.T) {
t.ID("5481")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -173,7 +173,7 @@ func RunSelectedScripts(t provider.T) {
func RunOpenedAndLast(t provider.T) {
t.ID("5484")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -227,7 +227,7 @@ func RunOpenedAndLast(t provider.T) {
func RunAll(t provider.T) {
t.ID("5485")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
os.RemoveAll(commonTestHelper.GetZtfProductPath())
os.Remove(commonTestHelper.GetPhpWorkspacePath() + "1.php")
......@@ -268,7 +268,7 @@ func RunAll(t provider.T) {
func RunWorkspace(t provider.T) {
t.ID("5482")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -315,7 +315,7 @@ func RunWorkspace(t provider.T) {
func RunDir(t provider.T) {
t.ID("5480")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -344,7 +344,7 @@ func RunDir(t provider.T) {
func RunUseProxy(t provider.T) {
t.ID("5746")
t.AddParentSuite("执行脚本")
commonTestHelper.ReplaceLabel(t, "客户端-执行脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -46,7 +46,7 @@ func RunTestNG(t provider.T) {
shellUtils.ExeShellWithOutputInDir("mvn clean package test", testngDir)
t.ID("5432")
t.AddParentSuite("执行单元测试")
commonTestHelper.ReplaceLabel(t, "客户端-执行单元测试")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -3,6 +3,7 @@ package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -13,7 +14,7 @@ import (
func SaveScript(t provider.T) {
t.ID("5470")
t.AddParentSuite("禅道站点脚本")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
ztfTestHelper.SelectSite(webpage, "")
......@@ -42,7 +43,7 @@ func SaveScript(t provider.T) {
func ViewScript(t provider.T) {
t.ID("5469")
t.AddParentSuite("禅道站点脚本")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
ztfTestHelper.SelectSite(webpage, "")
......@@ -54,7 +55,7 @@ func ViewScript(t provider.T) {
func SwitchScript(t provider.T) {
t.ID("7583")
t.AddParentSuite("脚本切换和关闭")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点脚本")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -79,7 +80,7 @@ func SwitchScript(t provider.T) {
}
func TestUiScript(t *testing.T) {
runner.Run(t, "客户端-编辑保存禅道站点脚本", SaveScript)
runner.Run(t, "客户端-显示禅道站点脚本", ViewScript)
runner.Run(t, "客户端-切换禅道站点脚本", SwitchScript)
runner.Run(t, "客户端-编辑保存管理禅道站点脚本", SaveScript)
runner.Run(t, "客户端-显示管理禅道站点脚本", ViewScript)
runner.Run(t, "客户端-切换管理禅道站点脚本", SwitchScript)
}
......@@ -3,6 +3,7 @@ package main
import (
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
plwConf "github.com/easysoft/zentaoatf/cmd/test/ui/conf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -13,7 +14,7 @@ import (
func CreateServer(t provider.T) {
t.ID("5737")
t.AddParentSuite("管理服务器")
commonTestHelper.ReplaceLabel(t, "客户端-管理服务器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -34,7 +35,7 @@ func CreateServer(t provider.T) {
func EditServer(t provider.T) {
t.ID("5738")
t.AddParentSuite("管理服务器")
commonTestHelper.ReplaceLabel(t, "客户端-管理服务器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -55,7 +56,7 @@ func EditServer(t provider.T) {
func DeleteServer(t provider.T) {
t.ID("5739")
t.AddParentSuite("管理服务器")
commonTestHelper.ReplaceLabel(t, "客户端-管理服务器")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -4,6 +4,7 @@ import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
plwConf "github.com/easysoft/zentaoatf/cmd/test/ui/conf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -14,7 +15,7 @@ import (
func CreateSite(t provider.T) {
t.ID("5466")
t.AddParentSuite("配置禅道站点")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -38,7 +39,7 @@ func CreateSite(t provider.T) {
func CreateSiteWithFullUrl(t provider.T) {
t.ID("7575")
t.AddParentSuite("禅道站点URL格式兼容")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -56,13 +57,13 @@ func CreateSiteWithFullUrl(t provider.T) {
locator.FillNth(3, constTestHelper.ZentaoPassword)
webpage.Click("text=确定")
webpage.WaitForSelector("fmt.Sprintf(".list-item-content span:has-text('%s')", constTestHelper.SiteName)")
webpage.WaitForSelector(fmt.Sprintf(".list-item-content span:has-text('%s')", constTestHelper.SiteName))
locator = webpage.Locator(".list-item-content span", playwright.PageLocatorOptions{HasText: constTestHelper.SiteName})
}
func EditSite(t provider.T) {
t.ID("5466")
t.AddParentSuite("配置禅道站点")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -94,11 +95,11 @@ func EditSite(t provider.T) {
webpage.Click("#siteFormModal>>.modal-action>>span:has-text(\"确定\")")
webpage.WaitForSelector(fmt.Sprintf(".list-item-content span:has-text('%s-update')", constTestHelper.SiteName))
locator = webpage.Locator(".list-item-content span", playwright.PageLocatorOptions{HasText: constTestHelper.SiteName+"-update"})
locator = webpage.Locator(".list-item-content span", playwright.PageLocatorOptions{HasText: constTestHelper.SiteName + "-update"})
}
func DeleteSite(t provider.T) {
t.ID("5466")
t.AddParentSuite("配置禅道站点")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -113,7 +114,7 @@ func DeleteSite(t provider.T) {
webpage.WaitForTimeout(1000)
webpage.Click(":nth-match(.modal-action > button, 1)")
webpage.WaitForSelector("fmt.Sprintf(".list-item-content span:has-text('%s')", constTestHelper.SiteName)", playwright.PageWaitForSelectorOptions{State: playwright.WaitForSelectorStateDetached})
webpage.WaitForSelector(fmt.Sprintf(".list-item-content span:has-text('%s')", constTestHelper.SiteName), playwright.PageWaitForSelectorOptions{State: playwright.WaitForSelectorStateDetached})
plwConf.DisableErr()
defer plwConf.EnableErr()
......
......@@ -4,6 +4,7 @@ import (
"fmt"
"testing"
commonTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/common"
constTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/conf"
ztfTestHelper "github.com/easysoft/zentaoatf/cmd/test/helper/ztf"
plwHelper "github.com/easysoft/zentaoatf/cmd/test/ui/helper"
......@@ -13,7 +14,7 @@ import (
func FilterDir(t provider.T) {
t.ID("5494")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-过滤禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -35,7 +36,7 @@ func FilterDir(t provider.T) {
}
func FilterSuite(t provider.T) {
t.ID("5495")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-过滤禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -58,7 +59,7 @@ func FilterSuite(t provider.T) {
}
func ByModule(t provider.T) {
t.ID("5493")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-过滤禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -79,7 +80,7 @@ func ByModule(t provider.T) {
}
func FilterTask(t provider.T) {
t.ID("5496")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-过滤禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -29,7 +29,7 @@ var (
func MangeWorkspace(t provider.T) {
t.ID("5468")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -45,7 +45,7 @@ func MangeWorkspace(t provider.T) {
func MangeLocalWorkspace(t provider.T) {
t.ID("5467")
t.AddParentSuite("管理本地站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理本地站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -204,7 +204,7 @@ func syncCaseFromZentaoSuite(t provider.T) {
func SyncTwoCaseFromZentao(t provider.T) {
t.ID("5752")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -236,7 +236,7 @@ func SyncTwoCaseFromZentao(t provider.T) {
func SyncToZentao(t provider.T) {
t.ID("5431")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
//update script title
scriptPath := filepath.Join(workspacePath, "2_webpage_extract.php")
......@@ -266,7 +266,7 @@ func SyncToZentao(t provider.T) {
func Copy(t provider.T) {
t.ID("5474")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
fileUtils.MkDirIfNeeded(syncDir)
defer os.RemoveAll(syncDir)
......@@ -299,7 +299,7 @@ func Copy(t provider.T) {
func ClipAndCopyDir(t provider.T) {
t.ID("5473,7593")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
CopyDir(t)
ClipDir(t)
......@@ -377,7 +377,7 @@ func ClipDir(t provider.T) {
func CreateScript(t provider.T) {
// t.ID("7596")
// t.AddParentSuite("管理禅道站点下工作目录")
// commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -400,7 +400,7 @@ func CreateScript(t provider.T) {
func RenameScript(t provider.T) {
t.ID("7596")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
fileUtils.MkDirIfNeeded(syncDir)
......@@ -431,7 +431,7 @@ func RenameScript(t provider.T) {
func CreateDir(t provider.T) {
// t.ID("7596")
// t.AddParentSuite("管理禅道站点下工作目录")
// commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......@@ -454,7 +454,7 @@ func CreateDir(t provider.T) {
func RenameDir(t provider.T) {
t.ID("7595")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
fileUtils.MkDirIfNeeded(syncDir)
defer os.RemoveAll(syncDir)
......@@ -481,7 +481,7 @@ func RenameDir(t provider.T) {
func DeleteScript(t provider.T) {
t.ID("5478")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
fileUtils.MkDirIfNeeded(syncDir)
scriptPath := filepath.Join(workspacePath, "product1", "1.php")
......@@ -514,7 +514,7 @@ func DeleteScript(t provider.T) {
}
func DeleteDir(t provider.T) {
t.ID("5477")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
fileUtils.MkDirIfNeeded(syncDir)
defer os.RemoveAll(syncDir)
......@@ -562,7 +562,7 @@ func DeleteWorkspace(t provider.T, webpage plwHelper.Webpage) {
}
func Clip(t provider.T) {
t.ID("5476")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
fileUtils.MkDirIfNeeded(syncDir)
scriptPath := filepath.Join(workspacePath, "product1", "1.php")
......@@ -595,7 +595,7 @@ func Clip(t provider.T) {
func Collapse(t provider.T) {
t.ID("5472")
t.AddParentSuite("管理禅道站点下工作目录")
commonTestHelper.ReplaceLabel(t, "客户端-管理禅道站点下工作目录")
webpage, _ := plwHelper.OpenUrl(constTestHelper.ZtfUrl, t)
defer webpage.Close()
......
......@@ -4,7 +4,6 @@ import (
"encoding/json"
"encoding/xml"
"fmt"
"github.com/jinzhu/copier"
"io/ioutil"
"os"
"path"
......@@ -15,6 +14,8 @@ import (
"strings"
"time"
"github.com/jinzhu/copier"
commConsts "github.com/easysoft/zentaoatf/internal/pkg/consts"
commDomain "github.com/easysoft/zentaoatf/internal/pkg/domain"
websocketHelper "github.com/easysoft/zentaoatf/internal/pkg/helper/websocket"
......@@ -147,7 +148,7 @@ func genUnitFailedMsg(failedCaseLines []string, failedCaseLinesDesc []string) st
msg := divider
msg += "\n" + color.New(color.Bold, color.FgHiWhite).Sprint(i118Utils.Sprintf("failed_scripts")) + "\n"
msg += strings.Join(failedCaseLines, "\n")
msg += strings.Join(failedCaseLines, "\n") + "\n"
msg += strings.Join(failedCaseLinesDesc, "\n")
msg += "\n\n" + divider
......
......@@ -86,8 +86,8 @@ func ValidateCaseResult(execParams commDomain.ExecParams, langType string,
statusWithColor, status := GenStatusTxt(csResult.Status)
msg := fmt.Sprintf(format, execParams.ScriptIdx+1, len(execParams.CasesToRun), status, path, csTitle, execParams.Secs)
msgWithColor := fmt.Sprintf(format, execParams.ScriptIdx+1, len(execParams.CasesToRun), statusWithColor, path, csTitle, execParams.Secs)
msg := fmt.Sprintf(format, len(execParams.Report.FuncResult), len(execParams.CasesToRun), status, path, csTitle, execParams.Secs)
msgWithColor := fmt.Sprintf(format, len(execParams.Report.FuncResult), len(execParams.CasesToRun), statusWithColor, path, csTitle, execParams.Secs)
// print each case result
if commConsts.ExecFrom == commConsts.FromClient {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册