command

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorIDduplicate        = errors.New("testcase's ID duplicate")
	ErrorDependencyNotExist = errors.New("dependency does not exist")
	ErrorIDRestrict         = errors.New("the ID of the dependent testcase must be smaller than the ID of the current testcase")
)

Functions

func AllCheck added in v0.0.3

func AllCheck() error

func CheckTestCaseGrpc added in v0.0.6

func CheckTestCaseGrpc() error

func CheckTestCaseHttp added in v0.0.6

func CheckTestCaseHttp() error

func ExtractXpath added in v0.0.2

func ExtractXpath(ctx context.Context, cmd *cli.Command) error

func GenReportFileGrpc added in v0.0.6

func GenReportFileGrpc(testCasefilePath string, tcResultList []GrpcTestCaseResult)

func GenReportFileHttp added in v0.0.6

func GenReportFileHttp(testCasefilePath string, tcResultList []HttpTestCaseResult)

func GrpcAutomateTest added in v0.0.6

func GrpcAutomateTest(grpcTestCases map[string][]*config.TestCaseGrpc)

func HandleSingleFileGrpc added in v0.0.6

func HandleSingleFileGrpc(workerNum int, filePath string) (*ResultInfo, []GrpcTestCaseResult)

func HandleSingleFileHttp added in v0.0.6

func HandleSingleFileHttp(workerNum int, filePath string) (*ResultInfo, []HttpTestCaseResult)

func HttpAutomateTest

func HttpAutomateTest(httpTestCases map[string][]*config.TestCaseHttp)

func RunTestCases

func RunTestCases(ctx context.Context, cmd *cli.Command) error

func ValidateConfig

func ValidateConfig(ctx context.Context, cmd *cli.Command) error

Types

type EventHandler added in v0.0.6

type EventHandler struct {
	// contains filtered or unexported fields
}

func NewEventHandler added in v0.0.6

func NewEventHandler(formatter grpcurl.Formatter) *EventHandler

func (*EventHandler) OnReceiveHeaders added in v0.0.6

func (m *EventHandler) OnReceiveHeaders(md metadata.MD)

func (*EventHandler) OnReceiveResponse added in v0.0.6

func (m *EventHandler) OnReceiveResponse(msg proto.Message)

func (*EventHandler) OnReceiveTrailers added in v0.0.6

func (m *EventHandler) OnReceiveTrailers(status *status.Status, md metadata.MD)

func (*EventHandler) OnResolveMethod added in v0.0.6

func (m *EventHandler) OnResolveMethod(descriptor *desc.MethodDescriptor)

func (*EventHandler) OnSendHeaders added in v0.0.6

func (m *EventHandler) OnSendHeaders(md metadata.MD)

type GrpcTestCallable added in v0.0.6

type GrpcTestCallable struct {
	// contains filtered or unexported fields
}

func (*GrpcTestCallable) Call added in v0.0.6

type GrpcTestCaseResult added in v0.0.6

type GrpcTestCaseResult struct {
	State  model.State
	ID     uint64
	Desc   string
	Reason model.Reason
	// actual request
	Request   config.RequestGrpc
	TestCase  *config.TestCaseGrpc
	KeyValues map[string]any
}

type HttpTestCallable

type HttpTestCallable struct {
	// contains filtered or unexported fields
}

func (*HttpTestCallable) Call

type HttpTestCaseResult

type HttpTestCaseResult struct {
	State  model.State
	ID     uint64
	Desc   string
	Reason model.Reason
	// actual request
	Request   config.RequestHttp
	TestCase  *config.TestCaseHttp
	KeyValues map[string]any
}

type ResultInfo

type ResultInfo struct {
	Total        int
	SuccessCount int
	FailedCount  int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL