QC資料庫表結構

2021-08-31 10:13:55 字數 3524 閱讀 5961

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!

有時候qc的報表不能滿足我們的要求,需要自己從qc的資料庫中查詢資料,放到excel中進行統計並生成圖表,因此有必要熟悉一下qc的表結構:

requirement(req)

requirement types(req_type)

requirement coverage(req_cover) – maps requirements to test cases

test(test) – contains test cases

下面sql指令碼查出所有需求項:

-- this query shows all requirements in all folders.

select
req.rq_req_idas'requirement id',
req.rq_user_01as'req id project', -- this has the original req id from project doco

req.rq_req_nameas'requirement name',
req.rq_req_commentas'requirement description',
req_type.tpr_nameas'requirement type',
req.rq_user_03as'risk'
from
req
joinreq_type
onreq.rq_type_id = req_type.tpr_type_id -- join to get the name of the requirement type e.g "folder"

where
tpr_name != 'folder' -- only retrieve requirements of type "business" or "functional"

orderby
rq_req_id
下面sql指令碼查出所有測試用例:

-- this query shows all test cases in all folders.

select
test.ts_test_idas'test id',
test.ts_nameas'test name',
test.ts_exec_statusas'execution status'
from
test
orderby
test.ts_test_id
下面sql指令碼查出哪些有測試用例覆蓋的需求項:

select
req.rq_req_idas'requirement id',
req.rq_user_01as'req id project', -- this has the original req id from project doco

req.rq_req_nameas'requirement name',
req.rq_req_commentas'requirement description',
req_type.tpr_nameas'requirement type',
req.rq_user_03as'risk',
test.ts_test_idas'test case id',
test.ts_nameas'test case name',
test.ts_exec_statusas'execution status'
from
req
leftjoin
req_coveronreq.rq_req_id = req_cover.rc_req_id -- join requirements to test cases (req to req_cover)

leftjoin
testonreq_cover.rc_entity_id = test.ts_test_id -- join requirements to test cases (req_cover to test)

join
req_typeonreq.rq_type_id = req_type.tpr_type_id -- join to get the name of the requirement type e.g "folder"

where
req_type.tpr_name != 'folder' -- only retrieve requirements of type "business" or "functional"

orderby
req.rq_req_id
參考:

給我老師的人工智慧教程打call!

QC新增資料庫

1 安裝qc完畢,輸入licence口令,開啟介面。2 在qc central for db2上右擊滑鼠,add instance or subsystems 3 輸入host name和operating system linux next 4 輸入node和instance,port,next到...

資料庫修改表結構

修改資料表 alter table 表名sql 的書寫不考慮順序,但是批量執行 需要要考慮好先執行哪些,後執行哪些 在修改資料表結構時,必須要明確 修改的字段中是否存在資料,例如 如果需要更改乙個欄位的約束為非空約束,那麼首先要保證該字段中已有的資料沒有null值。因此在做程式之前資料庫分析,設計是...

Zabbix資料庫表結構

acknowledges 當出現報錯的時候記錄 檢視著張表記錄了乙個事件 動作自動發現 問題告警 恢復告警 自動註冊 報警資訊 同web頁面的 操作日誌 在頁面上面檢視 autoreg host 自動註冊的主機 config 配置 dbversion 資料庫版本需要一致 重啟zabbix serve...