SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    New Member
    Join Date
    Feb 2016
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    HPQC query: Select all failed test runs with no defects linked to them

    Hi forum,

    I was trying to find a solution for this online, a thread on this forum had the same question asked, however, the answer ended up in putting out test cases with defects linked, not test runs with no defects linked...

    I've been messing around with a query for some time and never ended up with the right results.. So I'm trying to get all test runs (not test cases), which are failed and has no defects linked to them.

    I'm quite new to SQL and databases, so this task is a bit over the top, so help on this is very much appreciated - thank you very much in advance!

  2. #2
    Member meridian_05's Avatar
    Join Date
    Feb 2011
    Location
    Chiswick, London
    Posts
    158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Hi frederik,

    You should be able to figure out getting all Runs with a status of Failed fairly easily:

    Code:
    SELECT
    RUN.RN_RUN_ID As "Run ID",
    RUN.RN_RUN_NAME As "Run Name",
    RUN.RN_STATUS As "Run Status"
    From RUN
    Where RUN.RN_STATUS = 'Failed'
    There's a table in ALM called LINK that is updated with a new entry whenever you link something with a Bug (not just Run, but Step, Cycle, etc). So, in order to find all Runs that DO have defects linked to them you might want something like this:
    Code:
    SELECT
    LINK.LN_ENTITY_ID As "Linked Entity ID",
    LINK.LN_ENTITY_TYPE As "Linked Entity Type",
    LINK.LN_BUG_ID As "Defect ID",
    RUN.RN_RUN_NAME As "Run Name",
    RUN.RN_STATUS As "Run Status"
    
    FROM LINK
    
    Join RUN on LINK.LN_ENTITY_ID=RUN.RN_RUN_ID
    
    WHERE LINK.LN_ENTITY_TYPE = 'RUN'
    AND RUN.RN_STATUS = 'Failed'
    To get all Runs that are Failed that do not have defects linked, you'll just need to combine the two - get all Runs that are Failed and compare against the runs in the LINK table.

    Bear in mind that, as mentioned above, defects can be linked to Steps, Runs, Cycles, etc.
    Last edited by meridian_05; 02-11-2016 at 02:24 AM.

  3. #3
    New Member
    Join Date
    Feb 2016
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Thank you very much for the answer!

    And yes, the first part, I did figure out quite quickly - it is the part of getting the ones with no linked defects, which is difficult...

    However, it's probably good that you bring this up, with the Steps, Runs and Cycles... Is there any way to look at test cases and get all the ones with linked and all the ones without linked defects, no matter the run, cycle or steps?
    This is sort of the solution I'm looking for. As mentioned, I'm quite new to this HPQC database, so all of the relations are not necessarily known to me, which makes this a lot more difficult...

  4. #4
    New Member
    Join Date
    Feb 2016
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    My best try to do this is the following:
    SELECT
    RUN.RN_RUN_ID AS "Run ID"
    RUN.RN_STATUS AS "Run Status"
    FORM RUN
    JOIN LINK ON RUN.RN_RUN_ID = LINK.LN_LINK_ID OR RUN.RN_RUN_ID = LINK.LN_ENTITY_ID
    WHERE RUN.RN_STATUS = "Failed"
    AND LINK.LN_BUG_ID = NULL

    I do realize the problem myself.. But I just don't know how to deal with it. Obviously, the join is giving me the runs with the linked defects, but I'm just not sure how to get these two joined together without this...

    I also did try to make two separate select statements and make a NOT IN, but that didn't seem to work either..

    Any thoughts?
    Thanks in advance!

  5. #5
    Member meridian_05's Avatar
    Join Date
    Feb 2011
    Location
    Chiswick, London
    Posts
    158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Hi frederik,

    May I ask what problem it is that you're trying to solve, or what issue you're trying to report on? As mentioned above, it's not just at RUN level that defects can be logged (they don't even need to be linked to anything, they can be raised directly in the Defects module), but fundamentally there are many reasons that a test can fail that don't necessarily mean a defect will be raised (test data issues, system issues, inconsistencies in code check-in, authorisation issues, change requests, etc) - all depending on your local policies, of course.

    What will you do with the report if a test is failed, the issue is fixed immediately by the tester, and the test is then rerun and passed, all without a defect needing to be raised?

  6. #6
    New Member
    Join Date
    Feb 2016
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Thank you very much for your reply!

    The report I'm trying to get should show all of the tests with the status of failed, which have no linked defects (as mentioned), but no linked defects in the test runs or in any other way. Basically, the company I'm interning at wants to analyze the tests which are failed for no reason, or without a given reason (in form of a defect).
    As I was messing around with the SQL I did figure that defects could be made in many different ways...

    The main purpose is to sort out the tests which needs to be taken a look at again, and if they're still failed, we will need to log a defect for this test; since this was not done before.
    It's not about finding the defects, but the tests, test runs, test steps with none.

    I hope this makes it a bit more clear.

    Thanks again!

  7. #7
    New Member
    Join Date
    Dec 2015
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Fredrik,

    Were you able to solve this issue? Could you post the solution

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.68%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:00 PM.

Copyright BetaSoft Inc.