Documentation ¶
Index ¶
- Constants
- Variables
- func AddInterpreterIfExist(conf *commDomain.WorkspaceConf, lang string) bool
- func CheckCaseResult(execParams commDomain.ExecParams, logs string, wsMsg *websocket.Message, ...)
- func Compare(expect string, actual string) bool
- func CompareFloat(actualFloat, expectFloat float64, symbol string) bool
- func CompareRange(expect string, actual string) bool
- func Contain(expect, actual string, langType string) bool
- func ConvertAllureResult(cases []commDomain.AllureCase) (testSuites []commDomain.UnitTestSuite)
- func ConvertCppUnitResult(cppunitSuite commDomain.CppUnitSuites) commDomain.UnitTestSuite
- func ConvertCyResult(result commDomain.CypressTestsuites) commDomain.UnitTestSuite
- func ConvertGTestResult(gTestSuite commDomain.GTestSuites) commDomain.UnitTestSuite
- func ConvertJestResult(jestSuite commDomain.JestSuites) commDomain.UnitTestSuite
- func ConvertK6Result(results []interface{}, failedCaseIdToThresholdMap map[string]string) commDomain.UnitTestSuite
- func ConvertPhpUnitResult(phpUnitSuite commDomain.PhpUnitSuites) commDomain.UnitTestSuite
- func ConvertPyTestResult(pytestSuites commDomain.PyTestSuites) commDomain.UnitTestSuite
- func ConvertQTestResult(qTestSuite commDomain.QTestSuites) commDomain.UnitTestSuite
- func ConvertRobotResult(result commDomain.RobotResult) commDomain.UnitTestSuite
- func ExeScripts(execParams commDomain.ExecParams, ch chan int, wsMsg *websocket.Message)
- func Exec(ch chan int, req serverDomain.ExecReq, msg *websocket.Message) (err error)
- func ExecCases(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) (report commDomain.ZtfReport, pathMaxWidth int, err error)
- func ExecModule(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) (report commDomain.ZtfReport, pathMaxWidth int, err error)
- func ExecScan() (report *commDomain.ZapReport, err error)
- func ExecScript(execParams commDomain.ExecParams, ch chan int, wsMsg *websocket.Message, ...)
- func ExecSuite(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) (report commDomain.ZtfReport, pathMaxWidth int, err error)
- func ExecTask(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) (report commDomain.ZtfReport, pathMaxWidth int, err error)
- func ExecUnit(ch chan int, req serverDomain.TestSet, wsMsg *websocket.Message) (err error)
- func ExecZapScan(req serverDomain.TestSet) (err error)
- func ExpandCaseForMultiIds(suites *[]commDomain.UnitTestSuite)
- func FilterCases(cases []string, conf *commDomain.WorkspaceConf) (casesToRun, casesToIgnore []string)
- func GenJacocoCovReport() (report *commDomain.JacocoResult)
- func GenRunResult(report commDomain.ZtfReport) (result, resultClient, resultLog string)
- func GenStatusTxt(status commConsts.ResultStatus) (colorTxt string, txt string)
- func GenUnitReport(cases []commDomain.UnitResult, report *commDomain.ZtfReport, duration float32) (failedCaseLines, failedCaseLinesDesc []string)
- func GenUnitTestReport(req serverDomain.TestSet, startTime, endTime int64, ch chan int, ...) (report commDomain.ZtfReport)
- func GenZTFReport(report commDomain.ZtfReport) (failedCount int, failedCaseLinesWithCheckpoint []string)
- func GenZTFTestReport(report commDomain.ZtfReport, pathMaxWidth int, workspacePath string, ...)
- func GetAllureCaseId(cs commDomain.AllureCase) (ids string)
- func GetAllureCaseSuiteName(cs commDomain.AllureCase) (name string)
- func GetAllureSuites(resultDir string, startTime int64) (suites []commDomain.UnitTestSuite)
- func GetK6FailCaseInSummary(content string) (ret map[string]string)
- func GetLangInterpreter(language string) (list []map[string]interface{}, err error)
- func GetLangInterpreterUnix(language string) (list []map[string]interface{}, err error)
- func GetLangInterpreterWin(language string) (list []map[string]interface{}, err error)
- func GetNoEmptyLines(text, find string, getOne bool) (ret []string)
- func GetRunning() (val bool)
- func GetSuiteFiles(resultDir string, startTime int64, testTool commConsts.TestTool) (resultFiles []string, err error)
- func GetTestSuite(logFile string, testTool commConsts.TestTool, ...) (testSuite commDomain.UnitTestSuite, err error)
- func InitZap(req serverDomain.TestSet)
- func KillProcessByUUID(uuid string)
- func Logic(expect, actual, langType string) bool
- func Match(expect string, actual string) bool
- func MatchScene(expect, actual, langType string) (pass bool)
- func ParserUnitTestResult(testSuites []commDomain.UnitTestSuite) (cases []commDomain.UnitResult, classNameMaxWidth int, dur float32)
- func PopulateTestSetPropsWithParentRequest(req *serverDomain.ExecReq)
- func PrintErrMsg(key string, err error, wsMsg *websocket.Message) (stdOutput string, errOutput string)
- func RetrieveRobotTests(suite commDomain.RobotSuite, tests *[]commDomain.RobotTest)
- func RetrieveUnitResult(testset serverDomain.TestSet, startTime int64) (suites []commDomain.UnitTestSuite)
- func RunFile(filePath, workspacePath string, conf commDomain.WorkspaceConf, ch chan int, ...) (stdOutput string, errOutput string)
- func RunUnitTest(ch chan int, cmdStr, workspacePath string, wsMsg *websocket.Message) (err error)
- func RunZtf(ch chan int, workspacePath string, productId, id int, by commConsts.ExecBy, ...) (report commDomain.ZtfReport, pathMaxWidth int, err error)
- func SetRunning(val bool)
- func SetRunningIfNeed(ch chan int)
- func ValidateCaseResult(execParams commDomain.ExecParams, langType string, ...)
- func ValidateStepResult(langType string, expectLines []string, actualLines []string) (stepResult commConsts.ResultStatus, checkpointLogs []commDomain.CheckPointLog)
- func ZipDir(req serverDomain.TestSet)
- type ZapScanResp
- type ZapScanStatus
Constants ¶
View Source
const (
KeyRunning = "isRunning"
)
View Source
const (
Tmpl = `` /* 287-byte string literal not displayed */
)
Variables ¶
View Source
var (
OptionsMap = map[string]string{}
)
View Source
var (
SyncMap sync.Map
)
Functions ¶
func AddInterpreterIfExist ¶
func AddInterpreterIfExist(conf *commDomain.WorkspaceConf, lang string) bool
func CheckCaseResult ¶
func CheckCaseResult(execParams commDomain.ExecParams, logs string, wsMsg *websocket.Message, errOutput string, lock *sync.Mutex)
func CompareFloat ¶
func CompareRange ¶
func ConvertAllureResult ¶
func ConvertAllureResult(cases []commDomain.AllureCase) (testSuites []commDomain.UnitTestSuite)
func ConvertCppUnitResult ¶
func ConvertCppUnitResult(cppunitSuite commDomain.CppUnitSuites) commDomain.UnitTestSuite
func ConvertCyResult ¶
func ConvertCyResult(result commDomain.CypressTestsuites) commDomain.UnitTestSuite
func ConvertGTestResult ¶
func ConvertGTestResult(gTestSuite commDomain.GTestSuites) commDomain.UnitTestSuite
func ConvertJestResult ¶
func ConvertJestResult(jestSuite commDomain.JestSuites) commDomain.UnitTestSuite
func ConvertK6Result ¶
func ConvertK6Result(results []interface{}, failedCaseIdToThresholdMap map[string]string) commDomain.UnitTestSuite
func ConvertPhpUnitResult ¶
func ConvertPhpUnitResult(phpUnitSuite commDomain.PhpUnitSuites) commDomain.UnitTestSuite
func ConvertPyTestResult ¶
func ConvertPyTestResult(pytestSuites commDomain.PyTestSuites) commDomain.UnitTestSuite
func ConvertQTestResult ¶
func ConvertQTestResult(qTestSuite commDomain.QTestSuites) commDomain.UnitTestSuite
func ConvertRobotResult ¶
func ConvertRobotResult(result commDomain.RobotResult) commDomain.UnitTestSuite
func ExeScripts ¶
func ExeScripts(execParams commDomain.ExecParams, ch chan int, wsMsg *websocket.Message)
func ExecCases ¶
func ExecCases(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) (report commDomain.ZtfReport, pathMaxWidth int, err error)
func ExecModule ¶
func ExecModule(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) ( report commDomain.ZtfReport, pathMaxWidth int, err error)
func ExecScan ¶
func ExecScan() (report *commDomain.ZapReport, err error)
func ExecScript ¶
func ExecScript(execParams commDomain.ExecParams, ch chan int, wsMsg *websocket.Message, lock *sync.Mutex)
func ExecSuite ¶
func ExecSuite(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) ( report commDomain.ZtfReport, pathMaxWidth int, err error)
func ExecTask ¶
func ExecTask(ch chan int, testSet serverDomain.TestSet, msg *websocket.Message) ( report commDomain.ZtfReport, pathMaxWidth int, err error)
func ExecZapScan ¶
func ExecZapScan(req serverDomain.TestSet) (err error)
func ExpandCaseForMultiIds ¶
func ExpandCaseForMultiIds(suites *[]commDomain.UnitTestSuite)
func FilterCases ¶
func FilterCases(cases []string, conf *commDomain.WorkspaceConf) (casesToRun, casesToIgnore []string)
func GenJacocoCovReport ¶
func GenJacocoCovReport() (report *commDomain.JacocoResult)
func GenRunResult ¶
func GenRunResult(report commDomain.ZtfReport) (result, resultClient, resultLog string)
func GenStatusTxt ¶
func GenStatusTxt(status commConsts.ResultStatus) (colorTxt string, txt string)
func GenUnitReport ¶
func GenUnitReport(cases []commDomain.UnitResult, report *commDomain.ZtfReport, duration float32) (failedCaseLines, failedCaseLinesDesc []string)
func GenUnitTestReport ¶
func GenUnitTestReport(req serverDomain.TestSet, startTime, endTime int64, ch chan int, wsMsg *websocket.Message) ( report commDomain.ZtfReport)
func GenZTFReport ¶
func GenZTFReport(report commDomain.ZtfReport) (failedCount int, failedCaseLinesWithCheckpoint []string)
func GenZTFTestReport ¶
func GetAllureCaseId ¶
func GetAllureCaseId(cs commDomain.AllureCase) (ids string)
func GetAllureCaseSuiteName ¶
func GetAllureCaseSuiteName(cs commDomain.AllureCase) (name string)
func GetAllureSuites ¶
func GetAllureSuites(resultDir string, startTime int64) (suites []commDomain.UnitTestSuite)
func GetK6FailCaseInSummary ¶
func GetLangInterpreter ¶
func GetLangInterpreterUnix ¶
func GetLangInterpreterWin ¶
func GetNoEmptyLines ¶
func GetRunning ¶
func GetRunning() (val bool)
func GetSuiteFiles ¶
func GetTestSuite ¶
func GetTestSuite(logFile string, testTool commConsts.TestTool, failedCaseIdToThresholdMap map[string]string) ( testSuite commDomain.UnitTestSuite, err error)
func InitZap ¶
func InitZap(req serverDomain.TestSet)
func KillProcessByUUID ¶
func KillProcessByUUID(uuid string)
func MatchScene ¶
func ParserUnitTestResult ¶
func ParserUnitTestResult(testSuites []commDomain.UnitTestSuite) ( cases []commDomain.UnitResult, classNameMaxWidth int, dur float32)
func PopulateTestSetPropsWithParentRequest ¶
func PopulateTestSetPropsWithParentRequest(req *serverDomain.ExecReq)
func PrintErrMsg ¶
func RetrieveRobotTests ¶
func RetrieveRobotTests(suite commDomain.RobotSuite, tests *[]commDomain.RobotTest)
func RetrieveUnitResult ¶
func RetrieveUnitResult(testset serverDomain.TestSet, startTime int64) ( suites []commDomain.UnitTestSuite)
func RunFile ¶
func RunFile(filePath, workspacePath string, conf commDomain.WorkspaceConf, ch chan int, wsMsg *websocket.Message, idx int) ( stdOutput string, errOutput string)
func RunUnitTest ¶
func SetRunning ¶
func SetRunning(val bool)
func SetRunningIfNeed ¶
func SetRunningIfNeed(ch chan int)
func ValidateCaseResult ¶
func ValidateCaseResult(execParams commDomain.ExecParams, langType string, steps []commDomain.ZentaoCaseStep, skip bool, actualArr [][]string, wsMsg *websocket.Message, errOutput string, lock *sync.Mutex)
func ValidateStepResult ¶
func ValidateStepResult(langType string, expectLines []string, actualLines []string) ( stepResult commConsts.ResultStatus, checkpointLogs []commDomain.CheckPointLog)
func ZipDir ¶
func ZipDir(req serverDomain.TestSet)
Types ¶
type ZapScanResp ¶
type ZapScanResp struct {
ScanId string `json:"scan"`
}
type ZapScanStatus ¶
type ZapScanStatus struct {
Status string `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.