feat: support websocket protocol

This commit is contained in:
buyuxiang
2022-04-21 20:53:11 +08:00
parent f7f0c5d2cf
commit 3588ab0f0a
18 changed files with 1205 additions and 36 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ const (
stepTypeTransaction StepType = "transaction"
stepTypeRendezvous StepType = "rendezvous"
stepTypeThinkTime StepType = "thinktime"
stepTypeWebSocket StepType = "websocket"
)
type StepResult struct {
@@ -32,6 +33,7 @@ type TStep struct {
Transaction *Transaction `json:"transaction,omitempty" yaml:"transaction,omitempty"`
Rendezvous *Rendezvous `json:"rendezvous,omitempty" yaml:"rendezvous,omitempty"`
ThinkTime *ThinkTime `json:"think_time,omitempty" yaml:"think_time,omitempty"`
WebSocket *WebSocketAction `json:"websocket,omitempty" yaml:"websocket,omitempty"`
Variables map[string]interface{} `json:"variables,omitempty" yaml:"variables,omitempty"`
SetupHooks []string `json:"setup_hooks,omitempty" yaml:"setup_hooks,omitempty"`
TeardownHooks []string `json:"teardown_hooks,omitempty" yaml:"teardown_hooks,omitempty"`
@@ -43,7 +45,7 @@ type TStep struct {
// IStep represents interface for all types for teststeps, includes:
// StepRequest, StepRequestWithOptionalArgs, StepRequestValidation, StepRequestExtraction,
// StepTestCaseWithOptionalArgs,
// StepTransaction, StepRendezvous.
// StepTransaction, StepRendezvous, StepWebSocket.
type IStep interface {
Name() string
Type() StepType