cancel
Showing results for 
Search instead for 
Did you mean: 

Execute database query using onscreen value

Execute database query using onscreen value

We need to grab an onscreen value (confirmation number, ticket number etc) from web page and pass that value into a sql query to perform a database checks. So, i am using a project variables to capture the on-screen value.

Currently, i have to edit the db checkpoint and insert the value manually into the custom query page to perform back end validation using TestComplete.


For values that change every time the test case is executed (example - confirmation number) If we can automate the process of capturing the on-screen value from the variable and passing it to the query, the whole test case will become automated and reduce the need for manual intervention.

Are there any other approaches adopted by any other customers which might help solve this need?

6 Comments
Contributor

Yes - Please add this Feature/Function.  It would save us so much time.

New Contributor

This feature would be great. Order #'s are dynamic or sometimes other entries are based on date/time. It would be great to grab this entry and enter in a query.

Community Hero

Yup.  Write script code.  This is easily done by using the various ADO objects available to your automation script code to write you're own SQL queries against your database, passing in any parameters, checks, etc, that you want.   What makes a "Checkpoint" a checkpoint is simply that it encapsulates the query code and such into it's own operation and then uses, internally, the "Log.Checkpoint" method to write a "pass" log entry to the log or a "Log.Warning"/"Log.Error" for a fail.

Community Hero

FYI, I have a Script extension that I created that allows you to connect to SQL databases and run custom queries.  All you would need to do is use that to create the SQL processing and then wrap that into additional code for the logging and object property capturing.

Frequent Visitor

@tristaanogre Thats encouragin to hear. I'd appretiate it if you could share the script.
Thanks.

Community Hero
Announcements
Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Join us and watch the welcome video:
Announcements