HP QC(质量中心)中的跟踪历史记录

发布于 2024-09-15 11:29:50 字数 152 浏览 5 评论 0原文

有没有办法在 QC 中跟踪 bug 的历史记录?我想要了解的是在一个版本中重新打开了多少个错误以及重新打开了多少次。从质量控制中,我只能看到“状态”为“关闭”,但它不会给我有关它多次从“关闭”更改为“重新打开”然后“已修复”然后“重新打开”然后“关闭”的信息”。

提前致谢!

Is there a way to tracking a bug's history in QC? What I am trying to get is how many bugs are being reopened over a release and how many times it got reopened. From the QC, I can only see the "status" as "closed" but it won't give me the information about have many times it changed from "closed" to "reopen" then "fixed" then "reopen" then "closed".

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

过气美图社 2024-09-22 11:29:50

QC 的审核历史表存储了 QC 元素中每次更改(此处为 Bug)的信息。因此,您可以编写一个 SQL 查询来检索重新打开缺陷。我将它们称为首次修复失败,它们提供了很好的证据,说明为什么当您获得更多测试时会发生更多测试。

下面是博客链接,其中包含此信息,并说明如何使用 SQL 查询示例进行提取

第一次失败

Audit history table of QC has information stored for every change in the QC element(here the Bug). So you can write a SQL query that retrieve reopen defects. I call them as first time fix failures and they provide good evidence on why there is more testing happening when you got more of them

Below is the blog link which has this information and tells how to extract with an example of SQL query

First time failures

┾廆蒐ゝ 2024-09-22 11:29:50

历史表不会自动跟踪所有内容,因此首先请确保尽可能在自定义字段模块中将其标记为跟踪历史记录。
如果您通过 Saas 使用 QC 并且无法访问 Sql Server,则始终可以通过 OTA (QC Api) 进行操作并在那里使用 sql。
另一种选择是,使用工作流程并写入文件,可能是相关 QC 模块的 onchanged 事件或更确切地说 onsaved 事件的 xml 文件(使用 vbscript)。

The history table does not automatically track everything so make sure first that wherever possible to mark it in the customization field module to track history.
If you are using QC via Saas and have no access to Sql Server, you can always do it via the OTA (QC Api) and use sql there.
Other alternative, use the workflow and write in a file, maybe a xml one (using vbscript) on the onchanged event or rather onsaved event of the relevant QC module.

输什么也不输骨气 2024-09-22 11:29:50

您可以创建一个 SQL 查询(直接查询数据库,或使用 QC 的“出色”仪表板和 Excel 查询)来查看历史表中的行以查找该字段和缺陷编号。

对于此类查询,文档应该有足够的示例,您应该能够提出一个可用的查询,该查询可以工作,或者如果您发布它,可以在此处讨论。

