How To: Variable Checkpoint? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How To: Variable Checkpoint? (/Thread-How-To-Variable-Checkpoint) |
How To: Variable Checkpoint? - tsilb - 02-10-2009 I have a variable and want to create a checkpoint to pass/fail based on its value (i.e. pass if >= 1; fail of <= 0). How can this be done? Specifically, I have a database call that retrieves rows based on a parameterized query. I want to fail if no rows come back, but pass if any do, regardless of the content. I have tried modifying my query to select count(field) and return a number, then compare that using a database checkpoint, but I need to build the query progmatically because it contains arguments being passed in from the Global DataTable. I am a Developer, not a Tester. I'm not really even sure why I'm the one doing this. Here is my "code": Code: 'ModelMaster lookup I want to pass or fail based on the value of rs.recordcount. Why can't there be a Value Checkpoint that can be inserted anywhere in code? :( RE: How To: Variable Checkpoint? - tsilb - 02-10-2009 Got it: Code: strSQL= "select [...]" |