一、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_type_id=2

本文详细解析了TESTLINK测试用例的数据结构,包括node_types表中的测试组件信息和nodes_hierarchy表中的测试用例目录层次。从测试项目、测试集合到测试用例及其版本和步骤,逐一阐述各个部分的数据表示和查询方法。
1037

被折叠的 条评论
为什么被折叠?



