Forum Discussion

vinay_ba92's avatar
vinay_ba92
Occasional Contributor
7 years ago

Working with SQL Database using testcomplete

Hello guys,

I have a scenario where i have to query data from database and  i have to compare the db values with application values.

how can i do this using test complete?

 

 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    TestComplete has access to ADO database drivers and can use them via the ADO object .  These are sufficient for creating simple queries that return values that you can then use in your tests anywhere.

     

    If you are going to retrieve the data from multiple rows and validate them against application values in some sort of loop, you can also use the DDT.ADODriver method.

     

    If you follow the link in my signature below, I have a Script Extension that wraps some of those ADO objects to make it easier to run sql queries.  

     

    If you need more specific help with particular scenarios, we'd be more than happy to help but these three methods should be able to get you started.

    • joseph_michaud's avatar
      joseph_michaud
      Moderator

      Can't add much more to Robert's reply except to point to the (more general) article about working with Databases:

       

      Working With Databases

       

      and to point to some "How To" articles on working with SQL (but more on manipulating tables rather than just reading the DB):

       

      start with the first of them: TestComplete How To: SQL