I wanted to know if we can use selenium to do database validations? Say for example in an IBE (Internet booking Engine) you do a booking and then you check if the coinciding booking has been saved in the Database. Would that be possible using selenium?
also what would be the best selenium framework to be used for data driven testing?
You can use Selenium to do the interactions with the booking web pages. If there is a web page that then allows you to view data in the database then you can do what you are attempting in just Selenium IDE.
If you actually want to get into the database directly then you're going to need to get a scripting tool or programing language, c#, Java, etc. to first drive Selenium and then query the database.
@ TestCCC and Mark B. - well basically what I'm trying to do is Test automation using Selenium RC and probably some form of Test Automation Framework to automate the testing. The DB validations are a part of the test automatio process. I just haven't figured out how exactly I am going to tackle it. So trying figure out ways to implement selenium RC and a test automation framework.
I do all my work with C# in Visual Studio Test and I don't really know how Selenium works outside of that environment.
To do what you're talking about I'd end up writing a library that would have a method (or group of methods) to do a booking using Selenium and then another one to pull data out of the database behind the application.
I'd likely pull the test data out of a database to drive the method. Along with the test data to input, would be the data that would be the expected results.
After the booking was done via the method I'd connect to the database behind the application and query for the booking I just did. I'd then compare that with what I got from the test data database.
It could really be a bear if you don't have control over what appointments(etc) you are booking and have to pull that stuff from somewhere dynamically.
It would likely take me a fairly long time, like a few weeks, to put most of the thing together to where I could even begin creating tests.
That's how I'd do it. It's not the only way, maybe not even the best way, but it works for me.