Contributions
Re: How to remove extra slash in Request URL when EndPoint = ${#Project#EndPoint} using groovy ?
Solution: Set the Endpoint property value seperately. Before : String EndPoint = "\${#Project#Endpoint}" OR String EndPoint = "http://\${#Project#Endpoint}" testStep = testCase.addTestStep(type: "httprequest", name: "abc", endpoint: "EndPoint" + "/xml" , method: "POST") Output: Request URL: http:///${#Project#Endpoint}/xml ==> http contained 3 slashes After applying solution: String EndPoint = "http://\${#Project#Endpoint}" testStep = testCase.addTestStep(type: "httprequest", name: "abc", endpoint: " " , method: "POST") testStep.setPropertyValue( "Endpoint", "EndPoint" + "/xml") Output Request URL:http://${#Project#Endpoint}/xml2.1KViews1like0CommentsHow to remove extra slash in Request URL when EndPoint = ${#Project#EndPoint} using groovy ?
Hi, I am not able to set the Endpoint to be ${#Project#Endpoint} in groovy, because if set in this way , SoapUI sets the URL to start with http:/// which consists of 3 slashes after http. If I set the Endpoint to http://${#Project#Endpoint} , then SoapUI drops/breaks the data after # giving it as http://${. Is there any other method to set the endpoint to ${#Project#Endpoint} Thanks!Solved2.1KViews0likes1Comment