.

A complete guide to working on Quality Center with QTP

Q: What are the prerequisites to connect QTP with QC?

A:

  1. Check Allow other Mercury products to run tests and components present under Tools > Options > Run in QTP
  2. If you are running the tests on the same computer where you have QC client installed, then you will need:
    1. QTP Connectivity Add-In
    2. QTP Add-in
  3. If you are running the tests on the different computer than where you have QC client installed, then you will need:
    1. QTP Add-in where QC client is installed.
    2. QTP Add-in and QC connectivity Add-in where QTP is installed.
  4. QC connectivity can be found at QC server URL > ‘Add-Ins Page’ link > ‘QC Connectivity’ link > ‘Download Add-in’
  5. QTP Add-in can be found at QC server URL > ‘Add-Ins Page’ link > ‘More QC Add-ins’ link > Download and install QTP Add-in according to its version.

Q: How can we connect QC with QTP using Automation Object Model (AOM)?

A:

Use TDConnection Object.

Example:

‘ Create the QuickTest Professional application object.
Set qtqcApp = CreateObject(“QuickTest.Application”)

qtqcApp.Launch ‘Launch QTP
qtqcApp.Visible = True ‘Make it visible

‘Connect to Quality Center

‘qtqcApp.TDConnection.Connect <QC Server path>, <Domain name that contains QC project>,
‘<Project Name in QC you want to connect to>, <UserName>, <Password>,
‘ <Whether ‘password is entered in encrypted or normal. Value is True for encrypted and FALSE for normal>

qtqcApp.TDConnection.Connect “http://QualityCenterServer/tdbin”,
“FR”, “Flights”, “learnqtp”, “welcome”, False

Q: How can we automatically connect QTP with QC on start up?

A: Go to File > Quality Center Connection. Check the box marked Reconnect to server on start-up.automatically-connect-qc-qtp

Q: What if QTP tries to connect with QC automatically but QC login credentials had changed?

A: Change the following properties from 1 to 0. They are present in mic.ini file under QTP installation generally found under C:\Program Files\Mercury Interactive\QuickTest Professional\bin

  1. LoginAutomatically=0
  2. ReconnectToDB=0
  3. ReconnectToServer=0

Q: How can we access Quality Center Open Test Architecture (OTA) using AOM?

A: Using QCUtil object (AKA TDUtil for QTP 6.5 and backwards). You can find details of all associated properties like CurrentRun, TestRun, Current Testset, CurrentTestSetTest, IsConnected, QCConnection under QTP Help > Quick Test Object Model Reference > Utility Objects > QCUtil Object.

Q: Where can we find all methods and properties present under TDConnection Object?

A: Refer QTP Help > QTP Advanced References >  QuickTest Automation > TDConnection Object.

Q: How can we upload QTP scripts to QC using AOM?

A: Once connected to Quality Center, open the test using AOM and save it to QC.

Example:

qtqcApp.Open “C:\Temp\Project\QTPTestScript1″, True
‘ Get the Test object
Set qtqcTest = qtqcApp.Test
‘ Use the SaveAs method to upload the test to Quality Center
qtqcApp.Test.SaveAs “[QualityCenter] Subject\FolderName\QTPTScript”

Q: Which version of QTP is compatible with which version of Quality Center?

A: QC 9.0 integrates with QTP 8.2 SP1, QTP 8.2 SP2, QTP 9.0, QTP 9.1 and QTP 9.2. To check the compatibility of your QTP version, check out the ReadMe that comes pre-installed with QTP

Q: Can we record Quality Center operations with QTP?

A: Yes, only with QC 9.2 and above. Use .NET Add-in.

Q: Can we schedule a test run from Quality Center?

A: Yes, use ‘Test Run Scheduler’ utility that comes with QC.

Q: Is there version control in QC with QTP?

A: Yes, QTP 10.0 provides you the version control feature under the name of Quality Center Version Control present under File Menu. Earlier versions of QTP can work with 3rd party version control tools.

Have you downloaded the FREE Optimizing QTP eBook yet? Get It Now!

If you want to keep track of further articles on QTP. I recommend you to subscribe via RSS feed. You can also subscribe by Email and have new QTP articles sent directly to your inbox.

30 comments ↓

#1 Nidhish on 04.27.09 at 20:15

Nice article.. thanks ankur for providing this informative article.

Thanks,
Nidhish.

#2 suresh on 04.27.09 at 21:01

this is useful

#3 Kapil on 04.27.09 at 21:39

Its is really very useful

#4 Ravinder on 04.27.09 at 22:33

