QTP database checkpoint, numeric range checking

  • Questions
  • QTP database checkpoint, numeric range checking
Question ID: 104323
1
0

Hi, I have a database checkpoint that checks for a numerical range.
This seems to work fine.
However I want to be able to change the min/max properties of this checkpoint through code.

DbTable("DbTable").Check CheckPoint("26.CheckECG")

SQLstr = "Select  t1.VitalValue From  Case_VITALS_N As t1 Left Outer Join  Case_VITALS_N As t2 On t1.VitalDT < t2.VitalDT And t1.VitalCode = t2.VitalCode Where   t2.VitalCode Is Null And  t1.VitalCode = 'Temp1"'
DbTable("DbTable").SetTOProperty "Source", SQLstr

CheckPoint("26.CheckECG").SetProperty "Min","20"  <-- 'Min' does not work
CheckPoint("26.CheckECG").SetProperty "Max","50"  <-- neither does 'Max'

DbTable("DbTable").Check CheckPoint("26.CheckECG")

Ultimately I want to be able to get these min/max and sqlstr values from a datasheet (which I can do no problem). I’m just unsure of how to actually change the property of the checkpoint.
Will I have to create a separate checkpoint for every database value I check?
I want to avoid this as I have a lot of values to check, which all have numerical ranges.

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on February 21, 2011 3:54 am
12 views
Answers (1)
2
Private answer

I hope I'm understanding your question properly, but if I do, I think you can do it this way....

If the datasheet you are talking about is in an action's datatable, you can modify the database checkpoint properties to use the datatable value as the checked value. Just select the cell in the database checkpoint that you want to check and change it from a constant value to a Parameter value, and then you can reference the datatable cell with your min or max value and the checkpoint will use the current value of that datatable cell as the value it checks from the database.

I hope that's what your're after. If not, try clarifying your question some and maybe include some screenshots.

Marked as spam
Posted by (Questions: 16, Answers: 751)
Answered on May 8, 2013 7:41 pm