runTestCase

package
v0.0.0-...-a74421f Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvVar

func GetEnvVar(projectID uint, envID uint) (envVars map[string]string, envName string, err error)

func RunApi

func RunApi(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunBoomer

func RunBoomer(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunBoomerDebug

func RunBoomerDebug(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunCase

func RunCase(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunStep

func RunStep(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunTestCase

func RunTestCase(tc TestCase) (reports *interfacecase.ApiReport, err error)

func RunTimerTagCI

func RunTimerTagCI(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunTimerTask

func RunTimerTask(runCaseReq request.RunCaseReq, runType interfacecase.RunType) (reports *interfacecase.ApiReport, err error)

func RunTimerTaskBack

func RunTimerTaskBack(taskID uint) func()

Types

type ApiCaseStep

type ApiCaseStep struct {
	ID        uint
	Name      string                  `json:"name" form:"name" gorm:"column:name;comment:;"`
	FrontCase *bool                   `json:"front_case" orm:"front_case"`
	TStep     []interfacecase.ApiStep `json:"TStep" form:"TStep" gorm:"many2many:ApiCaseStepRelationship;"`
	ApiCase   []interfacecase.ApiCase `json:"case" form:"case" gorm:"many2many:ApiCaseRelationship;"`
	ProjectID uint                    `json:"-"`
	Config    *interfacecase.ApiConfig
}

type ApisCaseModel

type ApisCaseModel struct {
	Case      []hrp.ITestCase
	Config    interfacecase.ApiConfig
	SetupCase bool
	Environs  map[string]string
}

type B

type B struct {
	Boom     *hrp.HRPBoomer
	State    BoomerState
	OutputDB *boomer.DbOutput
	// contains filtered or unexported fields
}

type BoomerState

type BoomerState int
var (
	BoomerStateRunning BoomerState = 1
	BoomerStateStop    BoomerState = 2
)

type CaseList

type CaseList struct {
	Case      []hrp.ITestCase
	SetupCase bool
}

type Content

type Content struct {
	Name    string `json:"name"`
	Success int    `json:"success"`
	Fail    int    `json:"fail"`
	Time    int    `json:"time"`
	Total   int    `json:"total"`
	Error   int    `json:"error"`
	Skip    int    `json:"skip"`
}

type Device

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

func (*Device) Device

func (d *Device) Device() device.Info

func (*Device) MultilineString

func (d *Device) MultilineString() string

func (*Device) MultilineStringIndent

func (d *Device) MultilineStringIndent(n int) string

func (*Device) Set

func (d *Device) Set(i string) error

func (*Device) String

func (d *Device) String() string

type Devices

type Devices []Device

func (Devices) NewDeviceById

func (d Devices) NewDeviceById(i int) *Device

func (Devices) NewDeviceByName

func (d Devices) NewDeviceByName(name string) *Device

func (Devices) String

func (d Devices) String() string

type DingTalkNotifier

type DingTalkNotifier struct {
	NotifierDefault
	Type run.NotifierType
}

func (DingTalkNotifier) Send

func (dn DingTalkNotifier) Send() error

type FSCard

type FSCard struct {
	Type string `json:"type"`
	Data FSData `json:"data"`
	NotifierDefault
}

type FSData

type FSData struct {
	TemplateID       FSTemplate       `json:"template_id"`
	TemplateVariable TemplateVariable `json:"template_variable"`
}

type FSTemplate

type FSTemplate string
const FSTemplateFail FSTemplate = "ctp_AAmIkXEaoPea"
const FSTemplateSuccess FSTemplate = "ctp_AAmjuIxqEQjK"

type FeishuNotifier

type FeishuNotifier struct {
	NotifierDefault
}

func (FeishuNotifier) Send

func (fn FeishuNotifier) Send() error

type Image

type Image struct {
	Base64 string `json:"base64"`
	MD5    string `json:"md5"`
}

type Notifier

type Notifier interface {
	Send() error
}

func NewNotifier

func NewNotifier(msg *run.Msg, reports *interfacecase.ApiReport) Notifier

type NotifierDefault

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

func (NotifierDefault) SendMessage

func (n NotifierDefault) SendMessage(body interface{}) error

type ReportOperation

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

func (*ReportOperation) CreateReport

func (r *ReportOperation) CreateReport()

func (*ReportOperation) Recover

func (r *ReportOperation) Recover(msg string)

func (*ReportOperation) SendMsg

func (r *ReportOperation) SendMsg(reports *interfacecase.ApiReport)

func (*ReportOperation) UpdateReport

func (r *ReportOperation) UpdateReport(reports *interfacecase.ApiReport)

type RunBoomerMaster

type RunBoomerMaster struct {
	TCM ApisCaseModel

	ID uint
	// contains filtered or unexported fields
}

func NewBoomerMaster

func NewBoomerMaster(id uint) *RunBoomerMaster

func (*RunBoomerMaster) LoadCase

func (r *RunBoomerMaster) LoadCase() (err error)

func (*RunBoomerMaster) Report

func (r *RunBoomerMaster) Report() (report *interfacecase.ApiReport, err error)

func (*RunBoomerMaster) RunCase

func (r *RunBoomerMaster) RunCase() (err error)

type RunBoomerStandalone

type RunBoomerStandalone struct {
	CaseID uint
	// contains filtered or unexported fields
}

func (*RunBoomerStandalone) LoadCase

func (r *RunBoomerStandalone) LoadCase() (err error)

func (*RunBoomerStandalone) Report

func (r *RunBoomerStandalone) Report() (report *interfacecase.ApiReport, err error)

func (*RunBoomerStandalone) RunCase

func (r *RunBoomerStandalone) RunCase() (err error)

type TaskCaseHrp

type TaskCaseHrp struct {
	Name      string                  `json:"name"`
	Config    interfacecase.ApiConfig `json:"Config"`
	TestSteps []TestSteps             `json:"TestSteps"`
}

type TemplateVariable

type TemplateVariable struct {
	Env     string    `json:"env"`
	Detail  string    `json:"detail"`
	Content []Content `json:"content"`
	Title   string    `json:"title"`
}

type TestCase

type TestCase interface {
	LoadCase() (err error)
	RunCase() (err error)
	Report() (reports *interfacecase.ApiReport, err error)
}

func NewBoomer

func NewBoomer(runCaseReq request.RunCaseReq, runType interfacecase.RunType) TestCase

func NewBoomerDebug

func NewBoomerDebug(runCaseReq request.RunCaseReq, runType interfacecase.RunType) TestCase

func NewRunApi

func NewRunApi(runCaseReq request.RunCaseReq, runType interfacecase.RunType) TestCase

func NewRunBoomerMaster

func NewRunBoomerMaster(id uint) TestCase

func NewRunCase

func NewRunCase(runCaseReq request.RunCaseReq, runType interfacecase.RunType) TestCase

func NewRunStep

func NewRunStep(runCaseReq request.RunCaseReq, runType interfacecase.RunType) TestCase

func NewRunTag

func NewRunTag(runCaseReq request.RunCaseReq, runType interfacecase.RunType, msg *run.Msg) TestCase

func NewRunTask

func NewRunTask(runCaseReq request.RunCaseReq, runType interfacecase.RunType, msg *run.Msg) TestCase

type TestCases

type TestCases struct {
	Name      string                  `json:"name"`
	Config    interfacecase.ApiConfig `json:"Config"`
	TestSteps []interfacecase.ApiStep `json:"TestSteps"`
}

type TestSteps

type TestSteps struct {
	Name     string    `json:"name"`
	TestCase TestCases `json:"TestCase"`
}

type ToTestCase

type ToTestCase struct {
	Config    interfacecase.ApiConfig
	TestSteps []interface{}
}

type WeChatNotifier

type WeChatNotifier struct {
	NotifierDefault
}

func (WeChatNotifier) Send

func (wn WeChatNotifier) Send() error

func (WeChatNotifier) StringWidth

func (wn WeChatNotifier) StringWidth(s string) int

type WeChatNotifierText

type WeChatNotifierText struct {
	NotifierDefault
}

func (WeChatNotifierText) Send

func (wn WeChatNotifierText) Send() (err error)

Jump to

Keyboard shortcuts

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