Contributions
Re: How to change resource path for different environments.
Hi Bill, I try the above solution, unfortunately I didn't work . May be I'm doing something wrong in the script. Please have a look at the below script. log.info "\n\n\n\n" log.info " Begin of the demonstration of resourcepath in RequestFilter.filterRequest Groovy Script" log.info "\n\n\n\n" String therequestUri = new String(context.getProperty("requestUri").toString()) log.info "therequestUri is " + therequestUri log.info "length is "+ therequestUri.length() def endindex = therequestUri.length() - 1 def beginindex = 24 def resourcepath = context.expand('${#Project#CPresourceName}').toString() //String resourcepath = new String(therequestUri.substring(beginindex, endindex)) log.info "context.getProperty(\"requestUri\"): " + context.getProperty("resourcepath").toString() log.info "resourcepath is " + resourcepath log.info "\n\n\n\n" log.info " End of the demonstration of resourcepath in RequestFilter.filterRequest Groovy Script" log.info "\n\n\n\n" Also, I didn't get the below code , I comment it out in my script. //String resourcepath = new String(therequestUri.substring(beginindex, endindex)) From the test runner logs: I can see the following: 17:45:06,412 INFO [log] Begin of the demonstration of resourcepath in RequestFilter.filterRequest Groovy Script 17:45:06,412 INFO [log] 17:45:06,413 INFO [log] therequestUri is http://xxxxxx.xxx.xxxxx:xx /rail/rs/V1/tsearches 17:45:06,413 INFO [log] length is 66 17:45:06,413 INFO [log] context.getProperty("requestUri"): null 17:45:06,414 INFO [log] resourcepath is /rail/sohail/V1/tsearches 17:45:06,414 INFO [log] 17:45:06,414 INFO [log] End of the demonstration of resourcepath in RequestFilter.filterRequest Groovy Script 17:45:06,414 INFO [log] Could you please let me know, what's wrong in the above script. Thanks a lot.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes2Comments- 7 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.9KViews0likes0Comments
How to change resource path for different environments.
Following is my scenario: Using Ready API. I'm working with different environments ( dev, test & staging) the requirement here is utilizing the same test scenario for different environments. According to my project, the resource path is differ based on the environment. For example for dev environment: http://dev.company.com /rs/hotel/V1/shopping the resource path is different for test environment example:http://test.company.com /APINH0I/V1/shopping I can able to change the endpoint http://test.company.com to http://dev.company.com when I chose the environment option from the ready api tool. Changing the resource path going in the project is effecting all the resources, with this I can't able to execute the same scenario for two different environments. ( don't want' to duplicate the test suite, it will be huge for maintenance). Could you please recommend or suggest any workaround to handle this scenario.Solved7 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.9KViews0likes5CommentsHow to import composite rest ready api project into soap ui free version.
I have created the project (rest) in Ready Api. AS i have the license only for me in a team. Now the other team members want to import the project into soap ui free version.The free version import gives all the time java.lang error. Please suggest me some alternative to fix this issue..7 years agoPlace ReadyAPI QuestionsReadyAPI Questions917Views0likes1Comment