I have five different URL end-points(environments) for production and for QA and I need to execute the same features in all these production environments in a single run and get the result in one cucumber report- (In TestNG I was passing each environment as the parameter in separate XML file and then use a common TESTNG.XML file that contains all these XML,s with different environments).
How can I manage this in Karate-config file?
I have below production environments ProdV1,ProdV2,ProdV3 and ProdV4.
{
"prod":{
"endpoint_urls":{
"ProdV1":"https://production1.com/prod/ProdV1",
"ProdV2":"https://production2.com/prod/ProdV2"
"ProdV3":"https://production.com/prod/ProdV3",
"ProdV4":"https://production.com/prod/ProdV4"
}
},
"uat":{
"endpoint_urls":{
"UatV1":"https://uat.abc.com/uat1/home-sec-uri",
"Uatv2":"https://uat.abc.com/uat2/home-res-uri"
}
}
}
Using command line I know we can run a single environment by command 'mvn clean -Dtest=TestRunner -DCucumber.Options="--tags " DProvEnv=ProdV1 '. But my question is how to run on all these production environments ProdV1, ProdV2,ProdV3 and ProdV4 together in a single run. Do we need to use for-loop? or is there any way other than that?