Forum Discussion
Hi aaronpliu ,
Thanks for the further suggestion. I feel I have understood what you mentioned so the end state is that in the API section I would update the end points to have the Custom Property as the below screen
I have previously tried this and I can't hardcode the url in this manner. The first call to Salesforce is to test.salesforce.com. I would supply my login corresponding to the Sandbox i want to log into and once authenticated, Salesforce supplies back the URL for the environment under test.
for example
SIT I would navigate to "test.salesforce.com" and use my login id of troyyerJP@salesforce.com.sit, and then Salesforce would would create a session for the SIT environment sit.salesforce.com . the SIT url endpoint is supplied back to me by salesforce from the login api response data.
Stage I would navigate to "test.salesforce.com" and use my login id of troyyerJP@salesforce.com.prep and then Salesforce would create a session for the Stage environment prep.salesforce.com . the Stage url endpoint is supplied back to me from salesforce from the login api response data
I can't hardcode the sit url custom property to sit.salesforce.com as when we refresh the environments we could be assigned a new sandbox for the environment so the suggested process to login is to start from test.salesforce.com and use the ServerUrl supplied back in the login response.
As mentioned we have multiple APIs so we need to configure them in the Environments feature where I can set it once and other non-technical testers can select the environment they want to test in.
Any other options for this?
I tried to implement aaronpliu pattern, and hardcoded the salesforce URL for the specific environment to 2 different Test Project Custom Properties QA and UAT environment parameters, however that fails as a Salesforce update has now changed those URLs. So this pattern is a bit too brittle and has to be constantly managed.
- sonya_m3 years agoSmartBear Alumni (Retired)
Related Content
Recent Discussions
- 4 days agominhng