Forum Discussion
- JoostDGFrequent Contributor
What I often do in such a case is assert via a script assertion.
In the script I get the current active environment via:
def activeEnvironmentName = messageExchange.modelItem.project.activeEnvironment.name
//note, this is the name for your environment you have setup in the "Endpoints & Environments" setting.
//for tst
def expectedResult = "tst123"
if (activeEnvironmentName == "acc"){
//for acc
expectedResult = "acc123"
}
then proceed with the actual assertion by getting the actual api response value and assert it against expectedResult