Documentation ¶
Index ¶
- Variables
- type Alert
- type AllureCase
- type BugOption
- type BugOptions
- type BugOptionsWrapper
- type CaseSlice
- type CheckPointLog
- type CppUnitSuites
- type CppUnitTest
- type CypressFailure
- type CypressTestcase
- type CypressTestsuite
- type CypressTestsuites
- type ExecParams
- type Failure
- type FuncResult
- type GTestSuites
- type JacocoClassClass
- type JacocoCounter
- type JacocoLineElement
- type JacocoMethodElement
- type JacocoPackage
- type JacocoResult
- type JacocoSessioninfo
- type JacocoSourcefile
- type JestSuites
- type K6Metric
- type K6Point
- type K6Summary
- type MqMsg
- type PhpUnitSuites
- type PluginInstallReq
- type PluginStartReq
- type Properties
- type Property
- type PyTestSuites
- type QTestSuites
- type RobotResult
- type RobotStatistics
- type RobotStatus
- type RobotSuite
- type RobotTest
- type StepLog
- type SyncSettings
- type TestResult
- type Type
- type UnitResult
- type UnitTestSuite
- type WorkspaceConf
- type WsResp
- type ZapReport
- type ZapScanReq
- type ZentaoBug
- type ZentaoBugFields
- type ZentaoCaseStep
- type ZentaoUserProfile
- type ZtfBug
- type ZtfCase
- type ZtfCaseInModule
- type ZtfCaseInSuite
- type ZtfCaseInTask
- type ZtfCaseNoStepArr
- type ZtfCaseWrapper
- type ZtfModule
- type ZtfProduct
- type ZtfReport
- type ZtfRespTestCases
- type ZtfStep
- type ZtfSuite
- type ZtfTask
Constants ¶
This section is empty.
Variables ¶
View Source
var CypressResults = "results"
cypress
View Source
var RFResults = "results"
RobotFramework xml
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Sourceid string `json:"sourceid"` Other string `json:"other"` Method string `json:"method"` Evidence string `json:"evidence"` PluginId string `json:"pluginId"` Cweid string `json:"cweid"` Confidence string `json:"confidence"` Wascid string `json:"wascid"` Description string `json:"description"` MessageId string `json:"messageId"` InputVector string `json:"inputVector"` Url string `json:"url"` Tags struct { OWASP2021A05 string `json:"OWASP_2021_A05"` WSTGV42CLNT09 string `json:"WSTG-v42-CLNT-09"` OWASP2017A06 string `json:"OWASP_2017_A06"` } `json:"tags"` Reference string `json:"reference"` Solution string `json:"solution"` Alert string `json:"alert"` Param string `json:"param"` Attack string `json:"attack"` Name string `json:"name"` Risk string `json:"risk"` Id string `json:"id"` AlertRef string `json:"alertRef"` }
type AllureCase ¶
type AllureCase struct { Name string `json:"name"` Status string `json:"status"` StatusDetails struct { Known bool `json:"known"` Muted bool `json:"muted"` Flaky bool `json:"flaky"` Message string `json:"message"` Trace string `json:"trace"` } `json:"statusDetails"` Stage string `json:"stage"` Description string `json:"description"` Steps []interface{} `json:"steps"` Attachments []interface{} `json:"attachments"` Parameters []struct { Name string `json:"name"` Value string `json:"value"` } `json:"parameters"` Start int64 `json:"start"` Stop int64 `json:"stop"` Uuid string `json:"uuid"` HistoryId string `json:"historyId"` TestCaseId string `json:"testCaseId"` FullName string `json:"fullName"` Labels []struct { Name string `json:"name"` Value string `json:"value"` } `json:"labels"` Links []interface{} `json:"links"` Duration int }
allure json
type BugOptions ¶
type BugOptions struct { Type iris.Map `json:"type"` Pri []interface{} `json:"pri"` SeverityObj interface{} `json:"severity"` Modules iris.Map `json:"modules"` Build iris.Map `json:"build"` }
type BugOptionsWrapper ¶
type BugOptionsWrapper struct {
Options BugOptions `json:"options"`
}
type CaseSlice ¶
type CaseSlice []UnitResult
type CheckPointLog ¶
type CheckPointLog struct { Numb int `json:"numb"` Expect string `json:"expect"` Actual string `json:"actual"` Status commConsts.ResultStatus `json:"status"` }
type CppUnitSuites ¶
type CppUnitSuites struct { XMLName xml.Name `xml:"TestRun"` SuccessfulTests struct { Cases []CppUnitTest `json:"test" xml:"Tests"` } `json:"successfulTests" xml:"SuccessfulTests"` FailedTests struct { Cases []CppUnitTest `json:"test" xml:"FailedTest"` } `json:"failedTests" xml:"FailedTests"` Duration int }
cppunit xml
type CppUnitTest ¶
type CppUnitTest struct { Id int `json:"id" xml:"Id,attr"` Title string `json:"name" xml:"Name"` FailureType string `json:"failureType" xml:"FailureType"` Message string `json:"message" xml:"Message"` Location []struct { File string `json:"file" xml:"File"` Line string `json:"line" xml:"Line"` } `json:"location" xml:"Location"` Duration int }
type CypressFailure ¶
type CypressTestcase ¶
type CypressTestsuite ¶
type CypressTestsuite struct { Text string `xml:",chardata"` Name string `xml:"name,attr"` Timestamp string `xml:"timestamp,attr"` Tests string `xml:"tests,attr"` File string `xml:"file,attr"` Time float64 `xml:"time,attr"` Failures string `xml:"failures,attr"` Testcases []CypressTestcase `xml:"testcase"` }
type CypressTestsuites ¶
type ExecParams ¶
type FuncResult ¶
type FuncResult struct { Id int `json:"id"` WorkspaceId int `json:"workspaceId"` Seq string `json:"seq"` Key string `json:"key"` ProductId int `json:"productId"` Path string `json:"path"` RelativePath string `json:"relativePath"` Status commConsts.ResultStatus `json:"status"` Title string `json:"title"` Steps []StepLog `json:"steps"` }
type GTestSuites ¶
type GTestSuites struct { XMLName xml.Name `xml:"testsuites"` TestSuites []struct { Title string `xml:"name,attr"` Cases []struct { Title string `xml:"name,attr"` TestSuite string `xml:"classname,attr"` Duration float32 `xml:"time,attr"` Failure *struct { Type string `xml:"message,attr"` Desc string `xml:",innerxml"` } `xml:"failure,omitempty"` Status string `xml:"status,attr"` } `xml:"testcase"` Duration int } `xml:"testsuite"` Duration int Time float32 `xml:"time,attr"` }
gtest xml
type JacocoClassClass ¶
type JacocoClassClass struct { Method []JacocoMethodElement `xml:"method"` Counter []JacocoCounter `xml:"counter"` Name string `xml:"name,attr"` Sourcefilename string `xml:"sourcefilename,attr"` }
type JacocoCounter ¶
type JacocoLineElement ¶
type JacocoMethodElement ¶
type JacocoMethodElement struct { Counter []JacocoCounter `xml:"counter"` Name string `xml:"name,attr"` Desc string `xml:"desc,attr"` Line string `xml:"line,attr"` }
type JacocoPackage ¶
type JacocoPackage struct { Class JacocoClassClass `xml:"class"` Sourcefile JacocoSourcefile `xml:"sourcefile"` Counter []JacocoCounter `xml:"counter"` Name string `xml:"name,attr"` }
type JacocoResult ¶
type JacocoResult struct { Sessioninfo JacocoSessioninfo `xml:"sessioninfo"` Package JacocoPackage `xml:"package"` Counter []JacocoCounter `xml:"counter"` Name string `xml:"name,attr"` }
type JacocoSessioninfo ¶
type JacocoSourcefile ¶
type JacocoSourcefile struct { Line []JacocoLineElement `xml:"line"` Counter []JacocoCounter `xml:"counter"` Name string `xml:"name,attr"` }
type JestSuites ¶
type JestSuites struct { XMLName xml.Name `xml:"testsuites"` Title string `xml:"name,attr"` TestSuites []struct { Title string `xml:"name,attr"` Cases []UnitResult `xml:"testcase"` Duration int } `xml:"testsuite"` Duration int Time float32 `xml:"time,attr"` }
jest xml
type K6Metric ¶
type K6Metric struct { Type commConsts.K6ResultType `json:"type"` Metric string `json:"metric"` Data struct { Name string `json:"name"` Type string `json:"type"` Contains string `json:"contains"` Thresholds []interface{} `json:"thresholds"` Submetrics interface{} `json:"submetrics"` } `json:"data"` }
k6
type K6Point ¶
type K6Point struct { Type commConsts.K6ResultType `json:"type"` Metric string `json:"metric"` Data struct { Time time.Time `json:"time"` Value int `json:"value"` Tags struct { ExpectedResponse string `json:"expected_response"` Group string `json:"group"` Method string `json:"method"` Proto string `json:"proto"` Scenario string `json:"scenario"` Status string `json:"status"` TlsVersion string `json:"tls_version"` Url string `json:"url"` Id string `json:"id"` Name string `json:"name"` Checkpoint string `json:"checkpoint"` } `json:"tags"` } `json:"data"` }
type K6Summary ¶
type K6Summary struct { RootGroup struct { Name string `json:"name"` Path string `json:"path"` Id string `json:"id"` Groups []struct { Name string `json:"name"` Path string `json:"path"` Id string `json:"id"` Groups []interface{} `json:"groups"` Checks []struct { Path string `json:"path"` Id string `json:"id"` Passes int `json:"passes"` Fails int `json:"fails"` Name string `json:"name"` } `json:"checks"` } `json:"groups"` Checks []interface{} `json:"checks"` } `json:"root_group"` Options struct { SummaryTrendStats []string `json:"summaryTrendStats"` SummaryTimeUnit string `json:"summaryTimeUnit"` NoColor bool `json:"noColor"` } `json:"options"` State struct { IsStdErrTTY bool `json:"isStdErrTTY"` TestRunDurationMs float64 `json:"testRunDurationMs"` IsStdOutTTY bool `json:"isStdOutTTY"` } `json:"state"` Metrics map[string]interface{} `json:"metrics"` }
type PhpUnitSuites ¶
type PhpUnitSuites struct { XMLName xml.Name `xml:"tests"` Cases []struct { Title string `xml:"prettifiedMethodName,attr"` TestSuite string `xml:"prettifiedClassName,attr"` Fail string `xml:"exceptionMessage,attr"` Groups string `xml:"groups,attr"` Status int `xml:"status,attr"` Time float32 `xml:"time,attr"` } `xml:"test"` Duration int }
phpunit xml
type PluginInstallReq ¶
type PluginStartReq ¶
type PluginStartReq struct { }
type Properties ¶
type Properties struct {
Property []Property `json:"property" xml:"property"`
}
type PyTestSuites ¶
type PyTestSuites struct { XMLName xml.Name `xml:"testsuites"` TestSuites []struct { Title string `xml:"name,attr"` Cases []struct { Title string `xml:"name,attr"` TestSuite string `xml:"classname,attr"` Duration float32 `xml:"time,attr"` Failure *struct { Type string `xml:"message,attr"` Desc string `xml:",innerxml"` } `xml:"failure,omitempty"` Error *struct { Text string `xml:",chardata"` Message string `xml:"message,attr"` } `xml:"error"` Status string } `xml:"testcase"` Duration int Time float32 `xml:"time,attr"` } `xml:"testsuite"` Duration int }
pytest xml
type QTestSuites ¶
type QTestSuites struct { XMLName xml.Name `xml:"testsuite"` Name string `json:"name" xml:"name,attr"` Cases []struct { Title string `json:"name" xml:"name,attr"` Result string `json:"result" xml:"result,attr"` Failure *struct { Type string `json:"type" xml:"tag,attr"` Desc string `json:"desc" xml:"message,attr"` } `json:"failure" xml:"failure"` } `json:"testCases" xml:"testcase"` Properties Properties `json:"properties" xml:"properties"` Duration int }
qtest xml
type RobotResult ¶
type RobotResult struct { XMLName xml.Name `xml:"robot"` Text string `xml:",chardata"` Generator string `xml:"generator,attr"` Generated string `xml:"generated,attr"` Rpa string `xml:"rpa,attr"` Suites []RobotSuite `xml:"suite"` Statistics RobotStatistics `xml:"statistics"` Errors string `xml:"errors"` }
type RobotStatistics ¶
type RobotStatistics struct { Text string `xml:",chardata"` Total struct { Text string `xml:",chardata"` Stat []struct { Text string `xml:",chardata"` Pass string `xml:"pass,attr"` Fail string `xml:"fail,attr"` } `xml:"stat"` } `xml:"total"` Tag string `xml:"tag"` Suite struct { Text string `xml:",chardata"` States []struct { Text string `xml:",chardata"` Pass string `xml:"pass,attr"` Fail string `xml:"fail,attr"` ID string `xml:"id,attr"` Name string `xml:"name,attr"` } `xml:"stat"` } `xml:"suite"` }
type RobotStatus ¶
type RobotSuite ¶
type RobotSuite struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Name string `xml:"name,attr"` Source string `xml:"source,attr"` Suites []RobotSuite `xml:"suite"` Tests []RobotTest `xml:"test"` Status RobotStatus `xml:"status"` }
type RobotTest ¶
type RobotTest struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Name string `xml:"name,attr"` Kw []struct { Text string `xml:",chardata"` Name string `xml:"name,attr"` Library string `xml:"library,attr"` Doc string `xml:"doc"` Arguments struct { Text string `xml:",chardata"` Arg []string `xml:"arg"` } `xml:"arguments"` Msg struct { Text string `xml:",chardata"` Timestamp string `xml:"timestamp,attr"` Level string `xml:"level,attr"` } `xml:"msg"` Status RobotStatus `xml:"status"` Assign struct { Text string `xml:",chardata"` Var string `xml:"var"` } `xml:"assign"` } `xml:"kw"` Doc string `xml:"doc"` Status RobotStatus `xml:"status"` }
type StepLog ¶
type StepLog struct { Id string `json:"id"` Name string `json:"name"` Status commConsts.ResultStatus `json:"status"` CheckPoints []CheckPointLog `json:"checkPoints"` }
type SyncSettings ¶
type SyncSettings struct { WorkspaceId int `json:"workspaceId"` ProductId int `json:"productId"` ModuleId int `json:"moduleId"` SuiteId int `json:"suiteId"` TaskId int `json:"taskId"` CaseId int `json:"caseId"` CaseIds []int `json:"caseIds"` CasePath string `json:"casePath"` Lang string `json:"lang"` SaveByModule bool `json:"saveByModule"` IndependentFile bool `json:"independentFile"` }
type TestResult ¶
type TestResult struct { TestSetId uint `json:"testSetId" yaml:"testSetId"` Version float64 `json:"version" yaml:"version"` Name string `json:"name" yaml:"name"` Code int `json:"code"` Msg string `json:"msg"` StartTime time.Time `json:"startTime" yaml:"startTime"` EndTime time.Time `json:"endTime" yaml:"endTime"` Duration int `json:"duration" yaml:"duration"` // sec TotalNum int `json:"totalNum" yaml:"totalNum"` PassNum int `json:"passNum" yaml:"passNum"` FailNum int `json:"failNum" yaml:"failNum"` MissedNum int `json:"missedNum" yaml:"missedNum"` Payload interface{} `json:"payload"` }
func (*TestResult) Fail ¶
func (result *TestResult) Fail(msg string)
func (*TestResult) Failf ¶
func (result *TestResult) Failf(str string, args ...interface{})
func (*TestResult) IsSuccess ¶
func (result *TestResult) IsSuccess() bool
func (*TestResult) Pass ¶
func (result *TestResult) Pass(msg string)
func (*TestResult) Passf ¶
func (result *TestResult) Passf(str string, args ...interface{})
type UnitResult ¶
type UnitResult struct { Title string `json:"title" xml:"name,attr"` TestSuite string `json:"testSuite" xml:"classname,attr"` StartTime int64 `json:"startTime" xml:"startTime"` EndTime int64 `json:"endTime" xml:"endTime"` Duration float32 `json:"duration" xml:"time,attr"` Failure *Failure `json:"failure" xml:"failure,omitempty"` ErrorType string `json:"errorType" xml:"type,attr,omitempty"` ErrorContent string `json:"errorContent" xml:"error,omitempty"` Id int `json:"id"` Cid int `json:"cid"` Cids string `json:"-"` Status commConsts.ResultStatus `json:"status"` }
type UnitTestSuite ¶
type UnitTestSuite struct { XMLName xml.Name `xml:"testsuite"` Name string Duration int64 `xml:"-"` Time float32 `xml:"time,attr"` Properties Properties `xml:"properties"` Cases []UnitResult `xml:"testcase"` }
单元测试
type WorkspaceConf ¶
type WorkspaceConf struct { Language string `json:"language"` Url string `json:"url"` Username string `json:"username"` Password string `json:"password"` Javascript string `ini:",omitempty" json:"javascript"` Lua string `ini:",omitempty" json:"lua"` Perl string `ini:",omitempty" json:"perl"` Php string `ini:",omitempty" json:"php"` Python string `ini:",omitempty" json:"python"` Ruby string `ini:",omitempty" json:"ruby"` Tcl string `ini:",omitempty" json:"tcl"` Go string `ini:",omitempty" json:"go"` Autoit string `ini:",omitempty" json:"autoit"` Version string `json:"version"` IsWin bool `ini:"-" json:"isWin"` }
type WsResp ¶
type WsResp struct { Msg string `json:"msg"` IsRunning string `json:"isRunning,omitempty"` Category commConsts.WsMsgCategory `json:"category"` Info iris.Map `json:"info,omitempty"` }
type ZapScanReq ¶
type ZapScanReq struct {
Session string `json:"session"`
}
type ZentaoBug ¶
type ZentaoBug struct { Id int `json:"id"` Title string `json:"title"` Type string `json:"type"` Product int `json:"product"` Module int `json:"module"` Severity int `json:"severity"` Pri int `json:"pri"` Case int `json:"case"` Steps string `json:"steps"` Uid string `json:"uid"` OpenedBuild []string `json:"openedBuild"` CaseVersion string `json:"caseVersion"` OldTaskID string `json:"oldTaskID"` OpenedDate string `json:"openedDate"` OpenedBy string `json:"openedBy"` StatusName string `json:"statusName"` }
type ZentaoBugFields ¶
type ZentaoCaseStep ¶
type ZentaoCaseStep struct { Type commConsts.CaseStepType `json:"type"` Desc string `json:"desc"` Expect string `json:"expect"` }
type ZentaoUserProfile ¶
type ZtfBug ¶
type ZtfBug struct { Title string `json:"title"` Type string `json:"type"` TestType commConsts.TestType `json:"testType"` StepIds string `json:"ids"` // for to Product int `json:"product"` Module int `json:"module"` Severity int `json:"severity"` Pri int `json:"pri"` Case int `json:"case"` Steps string `json:"steps"` Uid string `json:"uid"` OpenedBuild []string `json:"openedBuild"` CaseVersion string `json:"caseVersion"` OldTaskID string `json:"oldTaskID"` }
type ZtfCaseInModule ¶
type ZtfCaseInSuite ¶
type ZtfCaseInTask ¶
type ZtfCaseNoStepArr ¶
type ZtfCaseWrapper ¶
type ZtfModule ¶
type ZtfModule struct { Id int Code string Title string Cases map[int]ZtfCaseInModule }
type ZtfProduct ¶
type ZtfProduct struct { Id int Cases map[int]ZtfCaseInModule `json:"testcases"` }
type ZtfReport ¶
type ZtfReport struct { Name string `json:"name"` Platform commConsts.OsType `json:"platform,omitempty"` TestType commConsts.TestType `json:"testType"` TestTool commConsts.TestTool `json:"testTool"` BuildTool commConsts.BuildTool `json:"buildTool"` TestCommand string `json:"testCommand"` WorkspaceId int `json:"workspaceId,omitempty"` WorkspaceType commConsts.TestTool `json:"workspaceType"` WorkspacePath string `json:"workspacePath"` Seq string `json:"seq,omitempty"` SubmitResult bool `json:"submitResult"` ProductId int `json:"productId,omitempty"` TaskId int `json:"taskId,omitempty"` ExecBy commConsts.ExecBy `json:"execBy,omitempty"` ExecById int `json:"execById,omitempty"` // run with ci tool ZentaoData string `json:"zentaoData"` BuildUrl string `json:"buildUrl"` Log string `json:"log"` Pass int `json:"pass"` Fail int `json:"fail"` Skip int `json:"skip"` Total int `json:"total"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Duration int64 `json:"duration"` FuncResult []FuncResult `json:"funcResult,omitempty"` UnitResult []UnitResult `json:"unitResult,omitempty"` JacocoResult *JacocoResult `json:"jacocoResult,omitempty"` ZapReport *ZapReport `json:"zapResult,omitempty"` }
type ZtfRespTestCases ¶
type ZtfRespTestCases struct {
Cases []ZtfCaseInModule `json:"testcases"`
}
Click to show internal directories.
Click to hide internal directories.