cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Datasource property for the Start and End value in DataGen Teststep

Highlighted
Occasional Contributor

Using a Datasource property for the Start and End value in DataGen Teststep

Is it possible to use a Datasource property value for the Start and End values in a DataGen Teststep (type Number)?

 

I would like to pull the ranges from a Datasource Grid, this will be the outer loop. Within the Testcase, for one particular part the script will loop through the ranges generated by the DataGen teststep.

1 REPLY 1
Highlighted
Occasional Contributor

Re: Using a Datasource property for the Start and End value in DataGen Teststep

Solved it using this, but is this the only way?

 

def maxNumber = context.expand( '${DataSource#MaxNumber}' )
testRunner.testCase.getTestStepByName("IncrementTerminalId").getPropertyAt(0).getProperty().setEndValue(maxNumber);

 

log.info testRunner.testCase.getTestStepByName("IncrementTerminalId").getPropertyAt(0).getProperty().getEndValue();

New Here?
Join us and watch the welcome video:
Top Kudoed Authors