The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP ALM / Mercury Quality Center

Pages: 1
techqa
Newbie


Reged: 03/01/08
Posts: 3
Test Execution Report from Test Lab
      #615140 - 02/24/10 07:05 AM

Hi,
I need to pull a report from the Test Lab describing a high level execution to show Test Folders and their Status. So a very basic hish level report. The problem I am facing -
If I pull the Cross Test Set report the status available is just Open or Closed.
And if I pull the Cross Test Report with Test Sets its more information than needed.
Does anyone have any suggestions for this around how to pull this report or how to better organize tests in the Test lab.
I have QC 9.2
Will really apprecite any help or suggestions.

Thanks!!!


Post Extras: Print Post   Remind Me!   Notify Moderator  
-Asher-
Junior Member


Reged: 08/04/04
Posts: 508
Loc: Wellington, New Zealand
Re: Test Execution Report from Test Lab [Re: techqa]
      #615220 - 02/24/10 07:22 PM

I personally like the Live Analysis progress graph, grouped by execution status: it shows the number of No run/In Progress/Passed/Failed test instances in all child test sets of the current folder. nice and simple.

It depends what you need - you haven't shared your audience or what level of information you are seeking.

--------------------
Regards,

Alex
... just another Tester ...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Jonty
Super Member


Reged: 01/17/07
Posts: 1267
Loc: India
Re: Test Execution Report from Test Lab [Re: -Asher-]
      #615227 - 02/24/10 09:03 PM

If you are not able to filter out your specific data, look at Excel reports, you can design and create your own reports directly using the tables and excel code

--------------------
Cheers
Jonty..
-- Here to Learn and share ---


Post Extras: Print Post   Remind Me!   Notify Moderator  
techqa
Newbie


Reged: 03/01/08
Posts: 3
Re: Test Execution Report from Test Lab [Re: Jonty]
      #615366 - 02/25/10 07:51 AM

Thank-You for your response.
I do not have experience with Excel Reports and currently no access to it as well but I am going to ask for permissions for it.
For now I am trying to use the existing reports available in QC.
What i need is a high level Test Execution Report to say that all tests in a particular folder or all tests in a test set passed and not go into the details about the tests actually.
But if I pull a report around status of Test Set it only has Open or Closed..??..So i was wondering if there is somethign like a cumulative status for all tests within a test set to say ok all passed or if even 1 fails then failed.
Please let me know if you have any suggestions on how to achieve this.
Thanks!!!


Post Extras: Print Post   Remind Me!   Notify Moderator  
sdaly
Member


Reged: 02/22/10
Posts: 25
Loc: DUNDEE
Re: Test Execution Report from Test Lab [Re: techqa]
      #615391 - 02/25/10 10:13 AM

You may wish to create a macro to pull the metrics out. I prefer this over the excel report generator.

Here is some VBA to pull out test set metrics. Just change the connection string with your details...

Dim tdc As TDConnection

Sub UpdateStats()

'create QC connection
QCconnect_silent "URL", "DOMAIN", "PROJECT", "USERNAME", "PASSWORD"
'process tests
getMetrics
'disconnect
QCdisconnect

End Sub

Private Sub QCconnect_silent(url As String, domain As String, project As String, user As String, pass As String)
'# Creates a connection to QC
On Error GoTo connected
'create the connection object
Set tdc = CreateObject("TDApiOle80.TDConnection")
tdc.InitConnectionEx url
'login to QC
tdc.Login user, pass
'connect to project
tdc.Connect domain, project
Application.StatusBar = "Connected to Quality Centre...."
Exit Sub
connected:
Exit Sub
End Sub


Private Sub QCdisconnect()
'# disconnect from QC and release connection
'check if connection exists
If (tdc Is Nothing = False) Then
'disconnect, logout and release connection
tdc.Disconnect
tdc.Logout
tdc.ReleaseConnection
Application.StatusBar = "Disconnnected from Quality Centre...."
End If
End Sub


