Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I found my way to set up QTP, but is it a good way?
#1
Not Solved
Hello,

After practicing a long time how to learn scripting in QTP, i wanted to learn, wich way is the best to set up QTP.

I want to use Descpriptive Programming, Data Driven and Keywords. I don't want to setup the test with the keywords in an excel document, but in QTP.

I made a setup like this:

-In QTP every Action corresponds with one design-document
-In the Data Table each Action is one Sheet
-In my script i use keywords, the script looks like this:

----------------------------Testcase 1------------------------
Code:
For i = 1 to 3
SetCurrentRow(i)
StartApllication
EnterUsername
EnterPassword
PushButton
CheckPoint
CloseApplication
Next
----------------------------Testcase 2------------------------
Code:
'The next testcase, with another loop, is use the loop the select the good row in the Data Table.
For i = 4 to 7
SetCurrentRow(i)
The Keywords
Next
-I made one function file (.qfl) per Action.
-In this function file (.qfl) i make functions for all the keywords from my script.
In this function i refer, that the testdata comes from a Data Table with the kolom name, that is the same as the keywordname.
-I put my data in the Data Table
-This set up works very good, simple, and keyworddriven!

Because i have no experience with how to set up QTP the best way (i have no experience with it), is this a good way?
Is it a problem that the most of my scripting is in the function library files, and that there are a lot of functions in it?
Can this setup give performance problems, problems with the memory usage, or other problems?
Are there more people who set QTP up like this?
Reply
#2
Not Solved
@ttralor,

Consider a scenario where you are given 500 test cases. Now as per your approach, you will have 500 actions(one action/script) and 500 .qfl files(one .qfl file per script). This does not end here, it will grow as the nos of script grow. This approcah may end you up with a huge maintenance.

My suggestion would to keep only one function library which will have all the function. Keep all the common keywords in it. This file will be accessed be all scripts. Thus you will have only one file for n no. of scripts.

Also, When you say "KEYWORD", these refers to specific opertaion which are common in use like
SET, CLICK, Select, OPEN, CLOSE, EXIST

You shouold not be making silly operations such as entering username and password as keyword. This can be done using a common function.

Let me know if you need further help.

Regards,
Ankesh
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "Action was not found" error. What to do? ttralor 2 6,143 05-04-2017, 03:54 PM
Last Post: Ankur
  Highlight the Found text in Word/notepad Sivakumar2186@gmail.com 2 3,792 10-21-2013, 06:31 PM
Last Post: BadrinarayananR
  The operation failed. An object could not be found. kotaramamohana 1 3,810 08-07-2013, 12:34 PM
Last Post: anil2u
  Object not found Laura_F 9 7,065 02-01-2012, 04:26 PM
Last Post: shivu.impu
Wink Recovery scenario for page not found. chetan-24 0 2,496 12-26-2008, 03:44 PM
Last Post: chetan-24

Forum Jump:


Users browsing this thread: 1 Guest(s)