Forum Discussion

Kateryna's avatar
Kateryna
Contributor
14 years ago

Getting SQL Query in the script

Hello,



Is it possible to get SQL query during test execution with the help of the script?

For example I have DBTables with Table1, Table2 and Table3. And during test execution I need to write SQL query of these tables to txt file.





Thanks

13 Replies

  • AlexKaras's avatar
    AlexKaras
    Community Hero
    Hi Kateryna,



    As a possible workaround you may programmatically search for the text of the SQL query in the <test project>\Stores\DBTables\<table name>.tcBTable.dbt file.



    To Tanya: the tcBTable looks like a typo done in code - shouldn't it be tcDBTable ('D' is missed) instead?
  • Yep, I also thought about that, but all necessary data is encoded so I can't get it from there...
  • That's a good idea, thank you. But what if they change the way how they encode their data and all my tests will fail? I have a lot of them, so that is very risky for me to rely on unverified code.