HPQC 10中的可追溯性矩阵

时间:2014-07-10 09:57:15

标签: matrix report hp-quality-center traceability

我们需要创建一个包含需求和测试用例之间可跟踪性矩阵的报告。 我知道HPQC 11有一个特定的功能,但我只有HPQC 10.

有没有办法在HPQC10中创建这样的矩阵?

PS:矩阵示例:https://en.wikipedia.org/wiki/Traceability_matrix

1 个答案:

答案 0 :(得分:1)

您应该能够使用OTA API以编程方式执行此操作。例如,您可以从需求开始,并使用涵盖它们的测试列出所有子需求。以下是Ruby中的示例代码:

reqs = req_factory.GetChildrenList(94) # get the start-requirement by id
reqs.each do |req|
  tests = req.GetCoverList
  puts "#{req.Name} is covered by #{tests.Count} tests:"
  tests.each { |test| puts "#{test.Name}" }
end

输出:

Req A is covered by 3 tests:
Test A
Test B
Test C
Req B is covered by 2 tests:
Test X
Test Y

要获得测试用例所涵盖的要求,请使用测试对象的函数GetCoverList()

这应该为您提供创建可追溯性矩阵所需的所有数据。

相关问题