Database compare input
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Database compare input
I am new to TestComplete and I bet there is a really answer that I am missing. From what I can tell, a database chekc gets a baseline set of data first and then when the test runs checks to see if that data has been modified. The test fails if modified from baseline. If my test goes through a web form registration, the database will change at the end and therefore not match the baseline. How do I check the database for the new record? I don't really need a baseline set of data, rather I want to know that my registration actually processed. Thanks for your patience with a noob question.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You compare the value that you entered to the database value after the entry on the webpage has been saved.
There are several ways to do this. If you're using data driven testing, you can compare the value in your data file to the value in the database. If you're always entering the same data on the web page, then you can save it in a variable and compare that variable to the value in the database. It all depends on where that entered value is coming from in the first place
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the input. I am using data driven tests. What I am confused about is the call DBTables.DBtable1.Check(). What is that checking? There are no parameters that I can put in that allow me to "check" variable "X" against the results of a run time database Query? How can I run a specific call to the database to see if the new record exists at test run time? Any examples that I can go look at?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check just tells you if the data has changed.
There's also Compare
These are references to a whole database table rather than one record, and there are samples on the pages.
If you are just trying to update a record from a webpage and make sure that it was stored in the database properly, these methods are overkill. Enter your data on the webpage and then search for the record in the database and make sure the data is the same as what was entered. Use an ID or some other field that isn't changed for your search.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
