Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Proper Use Of QTP
#1
Solved: 10 Years, 9 Months ago
Hi All,

I would like to ask a question regarding the responsiblity of QTP when we prepare a test in QTP.

Application Example:

3 Input boxes:
Input1
Input2
Input3

One Button:
Calculate

1 Output Box:
X

How Application Works:
This is a web application (HTML) contains 3 input boxes as mentioned above. User types numbers in Input1, Input2, and Input3 and then hits "Calculate" button. The button calls a java script function named "CalculateX()" to calculate the X, and it is shown in X output box.

Test Data:
Input1=3
Input2=7
Input3=5
X=95

CalculateX is a function that have many business rules in it to calculate the value of X. Thats why we dont knwo how do we get "95" in X. What is the best use of QTP for this application, here are 2 approaches:

Approach 1: We can use QTP to find out if we are getting right value of X or Not. To do this we can provide an excel sheet where we provide 3, 7, 5, 98 for input1, 2, 3 and X respectively. It means if we get 98 in screen/page the test is passed otherwise it is treated fails.

Approach 2: Another group of people say that we should implement CalculateX function within QTP. When test runs QTP calls its own CalculateX function first and grab the value from X field from page and then compares. If both QTP caluclated value and page value are equal then test is passed, otherwise it is treated fails.

I think approach 2 is incorrect because:
- CalculateX should be hidden from QTP.
- CalculateX is a business function and nothing to with QTP testing.
- Code is duplicated in application as well as in QTP.

I think approach 1 is correct because:
- The test should know what the X will be if I pass 3, 7, 5.

If you understand my question, I would like to ask the best usage QTP for this above mentioned application so that we can use QTP for the purpose it is made for. Please highlight some comments where I can understand the role of different people and how they linked and benefited with QTP.

Thanks
Farhan
Reply
#2
Solved: 10 Years, 9 Months ago
Set aside QTP for a while, how will you approach the above question while doing manual testing? What does your test case document say?
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months ago
Unfortunately, there is no test case document. The team wanted me to implement CalculateX function in QTP. Thats why I put the question in the forum to get the correct approach, what is the best test case for this application, and what input and output I can expect from QTP... in a proper way of QTP usage.

Thanks
Farhan
Reply
#4
Solved: 10 Years, 9 Months ago
I would say all these questions can be best answered by the team who has asked you to implement that function. Remember there is nothing known as "best test case". Test cases are derived from and acc. to the requirements.

You can ask your team some questions like:
  • Why do they want to implement this functionality in QTP?
  • How they would have done it w/o any automation tool?
  • What do they want to achieve out of it? etc

Hope that helps.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  not getting proper code qtpguru 1 1,464 11-10-2009, 10:05 AM
Last Post: Saket

Forum Jump:


Users browsing this thread: 2 Guest(s)