Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

SQL Useful Request

$
0
0

 Hello world,

 

I'm a French user of HPQC.

I'm using this tool for now 6 months and I can use it approximately as I wish.

 

But one point is truly hard to learn : Excel Reports.

It's not SQL requests the problem, it's the database.

It's so abstract and so huge that it's truly hard to extract the appropriate data.

 

So what I wanted to do in this topic is to create a list of useful requests for beginners (like me)

I hope that trained users should help to create these requests or improve others.

 

So here is a list of request that I'm trying to create :

 

 

 

########## REQUEST 1 ##########

 

The list of all Test Set and test instance within a specific folder with test status (IN PROGRESS)

This request allow you to know the global state of your Tests

 

For example: If I have

  • Folder 1
    • Folder 1.1
      • Test Set 1.1A
      • Test Set 1.1B
    • Folder 1.2
      • Folder 1.2.1
        • Test Set 1.2.1A
        • Test Set 1.2.1B
      • Folder 1.2.2
        • Test Set 1.2.2A
  • Folder 2
    • Test Set 2A

 

And I don't want to see the Test Sets in Folder 2

 

The expected result is:

FOLDER NAME          TEST SET NAME        TEST INSTANCE NAME         STATUS

Folder 1.1                   Test Set 1.1A                          Test A                         Failed

Folder 1.1                   Test Set 1.1A                          Test B                         Passed

Folder 1.1                   Test Set 1.1A                          Test C                         Blocked

Folder 1.1                   Test Set 1.1B                          Test W                         Passed

Folder 1.2.1                Test Set 1.2.1A                       Test X                          Passed

Folder 1.2.1                Test Set 1.2.1B                       Test Y                          Failed

Folder 1.2.2                Test Set 1.2.2A                       Test Z                          Passed

 

SQL REQUEST :

SELECT

CF_ITEM_NAME Folder, CY_CYCLE Test_Set, TS_NAME Test_Instance, TC_STATUS Statut

FROM CYCL_FOLD, Cycle, Test, TESTCYCL, RELEASE_CYCLES

WHERE CF_ITEM_PATH LIKE ''AAAAAAAAAA"

/*

Here we put a LIKE to access to sub folder of the first one with the path AAAAAA

To find the path of a folder use the request : SELECT * FROM CYCL_FOLD

*/

AND CF_ITEM_ID = CY_FOLDER_ID

AND CY_CYCLE_ID = TC_CYCLE_ID

AND TC_TEST_ID = TS_TEST_ID

AND CY_ASSIGN_RCYC = RCYC_ID

ORDERBY CF_FATHER_ID, CF_ITEM_NAME, CF_ITEM_PATH, CY_CYCLE, TC_TEST_ORDER ASC

 

 

You can also use RCYC_NAME (Name of Release Cycle) instead of using CF_ITEM_PATH.

It depends of your needs.

 

 

 

 

 

 

 

########## REQUEST 2##########

 

Execution Sum of each test execution grouped by test set with the total number of steps (NOT DONE)

This request allows you to know how many runs have been done on your tests.

The total number of steps by test instance allows you to balance the sum of runs

 

For example:

 

  • Folder 1.1
    • Test Set 1.1A                         Test A             09 Steps          5 Run
                                                         Test B             05 Steps          2 Run
    • Test Set 1.1B                         Test C             06 Steps          1 Run
  • Folder 1.2
    • Folder 1.2.1
      • Test Set 1.2.1A          Test X              05 Steps          2 Run
      • Test Set 1.2.1B          Test Y             12 Steps          1 Run
    • Folder 1.2.2
      • Test Set 1.2.2A          Test Z              09 Steps          0 Run

 

The expected result is:

TEST STEP NAME                  TEST NAME                STEPS SUM               RUNS SUM

Test Set 1.1A                          Test A                          09 Steps                      5 Run
Test Set 1.1A                          Test B                          05 Steps                      2 Run

Test Set 1.1B                          Test C                         06 Steps                      1 Run

Test Set 1.2.1A                       Test X                          05 Steps                      2 Run

Test Set 1.2.1B                       Test Y                          12 Steps                      1 Run

Test Set 1.2.2A                       Test Z                          09 Steps                      0 Run

 

 

SQL REQUEST :

SELECT

###

FROM ###

WHERE ###

 

 

 

Others and others request are possible (bug list grouped by test set, remaining bugs, etc…)

But these first 2 are big enough for now


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>