Documentation ¶
Overview ¶
Package dbclient 定义数据库操作的方法, orm 等。
Index ¶
- Constants
- type AutoTestFileTreeNode
- type AutoTestFileTreeNodeHistory
- type AutoTestFileTreeNodeMeta
- type AutoTestPlanMember
- type AutoTestScene
- type AutoTestSceneInput
- type AutoTestSceneOutput
- type AutoTestSceneStep
- type AutoTestSpace
- type DBClient
- func (client *DBClient) AddTestPlanV2Step(req *apistructs.TestPlanV2StepAddRequest) error
- func (client *DBClient) BatchCopyTestCases(req apistructs.TestCaseBatchCopyRequest) error
- func (client *DBClient) BatchCreateAutoTestPlanMembers(members []AutoTestPlanMember) error
- func (client *DBClient) BatchCreateIssueTestCaseRelations(rels []IssueTestCaseRelation) error
- func (client *DBClient) BatchCreateTestPlanCaseRels(rels []TestPlanCaseRel) error
- func (client *DBClient) BatchCreateTestPlanMembers(members []TestPlanMember) error
- func (client *DBClient) BatchDeleteSonarMetricRules(rules []QASonarMetricRules) (err error)
- func (client *DBClient) BatchDeleteTestCases(ids []uint64) error
- func (client *DBClient) BatchInsertSonarMetricRules(rules []*QASonarMetricRules) (err error)
- func (client *DBClient) BatchUpdateTestCases(req apistructs.TestCaseBatchUpdateRequest) error
- func (client *DBClient) BatchUpdateTestPlanCaseRels(req apistructs.TestPlanCaseRelBatchUpdateRequest) error
- func (db *DBClient) BulkInsert(objects interface{}, excludeColumns ...string) error
- func (client *DBClient) CheckRelatedSceneSet(setId uint64) (bool, error)
- func (client *DBClient) CheckSceneSetIsExists(setID uint64) error
- func (client *DBClient) CheckTestPlanCaseRelIDsExistOrNot(planID uint64, caseIDs []uint64) ([]uint64, []uint64, error)
- func (client *DBClient) CheckTestPlanV2NameExist(name string) error
- func (client *DBClient) CleanTestCasesByTestSetID(projectID, testSetID uint64) error
- func (db *DBClient) CleanTestSetFromRecycleBin(testSetID uint64) error
- func (db *DBClient) Close() error
- func (db *DBClient) CopyAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) CountSceneBySetAndName(setId uint64, name string) (int, error)
- func (db *DBClient) CountSceneBySetID(setId uint64) (uint64, error)
- func (db *DBClient) CountSceneBySpaceID(spaceID uint64) (uint64, error)
- func (client *DBClient) CountSceneSetByName(name string, spaceId uint64) (int, error)
- func (db *DBClient) CreateAutoTestFileTreeNode(node *AutoTestFileTreeNode) error
- func (db *DBClient) CreateAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
- func (db *DBClient) CreateAutoTestFileTreeNodeMeta(meta *AutoTestFileTreeNodeMeta) error
- func (client *DBClient) CreateAutoTestPlanMember(mem *AutoTestPlanMember) error
- func (db *DBClient) CreateAutoTestSceneInput(input *AutoTestSceneInput) error
- func (db *DBClient) CreateAutoTestSceneInputs(input []AutoTestSceneInput) error
- func (db *DBClient) CreateAutoTestSceneOutput(output *AutoTestSceneOutput) error
- func (db *DBClient) CreateAutoTestSceneOutputs(output []AutoTestSceneOutput) error
- func (db *DBClient) CreateAutoTestSceneStep(step *AutoTestSceneStep) error
- func (db *DBClient) CreateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
- func (db *DBClient) CreateAutotestScene(node *AutoTestScene) error
- func (db *DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaAddExtraByInode(inode string, addExtra map[string]interface{}) error
- func (db *DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaPipelineYmlAndSnippetObjByInode(inode, pipelineYml string, snippetAction apistructs.PipelineYmlAction) error
- func (client *DBClient) CreateSceneSet(sceneSet *SceneSet) error
- func (client *DBClient) CreateTestCase(uc *TestCase) error
- func (client *DBClient) CreateTestPlan(testPlan *TestPlan) error
- func (client *DBClient) CreateTestPlanCaseRel(testPlanCaseRel *TestPlanCaseRel) error
- func (client *DBClient) CreateTestPlanMember(mem *TestPlanMember) error
- func (client *DBClient) CreateTestPlanV2(testPlan *TestPlanV2) error
- func (db *DBClient) CreateTestSet(testset *TestSet) error
- func (db *DBClient) DeleteAutoTestFileTreeNodeByInode(inode string) error
- func (db *DBClient) DeleteAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
- func (client *DBClient) DeleteAutoTestPlanMemberByPlanID(planID uint64) error
- func (db *DBClient) DeleteAutoTestScene(id uint64) error
- func (db *DBClient) DeleteAutoTestSceneInput(id uint64) error
- func (db *DBClient) DeleteAutoTestSceneOutput(id uint64) error
- func (db *DBClient) DeleteAutoTestSceneStep(id uint64) error
- func (db *DBClient) DeleteAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
- func (db *DBClient) DeleteAutoTestSpaceRelation(spaceID uint64) error
- func (client *DBClient) DeleteIssueTestCaseRelationsByIDs(ids []uint64) error
- func (client *DBClient) DeleteIssueTestCaseRelationsByIssueIDs(issueIDs []uint64) error
- func (client *DBClient) DeleteIssueTestCaseRelationsByTestCaseIDs(testCaseIds []uint64) error
- func (client *DBClient) DeleteIssueTestCaseRelationsByTestPlanCaseRelIDs(testPlanCaseRelIDs []uint64) error
- func (client *DBClient) DeleteSceneSet(sceneSet *SceneSet, scenes []uint64) error
- func (client *DBClient) DeleteTestPlan(testPlanID uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelByTestCaseID(testCaseID uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelByTestPlanID(testPlanID uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelations(testPlanID uint64, relIDs []uint64) error
- func (client *DBClient) DeleteTestPlanCaseRelationsByTestCaseIds(testCaseIds []uint64) error
- func (client *DBClient) DeleteTestPlanMemberByPlanID(planID uint64) error
- func (client *DBClient) DeleteTestPlanV2ByID(testPlanID uint64) error
- func (client *DBClient) DeleteTestPlanV2Step(req *apistructs.TestPlanV2StepDeleteRequest) error
- func (client *DBClient) FindByPreId(id uint64) (*SceneSet, error)
- func (db *DBClient) FuzzySearchAutoTestFileTreeNodes(scope, scopeID string, prefixFuzzy, suffixFuzzy, fuzzy string, ...) ([]AutoTestFileTreeNode, error)
- func (db *DBClient) GetAllTestSets() ([]TestSet, error)
- func (db *DBClient) GetAutoTestFileTreeNodeByInode(inode string) (*AutoTestFileTreeNode, bool, error)
- func (db *DBClient) GetAutoTestFileTreeNodeMetaByInode(inode string) (*AutoTestFileTreeNodeMeta, bool, error)
- func (db *DBClient) GetAutoTestFileTreeScopeRootDir(scope, scopeID string) (*AutoTestFileTreeNode, bool, error)
- func (db *DBClient) GetAutoTestSceneInput(id uint64) (*AutoTestSceneInput, error)
- func (db *DBClient) GetAutoTestSceneOutput(id uint64) (*AutoTestSceneOutput, error)
- func (db *DBClient) GetAutoTestScenePreByPosition(req apistructs.AutotestSceneRequest) (uint64, uint64, bool, error)
- func (db *DBClient) GetAutoTestSceneStep(id uint64) (*AutoTestSceneStep, error)
- func (db *DBClient) GetAutoTestSceneStepByPreID(preID uint64, preType apistructs.PreType) (*AutoTestSceneStep, error)
- func (db *DBClient) GetAutoTestSceneStepCount(sceneID []uint64) ([]GetNum, error)
- func (db *DBClient) GetAutoTestSceneStepNumber(sceneID uint64) (uint64, error)
- func (db *DBClient) GetAutoTestSpace(id uint64) (*AutoTestSpace, error)
- func (db *DBClient) GetAutoTestSpaceStepNumber(spaceID uint64) (uint64, error)
- func (db *DBClient) GetAutotestScene(id uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneByName(name string, setID uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneByPreID(preID uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSceneFirst(setID uint64) (*AutoTestScene, error)
- func (db *DBClient) GetAutotestSpaceByName(name string, projectID int64) (*AutoTestSpace, error)
- func (db *DBClient) GetMaxOrderNumUnderParentTestSet(projectID, parentID uint64, recycled bool) (int, error)
- func (client *DBClient) GetSceneSet(id uint64) (*SceneSet, error)
- func (client *DBClient) GetSceneSetByPreID(preID uint64) (*SceneSet, error)
- func (client *DBClient) GetSonarMetricRules(ID int64) (*QASonarMetricRules, error)
- func (client *DBClient) GetStepByTestPlanID(testPlanID uint64, needSort bool) ([]TestPlanV2StepJoin, int64, error)
- func (client *DBClient) GetTestCaseByID(id uint64) (*TestCase, error)
- func (client *DBClient) GetTestPlan(testPlanID uint64) (*TestPlan, error)
- func (client *DBClient) GetTestPlanByName(projectID uint64, name string) (*TestPlan, error)
- func (client *DBClient) GetTestPlanCaseRel(relID uint64) (*TestPlanCaseRel, error)
- func (client *DBClient) GetTestPlanCaseRelByPlanIDAndCaseID(planID, caseID uint64) (*TestPlanCaseRel, error)
- func (client *DBClient) GetTestPlanV2ByID(testPlanID uint64) (*TestPlanV2, error)
- func (client *DBClient) GetTestPlanV2Step(ID uint64) (*TestPlanV2StepJoin, error)
- func (client *DBClient) GetTestPlanV2StepByPreID(preID uint64) (*TestPlanV2Step, error)
- func (db *DBClient) GetTestSetByID(id uint64) (*TestSet, error)
- func (db *DBClient) GetTestSetByNameAndParentIDAndProjectID(projectID, parentID uint64, recycled bool, name string) (*TestSet, error)
- func (db *DBClient) GetTestSetByParentID(parentID, projectID uint64) (*[]TestSet, error)
- func (db *DBClient) GetTestSetByParentIDAndProjectIDAsc(parentIDs []uint64, projectID uint64, recycled bool, testSetIDs []uint64) ([]TestSet, error)
- func (db *DBClient) GetTestSetByParentIDsAndProjectID(parentIDs []uint64, projectID uint64, recycled bool) ([]TestSet, error)
- func (db *DBClient) GetTestSetDirectoryByID(id uint64) (string, error)
- func (client *DBClient) GetUserAutoTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
- func (client *DBClient) GetUserTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
- func (db *DBClient) Insert(scene *AutoTestScene, id uint64) error
- func (db *DBClient) InsertAutoTestSceneStep(req apistructs.AutotestSceneRequest, preID uint64) (uint64, error)
- func (db *DBClient) ListAutoTestFileTreeNodeByPinode(pinode string) ([]AutoTestFileTreeNode, error)
- func (db *DBClient) ListAutoTestFileTreeNodeByPinodeAndNamePrefix(pinode, namePrefix string) ([]AutoTestFileTreeNode, error)
- func (db *DBClient) ListAutoTestFileTreeNodeHistoryByinode(inode string) ([]AutoTestFileTreeNodeHistory, error)
- func (client *DBClient) ListAutoTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]AutoTestPlanMember, error)
- func (client *DBClient) ListAutoTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]AutoTestPlanMember, error)
- func (client *DBClient) ListAutoTestPlanOwnersByOwners(owners []string) ([]AutoTestPlanMember, error)
- func (client *DBClient) ListAutoTestPlanOwnersByPlanID(testPlanID uint64) ([]AutoTestPlanMember, error)
- func (db *DBClient) ListAutoTestSceneInput(sceneID uint64) ([]AutoTestSceneInput, error)
- func (db *DBClient) ListAutoTestSceneInputByScenes(sceneID []uint64) ([]AutoTestSceneInput, error)
- func (db *DBClient) ListAutoTestSceneOutput(sceneID uint64) ([]AutoTestSceneOutput, error)
- func (db *DBClient) ListAutoTestSceneOutputByScenes(sceneID []uint64) ([]AutoTestSceneOutput, error)
- func (db *DBClient) ListAutoTestSceneStep(sceneID uint64) ([]AutoTestSceneStep, error)
- func (db *DBClient) ListAutoTestSceneSteps(sceneID []uint64) ([]AutoTestSceneStep, error)
- func (db *DBClient) ListAutoTestSpaceByProject(projectID int64, pageNo, pageSize int) ([]AutoTestSpace, int, error)
- func (db *DBClient) ListAutotestScene(req apistructs.AutotestSceneRequest) (uint64, []AutoTestScene, error)
- func (db *DBClient) ListAutotestScenes(setIDs []uint64) ([]AutoTestScene, error)
- func (client *DBClient) ListIssueTestCaseRelations(req apistructs.IssueTestCaseRelationsListRequest) ([]IssueTestCaseRelation, error)
- func (client *DBClient) ListSonarMetricRules(query *QASonarMetricRules, otherQueryFuncList ...func(sql *gorm.DB) *gorm.DB) (dbRules []QASonarMetricRules, err error)
- func (client *DBClient) ListTestCasesByIDs(ids []uint64) ([]TestCase, error)
- func (client *DBClient) ListTestCasesByTestSetIDs(req apistructs.TestCaseListRequest) ([]TestCase, error)
- func (client *DBClient) ListTestPlanCaseRels(req apistructs.TestPlanCaseRelListRequest) ([]TestPlanCaseRel, error)
- func (client *DBClient) ListTestPlanCaseRelsCount(testPlanIDs []uint64) (map[uint64]apistructs.TestPlanRelsCount, error)
- func (client *DBClient) ListTestPlanIDsByOwnerIDs(ownerIDs []string) ([]uint64, error)
- func (client *DBClient) ListTestPlanIDsByPartnerIDs(partnerIDs []string) ([]uint64, error)
- func (client *DBClient) ListTestPlanIDsByUserIDs(userIDs []string, roles ...apistructs.TestPlanMemberRole) ([]uint64, error)
- func (client *DBClient) ListTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]TestPlanMember, error)
- func (client *DBClient) ListTestPlanOwnersByOwners(owners []string) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanOwnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanPartnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
- func (client *DBClient) ListTestPlanTestSetIDs(testPlanID uint64) ([]uint64, error)
- func (db *DBClient) ListTestSetByIDs(ids []uint64) ([]TestSet, error)
- func (db *DBClient) ListTestSets(req apistructs.TestSetListRequest) ([]TestSet, error)
- func (db *DBClient) ListTestSetsRecursive(req apistructs.TestSetListRequest) ([]uint64, []TestSet, error)
- func (db *DBClient) MoveAutoTestFileTreeNode(inode, pinode, name, updaterID string) error
- func (db *DBClient) MoveAutoTestScene(id, preID, setID uint64) error
- func (db *DBClient) MoveAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) MoveAutoTestSceneStepGroup(req apistructs.AutotestSceneRequest) error
- func (db *DBClient) MoveAutoTestSceneStepToGroup(req apistructs.AutotestSceneRequest) error
- func (client *DBClient) MoveSceneSet(req apistructs.SceneSetRequest) error
- func (client *DBClient) MoveTestPlanV2Step(req *apistructs.TestPlanV2StepUpdateRequest) error
- func (client *DBClient) OverwriteAutoTestPlanMembers(testPlanID uint64, members []AutoTestPlanMember) error
- func (client *DBClient) OverwriteAutoTestPlanOwner(testPlanID uint64, ownerID string) error
- func (client *DBClient) OverwriteAutoTestPlanPartners(testPlanID uint64, partnerIDs []string) error
- func (client *DBClient) OverwriteTestPlanMembers(testPlanID uint64, members []TestPlanMember) error
- func (client *DBClient) OverwriteTestPlanOwner(testPlanID uint64, ownerID string) error
- func (client *DBClient) OverwriteTestPlanPartners(testPlanID uint64, partnerIDs []string) error
- func (client *DBClient) PagingSonarMetricRules(req apistructs.SonarMetricRulesPagingRequest) (*dbclient.Paging, error)
- func (client *DBClient) PagingTestPlan(req apistructs.TestPlanPagingRequest) (uint64, []TestPlan, error)
- func (client *DBClient) PagingTestPlanV2(req *apistructs.TestPlanV2PagingRequest) (int, []*apistructs.TestPlanV2, []string, error)
- func (client *DBClient) RecoverTestCasesByTestSetID(projectID, testSetID uint64) error
- func (db *DBClient) RecoverTestSet(testSetID, targetTestSetID uint64, name string) error
- func (db *DBClient) RecycleTestSet(testSetID uint64, newParentID *uint64) error
- func (client *DBClient) RecycledTestCasesByTestSetID(projectID, testSetID uint64) error
- func (client *DBClient) SceneSetsBySpaceID(spaceID uint64) ([]SceneSet, error)
- func (db *DBClient) Transaction(f func(tx *gorm.DB) error) error
- func (db *DBClient) UpdateAutoTestFileTreeNodeBasicInfo(inode string, updateColumns map[string]interface{}) error
- func (client *DBClient) UpdateAutoTestPlanMember(mem *AutoTestPlanMember) error
- func (db *DBClient) UpdateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
- func (db *DBClient) UpdateAutotestScene(node *AutoTestScene) error
- func (db *DBClient) UpdateAutotestSceneInput(input *AutoTestSceneInput) error
- func (db *DBClient) UpdateAutotestSceneOutput(output *AutoTestSceneOutput) error
- func (db *DBClient) UpdateAutotestSceneStep(step *AutoTestSceneStep) error
- func (db *DBClient) UpdateAutotestSceneUpdateAt(sceneID uint64, time time.Time) error
- func (db *DBClient) UpdateAutotestSceneUpdater(sceneID uint64, userID string) error
- func (db *DBClient) UpdateSceneRefSetID(copyRefs apistructs.AutoTestSceneCopyRef) error
- func (client *DBClient) UpdateSceneSet(sceneSet *SceneSet) (*SceneSet, error)
- func (client *DBClient) UpdateSonarMetricRules(updateObj *QASonarMetricRules) (err error)
- func (client *DBClient) UpdateTestCase(uc *TestCase) error
- func (client *DBClient) UpdateTestPlan(testPlan *TestPlan) error
- func (client *DBClient) UpdateTestPlanMember(mem *TestPlanMember) error
- func (client *DBClient) UpdateTestPlanTestCaseRel(testPlanCaseRel *TestPlanCaseRel) error
- func (client *DBClient) UpdateTestPlanV2(testPlanID uint64, fields map[string]interface{}) error
- func (client *DBClient) UpdateTestPlanV2Step(step TestPlanV2Step) error
- func (db *DBClient) UpdateTestSet(testset *TestSet) error
- type GetNum
- type IssueTestCaseRelation
- type PartnerIDs
- type QASonarMetricRules
- type SceneSet
- type TestCase
- type TestCaseStepAndResults
- type TestPlan
- type TestPlanCaseRel
- type TestPlanMember
- type TestPlanV2
- type TestPlanV2Join
- type TestPlanV2Step
- type TestPlanV2StepJoin
- type TestSet
Constants ¶
const BULK_INSERT_CHUNK_SIZE = 3000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoTestFileTreeNode ¶
type AutoTestFileTreeNode struct { dbengine.BaseModel Type apistructs.UnifiedFileTreeNodeType Scope string ScopeID string Pinode string `gorm:"type:bigint(20)"` // root dir 的 pinode 为 "0",表示无 pinode Inode string `gorm:"type:bigint(20)"` Name string Desc string CreatorID string UpdaterID string }
Inode / Pinode 使用 snowflake uuid
func (AutoTestFileTreeNode) TableName ¶
func (AutoTestFileTreeNode) TableName() string
type AutoTestFileTreeNodeHistory ¶
type AutoTestFileTreeNodeHistory struct { dbengine.BaseModel Pinode string `gorm:"type:bigint(20)"` // root dir 的 pinode 为 "0",表示无 pinode Inode string `gorm:"type:bigint(20)"` Name string `gorm:"name"` Desc string `gorm:"desc"` CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` PipelineYml string `gorm:"pipeline_yml"` // 节点的 pipeline yml 文件,pipeline 可以通过 snippetAction 配置 SnippetAction snippetActionType `gorm:"snippet_action"` // 其他用例或计划通过 snippet 方式引用时当前节点时, 根据该参数拼装出 snippet action Extra autoTestFileTreeNodeMetaExtra `gorm:"extra"` }
func (AutoTestFileTreeNodeHistory) TableName ¶
func (AutoTestFileTreeNodeHistory) TableName() string
type AutoTestFileTreeNodeMeta ¶
type AutoTestFileTreeNodeMeta struct { dbengine.BaseModel Inode string `gorm:"type:bigint(20)"` PipelineYml string // 节点的 pipeline yml 文件,pipeline 可以通过 snippetAction 配置 SnippetAction snippetActionType // 其他用例或计划通过 snippet 方式引用时当前节点时, 根据该参数拼装出 snippet action Extra autoTestFileTreeNodeMetaExtra }
func (AutoTestFileTreeNodeMeta) TableName ¶
func (AutoTestFileTreeNodeMeta) TableName() string
type AutoTestPlanMember ¶
type AutoTestPlanMember struct { dbengine.BaseModel TestPlanID uint64 `json:"testPlanID"` Role apistructs.TestPlanMemberRole `json:"role"` UserID string `json:"userID"` }
AutoTestPlanMember 自动测试计划成员表
func (AutoTestPlanMember) TableName ¶
func (AutoTestPlanMember) TableName() string
type AutoTestScene ¶
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) Convert ¶
func (s *AutoTestScene) Convert() apistructs.AutoTestScene
func (AutoTestScene) TableName ¶
func (AutoTestScene) TableName() string
type AutoTestSceneInput ¶
type AutoTestSceneInput struct { dbengine.BaseModel Name string `gorm:"name"` Value string `gorm:"value"` // 默认值 Temp string `gorm:"temp"` // 当前值 Description string `gorm:"description"` // 描述 SceneID uint64 `gorm:"scene_id"` // 场景ID SpaceID uint64 `gorm:"space_id"` // 所属测试空间ID CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` }
func (AutoTestSceneInput) TableName ¶
func (AutoTestSceneInput) TableName() string
type AutoTestSceneOutput ¶
type AutoTestSceneOutput struct { dbengine.BaseModel Name string `gorm:"name"` Value string `gorm:"value"` // 值表达式 Description string `gorm:"description"` // 描述 SceneID uint64 `gorm:"scene_id"` // 场景ID SpaceID uint64 `gorm:"space_id"` // 所属测试空间ID CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` }
func (AutoTestSceneOutput) TableName ¶
func (AutoTestSceneOutput) TableName() string
type AutoTestSceneStep ¶
type AutoTestSceneStep struct { dbengine.BaseModel Type apistructs.StepAPIType `gorm:"type"` // 类型 Value string `gorm:"value"` // 值 Name string `gorm:"name"` // 名称 PreID uint64 `gorm:"pre_id"` // 排序id PreType apistructs.PreType `gorm:"pre_type"` // 串行/并行类型 SceneID uint64 `gorm:"scene_id"` // 场景ID SpaceID uint64 `gorm:"space_id"` // 所属测试空间ID APISpecID uint64 `gorm:"column:api_spec_id"` // api集市id CreatorID string `gorm:"creator_id"` UpdaterID string `gorm:"updater_id"` }
func (*AutoTestSceneStep) Convert ¶
func (v *AutoTestSceneStep) Convert() *apistructs.AutoTestSceneStep
func (AutoTestSceneStep) TableName ¶
func (AutoTestSceneStep) TableName() string
type AutoTestSpace ¶
type AutoTestSpace struct { dbengine.BaseModel Name string ProjectID int64 Description string CreatorID string UpdaterID string Status apistructs.AutoTestSpaceStatus // 被复制的源测试空间 SourceSpaceID *uint64 // DeletedAt 删除时间 DeletedAt *time.Time }
AutoTestSpace 测试空间
type DBClient ¶
func (*DBClient) AddTestPlanV2Step ¶
func (client *DBClient) AddTestPlanV2Step(req *apistructs.TestPlanV2StepAddRequest) error
AddTestPlanV2Step Insert a step in the test plan
func (*DBClient) BatchCopyTestCases ¶
func (client *DBClient) BatchCopyTestCases(req apistructs.TestCaseBatchCopyRequest) error
func (*DBClient) BatchCreateAutoTestPlanMembers ¶
func (client *DBClient) BatchCreateAutoTestPlanMembers(members []AutoTestPlanMember) error
func (*DBClient) BatchCreateIssueTestCaseRelations ¶
func (client *DBClient) BatchCreateIssueTestCaseRelations(rels []IssueTestCaseRelation) error
BatchCreateIssueTestCaseRelations 批量创建关联关系
func (*DBClient) BatchCreateTestPlanCaseRels ¶
func (client *DBClient) BatchCreateTestPlanCaseRels(rels []TestPlanCaseRel) error
func (*DBClient) BatchCreateTestPlanMembers ¶
func (client *DBClient) BatchCreateTestPlanMembers(members []TestPlanMember) error
func (*DBClient) BatchDeleteSonarMetricRules ¶
func (client *DBClient) BatchDeleteSonarMetricRules(rules []QASonarMetricRules) (err error)
func (*DBClient) BatchDeleteTestCases ¶
func (*DBClient) BatchInsertSonarMetricRules ¶
func (client *DBClient) BatchInsertSonarMetricRules(rules []*QASonarMetricRules) (err error)
func (*DBClient) BatchUpdateTestCases ¶
func (client *DBClient) BatchUpdateTestCases(req apistructs.TestCaseBatchUpdateRequest) error
func (*DBClient) BatchUpdateTestPlanCaseRels ¶
func (client *DBClient) BatchUpdateTestPlanCaseRels(req apistructs.TestPlanCaseRelBatchUpdateRequest) error
BatchUpdateTestPlanCaseRels 批量更新测试计划用例
func (*DBClient) BulkInsert ¶
func (*DBClient) CheckRelatedSceneSet ¶
func (*DBClient) CheckSceneSetIsExists ¶
CheckSceneSetIsExists check the SceneSet is exists
func (*DBClient) CheckTestPlanCaseRelIDsExistOrNot ¶
func (client *DBClient) CheckTestPlanCaseRelIDsExistOrNot(planID uint64, caseIDs []uint64) ([]uint64, []uint64, error)
CheckTestPlanCaseRelIDsExistOrNot 返回已存在和不存在的 id 列表 return: existIDs, notExistIDs, error
func (*DBClient) CheckTestPlanV2NameExist ¶
CheckTestPlanV2NameExist Check if the name of the test plan is repeated
func (*DBClient) CleanTestCasesByTestSetID ¶
CleanTestCasesByTestSetID 彻底删除测试集下的测试用例
func (*DBClient) CleanTestSetFromRecycleBin ¶
func (*DBClient) CopyAutoTestSceneStep ¶
func (db *DBClient) CopyAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
func (*DBClient) CountSceneBySetAndName ¶
func (*DBClient) CountSceneBySetID ¶
func (*DBClient) CountSceneBySpaceID ¶
func (*DBClient) CountSceneSetByName ¶
func (*DBClient) CreateAutoTestFileTreeNode ¶
func (db *DBClient) CreateAutoTestFileTreeNode(node *AutoTestFileTreeNode) error
func (*DBClient) CreateAutoTestFileTreeNodeHistory ¶
func (db *DBClient) CreateAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
func (*DBClient) CreateAutoTestFileTreeNodeMeta ¶
func (db *DBClient) CreateAutoTestFileTreeNodeMeta(meta *AutoTestFileTreeNodeMeta) error
func (*DBClient) CreateAutoTestPlanMember ¶
func (client *DBClient) CreateAutoTestPlanMember(mem *AutoTestPlanMember) error
func (*DBClient) CreateAutoTestSceneInput ¶
func (db *DBClient) CreateAutoTestSceneInput(input *AutoTestSceneInput) error
func (*DBClient) CreateAutoTestSceneInputs ¶
func (db *DBClient) CreateAutoTestSceneInputs(input []AutoTestSceneInput) error
func (*DBClient) CreateAutoTestSceneOutput ¶
func (db *DBClient) CreateAutoTestSceneOutput(output *AutoTestSceneOutput) error
func (*DBClient) CreateAutoTestSceneOutputs ¶
func (db *DBClient) CreateAutoTestSceneOutputs(output []AutoTestSceneOutput) error
func (*DBClient) CreateAutoTestSceneStep ¶
func (db *DBClient) CreateAutoTestSceneStep(step *AutoTestSceneStep) error
func (*DBClient) CreateAutoTestSpace ¶
func (db *DBClient) CreateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
CreateAutoTestSpace 创建测试空间
func (*DBClient) CreateAutotestScene ¶
func (db *DBClient) CreateAutotestScene(node *AutoTestScene) error
func (*DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaAddExtraByInode ¶
func (*DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaPipelineYmlAndSnippetObjByInode ¶
func (db *DBClient) CreateOrUpdateAutoTestFileTreeNodeMetaPipelineYmlAndSnippetObjByInode(inode, pipelineYml string, snippetAction apistructs.PipelineYmlAction) error
func (*DBClient) CreateSceneSet ¶
Create Scene Set
func (*DBClient) CreateTestCase ¶
CreateTestCase 创建测试用例
func (*DBClient) CreateTestPlan ¶
CreateTestPlan Create test plan
func (*DBClient) CreateTestPlanCaseRel ¶
func (client *DBClient) CreateTestPlanCaseRel(testPlanCaseRel *TestPlanCaseRel) error
CreateTestPlanCaseRel Create testPlanCaseRel
func (*DBClient) CreateTestPlanMember ¶
func (client *DBClient) CreateTestPlanMember(mem *TestPlanMember) error
func (*DBClient) CreateTestPlanV2 ¶
func (client *DBClient) CreateTestPlanV2(testPlan *TestPlanV2) error
CreateTestPlanV2 Create test plan
func (*DBClient) CreateTestSet ¶
CreateTestSet insert testset
func (*DBClient) DeleteAutoTestFileTreeNodeByInode ¶
func (*DBClient) DeleteAutoTestFileTreeNodeHistory ¶
func (db *DBClient) DeleteAutoTestFileTreeNodeHistory(node *AutoTestFileTreeNodeHistory) error
func (*DBClient) DeleteAutoTestPlanMemberByPlanID ¶
func (*DBClient) DeleteAutoTestScene ¶
func (*DBClient) DeleteAutoTestSceneInput ¶
func (*DBClient) DeleteAutoTestSceneOutput ¶
func (*DBClient) DeleteAutoTestSceneStep ¶
func (*DBClient) DeleteAutoTestSpace ¶
func (db *DBClient) DeleteAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
DeleteAutoTestSpace 删除测试空间
func (*DBClient) DeleteAutoTestSpaceRelation ¶
DeleteAutoTestSpaceRelation 删除测试空间关联
func (*DBClient) DeleteIssueTestCaseRelationsByIDs ¶
DeleteIssueTestCaseRelationsByIDs 根据关联关系 id 删除
func (*DBClient) DeleteIssueTestCaseRelationsByIssueIDs ¶
DeleteIssueTestCaseRelationsByIssueIDs 根据 issue ids 删除关联关系
func (*DBClient) DeleteIssueTestCaseRelationsByTestCaseIDs ¶
DeleteIssueTestCaseRelationsByCaseIDs 根据 test case id 删除关联关系
func (*DBClient) DeleteIssueTestCaseRelationsByTestPlanCaseRelIDs ¶
func (client *DBClient) DeleteIssueTestCaseRelationsByTestPlanCaseRelIDs(testPlanCaseRelIDs []uint64) error
DeleteIssueTestCaseRelationsByTestPlanCaseRelIDs 根据 测试计划用例 ids 删除
func (*DBClient) DeleteSceneSet ¶
Delete Sceneset
func (*DBClient) DeleteTestPlan ¶
DeleteTestPlan Delete test plan
func (*DBClient) DeleteTestPlanCaseRelByTestCaseID ¶
DeleteTestPlanCaseRelByTestCaseID Delete relations by testCaseID
func (*DBClient) DeleteTestPlanCaseRelByTestPlanID ¶
DeleteTestPlanCaseRelByTestPlanID Delete relations by testPlanID
func (*DBClient) DeleteTestPlanCaseRelations ¶
DeleteTestPlanCaseRelations
func (*DBClient) DeleteTestPlanCaseRelationsByTestCaseIds ¶
DeleteTestPlanCaseRelationsByTestCaseIds
func (*DBClient) DeleteTestPlanMemberByPlanID ¶
func (*DBClient) DeleteTestPlanV2ByID ¶
DeleteTestPlanV2ByID Delete test plan and his all steps by ID
func (*DBClient) DeleteTestPlanV2Step ¶
func (client *DBClient) DeleteTestPlanV2Step(req *apistructs.TestPlanV2StepDeleteRequest) error
DeleteTestPlanV2Step Delete a step in the test plan
func (*DBClient) FuzzySearchAutoTestFileTreeNodes ¶
func (*DBClient) GetAllTestSets ¶
func (*DBClient) GetAutoTestFileTreeNodeByInode ¶
func (db *DBClient) GetAutoTestFileTreeNodeByInode(inode string) (*AutoTestFileTreeNode, bool, error)
func (*DBClient) GetAutoTestFileTreeNodeMetaByInode ¶
func (db *DBClient) GetAutoTestFileTreeNodeMetaByInode(inode string) (*AutoTestFileTreeNodeMeta, bool, error)
func (*DBClient) GetAutoTestFileTreeScopeRootDir ¶
func (db *DBClient) GetAutoTestFileTreeScopeRootDir(scope, scopeID string) (*AutoTestFileTreeNode, bool, error)
func (*DBClient) GetAutoTestSceneInput ¶
func (db *DBClient) GetAutoTestSceneInput(id uint64) (*AutoTestSceneInput, error)
func (*DBClient) GetAutoTestSceneOutput ¶
func (db *DBClient) GetAutoTestSceneOutput(id uint64) (*AutoTestSceneOutput, error)
func (*DBClient) GetAutoTestScenePreByPosition ¶
func (db *DBClient) GetAutoTestScenePreByPosition(req apistructs.AutotestSceneRequest) (uint64, uint64, bool, error)
func (*DBClient) GetAutoTestSceneStep ¶
func (db *DBClient) GetAutoTestSceneStep(id uint64) (*AutoTestSceneStep, error)
func (*DBClient) GetAutoTestSceneStepByPreID ¶
func (db *DBClient) GetAutoTestSceneStepByPreID(preID uint64, preType apistructs.PreType) (*AutoTestSceneStep, error)
func (*DBClient) GetAutoTestSceneStepCount ¶
func (*DBClient) GetAutoTestSceneStepNumber ¶
func (*DBClient) GetAutoTestSpace ¶
func (db *DBClient) GetAutoTestSpace(id uint64) (*AutoTestSpace, error)
GetAutoTestSpace 获取测试空间
func (*DBClient) GetAutoTestSpaceStepNumber ¶
func (*DBClient) GetAutotestScene ¶
func (db *DBClient) GetAutotestScene(id uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneByName ¶
func (db *DBClient) GetAutotestSceneByName(name string, setID uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneByPreID ¶
func (db *DBClient) GetAutotestSceneByPreID(preID uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSceneFirst ¶
func (db *DBClient) GetAutotestSceneFirst(setID uint64) (*AutoTestScene, error)
func (*DBClient) GetAutotestSpaceByName ¶
func (db *DBClient) GetAutotestSpaceByName(name string, projectID int64) (*AutoTestSpace, error)
GetAutotestSpaceByName 通过空间名获取空间
func (*DBClient) GetMaxOrderNumUnderParentTestSet ¶
func (db *DBClient) GetMaxOrderNumUnderParentTestSet(projectID, parentID uint64, recycled bool) (int, error)
GetMaxOrderNumUnderParentTestSet 返回当前父测试集下的最大 order num 若当前父测试集下没有子测试集,则返回 -1
func (*DBClient) GetSceneSet ¶
Get Sceneset by id
func (*DBClient) GetSceneSetByPreID ¶
func (*DBClient) GetSonarMetricRules ¶
func (client *DBClient) GetSonarMetricRules(ID int64) (*QASonarMetricRules, error)
func (*DBClient) GetStepByTestPlanID ¶
func (client *DBClient) GetStepByTestPlanID(testPlanID uint64, needSort bool) ([]TestPlanV2StepJoin, int64, error)
GetStepByTestPlanID Get steps of test plan if needSort is true then return a sorted list
func (*DBClient) GetTestCaseByID ¶
func (*DBClient) GetTestPlan ¶
GetTestPlan Fetch test plan
func (*DBClient) GetTestPlanByName ¶
GetTestPlanByName
func (*DBClient) GetTestPlanCaseRel ¶
func (client *DBClient) GetTestPlanCaseRel(relID uint64) (*TestPlanCaseRel, error)
GetTestPlanCaseRel Fetch testPlanCaseRel
func (*DBClient) GetTestPlanCaseRelByPlanIDAndCaseID ¶
func (client *DBClient) GetTestPlanCaseRelByPlanIDAndCaseID(planID, caseID uint64) (*TestPlanCaseRel, error)
func (*DBClient) GetTestPlanV2ByID ¶
func (client *DBClient) GetTestPlanV2ByID(testPlanID uint64) (*TestPlanV2, error)
GetTestPlanV2ByID Get test plan by id
func (*DBClient) GetTestPlanV2Step ¶
func (client *DBClient) GetTestPlanV2Step(ID uint64) (*TestPlanV2StepJoin, error)
func (*DBClient) GetTestPlanV2StepByPreID ¶
func (client *DBClient) GetTestPlanV2StepByPreID(preID uint64) (*TestPlanV2Step, error)
func (*DBClient) GetTestSetByID ¶
GetTestSetByID 根据ID获取测试集
func (*DBClient) GetTestSetByNameAndParentIDAndProjectID ¶
func (db *DBClient) GetTestSetByNameAndParentIDAndProjectID(projectID, parentID uint64, recycled bool, name string) (*TestSet, error)
ListTestSets 根据父ID和项目ID获取测试集
func (*DBClient) GetTestSetByParentID ¶
GetTestSetByParentID 根据父ID和项目ID获取测试集
func (*DBClient) GetTestSetByParentIDAndProjectIDAsc ¶
func (db *DBClient) GetTestSetByParentIDAndProjectIDAsc(parentIDs []uint64, projectID uint64, recycled bool, testSetIDs []uint64) ([]TestSet, error)
GetTestSetByParentIDAndProjectIDAsc 根据父ID和项目ID获取子测试集信息,升序排列
func (*DBClient) GetTestSetByParentIDsAndProjectID ¶
func (db *DBClient) GetTestSetByParentIDsAndProjectID(parentIDs []uint64, projectID uint64, recycled bool) ([]TestSet, error)
GetTestSetByParentIDsAndProjectID 根据父ID和项目ID获取测试集
func (*DBClient) GetTestSetDirectoryByID ¶
GetTestSetDirectoryByID 根据ID获取测试集的路径
func (*DBClient) GetUserAutoTestPlanRole ¶
func (client *DBClient) GetUserAutoTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
func (*DBClient) GetUserTestPlanRole ¶
func (client *DBClient) GetUserTestPlanRole(userID string, testPlanID uint64) (apistructs.TestPlanMemberRole, error)
func (*DBClient) InsertAutoTestSceneStep ¶
func (db *DBClient) InsertAutoTestSceneStep(req apistructs.AutotestSceneRequest, preID uint64) (uint64, error)
func (*DBClient) ListAutoTestFileTreeNodeByPinode ¶
func (db *DBClient) ListAutoTestFileTreeNodeByPinode(pinode string) ([]AutoTestFileTreeNode, error)
func (*DBClient) ListAutoTestFileTreeNodeByPinodeAndNamePrefix ¶
func (db *DBClient) ListAutoTestFileTreeNodeByPinodeAndNamePrefix(pinode, namePrefix string) ([]AutoTestFileTreeNode, error)
func (*DBClient) ListAutoTestFileTreeNodeHistoryByinode ¶
func (db *DBClient) ListAutoTestFileTreeNodeHistoryByinode(inode string) ([]AutoTestFileTreeNodeHistory, error)
func (*DBClient) ListAutoTestPlanMembersByPlanID ¶
func (client *DBClient) ListAutoTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestPlanMembersByPlanIDs ¶
func (client *DBClient) ListAutoTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestPlanOwnersByOwners ¶
func (client *DBClient) ListAutoTestPlanOwnersByOwners(owners []string) ([]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestPlanOwnersByPlanID ¶
func (client *DBClient) ListAutoTestPlanOwnersByPlanID(testPlanID uint64) ([]AutoTestPlanMember, error)
func (*DBClient) ListAutoTestSceneInput ¶
func (db *DBClient) ListAutoTestSceneInput(sceneID uint64) ([]AutoTestSceneInput, error)
func (*DBClient) ListAutoTestSceneInputByScenes ¶
func (db *DBClient) ListAutoTestSceneInputByScenes(sceneID []uint64) ([]AutoTestSceneInput, error)
func (*DBClient) ListAutoTestSceneOutput ¶
func (db *DBClient) ListAutoTestSceneOutput(sceneID uint64) ([]AutoTestSceneOutput, error)
func (*DBClient) ListAutoTestSceneOutputByScenes ¶
func (db *DBClient) ListAutoTestSceneOutputByScenes(sceneID []uint64) ([]AutoTestSceneOutput, error)
func (*DBClient) ListAutoTestSceneStep ¶
func (db *DBClient) ListAutoTestSceneStep(sceneID uint64) ([]AutoTestSceneStep, error)
func (*DBClient) ListAutoTestSceneSteps ¶
func (db *DBClient) ListAutoTestSceneSteps(sceneID []uint64) ([]AutoTestSceneStep, error)
func (*DBClient) ListAutoTestSpaceByProject ¶
func (db *DBClient) ListAutoTestSpaceByProject(projectID int64, pageNo, pageSize int) ([]AutoTestSpace, int, error)
ListAutoTestSpaceByProject 项目下获取测试空间列表
func (*DBClient) ListAutotestScene ¶
func (db *DBClient) ListAutotestScene(req apistructs.AutotestSceneRequest) (uint64, []AutoTestScene, error)
func (*DBClient) ListAutotestScenes ¶
func (db *DBClient) ListAutotestScenes(setIDs []uint64) ([]AutoTestScene, error)
ListAutotestScenes 批量查询场景
func (*DBClient) ListIssueTestCaseRelations ¶
func (client *DBClient) ListIssueTestCaseRelations(req apistructs.IssueTestCaseRelationsListRequest) ([]IssueTestCaseRelation, error)
ListIssueTestCaseRelations 查询事件用例关联关系列表
func (*DBClient) ListSonarMetricRules ¶
func (client *DBClient) ListSonarMetricRules(query *QASonarMetricRules, otherQueryFuncList ...func(sql *gorm.DB) *gorm.DB) (dbRules []QASonarMetricRules, err error)
func (*DBClient) ListTestCasesByIDs ¶
func (*DBClient) ListTestCasesByTestSetIDs ¶
func (client *DBClient) ListTestCasesByTestSetIDs(req apistructs.TestCaseListRequest) ([]TestCase, error)
func (*DBClient) ListTestPlanCaseRels ¶
func (client *DBClient) ListTestPlanCaseRels(req apistructs.TestPlanCaseRelListRequest) ([]TestPlanCaseRel, error)
ListTestPlanCaseRels List testPlanCaseRel
func (*DBClient) ListTestPlanCaseRelsCount ¶
func (client *DBClient) ListTestPlanCaseRelsCount(testPlanIDs []uint64) (map[uint64]apistructs.TestPlanRelsCount, error)
func (*DBClient) ListTestPlanIDsByOwnerIDs ¶
func (*DBClient) ListTestPlanIDsByPartnerIDs ¶
func (*DBClient) ListTestPlanIDsByUserIDs ¶
func (client *DBClient) ListTestPlanIDsByUserIDs(userIDs []string, roles ...apistructs.TestPlanMemberRole) ([]uint64, error)
func (*DBClient) ListTestPlanMembersByPlanID ¶
func (client *DBClient) ListTestPlanMembersByPlanID(testPlanID uint64, roles ...apistructs.TestPlanMemberRole) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanMembersByPlanIDs ¶
func (client *DBClient) ListTestPlanMembersByPlanIDs(testPlanIDs []uint64, roles ...apistructs.TestPlanMemberRole) (map[uint64][]TestPlanMember, error)
func (*DBClient) ListTestPlanOwnersByOwners ¶
func (client *DBClient) ListTestPlanOwnersByOwners(owners []string) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanOwnersByPlanID ¶
func (client *DBClient) ListTestPlanOwnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanPartnersByPlanID ¶
func (client *DBClient) ListTestPlanPartnersByPlanID(testPlanID uint64) ([]TestPlanMember, error)
func (*DBClient) ListTestPlanTestSetIDs ¶
ListTestPlanTestSetIDs 获取测试计划下的测试集 ID 列表,从关联关系而来
func (*DBClient) ListTestSetByIDs ¶
func (*DBClient) ListTestSets ¶
func (db *DBClient) ListTestSets(req apistructs.TestSetListRequest) ([]TestSet, error)
ListTestSets
func (*DBClient) ListTestSetsRecursive ¶
func (db *DBClient) ListTestSetsRecursive(req apistructs.TestSetListRequest) ([]uint64, []TestSet, error)
ListTestSetsRecursive 获取测试集列表,可选是否包含子测试集
func (*DBClient) MoveAutoTestFileTreeNode ¶
func (*DBClient) MoveAutoTestScene ¶
func (*DBClient) MoveAutoTestSceneStep ¶
func (db *DBClient) MoveAutoTestSceneStep(req apistructs.AutotestSceneRequest) error
单个移动
func (*DBClient) MoveAutoTestSceneStepGroup ¶
func (db *DBClient) MoveAutoTestSceneStepGroup(req apistructs.AutotestSceneRequest) error
整组移动
func (*DBClient) MoveAutoTestSceneStepToGroup ¶
func (db *DBClient) MoveAutoTestSceneStepToGroup(req apistructs.AutotestSceneRequest) error
把单个步骤改为目标之后的串行节点
func (*DBClient) MoveSceneSet ¶
func (client *DBClient) MoveSceneSet(req apistructs.SceneSetRequest) error
func (*DBClient) MoveTestPlanV2Step ¶
func (client *DBClient) MoveTestPlanV2Step(req *apistructs.TestPlanV2StepUpdateRequest) error
UpdateTestPlanV2Step Update a step in the test plan
func (*DBClient) OverwriteAutoTestPlanMembers ¶
func (client *DBClient) OverwriteAutoTestPlanMembers(testPlanID uint64, members []AutoTestPlanMember) error
OverwriteAutoTestPlanMembers 使用新的成员列表覆盖之前的成员列表
func (*DBClient) OverwriteAutoTestPlanOwner ¶
OverwriteAutoTestPlanOwner 使用新的 owner 覆盖之前的 owner
func (*DBClient) OverwriteAutoTestPlanPartners ¶
OverwriteAutoTestPlanPartners 使用新的 partner 列表覆盖之前的 partner 列表
func (*DBClient) OverwriteTestPlanMembers ¶
func (client *DBClient) OverwriteTestPlanMembers(testPlanID uint64, members []TestPlanMember) error
OverwriteTestPlanMembers 使用新的成员列表覆盖之前的成员列表
func (*DBClient) OverwriteTestPlanOwner ¶
OverwriteTestPlanOwner 使用新的 owner 覆盖之前的 owner
func (*DBClient) OverwriteTestPlanPartners ¶
OverwriteTestPlanPartners 使用新的 partner 列表覆盖之前的 partner 列表
func (*DBClient) PagingSonarMetricRules ¶
func (client *DBClient) PagingSonarMetricRules(req apistructs.SonarMetricRulesPagingRequest) (*dbclient.Paging, error)
PagingTestPlan List test plan
func (*DBClient) PagingTestPlan ¶
func (client *DBClient) PagingTestPlan(req apistructs.TestPlanPagingRequest) (uint64, []TestPlan, error)
PagingTestPlan List test plan
func (*DBClient) PagingTestPlanV2 ¶
func (client *DBClient) PagingTestPlanV2(req *apistructs.TestPlanV2PagingRequest) (int, []*apistructs.TestPlanV2, []string, error)
PagingTestPlanV2 Page query testplan
func (*DBClient) RecoverTestCasesByTestSetID ¶
RecoverTestCasesByTestSetID 回收站恢复测试集下的测试用例
func (*DBClient) RecoverTestSet ¶
func (*DBClient) RecycleTestSet ¶
func (*DBClient) RecycledTestCasesByTestSetID ¶
RecycledTestCasesByTestSetID 回收测试集下的测试用例
func (*DBClient) SceneSetsBySpaceID ¶
Get Scenesets by spaceID
func (*DBClient) Transaction ¶
Transaction Execute Transaction
func (*DBClient) UpdateAutoTestFileTreeNodeBasicInfo ¶
func (*DBClient) UpdateAutoTestPlanMember ¶
func (client *DBClient) UpdateAutoTestPlanMember(mem *AutoTestPlanMember) error
func (*DBClient) UpdateAutoTestSpace ¶
func (db *DBClient) UpdateAutoTestSpace(space *AutoTestSpace) (*AutoTestSpace, error)
UpdateAutoTestSpace 更新测试空间
func (*DBClient) UpdateAutotestScene ¶
func (db *DBClient) UpdateAutotestScene(node *AutoTestScene) error
func (*DBClient) UpdateAutotestSceneInput ¶
func (db *DBClient) UpdateAutotestSceneInput(input *AutoTestSceneInput) error
func (*DBClient) UpdateAutotestSceneOutput ¶
func (db *DBClient) UpdateAutotestSceneOutput(output *AutoTestSceneOutput) error
func (*DBClient) UpdateAutotestSceneStep ¶
func (db *DBClient) UpdateAutotestSceneStep(step *AutoTestSceneStep) error
func (*DBClient) UpdateAutotestSceneUpdateAt ¶
func (*DBClient) UpdateAutotestSceneUpdater ¶
func (*DBClient) UpdateSceneRefSetID ¶
func (db *DBClient) UpdateSceneRefSetID(copyRefs apistructs.AutoTestSceneCopyRef) error
func (*DBClient) UpdateSceneSet ¶
Update Sceneset
func (*DBClient) UpdateSonarMetricRules ¶
func (client *DBClient) UpdateSonarMetricRules(updateObj *QASonarMetricRules) (err error)
func (*DBClient) UpdateTestCase ¶
UpdateTestCase 更新测试用例
func (*DBClient) UpdateTestPlan ¶
UpdateTestPlan Update test plan
func (*DBClient) UpdateTestPlanMember ¶
func (client *DBClient) UpdateTestPlanMember(mem *TestPlanMember) error
func (*DBClient) UpdateTestPlanTestCaseRel ¶
func (client *DBClient) UpdateTestPlanTestCaseRel(testPlanCaseRel *TestPlanCaseRel) error
UpdateTestPlanTestCaseRel Update testPlanCaseRel
func (*DBClient) UpdateTestPlanV2 ¶
UpdateTestPlanV2 Update test plan
func (*DBClient) UpdateTestPlanV2Step ¶
func (client *DBClient) UpdateTestPlanV2Step(step TestPlanV2Step) error
func (*DBClient) UpdateTestSet ¶
UpdateTestSet update testset
type IssueTestCaseRelation ¶
type IssueTestCaseRelation struct { dbengine.BaseModel IssueID uint64 `json:"issueID"` TestPlanID uint64 `json:"testPlanID"` TestPlanCaseRelID uint64 `json:"testPlanCaseRelID"` TestCaseID uint64 `json:"testCaseID"` CreatorID string `json:"creatorID"` }
IssueTestCaseRelation 事件与用例关联
func (IssueTestCaseRelation) TableName ¶
func (IssueTestCaseRelation) TableName() string
TableName 表名
type PartnerIDs ¶
type PartnerIDs []string
func (*PartnerIDs) Scan ¶
func (ids *PartnerIDs) Scan(value interface{}) error
type QASonarMetricRules ¶
type QASonarMetricRules struct { ID int64 `gorm:"primary_key" json:"id"` CreatedAt time.Time `gorm:"created_at" json:"createdAt"` UpdatedAt time.Time `gorm:"updated_at" json:"updatedAt"` Description string `gorm:"description" json:"description"` ScopeType string `gorm:"scope_type" json:"scopeType"` ScopeID string `gorm:"scope_id" json:"scopeId"` MetricKeyID int64 `gorm:"metric_key_id" json:"metricKeyId"` MetricValue string `gorm:"metric_value" json:"metricValue"` }
func (QASonarMetricRules) TableName ¶
func (QASonarMetricRules) TableName() string
TableName QASonar对应的数据库表qa_sonar
func (*QASonarMetricRules) ToApi ¶
func (rule *QASonarMetricRules) ToApi() *apistructs.SonarMetricRuleDto
type SceneSet ¶
type TestCase ¶
type TestCase struct { dbengine.BaseModel Name string ProjectID uint64 TestSetID uint64 Priority apistructs.TestCasePriority PreCondition string StepAndResults TestCaseStepAndResults Desc string Recycled *bool From apistructs.TestCaseFrom CreatorID string UpdaterID string }
TestCase 测试用例
type TestCaseStepAndResults ¶
type TestCaseStepAndResults []apistructs.TestCaseStepAndResult
func (*TestCaseStepAndResults) Scan ¶
func (sr *TestCaseStepAndResults) Scan(value interface{}) error
type TestPlan ¶
type TestPlan struct { dbengine.BaseModel Name string Status apistructs.TPStatus // DOING/PAUSE/DONE ProjectID uint64 CreatorID string UpdaterID string Summary string StartedAt *time.Time EndedAt *time.Time Type apistructs.TestPlanType Inode string }
TestPlan 测试计划
type TestPlanCaseRel ¶
type TestPlanCaseRel struct { dbengine.BaseModel TestPlanID uint64 TestSetID uint64 TestCaseID uint64 ExecStatus apistructs.TestCaseExecStatus CreatorID string UpdaterID string ExecutorID string }
TestPlanCaseRel
type TestPlanMember ¶
type TestPlanMember struct { dbengine.BaseModel TestPlanID uint64 `json:"testPlanID"` Role apistructs.TestPlanMemberRole `json:"role"` UserID string `json:"userID"` }
TestPlanMember 测试计划成员表
func (TestPlanMember) TableName ¶
func (TestPlanMember) TableName() string
type TestPlanV2 ¶
type TestPlanV2 struct { dbengine.BaseModel Name string Desc string CreatorID string UpdaterID string ProjectID uint64 SpaceID uint64 }
TestPlanV2 测试计划V2
func (*TestPlanV2) Convert2DTO ¶
func (tp *TestPlanV2) Convert2DTO() apistructs.TestPlanV2
Convert2DTO convert DAO to DTO
type TestPlanV2Join ¶
type TestPlanV2Join struct { TestPlanV2 SpaceName string }
TestPlanV2Join join dice_autotest_space
func (*TestPlanV2Join) Convert2DTO ¶
func (tp *TestPlanV2Join) Convert2DTO() *apistructs.TestPlanV2
Convert2DTO convert DAO to DTO
type TestPlanV2Step ¶
TestPlanV2Step 测试计划V2步骤
type TestPlanV2StepJoin ¶
type TestPlanV2StepJoin struct { TestPlanV2Step SceneSetName string `gorm:"column:name"` }
TestPlanV2StepJoin 测试计划V2步骤join测试集表
func (TestPlanV2StepJoin) Convert2DTO ¶
func (tps TestPlanV2StepJoin) Convert2DTO() *apistructs.TestPlanV2Step
Convert2DTO Convert to apistructs
type TestSet ¶
type TestSet struct { dbengine.BaseModel // 测试集的中文名,可重名 Name string // 上一级的所属测试集id,顶级时为0 ParentID uint64 // 是否回收 Recycled bool // 项目ID ProjectID uint64 // 路径地址 Directory string // 排序编号 OrderNum int // 创建人ID CreatorID string // 更新人ID UpdaterID string }
TestSet 测试集
func FakeRootTestSet ¶
Source Files ¶
- autotest_filetree.go
- autotest_filetree_extras.go
- autotest_filetree_history.go
- autotest_scene.go
- autotest_scene_input.go
- autotest_scene_output.go
- autotest_scene_step.go
- autotest_space.go
- dbclient.go
- issue_testplancaserel_rel.go
- sceneset.go
- sonar_metric_rules.go
- testcase.go
- testplan.go
- testplan_member.go
- testplan_memberv2.go
- testplan_testcase_relation.go
- testplan_v2.go
- testplan_v2_step.go
- testset.go