thanks ankur, to post the very informative artical.

#5 Rashmi on 04.27.09 at 23:00

Its really a nice and informative article. Thanks Ankur for this info….

#6 suresh babu on 04.27.09 at 23:57

Great ankur, this is good contribution to QTP family

#7 Diwakar on 04.28.09 at 00:17

Hi Ankur,
Thanks for this info, In my current project we are trying to insert defect in TD through QTP (AOM) but we didn’t succeed.Do you have any idea on this

#8 Anand on 04.28.09 at 02:00

thanks Ankur for the information…

#9 Keerthana on 04.28.09 at 05:17

Hi Ankur,
Thanks Ankur for sharing your knowledge. I have a request, I am a beginner and I am getting lot of calls but everywhere they are asking more about networks and server side questions. Where ever I am working they are not intersted in explaining about these so how can I get more/indepth knowledge about the mobile application.
Please guide me how to get the domain knowldge like pharma/validation, finance….etc.

Thanks,
Kerrthana.

#10 Adi on 04.28.09 at 20:52

Dear Ankur, it is good article and also very useful to every one, thanks for posting

Regards
Adi

#11 Sai on 05.07.09 at 19:29

Thank you very much Ankur, This is really helpful.

#12 Nandini on 05.13.09 at 00:56

Ankur

I’ve all the data(Libraryfiles, OR,TestData in the Quality Center) how can i import the data table from QC while running the script in QTP? I mean what path i have to mention? DataTable.ImportSheet ?

#13 vishal on 05.16.09 at 01:19

Hi Kapil,
first of all i want to say thanks for your wonderful comments. i am regular reader of your blogs.
i am download QTP(9.2) and work on basics.basically i have 4 years exp i manual testing now i want to learn more so pls tell me after basics of QTP what is next step. i urgently need a job in top MNC. so pls help me…

Waiting for your reply

Thanks in advance

#14 RAGHAVENDRA on 05.30.09 at 01:01

Dear Ankur,

Please help me how to learn QTP/QC with tutorial & ppt study material for the certification .

Thanks & Regards

Raghavendra

#15 shiva on 06.18.09 at 06:44

Hi Ankur,

Its gud.thanks for the info

#16 vasanth on 06.20.09 at 21:16

hi all

please inform me any testing jobs in your companies.

i have 3 yrs of exp .

#17 Harish on 07.30.09 at 06:54

This is very useful article

#18 Shrikant on 08.03.09 at 02:02

Hmmmmm gr8! Thnx Ankur

#19 Hariom Gupta on 08.12.09 at 20:48

Its really a knowledgeable artical…

#20 shobha on 09.11.09 at 02:35

Getting below Error when i try give run from test plan using QTP10.0

Test :
BAd DAta

please suggest some solution

#21 sanjay on 10.04.09 at 23:42

Very good arrticle… Thanks Ankur Sir

#22 Anand on 10.14.09 at 09:48

Good stuff, Thanks

#23 sumanth on 10.16.09 at 23:02

very good article …Thanks!!

#24 Charu on 10.31.09 at 18:11

Hello Ankur, can u plz tell me what to write in Server url area in the above . As I am new to testing plz do me a favor…

Thanks & Regards,
Charo

#25 kishore on 12.30.09 at 11:38

whats the probable launching date of QC 9.0 Can anybody focus on it?

#26 Skumar on 03.11.10 at 22:25

Great Ankur,

Today we just migrated to qc 10 which is first experience to me, so there weere many questions in my mind.
This article not only answered my questions but has more info.
People like you really helping us to ovecome hurdles in our day to day job responsibilties and in developing knowledge.
Trust me, these exp’s really builting up confidense that we can go any place , any project to work on and gain knowledge as we go on explore things.
Thank, Thanks, Thanks a lot.
God bless you.

#27 Kannan on 05.11.10 at 11:48

Ankur, Thank you so much for posting these details. Its really helpful.

#28 dembamita on 05.26.10 at 15:10

how to install QTP 9.2 at home and use for long time

#29 sunil on 06.01.10 at 12:43

This link is very help full for me.

#30 lemon on 06.09.10 at 12:09

can i ask something about QTP? im using qtp10 doing functional testing for a website.. i doing the recording well but after run the test i came out with this problem “Cannot identify the object “All Events” (of class Link). Verify that this object’s properties match an object currently displayed in your application” why did the run time error msg came out, suppose qtp already capture all the object properties etc during recodrding?? that software fail or test application fail??
i will write more next time but help me fix this problem first…… thank you :)

Leave a Comment