mgroen2's avatar
mgroen2
Super Contributor
8 years ago
Status:
New Idea

Implement support for validation on Database tables using dynamical values in WHERE clausule (SQL)

I am refferring to this post.

 

Currently, the tester (QA user), Test Automation Framework designer needs to write code to create validations on database tables, if he/she uses WHERE clausule.

Database Table Checkpoints, as currently implemented, do not support dynamically populated values in the "WHERE" clausules.

 

I would like to see TestComplete improved so that the Database Table Checkpoint feature supports dynamically populated "WHERE" SQL statements.

 

 

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Sorry, I should mention that the example code is JScript/JavaScript.  If you're using VBScript, the syntax and structure is going to change in generating the code.  I'm not a VBScript guy... I can struggle through and give you something but I'm not confident enough in my VBScript skills to be a whole lot of help.

  • mgroen2's avatar
    mgroen2
    Super Contributor

    No problem. I will create a new project.

    Do I need to select JavaScript or JScript? Or does it make no difference?

     

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    The syntax I use in the example is generally usable in either.

    One thing I just realized... the example I gave isn't going to work because the extension is written in JScript but I'm depending upon an output parameter.  So, what you're going to want to do is probably use the method for the record set as documented in the ReadMe I PM'd to you... That will return the actual SQL records in an ADO record set object that you can then traverse and check for content.

    I've created a "bug" in my repository to correct this oversight so that folks can get a "rows affected" response if they want... that is, again, a backlog item for me so it might take a bit.  In the meantime, the work around I suggested SHOULD work for you.