- ArchanaRegular Participant
- Posts : 33
Join date : 2009-08-21
database connectivity
Sat Aug 22, 2009 2:35 pm
Hi,
I'm submitting a form through my test suite. As per my test plan, form should be submitted & if insert query goes smooth, a row should be added in my db. How can I test whether a row is really added or not? How can I check the error, if query is failed?
Also in my form, I'm getting options of a dropdown from db, How can I test whether correct options are loaded or not? If these are not possible, learning this stuff would be useless for me.
Please kindly help,
Thanks for your quick replies.
I'm submitting a form through my test suite. As per my test plan, form should be submitted & if insert query goes smooth, a row should be added in my db. How can I test whether a row is really added or not? How can I check the error, if query is failed?
Also in my form, I'm getting options of a dropdown from db, How can I test whether correct options are loaded or not? If these are not possible, learning this stuff would be useless for me.
Please kindly help,
Thanks for your quick replies.
Re: database connectivity
Sat Aug 22, 2009 6:39 pm
hi,
For checking the db query is successfully executing, you have to verify it on web page. After inserting it should be shown somewhere so verify text on that page by using command like verifyText or verifyTable if it appear in table.
If your query is failed, the data will not shown in UI. so by this way you can verify it.
For dropdown list use following command :
storeSelectedLabels ( selectLocator, variableName )
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
Arguments:
* selectLocator - an element locator identifying a drop-down menu
* variableName - the name of a variable in which the result is to be stored.
Returns:
an array of all selected option labels in the specified select drop-down
For more database testing use user-extensions created in javascript. You have to write as per your requirement.Search for already created by someone.
check out this link for more details:
http://seleniumhq.org/docs/05_selenium_rc.html#database-validations
Hope this will help you. best of luck.
Bye
For checking the db query is successfully executing, you have to verify it on web page. After inserting it should be shown somewhere so verify text on that page by using command like verifyText or verifyTable if it appear in table.
If your query is failed, the data will not shown in UI. so by this way you can verify it.
For dropdown list use following command :
storeSelectedLabels ( selectLocator, variableName )
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
Arguments:
* selectLocator - an element locator identifying a drop-down menu
* variableName - the name of a variable in which the result is to be stored.
Returns:
an array of all selected option labels in the specified select drop-down
For more database testing use user-extensions created in javascript. You have to write as per your requirement.Search for already created by someone.
check out this link for more details:
http://seleniumhq.org/docs/05_selenium_rc.html#database-validations
Hope this will help you. best of luck.
Bye
Permissions in this forum:
You cannot reply to topics in this forum