Forum Discussion

boku2112's avatar
boku2112
New Contributor
6 years ago

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.

 

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    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

    • boku2112's avatar
      boku2112
      New Contributor

      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?