LoginSignup
2
0

More than 5 years have passed since last update.

TestLinkのデータベース内部

Posted at

定義されている全テーブルの説明はしていませんのであしからず。

テスト仕様関連の主要なテーブル

テーブル名 説明
testprojects テストプロジェクトの情報を管理するテーブル
testsuites テストスイートの情報を管理するテーブル
nodes_hierarchy テスト仕様の構造を管理するテーブル
tcversions テストケースをバージョンごとに管理するテーブル
tcsteps テストケースのテスト手順を管理するテーブル

nodes_hierarchy テーブル

カラム名 説明
id
name
parent_id 親ノードのID
node_type_id node_typesテーブルのID
node_order ツリー上の表示位置(?)

例えば、以下のような構造になっていた場合。

testproject
+ testsuite1
|   testcase1
|   + testcase_version1
|   |   testcase_step1
|   |
|   + testcase_version2
|       testcase_step1
|
+ testsuite2
    testsuite3
      testcase2
      + testcase_version1
      |   testcase_step1
      |
      + testcase_version2
          testcase_step1

テーブルは以下のような感じに定義される。

id name parent_id node_type_id node_order
1 testproject NULL 1 1
2 testsuite1 1 2 0
3 testcase1 2 3 0
4 testcase_version1 3 4 0
5 testcase_step1 4 9 0
6 testcase_version2 3 4 0
7 testcase_step1 6 9 0
8 testsuite2 1 2 0
9 testsuite3 8 2 0
10 testcase2 9 3 0
11 testcase_version1 10 4 0
12 testcase_step1 11 9 0
13 testcase_version2 10 4 0
14 testcase_step1 13 9 0

本テーブルのidと各node_typeのIDは同じ値となるので、testprojectの内容を知りたかったら select * from testprojects where id = 1 で取れる。

node_type_idnode_types テーブルで定義されているIDが指定されている。1.9.4 の定義は以下の通り

id description
1 testproject
2 testsuite
3 testcase
4 testcase_version
5 testplan
6 requirement_spec
7 requirement
8 requirement_version
9 testcase_step
10 requirement_revision
11 requirement_spec_revision

テスト計画、実行関連の主要なテーブル

テーブル名 説明
testplans テスト計画の情報を管理するテーブル
builds ビルド情報を管理するテーブル
testplan_tcversions テスト計画とテストバージョン(テストケース)の関連テーブル
executions 実施結果を管理するテーブル

testplan_tcversionsにはtestplansのIDとtcversionsのIDが管理されているので、それらを各テーブルから引っ張ってくればテストケースとテスト計画がリンクできる。

executionsにはtestplan_id, build_id, tcversion_idがあるので、実施結果がどのテスト計画、テストケースに紐づいているかがわかる。また、statusに実施結果が格納されている。pが成功、fが失敗、bがブロック、nが未実施

あとがき

カスタムレコードやユーザー情報についてはまだ調査できてないです。やる気もないし。もしやる気が出て、まとめたいなと思ったら書きます。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0