You could create an SQL query (directly query the db, or use QC's "great" dashboard and an Excel query there) that looks at the rows in the history table for that field and defect number.

The documentation should have enough examples for queries like these that you should be able to come up with a usable query that either works or can be discussed here if you post it.

久隐师 2024-09-22 11:29:50

这里的关键是我们在工作流程中有一个明确的“重新打开”状态,我们可以对此进行测试。不是当前状态,而是我们经历该状态的次数。这可以通过自定义 Excel 报告轻松完成。

正如 Anthony Hilyard 所示,它本质上是 Bug 表和审核日志/属性表之间的联接。要获取版本,您还需要加入版本表。我们使用检测到的版本和目标版本。对于任何未解决的缺陷,目标版本都会转移到当前版本,因此我们将它们合并在一起,这样如果没有目标版本,它将使用当前版本。与安东尼的解决方案不同,我们只想计算重新打开的次数,而不是列出它们。

在版本“@RelNam@”中查看的 SQL 如下所示:

SELECT 
    BG.BG_BUG_ID As 'Defect ID', 
    BG.BG_STATUS As 'Status', 
    COUNT(AU.AU_ACTION_ID) As 'Reopens', 
    BG.BG_DETECTED_BY AS 'Detected By', 
    BG.BG_SUMMARY As 'Summary'
FROM BUG BG
LEFT JOIN AUDIT_LOG AU ON BG.BG_BUG_ID = AU.AU_ENTITY_ID
INNER JOIN AUDIT_PROPERTIES AP ON AU.AU_ACTION_ID = AP.AP_ACTION_ID
INNER JOIN RELEASES RLS ON RLS.REL_ID = COALESCE(BG.BG_TARGET_REL,BG.BG_DETECTED_IN_REL)
WHERE 1=1
    AND RLS.REL_NAME = '@RelNam@'
    AND (AU.AU_ENTITY_TYPE = 'BUG' OR AU.AU_ENTITY_TYPE IS NULL)
    AND AU.AU_ACTION = 'UPDATE'
    AND (AP.AP_PROPERTY_NAME = 'Status' AND AP.AP_NEW_VALUE = 'Reopen')
GROUP BY 
    BG.BG_BUG_ID, 
    BG.BG_STATUS, 
    BG.BG_DETECTED_BY, 
    BG.BG_SUMMARY

ORDER BY BG.BG_BUG_ID

如果您想使用日期,请删除与版本的连接以及关联的 WHERE 子句,而只使用 BG_DETECTION_DATE 的测试。

如果您没有明确的“重新打开”状态,但您的工作流程具有“重新测试”和“修复”,则您可以查找涉及旧状态=重新测试和新状态=“修复”的转换事件的数量。这将排除第一次通过,仅在重新打开缺陷的情况下。

请记住,如果要在输出中添加列,请确保它们也在底部的“Group By”子句中。

The key here is that we have an explicit 'Reopen' state in the workflow and we can test for this. Not as a current state but how many times we move through the state. This is easily done as a custom Excel Report.

As Anthony Hilyard shows, it is essentially a join between the Bug table and the audit log/property table. To get the release, you also need to join with the Releases table. We use both the detected in release and the targeted release. The targeted release moves on to the current release for any open defect so we coalesce them together so if there is no target release, it uses the current release. Unlike Anthony's solution, we just want to count the reopens, rather than list them.

The SQL to look in Release, '@RelNam@' would look like this:

SELECT 
    BG.BG_BUG_ID As 'Defect ID', 
    BG.BG_STATUS As 'Status', 
    COUNT(AU.AU_ACTION_ID) As 'Reopens', 
    BG.BG_DETECTED_BY AS 'Detected By', 
    BG.BG_SUMMARY As 'Summary'
FROM BUG BG
LEFT JOIN AUDIT_LOG AU ON BG.BG_BUG_ID = AU.AU_ENTITY_ID
INNER JOIN AUDIT_PROPERTIES AP ON AU.AU_ACTION_ID = AP.AP_ACTION_ID
INNER JOIN RELEASES RLS ON RLS.REL_ID = COALESCE(BG.BG_TARGET_REL,BG.BG_DETECTED_IN_REL)
WHERE 1=1
    AND RLS.REL_NAME = '@RelNam@'
    AND (AU.AU_ENTITY_TYPE = 'BUG' OR AU.AU_ENTITY_TYPE IS NULL)
    AND AU.AU_ACTION = 'UPDATE'
    AND (AP.AP_PROPERTY_NAME = 'Status' AND AP.AP_NEW_VALUE = 'Reopen')
GROUP BY 
    BG.BG_BUG_ID, 
    BG.BG_STATUS, 
    BG.BG_DETECTED_BY, 
    BG.BG_SUMMARY

ORDER BY BG.BG_BUG_ID

If you want to use date instead, drop the join with releases and the associated WHERE clause and just use a test for BG_DETECTION_DATE instead.

If you don't have an explicit 'Reopen' state but your workflow has a 'Retest' and 'Fix', you can instead look for the number of transition events involving old state=Retest and new state='Fix'. This will exclude first time through, only where a defect is reopened.

Remember if you want to add columns in the output, make sure they are also in the 'Group By' clause at the bottom.

岁月流歌 2024-09-22 11:29:50

这是我使用的 Excel SQL 摘录:

SELECT
  "defect"."BG_BUG_ID" AS "Defect",
  "defect"."BG_STATUS" AS "Status",
  "defect"."BG_SEVERITY" AS "Severity",
  "defect"."BG_PRIORITY" AS "Priority",
  "defect"."BG_USER_03" AS "Category",
  "defect"."BG_USER_01" AS "Modules",
  "defect"."BG_USER_08" AS "EFD",
  "defect"."BG_USER_02" AS "Region",
  "defect"."BG_SUMMARY" AS "Summary",
  "defect"."BG_DETECTED_BY" AS "Detected By",
  "audit_log"."AU_ACTION" AS "Action",
  "audit_log"."AU_USER" AS "User",
  "audit_property"."AP_OLD_VALUE" AS "Old Value",
  "audit_property"."AP_NEW_VALUE" AS "New Value",
  "audit_log"."AU_TIME" AS "Change Time",
  "audit_property"."AP_PROPERTY_NAME" AS "Change Area"
FROM
  BUG "defect"
  INNER JOIN AUDIT_LOG "audit_log" ON "defect"."BG_BUG_ID" = "audit_log"."AU_ENTITY_ID"
  INNER JOIN AUDIT_PROPERTIES "audit_property" ON "audit_log"."AU_ACTION_ID" = "audit_property"."AP_ACTION_ID"
WHERE
    "audit_log"."AU_ENTITY_TYPE" = 'BUG'

Here is an Excel SQL Extract I use:

SELECT
  "defect"."BG_BUG_ID" AS "Defect",
  "defect"."BG_STATUS" AS "Status",
  "defect"."BG_SEVERITY" AS "Severity",
  "defect"."BG_PRIORITY" AS "Priority",
  "defect"."BG_USER_03" AS "Category",
  "defect"."BG_USER_01" AS "Modules",
  "defect"."BG_USER_08" AS "EFD",
  "defect"."BG_USER_02" AS "Region",
  "defect"."BG_SUMMARY" AS "Summary",
  "defect"."BG_DETECTED_BY" AS "Detected By",
  "audit_log"."AU_ACTION" AS "Action",
  "audit_log"."AU_USER" AS "User",
  "audit_property"."AP_OLD_VALUE" AS "Old Value",
  "audit_property"."AP_NEW_VALUE" AS "New Value",
  "audit_log"."AU_TIME" AS "Change Time",
  "audit_property"."AP_PROPERTY_NAME" AS "Change Area"
FROM
  BUG "defect"
  INNER JOIN AUDIT_LOG "audit_log" ON "defect"."BG_BUG_ID" = "audit_log"."AU_ENTITY_ID"
  INNER JOIN AUDIT_PROPERTIES "audit_property" ON "audit_log"."AU_ACTION_ID" = "audit_property"."AP_ACTION_ID"
WHERE
    "audit_log"."AU_ENTITY_TYPE" = 'BUG'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文