Documentation
¶
Index ¶
- func GetCsvDataFilesForJsonFile(jsonFile string, suffix string) []string
- func GetTcNameSet(tcArray []*TestCaseDataInfo) []string
- func IfCaseNameDuplicated(tcInfos []*TestCaseDataInfo) bool
- type CommandDetails
- type MultipartForm
- type MutationInfo
- type OutFilesDetails
- func (tcOutFiles *OutFilesDetails) GetData() map[string][]interface{}
- func (tcOutFiles *OutFilesDetails) GetOperation() string
- func (tcOutFiles *OutFilesDetails) GetSources() []string
- func (tcOutFiles *OutFilesDetails) GetSourcesFields() []string
- func (tcOutFiles *OutFilesDetails) GetTargetFileName() string
- func (tcOutFiles *OutFilesDetails) GetTargetHeader() []string
- type OutputsDetails
- type Payload
- type Request
- type TcConsoleResults
- type TcReportResults
- type TestCase
- func (tc *TestCase) AddRequestHeader(key string, newValue string)
- func (tc *TestCase) AddRequestQueryString(key string, newValue string)
- func (tc *TestCase) ComposeReqQueryString() string
- func (tc *TestCase) ComposeReqQueryStringEncode() string
- func (tc *TestCase) DelReqPayload(key string)
- func (tc *TestCase) DelRequestHeader(key string)
- func (tc *TestCase) DelRequestQueryString(key string)
- func (tc *TestCase) FunctionAreas() []string
- func (tc *TestCase) IfGlobalSetUpTestCase() bool
- func (tc *TestCase) IfGlobalTearDownTestCase() bool
- func (tc *TestCase) Inputs() []interface{}
- func (tc *TestCase) OutFiles() []*OutFilesDetails
- func (tc *TestCase) OutGlobalVariables() map[string]interface{}
- func (tc *TestCase) OutLocalVariables() map[string]interface{}
- func (tc *TestCase) Outputs() []*OutputsDetails
- func (tc *TestCase) ParentTestCase() string
- func (tc *TestCase) Priority() string
- func (tc *TestCase) ReqHeaders() map[string]interface{}
- func (tc *TestCase) ReqMethod() string
- func (tc *TestCase) ReqPath() string
- func (tc *TestCase) ReqPayload() map[string]interface{}
- func (tc *TestCase) ReqQueryString() map[string]interface{}
- func (tc *TestCase) Request() *Request
- func (tc *TestCase) Response() []map[string]interface{}
- func (tc *TestCase) Session() map[string]interface{}
- func (tc *TestCase) SetInputs(newValue string)
- func (tc *TestCase) SetParentTestCase(newValue string)
- func (tc *TestCase) SetPriority(newValue string)
- func (tc *TestCase) SetRequestHeader(key string, newValue string)
- func (tc *TestCase) SetRequestMethod(newValue string)
- func (tc *TestCase) SetRequestPath(newValue string)
- func (tc *TestCase) SetRequestPayload(key string, newValue interface{})
- func (tc *TestCase) SetRequestQueryString(key string, newValue string)
- func (tc *TestCase) SetTestSuite(newValue string)
- func (tc *TestCase) SetUp() []*CommandDetails
- func (tc *TestCase) TcName() string
- func (tc *TestCase) TearDown() []*CommandDetails
- func (tc *TestCase) TestCaseBasics() *TestCaseBasics
- func (tc *TestCase) TestSuite() string
- func (tc *TestCase) UpdateTcName(newKey string)
- func (tc *TestCase) UrlEncode(baseUrl string) string
- func (tc *TestCase) UrlRaw(baseUrl string) string
- type TestCaseBasics
- type TestCaseDataInfo
- func (tcData *TestCaseDataInfo) FunctionAreas() []string
- func (tcData *TestCaseDataInfo) ParentTestCase() string
- func (tcData *TestCaseDataInfo) Priority() string
- func (tcData *TestCaseDataInfo) ReqMethod() string
- func (tcData *TestCaseDataInfo) ReqPath() string
- func (tcData *TestCaseDataInfo) TcName() string
- func (tcData *TestCaseDataInfo) TestSuite() string
- type TestCaseExecutionInfo
- func (tcExecution *TestCaseExecutionInfo) ParentTestCase() string
- func (tcExecution *TestCaseExecutionInfo) Priority() string
- func (tcExecution *TestCaseExecutionInfo) ReqMethod() string
- func (tcExecution *TestCaseExecutionInfo) ReqPath() string
- func (tcExecution *TestCaseExecutionInfo) SetTestResult(value string)
- func (tcExecution *TestCaseExecutionInfo) TcConsoleResults() *TcConsoleResults
- func (tcExecution *TestCaseExecutionInfo) TcName() string
- func (tcExecution *TestCaseExecutionInfo) TcReportResults() *TcReportResults
- func (tcExecution *TestCaseExecutionInfo) TestCase() *TestCase
- type TestCases
- type TestMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTcNameSet ¶
func GetTcNameSet(tcArray []*TestCaseDataInfo) []string
func IfCaseNameDuplicated ¶
func IfCaseNameDuplicated(tcInfos []*TestCaseDataInfo) bool
Types ¶
type CommandDetails ¶
type CommandDetails struct {
CmdType string `json:"cmdType"`
CmdSource string `json:"cmdSource"`
Cmd interface{} `json:"cmd"`
CmdResponse []map[string]interface{} `json:"cmdResponse"`
OutGlobalVariables map[string]interface{} `json:"outGlobalVariables"`
OutLocalVariables map[string]interface{} `json:"outLocalVariables"`
Session map[string]interface{} `json:"session"`
OutFiles []*OutFilesDetails `json:"outFiles"`
}
type MultipartForm ¶
type MutationInfo ¶
type OutFilesDetails ¶
type OutFilesDetails struct {
TargetFile string
TargetHeader []string
Sources []string
SourcesFields []string
Operation string
Data map[string][]interface{}
}
func (*OutFilesDetails) GetData ¶
func (tcOutFiles *OutFilesDetails) GetData() map[string][]interface{}
func (*OutFilesDetails) GetOperation ¶
func (tcOutFiles *OutFilesDetails) GetOperation() string
func (*OutFilesDetails) GetSources ¶
func (tcOutFiles *OutFilesDetails) GetSources() []string
func (*OutFilesDetails) GetSourcesFields ¶
func (tcOutFiles *OutFilesDetails) GetSourcesFields() []string
func (*OutFilesDetails) GetTargetFileName ¶
func (tcOutFiles *OutFilesDetails) GetTargetFileName() string
outFiles
func (*OutFilesDetails) GetTargetHeader ¶
func (tcOutFiles *OutFilesDetails) GetTargetHeader() []string
type OutputsDetails ¶
func (*OutputsDetails) GetOutputsDetailsData ¶
func (tcOutDetails *OutputsDetails) GetOutputsDetailsData() map[string][]interface{}
func (*OutputsDetails) GetOutputsDetailsFileName ¶
func (tcOutDetails *OutputsDetails) GetOutputsDetailsFileName() string
outputs
func (*OutputsDetails) GetOutputsDetailsFormat ¶
func (tcOutDetails *OutputsDetails) GetOutputsDetailsFormat() string
type Payload ¶
type Payload struct {
TextJson interface{} `json:"textJson"`
Text interface{} `json:"text"`
MultipartForm *MultipartForm `json:"multipartForm"`
Form map[string]interface{} `json:"form"`
}
type TcConsoleResults ¶
type TcConsoleResults struct {
TcName string
Priority string
ParentTestCase string
JsonFilePath string
CsvFile string
CsvRow string
MutationInfoStr interface{}
SetUpResult string
HttpResult string
TearDownResult string
TestResult string // Ready, Running, Success, Fail, ParentReady, ParentRunning, ParentFailed
ActualStatusCode int
HttpTestMessages []*TestMessage
}
type TcReportResults ¶
type TcReportResults struct {
TcName string
IfGlobalSetUpTearDown string // SetUp, TearDown
// CaseType string // Normal, Scenario, Mutation, Fuzz
Priority string
ParentTestCase string
FunctionAreas []string
TestSuite string
SetUpResult string // Success, Fail
SetUpTestMessages [][]*TestMessage
Path string
Method string
JsonFilePath string
CsvFile string
CsvRow string
MutationArea string
MutationCategory string
MutationRule string
MutationInfo interface{}
HttpResult string // Success, Fail
ActualStatusCode int
StartTime string
EndTime string
HttpTestMessages []*TestMessage
StartTimeUnixNano int64
EndTimeUnixNano int64
DurationUnixNano int64
DurationUnixMillis int64
TearDownResult string // Success, Fail
TearDownTestMessages [][]*TestMessage
TestResult string // Success, Fail, ParentFailed
HttpUrl string
CaseOrigin interface{}
GlobalVariables interface{}
Session interface{}
LocalVariables interface{}
ActualHeader interface{}
ActualBody interface{}
}
for report format
type TestCase ¶
type TestCase map[string]*TestCaseBasics
test case type,
func (*TestCase) AddRequestHeader ¶
func (*TestCase) AddRequestQueryString ¶
func (*TestCase) ComposeReqQueryString ¶
func (*TestCase) ComposeReqQueryStringEncode ¶
to encode the query, also avoid the impact if string itself contains char '&'
func (*TestCase) DelReqPayload ¶
func (*TestCase) DelRequestHeader ¶
func (*TestCase) DelRequestQueryString ¶
func (*TestCase) FunctionAreas ¶
func (*TestCase) IfGlobalSetUpTestCase ¶
func (*TestCase) IfGlobalTearDownTestCase ¶
func (*TestCase) OutFiles ¶
func (tc *TestCase) OutFiles() []*OutFilesDetails
func (*TestCase) OutGlobalVariables ¶
func (*TestCase) OutLocalVariables ¶
func (*TestCase) Outputs ¶
func (tc *TestCase) Outputs() []*OutputsDetails
func (*TestCase) ParentTestCase ¶
func (*TestCase) ReqHeaders ¶
func (*TestCase) ReqPayload ¶
func (*TestCase) ReqQueryString ¶
func (*TestCase) SetParentTestCase ¶
func (*TestCase) SetPriority ¶
!! --------------------------------------- !! --- test case type - set !! ---------------------------------------
func (*TestCase) SetRequestHeader ¶
request header
func (*TestCase) SetRequestMethod ¶
func (*TestCase) SetRequestPath ¶
func (*TestCase) SetRequestPayload ¶
request query Payload
func (*TestCase) SetRequestQueryString ¶
request query string
func (*TestCase) SetTestSuite ¶
func (*TestCase) SetUp ¶
func (tc *TestCase) SetUp() []*CommandDetails
func (*TestCase) TearDown ¶
func (tc *TestCase) TearDown() []*CommandDetails
func (*TestCase) TestCaseBasics ¶
func (tc *TestCase) TestCaseBasics() *TestCaseBasics
func (*TestCase) UpdateTcName ¶
type TestCaseBasics ¶
type TestCaseBasics struct {
Priority string `json:"priority"`
ParentTestCase string `json:"parentTestCase"`
FunctionAreas []string `json:"functionAreas"`
TestSuite string `json:"testSuite"`
IfGlobalSetUpTestCase bool `json:"ifGlobalSetUpTestCase"`
IfGlobalTearDownTestCase bool `json:"ifGlobalTearDownTestCase"`
SetUp []*CommandDetails `json:"setUp"`
Inputs []interface{} `json:"inputs"`
Request *Request `json:"request"`
Response []map[string]interface{} `json:"response"`
Outputs []*OutputsDetails `json:"outputs"`
OutFiles []*OutFilesDetails `json:"outFiles"`
OutGlobalVariables map[string]interface{} `json:"outGlobalVariables"`
OutLocalVariables map[string]interface{} `json:"outLocalVariables"`
Session map[string]interface{} `json:"session"`
TearDown []*CommandDetails `json:"tearDown"`
}
type TestCaseDataInfo ¶
type TestCaseDataInfo struct {
TestCase *TestCase
JsonFilePath string
CsvFile string
CsvRow string
MutationArea string
MutationCategory string
MutationRule string
MutationInfoStr interface{}
MutationInfo MutationInfo
}
test case data type, includes testcase
func ConstructTcInfosWithDt ¶
func ConstructTcInfosWithDt(jsonFile string, csvFileList []string) []*TestCaseDataInfo
not using "text/template"
func ConstructTcInfosWithoutDt ¶
func ConstructTcInfosWithoutDt(jsonFile string) []*TestCaseDataInfo
func InitFullTcSlice ¶
func InitFullTcSlice(filePathSlice []string) []*TestCaseDataInfo
func (*TestCaseDataInfo) FunctionAreas ¶
func (tcData *TestCaseDataInfo) FunctionAreas() []string
func (*TestCaseDataInfo) ParentTestCase ¶
func (tcData *TestCaseDataInfo) ParentTestCase() string
func (*TestCaseDataInfo) Priority ¶
func (tcData *TestCaseDataInfo) Priority() string
func (*TestCaseDataInfo) ReqMethod ¶
func (tcData *TestCaseDataInfo) ReqMethod() string
func (*TestCaseDataInfo) ReqPath ¶
func (tcData *TestCaseDataInfo) ReqPath() string
func (*TestCaseDataInfo) TcName ¶
func (tcData *TestCaseDataInfo) TcName() string
!! --------------------------------------- !! --- test case data type !! ---------------------------------------
func (*TestCaseDataInfo) TestSuite ¶
func (tcData *TestCaseDataInfo) TestSuite() string
type TestCaseExecutionInfo ¶
type TestCaseExecutionInfo struct {
TestCaseDataInfo *TestCaseDataInfo
SetUpResult string
SetUpTestMessages [][]*TestMessage
HttpResult string
ActualStatusCode int
StartTime string
EndTime string
HttpTestMessages []*TestMessage
StartTimeUnixNano int64
EndTimeUnixNano int64
DurationUnixNano int64
ActualBody []byte
ActualHeader map[string][]string
HttpUrl string
TearDownResult string
TearDownTestMessages [][]*TestMessage
TestResult string // Ready, Running, Success, Fail, ParentReady, ParentRunning, ParentFailed
LocalVariables interface{}
}
test case execution type, includes testdata
func (*TestCaseExecutionInfo) ParentTestCase ¶
func (tcExecution *TestCaseExecutionInfo) ParentTestCase() string
func (*TestCaseExecutionInfo) Priority ¶
func (tcExecution *TestCaseExecutionInfo) Priority() string
func (*TestCaseExecutionInfo) ReqMethod ¶
func (tcExecution *TestCaseExecutionInfo) ReqMethod() string
func (*TestCaseExecutionInfo) ReqPath ¶
func (tcExecution *TestCaseExecutionInfo) ReqPath() string
func (*TestCaseExecutionInfo) SetTestResult ¶
func (tcExecution *TestCaseExecutionInfo) SetTestResult(value string)
func (*TestCaseExecutionInfo) TcConsoleResults ¶
func (tcExecution *TestCaseExecutionInfo) TcConsoleResults() *TcConsoleResults
for report
func (*TestCaseExecutionInfo) TcName ¶
func (tcExecution *TestCaseExecutionInfo) TcName() string
test case execution type
func (*TestCaseExecutionInfo) TcReportResults ¶
func (tcExecution *TestCaseExecutionInfo) TcReportResults() *TcReportResults
func (*TestCaseExecutionInfo) TestCase ¶
func (tcExecution *TestCaseExecutionInfo) TestCase() *TestCase
type TestMessage ¶
Click to show internal directories.
Click to hide internal directories.