Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I report defects to QC from script results
#1
Not Solved
Is there a way to create defects on QC from test results? In case if a certain test fails a defect is opened reporting it on QC.
Reply
#2
Not Solved
You need to connect QTP with QC. This guide may be of some help.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved
Thanks Ankur for your quick reply. However, I already have QTP connected with QC and have my scripts uploaded to QC. What I want to know is how to open defects if after running a script and some errors were found?
Reply
#4
Not Solved
In QTP under Tools/Options there is a setting to "Submit Defect to QC for each failed step". Set that. That will automatically create defects if steps fail. If you need to manually report a failure use:

Code:
Reporter.ReportEvent micFail, "Step", "Reason

With the defect option set, that will create defects when you manually create a failed point. you can also use:

Code:
Services.SetTransactionStatus Fail

This will fail a step as well and create a defect if the option is selected.

I hope this is what you were interested in.
Reply
#5
Not Solved
I'm able to connect to QC manually and report defects from the Test Results manually, but all what is written in the defect is the path of the test itself. What I need is to be able to customize what's written in the defect (or at least to include what's in Test Result)

Any help?
Reply
#6
Not Solved
Okay, I got now how to create a defect from QTP using
Code:
Dim QCConnection

Set QCConnection = QCUtil.QCConnection

'Get the IBugFactory

Set BugFactory = QCConnection.BugFactory

'Add a new, empty defect

Set Bug = BugFactory.AddItem (Nothing)

'Enter values for required fields

Bug.Status = "New"

Bug.Summary = "New defect"

Bug.DetectedBy = "admin" ' user that must exist in the database's user list

'Post the bug to the database ( commit )

Bug.Post

But there're some fields I can't alter, such as: Build, Team Lead, QA Responsibility, Status Detail.

Anyone know how to change the values of the mentioned fields? (tried using
Code:
Bug.field("BG_Team_Lead")
but didn't work
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Launch report button missing in QC uma87 0 3,542 10-27-2011, 08:15 PM
Last Post: uma87
  Submit defects automatically from QTP to QC PallaviD 0 3,896 06-24-2011, 03:31 AM
Last Post: PallaviD
  How to export the QTP Test results in to HTML file using script venkatbatchu 9 27,161 08-12-2009, 07:18 PM
Last Post: manabh
  Problem with hardcopy on QTP report. bpyro 0 1,814 07-24-2009, 02:03 PM
Last Post: bpyro
  Fusion Report - How to combine with QuickTest Professional babyrajani 1 2,638 01-05-2009, 11:34 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)