Private Sub getMetrics()
'create variables
Dim TestSetFolderPath, TestName, TestInstance, TestSetName, tsl
Dim tsf As TestSetFactory
Dim tf As TestFactory
Dim filterSet As TDFilter
Dim Tset As TestSet
Dim testInLab, testList
Dim test As TSTest
Dim row As Integer
Dim execDate, diff
Dim totalTestCount, runCount, totalRunCount, passed, totalPassed, failed, totalFailed As Integer
Dim runThisWeek, passedThisWeek, failedThisWeek, totalRunThisWeek, totalPassedThisWeek, totalFailedThisWeek As Integer
'write out column headings
writeHeadings
'set initial values
row = 3
totalRunCount = 0
totalPassed = 0
totalFailed = 0
passed = 0
failed = 0
runCount = 0
runThisWeek = 0
passedThisWeek = 0
failedThisWeek = 0
'get list of test cycles
Set tsf = tdc.TestSetFactory
Set tsl = tsf.NewList("")
'loop for each test cycle
For Each Tset In tsl
Application.StatusBar = "Getting Metrics for " & Tset.Name & "...."
'get list of tests in cycle
Set testInLab = Tset.TSTestFactory
Set testList = testInLab.NewList("")
'output cycle folder\name and number of tests
Range("A" & row).Value = Tset.TestSetFolder & "\" & Tset.Name
Range("B" & row).Value = testList.Count
'keep total of tests
totalTestCount = totalTestCount + testList.Count
'loop for each test in the cycle
For Each test In testList
'get the execution date and compare with todays date
execDate = test.Field("TC_EXEC_DATE")
diff = DateDiff("d", execDate, Date)
'check if test HAS been run
If test.Status <> "No Run" Then
'increment count
runCount = runCount + 1
'check if the run was this week - 0 to 7 days
If diff < 8 Then runThisWeek = runThisWeek + 1
End If
'check if test has passed
If test.Status = "Passed" Then
'increment count
passed = passed + 1
'check if the run was this week - 0 to 7 days
If diff < 8 Then passedThisWeek = passedThisWeek + 1
End If
'check if test has failed
If test.Status = "Failed" Then
'increment count
failed = failed + 1
'check if the run was this week - 0 to 7 days
If diff < 8 Then failedThisWeek = failedThisWeek + 1
End If
Next
'output totals for test cycle
Range("C" & row).Value = runCount
Range("D" & row).Value = runThisWeek
Range("E" & row).Value = passed
Range("F" & row).Value = passedThisWeek
Range("G" & row).Value = failed
Range("H" & row).Value = failedThisWeek
'clear objects containing list of tests in cycle
Set testsinlab = Nothing
Set testList = Nothing
'increment totals
totalRunCount = totalRunCount + runCount
totalPassed = totalPassed + passed
totalFailed = totalFailed + failed
totalRunThisWeek = totalRunThisWeek + runThisWeek
totalPassedThisWeek = totalPassedThisWeek + passedThisWeek
totalFailedThisWeek = totalFailedThisWeek + failedThisWeek
'reset values
passed = 0
failed = 0
runCount = 0
runThisWeek = 0
passedThisWeek = 0
failedThisWeek = 0
'increment row number
row = row + 1
Next 'end of processing
'increment row to add blank line
row = row + 1
'output totals
Range("A" & row).Value = "Total"
Range("B" & row).Value = totalTestCount
Range("C" & row).Value = totalRunCount
Range("D" & row).Value = totalRunThisWeek
Range("E" & row).Value = totalPassed
Range("F" & row).Value = totalPassedThisWeek
Range("G" & row).Value = totalFailed
Range("H" & row).Value = totalFailedThisWeek
'autofit columns
Columns("A:K").EntireColumn.AutoFit
'clear objects containing list of test cycles
Set tsf = Nothing
Set tsl = Nothing
'inform user of finish
MsgBox "Finished"
End Sub

Private Sub writeHeadings()
'# write out column headings
Range("A1").Value = "Quality Center Statistics"
Range("B1").Value = "Date: " & Date
Range("A2").Value = "Test Cycle"
Range("B2").Value = "No. of Tests"
Range("C2").Value = "No. Run"
Range("D2").Value = "No. Run this Week"
Range("E2").Value = "Total No. Passed "
Range("F2").Value = "No. Passed this Week"
Range("G2").Value = "Total No. Failed"
Range("H2").Value = "Total No. Failed this Week"
Range("I2").Value = "Current cycle No."
Range("J2").Value = "No of Cycles required for complete run"
Range("K2").Value = "No of builds required for complete run"
End Sub


Hope this is of help
Scott

--------------------
TestFire Controller - Open Source Test Automation Management for T-Plan Robot - www.testfire-controller.net


Post Extras: Print Post   Remind Me!   Notify Moderator  
-Asher-
Junior Member


Reged: 08/04/04
Posts: 508
Loc: Wellington, New Zealand
Re: Test Execution Report from Test Lab [Re: techqa]
      #615409 - 02/25/10 12:44 PM

The Live Analysis progress graph will give you exactly what you're asking for with almost zero effort on your part.

    1. Click on a Folder in the Test Lab module
    2. select the Live Analysis tab
    3. Click 'Add graph' in the left-hand pane
    4. Choose 'Summary' graph type
    5. Click Next
    6. Group by Status
    7. Click Next
    8. Choose 'Test Set' for the X-Axis
    9. Click Finish


Now you can see how many tests in each set (in the selected folder) have been executed/passed/failed
When you select another Test Lab folder, the settings will remain, so you don't have to set it up again.

