Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help on how to validate a web application form using QTP
06-23-2009, 05:16 PM
Post: #1
Need help on how to validate a web application form using QTP

Hi
I am Debapriya.I am working as a test engineer. I need some help regarding what is the exact procedure to run test cases using QTP? How to validate a form using QTP?
In a form we may have field
Employee Name for which the Functional specs is 3 to 15 alpha chars
Then we can have different test case values
a. alpha chars ( Using Boundary values and EP ) ( valid and invalid
b. Numeric chars ( invalid )
c. Special chars ( invalid )
d. Alphanum chars ( invalid )
Where do we have to give these values?
Do we have to give these values in the data table? or in the field itself one after another.
How will QTP recognise the limit ( 3 to 15 chars ) and also that only alpha chars are allowed?
Or
If there is a field Zip Code whose Functional Specs. is 6 num chars?
can u explain any of these example in detail.
Thankyou in advance. Please do help out.
Thanks
Debapriya
Find all posts by this user
Quote this message in a reply
06-23-2009, 05:58 PM
Post: #2
RE: Need help on how to validate a web application form using QTP
Hi Priya,

There are two ways to write test scripts in QTP.
1. Record/Playback
2. Descriptive programming.

In record / Play back, you need to record the user actions and then you have to enhance the recorded script based on your specific requirements. In your case, the field should accept 3-15 alpha characters. For which you need to record the application for an invalid (let me assume error message for all the invalid cases is same) and a valid inputs and stop recording. Now your keyword view has the steps you have followed while recording. Add text check point for the error message. After adding check points, Click on the value column of the Employee name field and click on the "Configure the Value" button present in that cell. Now Value configurations options will be displayed in which select paramenter option, DataTable in the combo box, Enter a name in the Name combo box,say, "test" and Click OK. Now your data table will have a column "test" underwhich add all the possible inputs. (This is called as parameterizing the test). Now using conditional statements (if..then..else, while, etc..) you can validate the field.
For example, find the length of the input and check if the input's length is less than 3. If yes, Check whether the error message is displayed using the Text Check Point.

In Descriptive Programming, Recording will not come into picture. The whole test script will be written manually in VBScript. If you become proficient in recording and running, its easy to understand descriptive programming.

Thanks,
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Update expected results as you validate on ResultViewer mok 1 143 01-31-2012 08:56 AM
Last Post: rajpes
  Enable to record script for web application shailesh 3 1,110 07-01-2011 12:38 PM
Last Post: shailesh
  Unable to Record Web Application manoj12345 8 2,030 05-27-2011 05:36 PM
Last Post: Mohamed Asarudeen
  recording web application sonalee 3 904 05-02-2011 03:39 PM
Last Post: PrasadMedepalle
  Validate default email client and send mail through OL/OE eltee 0 1,186 04-08-2011 04:00 PM
Last Post: eltee

Forum Jump:


User(s) browsing this thread: 1 Guest(s)