vendredi 15 février 2019

Reading extra properties or host addresses inside the JSON test case

I am using zerocode-rest-bdd maven lib with following version. I have my applications host and port defined in the JUnit runner with "@TargetEnv("app_host.properties")".

<dependency>
  <groupId>org.jsmart</groupId>
  <artifactId>zerocode-rest-bdd</artifactId>
  <version>1.2.15</version>
</dependency>

I want to access more hosts/ports(boundary application IPs) and common tokens(SAML, OAuth etc) into my JSON test case which I am unable to access using $.

Is there any other way to extend or configure these extra properties so that I can access them and validate my boundary contracts?

app_host.properties contains:

web.application.endpoint.host=https://api.github.local
web.application.endpoint.port=443
web.application.endpoint.context=
#Can not access these below properties
app_host_1=https://app1.host.local.uk
saml_token=<SAML>sdf-wer</SAML>

Accessing in the test case as below:

"url": "${app_host_1}/users/u123",

Aucun commentaire:

Enregistrer un commentaire