The next thing that I do is set up the right hand pane in Live Analysis to show me TREND information

    1. Click 'Add graph' in the left-hand pane
    2. Choose 'Progress' graph type
    3. Click Next
    4. Group by Status
    5. Click Finish

Now you can see your execution states over time.

Very simple, no mucking around with report definitions or filters required.

--------------------
Regards,

Alex
... just another Tester ...


Post Extras: Print Post   Remind Me!   Notify Moderator  
dangermouse
Junior Member


Reged: 06/21/05
Posts: 3
Re: Test Execution Report from Test Lab [Re: sdaly]
      #615650 - 02/28/10 01:59 AM

Quote:

You may wish to create a macro to pull the metrics out. I prefer this over the excel report generator.

Here is some VBA to pull out test set metrics. Just change the connection string with your details...



Hope this is of help
Scott




I would like to try this. Where do I put all this code?


Post Extras: Print Post   Remind Me!   Notify Moderator  
sdaly
Member


Reged: 02/22/10
Posts: 25
Loc: DUNDEE
Re: Test Execution Report from Test Lab [Re: dangermouse]
      #615652 - 02/28/10 03:55 AM

dangermouse, its vba so needs to go in a macro, this is written for excel. You can either:

Open excel, add the dev bar which gives a link to the vba editor. Paste in there, change the connection string, save then run.

Or...You can open excel, click to create a new macro, stop recording then edit and paste the code in.

Hope this helps!

--------------------
TestFire Controller - Open Source Test Automation Management for T-Plan Robot - www.testfire-controller.net


Post Extras: Print Post   Remind Me!   Notify Moderator  
swc001
Newbie


Reged: 08/07/07
Posts: 2
Re: Test Execution Report from Test Lab [Re: sdaly]
      #617518 - 03/12/10 07:07 AM

Sweet... nice coding, Scott.

Only one coding error... you spelled "center" wrong... :-)
(a Brit, perhaps?)

Thanks for sharing.

(another) Scott


Post Extras: Print Post   Remind Me!   Notify Moderator  
mihai2dor
Newbie


Reged: 05/11/10
Posts: 5
Re: Test Execution Report from Test Lab [Re: swc001]
      #635581 - 07/21/10 04:22 AM

Hello sdaly,

Nice reporting tool!
I want to uset in my reporting activities but I cannot figure out how to create reports for a specific Folder in QC - I have a folder which contains some test tets, for which I want to create a report.

Can you help me with this issue?

Thanks a lot,
Mihai


Post Extras: Print Post   Remind Me!   Notify Moderator  
rbreporting
Newbie


Reged: 07/25/10
Posts: 1
Re: Test Execution Report from Test Lab [Re: techqa]
      #636065 - 07/25/10 05:47 PM

Quote:

I need to pull a report from the Test Lab describing a high level execution to show Test Folders and their Status. So a very basic hish level report.




Check http://www.rbreporting.com The Test Plan Status report does exactly what you have asked. The good thing is that the report is absolutely free.


Post Extras: Print Post   Remind Me!   Notify Moderator  
krishna_pandian
Newbie


Reged: 11/21/11
Posts: 1
Re: Test Execution Report from Test Lab [Re: sdaly]
      #707374 - 05/18/12 02:16 AM

Hi sdaly,

I tried to extract the report using the code but i am getting some error when i try to run it. i have changed the below details:

QCconnect_silent "http://l035000:7563/qcbin", "Wording", "Affect", "chinnak", ""

but when i change i run the vba, getting the below error

User Define type not defined:
"Dim tdc As TDConnection"

incase if i comment that and run i wil get error in anther place

Dim tsf As TestSetFactory - > error user not defined.


Could you please tell me what i am doing wrong and how should i proceed further to extract the report.


Thanks,
Krishna


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rajkumar_Rajangam
Veteran


Reged: 10/22/10
Posts: 3136
Loc: Norway
Re: Test Execution Report from Test Lab [Re: krishna_pandian]
      #707381 - 05/18/12 03:38 AM

Krishna,

Add OTA COM Type Library in the References & try again.

--------------------
Rajkumar


Post Extras: Print Post   Remind Me!   Notify Moderator  
TestingRam
Newbie


Reged: 10/25/12
Posts: 4
Re: Test Execution Report from Test Lab [Re: Rajkumar_Rajangam]
      #718753 - 10/25/12 10:23 AM

Hi Friends,

Please suggest any material to learn how write coding.
I want to export the test lab report from QC to Excel i am very much interested to learn the coding. Please help me.


Thanks
Ram


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 27 anonymous users are browsing this forum.

Moderator:  Rich W., AJ, jgottlieb 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 18857

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5