db

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiCount added in v1.4.0

type ApiCount struct {
	Count   int64  `json:"count"`
	SceneID uint64 `json:"sceneID" gorm:"scene_id"`
}

type AutoTestExecHistory added in v1.4.0

type AutoTestExecHistory struct {
	dbengine.BaseModel

	CreatorID   string
	ProjectID   uint64
	SpaceID     uint64
	IterationID uint64
	PlanID      uint64
	SceneID     uint64
	SceneSetID  uint64
	StepID      uint64
	ParentPID   uint64
	Type        apistructs.StepAPIType
	Status      apistructs.PipelineStatus

	PipelineYml   string // Used to record the order of scenes,sceneSets and steps
	ExecuteApiNum int64
	SuccessApiNum int64
	PassRate      float64
	ExecuteRate   float64
	TotalApiNum   int64
	ExecuteTime   time.Time
	CostTimeSec   int64
	OrgID         uint64
	TimeBegin     time.Time
	TimeEnd       time.Time
	PipelineID    uint64
}

func (AutoTestExecHistory) TableName added in v1.4.0

func (AutoTestExecHistory) TableName() string

type AutoTestScene added in v1.4.0

type AutoTestScene struct {
	dbengine.BaseModel
	Name        string                 `gorm:"name"`
	Description string                 `gorm:"description"` // 描述
	SpaceID     uint64                 `gorm:"space_id"`    // 场景所属测试空间ID
	SetID       uint64                 `gorm:"set_id"`      // 场景集ID
	PreID       uint64                 `gorm:"pre_id"`      // 排序的前驱ID
	CreatorID   string                 `gorm:"creator_id"`
	UpdaterID   string                 `gorm:"updater_id"`
	Status      apistructs.SceneStatus `gorm:"status"`
	RefSetID    uint64                 `gorm:"ref_set_id"` // 引用场景集ID
}

func (AutoTestScene) TableName added in v1.4.0

func (AutoTestScene) TableName() string

type TestPlanDB

type TestPlanDB struct {
	*dao.DBClient
}

TestPlanDB .

func (*TestPlanDB) BatchCreateAutoTestExecHistory added in v1.4.0

func (db *TestPlanDB) BatchCreateAutoTestExecHistory(list []AutoTestExecHistory) error

BatchCreateAutoTestExecHistory .

func (*TestPlanDB) CountApiBySceneID added in v1.4.0

func (db *TestPlanDB) CountApiBySceneID(sceneID ...uint64) (counts []ApiCount, err error)

CountApiBySceneID .

func (*TestPlanDB) CreateAutoTestExecHistory added in v1.4.0

func (db *TestPlanDB) CreateAutoTestExecHistory(execHistory *AutoTestExecHistory) error

CreateAutoTestExecHistory .

func (*TestPlanDB) GetTestPlan added in v1.4.0

func (db *TestPlanDB) GetTestPlan(id uint64) (*TestPlanV2, error)

GetTestPlan .

func (*TestPlanDB) ListSceneBySceneSetID added in v1.4.0

func (db *TestPlanDB) ListSceneBySceneSetID(setID ...uint64) (scenes []AutoTestScene, err error)

ListSceneBySceneSetID .

func (*TestPlanDB) ListTestPlanByPlanID added in v1.4.0

func (db *TestPlanDB) ListTestPlanByPlanID(planID ...uint64) (testPlans []TestPlanV2Step, err error)

ListTestPlanByPlanID .

func (*TestPlanDB) UpdateTestPlanV2

func (db *TestPlanDB) UpdateTestPlanV2(testPlanID uint64, fields map[string]interface{}) error

UpdateTestPlanV2 Update test plan

type TestPlanV2

type TestPlanV2 struct {
	dbengine.BaseModel
	Name          string
	Desc          string
	CreatorID     string
	UpdaterID     string
	ProjectID     uint64
	SpaceID       uint64
	PipelineID    uint64
	PassRate      float64
	ExecuteTime   *time.Time
	ExecuteApiNum uint64
	TotalApiNum   uint64
	SuccessApiNum uint64
	ExecuteRate   float64
	IterationID   uint64
	CostTimeSec   int64
}

TestPlanV2 测试计划V2

func (TestPlanV2) TableName

func (TestPlanV2) TableName() string

TableName table name

type TestPlanV2Step added in v1.4.0

type TestPlanV2Step struct {
	dbengine.BaseModel
	PlanID     uint64
	SceneSetID uint64
	PreID      uint64
	GroupID    uint64
}

func (TestPlanV2Step) TableName added in v1.4.0

func (TestPlanV2Step) TableName() string

Jump to

Keyboard shortcuts

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