SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1
    Member
    Join Date
    Mar 2012
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Pattern recognition in qc tables with qtp

    Hi Guys,
    Currently due to the volume of defects we are having multiple instances of duplicate defects being raised by testers. In spite of having a Defect co ordinator this issue still crops up.Currently i suppose pattern matching only for the Subject is currently provided out of the box by QC.
    I was planning to try something on the lines:
    1.Connect to the qc bug table using qtp
    2. Fire a pattern patch on the BUG table across columns like BG_DESCRIPTION,BG_SUBJECT,BG_DEV_COMMENTS

    Can someone please guide on the same
    Please provide any good reference on understanding the qc db model and find values in specific columns in qc database.
    Thanks

  2. #2
    Member
    Join Date
    Feb 2012
    Posts
    74
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Shreejit,
    I dont have much idea about qc db model , but I can give a few pointers on this issue as we had initially faced it .
    1. While entering the defect description follow a standard pattern. Ex : <ProjectName>_<ModuleName>_<Shor t Desc>
    2. " Find similar defects " functionality provided by QC should help in reducing the chances,but I am not sure of its internal architecture as to how it works.
    3. The most efficient way that worked for us was to have a defect review board which met on a every specified day of a week . This board consisted of testers, developers , business analysts etc . They not only reviewed defects for its preciseness in terms of defect parameters but also gave quality inputs on any duplicate entries.
    4. Also before the build starts up the existing defects logged by dev people was shared with the testers group so that they are already aware of the situation.
    Well most of my points are based on a management perspective. Hope it helps out.

    Thanks,
    pai
    If you do find solution to a problem - have a bud & re-visit !

  3. #3
    Member
    Join Date
    Mar 2012
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Hi Kartik,
    I do understand that from a functional perspective there are a lot of processes you can set up to prevent the same.
    I was looking more for a technical approach to the same.
    I was able to check all the qc tables in the 'Dashboard' tab today and the BUG table would contain most of the information you should be looking for
    Thanks

  4. #4
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    I would not use QTP to do this, I would use the QC API from Excel or use QC Reporting to download all the 'Non-Closed' BUG table entries into Excel and run some macros against that.

    Mark Smith.

  5. #5
    Member
    Join Date
    Mar 2012
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Hi Mark,
    The issue was we perform a basic heartbeat checkout at the end of the day using an automation script. The script is expected to be smart enough to list out if there were any defects raised of a particular category. So we needed to do that.

    1. I do not have an admin account to qc due to which i need to use the BugFilter
    2. If we have any admin account in qc we could directly hit the qc database tables using QCUtil.QCConnection.Command
    I observed the Command object does not get created if we are connecting to QC with a non admin account

    'Find the list of critical defects raised for current executing release which are currently not closed or withdrawn
    'Attached sample code snippet which i am currently working
    Msgbox QCUTIL.QCConnection.Connected


    Set QCConnection = QCUtil.QCConnection
    Set BugFactory = QCConnection.BugFactory
    'Set QCCommand = QCConnection.Command

    Set oBugFilter1= BugFactory.Filter
    'oBugFilter1.Filter("BG_SUMMARY") = "*SWAT*" 'Name of the Release
    oBugFilter1.Filter("BG_STATUS")= "New Or Open Or Assigned Or Fixed Or 'In Progress' Or 'Pending Close' Or 'PT Re-Test' Or ' Re-Test' "
    'Defect status for which count is calculated

    oBugFilter1.Filter("BG_USER_13") = "*2.20*"
    Msgbox BugFactory.NewList(oBugFilter1.Text).Count
    Msgbox oBugFilter1.Text

    set BugList= BugFactory.NewList(oBugFilter1.Text)

    ''''''''''Export Records
    Dim Bug, Excel, Sheet
    Set Excel = CreateObject("Excel.Application") 'Open Excel
    Excel.WorkBooks.Add() 'Add a new workbook
    'Get the first worksheet.
    Set Sheet = Excel.ActiveSheet
    Sheet.Name = "Defects"

    With Sheet.Range("A1:H1")
    .Font.Name = "Arial"
    .Font.FontStyle = "Bold"
    .Font.Size = 10
    .Font.Bold = True
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlCenter
    .Interior.ColorIndex = 15 'Light Grey
    End With

    Sheet.Cells(1, 1) = "Summary"
    Sheet.Cells(1, 2) = "Detected By"
    Sheet.Cells(1, 3) = "Detected on Date"
    Sheet.Cells(1, 4) = "Status"
    Sheet.Cells(1, 5) = "Subject"
    Sheet.Cells(1, 6) = "Severity"
    Sheet.Cells(1, 7) = "Priority"
    Sheet.Cells(1, 8) = "Assigned To"

    'Call PrintFields(BugFactory)

    Dim Row
    Row = 2
    'Iterate through all the defects.

    For Each Bug In BugList
    'Save a specified set of fields.
    'Sheet.Cells(Row, 9).Value = Bug.Field("BG_BUG_ID")
    Sheet.Cells(Row, 1).Value = Bug.Summary
    Sheet.Cells(Row, 2).Value = Bug.DetectedBy
    Sheet.Cells(Row, 3).Value = Bug.Field("BG_DETECTION_DATE")
    Sheet.Cells(Row, 4).Value = Bug.Status
    Sheet.Cells(Row, 5).Value = Bug.Field("BG_SUBJECT")
    Sheet.Cells(Row, 6).Value = Bug.Field("BG_SEVERITY")
    Sheet.Cells(Row, 7).Value = Bug.Priority
    Sheet.Cells(Row, 8).Value = Bug.AssignedTo
    Row = Row + 1
    Next

    Excel.Columns.AutoFit

    'Save the newly created workbook and close Excel.
    Excel.ActiveWorkbook.SaveAs("D:\DEFECTS.xls")
    Excel.Quit

  6. #6
    Advanced Member cgrzelka's Avatar
    Join Date
    Feb 2005
    Location
    Bordeaux, France
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Each time you update a bug, QC updates a table named TOKENS with the words that are making up the Summary and Description fields (some words, such as articles, are ignored).

    Then you have two FindSimilarBugs method (one for the BugFactory and one for the Bug object), that allows you to find similar bugs for a given pattern (from BugFactory, equivalent to the Find Similar Text in the UI) or a given bug (from Bug, equivalent to Find Similar Defect in the UI).

    You'll have to tweek the similarity ratio so that results are meaningful.

    For more information on the similarity ratio, see 'Matching Defects' under 'Adding New Defects' in the Quality Center User's Guide.

    Another option is to enable Text Search for your project. Then you can use the ISearchableFactory interface of the BugFactory and its Search method. This is only possible with strongly typed languages, i.e it's OK with Visual Basic Assistant (in Excel) but not with VBScript as you need to access to a secondary interface of the BugFactory object. The Search method will give you more accurate results because it is based on a more complex dictionnary stored in your DB manager (for instance it should find a verb regardless of the tense being used).

  7. #7
    Member
    Join Date
    Mar 2012
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Thanks Christian,
    Also i have a question here is the Bug Factory filer 'case insensitive'?

    Set oBugFilter1= BugFactory.Filter
    'oBugFilter1.Filter("BG_SUMMARY") = "*SWAT*" 'Name of the Release
    oBugFilter1.Filter("BG_STATUS")= "New Or Open Or Assigned Or Fixed Or 'In Progress' Or 'Pending Close' Or 'PT Re-Test' Or ' Re-Test' "
    for eg. i have filtered with *SWAT*.
    Will it find SWAT, swat, Swat etc??

  8. #8
    Member
    Join Date
    Mar 2012
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Hmmmm ran a quickie blind search and BugFactory Filter is really smart enough (SWAT, Swat, swat) its all trapped appropriately. Nothing additionally needs to be done for any 'case insensitivity' [img]/images/graemlins/smile.gif[/img]

  9. #9
    Member
    Join Date
    Mar 2012
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    Stuck at a point
    "Filter Error in Field < Description > : 341"

    This is when i try to filter out based on the DESCRIPTION column in the bug table
    oBugFilter1.Filter("BG_DESCRIPTION") = "*towed*"
    When the data was extracted for the Description column it was in html format
    -------------------------------------------------------
    <html><body>Unable to proceed from Third Party Asset UI while taking a claim.<br>Getting, "Asset Towed From Scene: Missing Required Field" error message in Third Party Asset UI.<br><br>Environment : PT-GL<br>Browser : IE 8<br><br><b>Steps to Reproduce:</b><br>1. Login to NextGen<br>2. Click on First Notice of Loss<br>3. Proceed till Third Party Asset UI.<br>4. Enter the Third Party Asset details and Click on Save<br><br><b>Claim #'s:</b> 115800237, 115810269, 115810392<br><br><b>Expected Result : </b>Third Party Asset UI should display the appropriate details of the Claimant.<br><br><b>Actual Result :</b> <font color="#FF0000"><b>"Asset Towed From Scene: Missing Required Field"</b></font> error message is displayed in Third Party Asset UI.<br><br>Attached Screenshot for reference.</body></html>
    --------------------------------------------------
    How can i filter for keywords inside this html?
    Please help
    I dont have admin rights to fire direct sql queries into the database unfortunately (so maximizing using the Bug Factory)

  10. #10
    Member
    Join Date
    May 2009
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Pattern recognition in qc tables with qtp

    You could try to use the function given below for converting html to text first, then search the pattern using regex or instr

    <font class="small">Code:</font><hr /><pre>
    msgbox ConvertHTMLtoText("&lt;br&gt;&lt;br&gt;&lt;font color=""""#008000""""&gt;TestingGUID position 26 with dashes must be one of the following: AB234567&lt;/font&gt;&lt;/body&gt;&lt;/html&gt;")

    Public Function ConvertHTMLtoText(byVal strHTML)
    If InStr(1,strHTML,"&lt;") &gt; 0 Then
    Do
    startVariable = InStr(1,strHTML,"&lt;")

    endVariable = InStr(startVariable,strHTML,"&gt;")
    varName = Mid(strHTML,startVariable, endVariable-startVariable+1)
    strHTML = replace(strHTML,varName,"")
    Loop While InStr(1,strHTML,"&lt;") &gt; 0
    End If

    strHTML = replace(strHTML,"&amp;gt;","")
    strHTML = replace(strHTML,"&amp;lt;","")
    ConvertHTMLtoText = strHTML

    End Function
    </pre><hr />

 

 
Page 1 of 3 123 LastLast

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.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:26 AM.

Copyright BetaSoft Inc.