`
Hi
I encounter many problems with the following script :
I have an Excel file which contains 4 columns : Xmin, Ymin, Xmax, Ymax
I would like write the code :
for(int x=xmin;x=xmax;x++)
for(int y=ymin;y=ymax;y++)
http(“Tile”)
.get(url +"/"+ “${y}” +"/"+ “${y}”
Then I write this first test:
val myDATA =ssv(“test.csv”).convert {
case (“Xmin”, string) => string.toInt
case (“Xmax”, string) => string.toInt
case (“Ymin”, string) => string.toInt
case (“Ymax”, string) => string.toInt
}
object MapsService {
val feeder = myDATA.random
val exportMap = exec(
feed(feeder)
.exec(session => {
// Ca serait pas mal d’iterer de xMin à XMin de YMin à YMax
// val x="${Xmin}" +1 don’t work
// val x=${Xmin} +1 don’t work
// val x = feeder[“Xmin”]+1 don’t work
session.set(“myTile”, “${Level}” +"/"+ “${Ymin}” +"/"+ “${Xmin}” )
})
.exec(http(“Tile/”+ “${Level}” +"/"+ “${Ymin}” +"/"+ “${Xmin}” )
.get(webAdaptor + “/rest/services/” + “FondsDePlan/ViaNavigo” + “/MapServer/tile/” + “${Level}” +"/"+ “${Ymax}” +"/"+ “${Xmin}” )
.check(status.is(200))
)
.exec(http(“Tile/”+ “${Level}” +"/"+ “${Ymax}” +"/"+ “${Xmin}” )
.get(webAdaptor + “/rest/services/” + “FondsDePlan/ViaNavigo” + “/MapServer/tile/” + “${Level}” +"/"+ “${Ymax}” +"/"+ “${Xmin}” )
.check(status.is(200))
)
.exec(http(“Tile/”+ “${Level}” +"/"+ “${Ymin}” +"/"+ “${Xmax}” )
.get(webAdaptor + “/rest/services/” + “FondsDePlan/ViaNavigo” + “/MapServer/tile/” + “${Level}” +"/"+ “${Ymin}” +"/"+ “${Xmax}” )
.check(status.is(200))
)
.exec(http(“Tile/”+ “${Level}” +"/"+ “${Ymax}” +"/"+ “${Xmax}” )
.get(webAdaptor + “/rest/services/” + “FondsDePlan/ViaNavigo” + “/MapServer/tile/” + “${Level}” +"/"+ “${Ymax}” +"/"+ “${Xmax}” )
.check(status.is(200))
)
)
}
I ve two questions :
- First I don’t know how to loop inside the exec function. Is’it possible ?
- And I don’t know how to add value to one of my feed : How can we do that ?
val x “${Ymin}” +1
If someone could help me …
Best Regards
`