doSwitch?

Hi,
I am trying to use doSwitch but can not figure out why it is not working. The thing I am trying to achieve is to make my script execute different REST-request depending on which environment I am running it towards.
For example, when I execute the script I am passing the parameter -DtestEnvironment=“test” at commandline. When I execute against test environment i want to execute a post request and when running against uat I want to execute a get request against another url. Somehow my script doesnt seem to execute the doSwitch at all. What am I missing?

Note, the below code is a fragment of my script, just to show the principle. Hope it is enough to get an understanding of what I am trying to achieve.

`
val testEnvironment = System.getProperty(“testEnvironment”)

def get_socialSecurityNumber () : ChainBuilder = {
doSwitch(testEnvironment)(
“test” →
exec(
http(“GET Social Security Number”)
.post(“http://fejka.nu?json=1”)
.check(jsonPath("$.pnr_full").saveAs(“socialSecurityNumber”))
.check(jsonPath("$.email").saveAs(“email”))
.check(status.is(200)))
.exec { session =>
email = session(“email”).as[String].replace(“fejka.nu”, “getnada.com”)
socialSecurityNumber = session(“socialSecurityNumber”).as[String].replace("-", “”)
session
},
“uat” →
exec(
http(“GET CRM Private Customer”)
.get(“https://someurl/customers?personalIdentityNumber=” + socialSecurityNumber)
.check(status.in(200, 404))
.check(status.saveAs(“crmHttpStatus”)))
.exec { session =>
crmHttpStatus = session(“crmHttpStatus”).as[String]
session
}
)
}

val testParameters = scenario(“Testing scenario”)
.exec(
startAppFirstTime(),
Testdata.get_socialSecurityNumber()
)

class Testing extends Simulation {
setUp(SmallRegression.testParameters.inject(atOnceUsers(1)).protocols(httpProtocol))

}
`

Regards,
Mats

Solved the problem, a foolish mistake, missed an exec in a another function.

//Mats