lsainsbury
11 years agoContributor
Property Checkpoint Code Expression
Hey :)
I have a data-driven loop using an excel spreadsheet, where the Property Checkpoints value changes every loop.
I want to use a code expression to check that the value is between a certain value range in terms of a percent, so for example I'd like to pass my Checkpoints based off our specified value in the spreadsheet being within a value that is anywhere between 10% lower to 10% higher than our base value. I want to use percentages because it is easy to adjust later on rather than specifying default values for every row.
First of all I'd just like to get confirmation that this is possible using a code expression? If so, how would I go about referencing our spreadsheet value in the same way Test Complete does when we create a Property Checkpoint, Condition/Value?
Thanks in advance!
Edit:
So it seems to me I need some expression that references our Object Property (Value in our Software) then compares it against the Spreadsheet value * Value?
Something like...If Object Property < Spreadsheet Value * 1.1 or Object Property > Spreadsheet Value * 0.9?
I have a data-driven loop using an excel spreadsheet, where the Property Checkpoints value changes every loop.
I want to use a code expression to check that the value is between a certain value range in terms of a percent, so for example I'd like to pass my Checkpoints based off our specified value in the spreadsheet being within a value that is anywhere between 10% lower to 10% higher than our base value. I want to use percentages because it is easy to adjust later on rather than specifying default values for every row.
First of all I'd just like to get confirmation that this is possible using a code expression? If so, how would I go about referencing our spreadsheet value in the same way Test Complete does when we create a Property Checkpoint, Condition/Value?
Thanks in advance!
Edit:
So it seems to me I need some expression that references our Object Property (Value in our Software) then compares it against the Spreadsheet value * Value?
Something like...If Object Property < Spreadsheet Value * 1.1 or Object Property > Spreadsheet Value * 0.9?