Ask a Question

Groovy: Changing resource path for diff environments using readyapi 2.6.0

SOLVED
subhaD
Contributor

Groovy: Changing resource path for diff environments using readyapi 2.6.0

I have 3 environments, two have different endpoint , but same resource path , ao am using environments for this

But 3rd environemnt has a different endpoint and different resource path.

Please help with some groovy script to update thie resource path based on environment name.

 

I am hoping to add it in events, projectRunListener.beforeRun

3 REPLIES 3
TanyaYatskovska
SmartBear Alumni (Retired)

Leaders, can you please help here?

@groovyguy@avidCoder@nmrao 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



nmrao
Champion Level 3

Please show the example with screen shot.
Usually it will be same resource path. Wonder how different it is.


Regards,
Rao.

We have differnet environments, like

www.qa.google.com\abcd\efgh

www.google.com\abcd\efgh\ijkl\mnop

To parametrize this on different environments, we create project custom property and parametrize using that in different environments,

www.google.com\{templateproperty} using the template property in project.

Then we can change using environments, and changing endpoint for different environments,

www.google.comwww.qa.google.com

Got this answer from smartbear support , by emailing support tech. Thanks all for help, creating screenshot of my solution. 

cancel
Showing results for 
Search instead for 
Did you mean: