nullop
13 years agoOccasional Contributor
Making sequence numbers
I have not found out how to do this functionality:
myNum starts as 1.
<myTag>
<option>${DataGen#myNum}</option> // should put 1 in here
<option>${DataGen#myNum }</option> // should put 2 in here
<option>${DataGen#myNum }</option> // should put 3 in here
</myTag>
If I run the test case again it should start at 4. I need a string before the number… Stepping through an int is not as flexible as what I need. Making 3 separate ints is too cumbersome. I may need 512 ints that follow this pattern.
Any idea how to approach this?
I have been looking into XmlParser & XmlSlurper... I do not know if that is the right path yet.
myNum starts as 1.
<myTag>
<option>${DataGen#myNum}</option> // should put 1 in here
<option>${DataGen#myNum }</option> // should put 2 in here
<option>${DataGen#myNum }</option> // should put 3 in here
</myTag>
If I run the test case again it should start at 4. I need a string before the number… Stepping through an int is not as flexible as what I need. Making 3 separate ints is too cumbersome. I may need 512 ints that follow this pattern.
Any idea how to approach this?
I have been looking into XmlParser & XmlSlurper... I do not know if that is the right path yet.