Ask a Question

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

Trojka
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
Trojka
Occasional Contributor

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();

cancel
Showing results for 
Search instead for 
Did you mean: