Documentation
¶
Index ¶
- Constants
- type ActivityCoverage
- type ActivityMock
- type ActivityReport
- type Assertion
- type Coverage
- type DebugExecOptions
- type DebugOptions
- type FlowErrorHandler
- type FlowMock
- type FlowReport
- type Handler
- type Interceptor
- func (pi *Interceptor) AddToActivityCoverage(coverage ActivityCoverage)
- func (pi *Interceptor) AddToLinkCoverage(coverage TransitionCoverage)
- func (pi *Interceptor) AddToSubFlowCoverage(coverage SubFlowCoverage)
- func (pi *Interceptor) AddToSubFlowCoverageMap(instanceId string, coverage *SubFlowCoverage)
- func (pi *Interceptor) GetSubFlowCoverageEntry(instanceId string) *SubFlowCoverage
- func (pi *Interceptor) GetTaskInterceptor(taskID string) *TaskInterceptor
- func (pi *Interceptor) Init()
- type LinkReport
- type MockOutputReport
- type MockReport
- type OutputReport
- type Report
- type SubFlowCoverage
- type TaskInterceptor
- type TransitionCoverage
- type Trigger
Constants ¶
View Source
const ( Primitive = 1 Activity = 2 )
View Source
const ( AssertionActivity = 1 AssertionException = 2 SkipActivity = 3 MockActivity = 4 MockException = 5 )
View Source
const ( NotExecuted = 0 Pass = 1 Fail = 2 Mocked = 3 AssertionNotExecuted = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityCoverage ¶
type ActivityCoverage struct {
ActivityName string
LinkFrom []string
LinkTo []string
Inputs map[string]interface{} `json:"inputs,omitempty"`
Outputs interface{} `json:"outputs,omitempty"`
Error map[string]interface{} `json:"errors,omitempty"`
FlowName string `json:"flowName"`
IsMainFlow bool `json:"scope"`
FlowId string `json:"flowId"`
}
type ActivityMock ¶
type ActivityReport ¶
type Coverage ¶
type Coverage struct {
ActivityCoverage []*ActivityCoverage `json:"activityCoverage,omitempty"`
TransitionCoverage []*TransitionCoverage `json:"transitionCoverage,omitempty"`
SubFlowCoverage []*SubFlowCoverage `json:"subFlowCoverage,omitempty"`
SubFlowMap map[string]*SubFlowCoverage `json:"subFlowMap,omitempty"`
}
type DebugExecOptions ¶
type DebugExecOptions struct {
Interceptor *Interceptor
}
type DebugOptions ¶
type FlowErrorHandler ¶
type FlowErrorHandler struct {
ActivityReport []ActivityReport `json:"activities"`
LinkReport []LinkReport `json:"links,omitempty"`
}
type FlowMock ¶
type FlowMock struct {
Name string `json:"flowName,omitempty"`
ActivityReport []*ActivityMock `json:"activities"`
}
type FlowReport ¶
type FlowReport struct {
Name string `json:"flowId,omitempty"`
ActivityReport []ActivityReport `json:"activities"`
LinkReport []LinkReport `json:"links,omitempty"`
FlowErrorHandler FlowErrorHandler `json:"errorHandler,omitempty"`
SubFlow map[string]interface{} `json:"subFlow,omitempty"`
Inputs map[string]interface{} `json:"inputs,omitempty"`
Outputs map[string]interface{} `json:"outputs,omitempty"`
}
type Interceptor ¶
type Interceptor struct {
TaskInterceptors []*TaskInterceptor `json:"tasks"`
Coverage *Coverage `json:"coverage"`
CollectIO bool
// contains filtered or unexported fields
}
Interceptor contains a set of task interceptor, this can be used to override runtime data of an instance of the corresponding FlowReport. This can be used to modify runtime execution of a flow or in test/debug for implementing mocks for tasks
func (*Interceptor) AddToActivityCoverage ¶
func (pi *Interceptor) AddToActivityCoverage(coverage ActivityCoverage)
func (*Interceptor) AddToLinkCoverage ¶
func (pi *Interceptor) AddToLinkCoverage(coverage TransitionCoverage)
func (*Interceptor) AddToSubFlowCoverage ¶
func (pi *Interceptor) AddToSubFlowCoverage(coverage SubFlowCoverage)
func (*Interceptor) AddToSubFlowCoverageMap ¶
func (pi *Interceptor) AddToSubFlowCoverageMap(instanceId string, coverage *SubFlowCoverage)
func (*Interceptor) GetSubFlowCoverageEntry ¶
func (pi *Interceptor) GetSubFlowCoverageEntry(instanceId string) *SubFlowCoverage
func (*Interceptor) GetTaskInterceptor ¶
func (pi *Interceptor) GetTaskInterceptor(taskID string) *TaskInterceptor
GetTaskInterceptor get the TaskInterceptor for the specified task (referred to by ID)
func (*Interceptor) Init ¶
func (pi *Interceptor) Init()
Init initializes the FlowInterceptor, usually called after deserialization
type LinkReport ¶
type MockOutputReport ¶
type MockOutputReport struct {
AppName string `json:"appName"`
AppVersion string `json:"appVersion"`
Mock *MockReport `json:"mocks"`
}
type MockReport ¶
type OutputReport ¶
type Report ¶
type Report struct {
Trigger *Trigger `json:"trigger"`
Flows *FlowReport `json:"flows"`
}
type SubFlowCoverage ¶
type TaskInterceptor ¶
type TaskInterceptor struct {
ID string `json:"id"`
Skip bool `json:"skip,omitempty"`
Inputs map[string]interface{} `json:"inputs,omitempty"`
Outputs map[string]interface{} `json:"outputs,omitempty"`
Assertions []Assertion `json:"assertions,omitempty"`
SkipExecution bool `json:"skipExecution"`
Result int `json:"result,omitempty"`
Message string `json:"message"`
Type int `json:"type"`
}
TaskInterceptor contains instance override information for a Task, such has attributes. Also, a 'Skip' flag can be enabled to inform the runtime that the task should not execute.
type TransitionCoverage ¶
type TransitionCoverage struct {
TransitionName string `json:"transitionName"`
TransitionType string `json:"transitionType"`
TransitionFrom string `json:"transitionFrom"`
TransitionTo string `json:"transitionTo"`
TransitionExpression string `json:"transitionExpression"`
FlowName string `json:"flowName"`
IsMainFlow bool `json:"scope"`
FlowId string `json:"flowId"`
}
Click to show internal directories.
Click to hide internal directories.