Forum Discussion

mdc's avatar
14 years ago

DBTables compare via a keyword test

I'm a novice user and have a question regarding a test that I'm trying to do.



I'm attempting to record a keyword script that adds data to my local db, checks for that data stored in my local db, then deletes the record at the application level (not the database) and then checks that the record was indeed deleted. I've successfully have added and executed the script, so that it opens my application, enters the one item via the application into my db, and then deletes the record. The problem that I'm encountering is understanding how the data compare works.



I've converted my keyword test to a script and have established a connection to my local db via DBTables in the Stores section of TestComplete. However, it does not appear to be checking the values, but I could be misunderstanding how it functions. What I'm looking to occur in the log file is an indicator that the record has been added and what the value of the record added was. Then I would like to see some validation occur at the end of the test that checks to make sure that it was deleted.



Here is my script:



Sub Main()

  Call Aliases.abc.wndabc9c000000.Keys("~t")

  Call Aliases.abc.wndabc9c000000.MainMenu.Click("Tools|[3]|[1]")

  Call Aliases.abc.wndcabc9c000000.Keys("~nAATEST")

  Call Aliases.abc.wndabc9c000000.abc9c000000.wndEthnicities.Click(256, 312)

  DBTables.Table.Compare

  Call Aliases.abc.wndabc9c000000.Keys("~t")

  Call Aliases.abc.wndabc9c000000.MainMenu.Click("Tools|[3]|[1]")

  Call Aliases.abc.wndabc9c000000.Keys("~d")

  Call Aliases.abc.wndabc.Keys("y")

  Call Aliases.abc.wndabc9c000000.mrs9c000000.wndEthnicities.Click(256, 312)

  DBTables.Table.Compare

End Sub



Here is my db connection string using the custom query data source:



Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=abc;Data Source=MIKEC-I1545



I watched the tutorial about Database Checkpoints, but I still must be doing something wrong.



Does anyone have any suggestions?