ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

TESTLINK 测试用例数据结构解析

2026/8/20 4:40:55 拓冰建站 浏览量
TESTLINK 测试用例数据结构解析

一、node_types 测试组件信息表

我们查询表 select * from testlink.node_types;
得到如下结果
在这里插入图片描述

二、nodes_hierarchy 测试用例目录层次表

我们以下图的项目为例,来讲解
在这里插入图片描述

1、测试项目

首先,我们有个Train的项目,存在表testprojects中,可以用如下sql查找到
select * from testlink.testprojects where notes like '%Train%' order by id desc;
在这里插入图片描述

对应在表 nodes_hierarchy中有一条同id的数据,其中node_type_id为1,
这里node_type_id=1,表示的意思对应表node_types查出来的结果testproject
select * from testlink.nodes_hierarchy where id=21994;
在这里插入图片描述

2、测试项目下的测试集合testsuite

我们可以通过查父id为该项目id数据
select * from testlink.nodes_hierarchy where parent_id=21994;
得到如下图数据,
即Train项目下有2个testsuite,
在这里插入图片描述

根据node_types对应关系可知,type 2 为 testsuite,type 5 为 testplan
由目录层级结构可知,在Folder集下有个名为F1的用例子集,我们用如下sql查询,

select * from testlink.nodes_hierarchy where node_t