I am trying to configure different environment specific data in serenity.conf and trying to read them using EnvironmentVariables in my serenity bdd tests.I have below configuration in serenity.conf
environments {
dev {
restapi.baseurl = "https://dev.api.3stripes.io/"
}
stg {
restapi.baseurl = "https://stg.api.3stripes.io/"
}
default {
restapi.baseurl = "https://prod.api.3stripes.io/"
}
}
I am trying to read this in my bdd steps like this
EnvironmentVariables objEnvVar = SystemEnvironmentVariables.createEnvironmentVariables();
String baseURI = objEnvVar.getProperty("restapi.baseurl");
I am running the tests using maven command :
mvn clean verify -Denvironment=dev
But am getting null value for baseURI string.Please let me know what needs to be changed here to read the value properly.