Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "kafka"
Name of executor
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Executor ¶
type Executor struct { Addrs []string `json:"addrs,omitempty" yaml:"addrs,omitempty"` WithTLS bool `json:"with_tls,omitempty" yaml:"withTLS,omitempty"` WithSASL bool `json:"with_sasl,omitempty" yaml:"withSASL,omitempty"` WithSASLHandshaked bool `json:"with_sasl_handshaked,omitempty" yaml:"withSASLHandshaked,omitempty"` User string `json:"user,omitempty" yaml:"user,omitempty"` Password string `json:"password,omitempty" yaml:"password,omitempty"` //ClientType must be "consumer" or "producer" ClientType string `json:"client_type,omitempty" yaml:"clientType,omitempty"` //Used when ClientType is consumer GroupID string `json:"group_id,omitempty" yaml:"groupID,omitempty"` Topics []string `json:"topics,omitempty" yaml:"topics,omitempty"` //Represents the timeout for reading messages. In Milliseconds. Default 5000 Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` //Represents the limit of message will be read. After limit, consumer stop read message MessageLimit int `json:"message_limit,omitempty" yaml:"messageLimit,omitempty"` //InitialOffset represents the initial offset for the consumer. Possible value : newest, oldest. default: newest InitialOffset string `json:"initial_offset,omitempty" yaml:"initialOffset,omitempty"` //MarkOffset allows to mark offset when consuming message MarkOffset bool `json:"mark_offset,omitempty" yaml:"markOffset,omitempty"` //Used when ClientType is producer //Messages represents the message sended by producer Messages []Message `json:"messages,omitempty" yaml:"messages,omitempty"` //MessagesFile represents the messages into the file sended by producer (messages field would be ignored) MessagesFile string `json:"messages_file,omitempty" yaml:"messages_file,omitempty"` }
Executor represents a Test Exec
func (Executor) GetDefaultAssertions ¶
func (Executor) GetDefaultAssertions() *venom.StepAssertions
GetDefaultAssertions return default assertions for type exec
func (Executor) Run ¶
func (Executor) Run(testCaseContext venom.TestCaseContext, l venom.Logger, step venom.TestStep, workdir string) (venom.ExecutorResult, error)
Run execute TestStep of type exec
func (Executor) ZeroValueResult ¶
func (Executor) ZeroValueResult() venom.ExecutorResult
ZeroValueResult return an empty implemtation of this executor result
type MessageJSON ¶
type MessageJSON struct { Topic string Value interface{} }
MessageJSON represents the object sended or received from kafka
type Result ¶
type Result struct { Executor Executor `json:"executor,omitempty" yaml:"executor,omitempty"` TimeSeconds float64 `json:"timeSeconds,omitempty" yaml:"timeSeconds,omitempty"` TimeHuman string `json:"timeHuman,omitempty" yaml:"timeHuman,omitempty"` Messages []Message `json:"messages,omitempty" yaml:"messages,omitempty"` MessagesJSON []interface{} `json:"messagesJSON,omitempty" yaml:"messagesJSON,omitempty"` Err string `json:"error" yaml:"error"` }
Result represents a step result.
Click to show internal directories.
Click to hide internal directories.