Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help on how to validate a web application form using QTP
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
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
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
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,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT 14.53 not able to record steps of web application rupesh doshi 3 2,922 10-10-2019, 01:50 PM
Last Post: rupesh doshi
  Can we test Salesforce Standard form using QTP? yona34 0 1,094 05-22-2018, 10:57 AM
Last Post: yona34
  How to identify SVG elements from web application Sanjana1987 0 1,979 02-07-2017, 08:30 AM
Last Post: Sanjana1987
  Not able to set value in application web edit box tanuj dewangan 4 3,773 07-29-2016, 03:58 PM
Last Post: harshadevadas
Question Strange form, cant get it marvson 0 1,503 05-12-2016, 07:35 PM
Last Post: marvson

Forum Jump:


Users browsing this thread: 1 Guest(s)