Forum Discussion

vadanas's avatar
New Contributor
2 years ago

End point request


My question is we need to write the script for Multiple end points change at a time i have wrote like this but unfortunately not able to please check my below code


def result ="Please select the enviornment", "Environment", ['shr-rbdevkong(Kong QA server*)','shr-rbqakong(Kong QA Server Alert*)','hc-kong-qa(Kong QA Server Old*)']) "selectedurl" +result
def Server =['shr-rbdevkong(Kong QA server*)' ,'shr-rbqakong(Kong QA Server Alert*)' ,'hc-kong-qa(Kong QA Server Old*)']
/*def Endpoints=[""]
def Authorizationlist=[""]*/
if (result.toString().equals(Server[0])) {EndPoints = EndPointList[0]; Authorizationlist = "No Authorization";"0"} "Endpointsvaluee"  + EndPoints "Authvalue"  + Authorizationlist "Server[0]"
if (result.toString().equals(Server[1])) {EndPoints = EndPointList[1]; Authorizationlist = "No Authorization";"1"} "Endpointsvalue" +EndPoints "Authvalue" + Authorizationlist "Server[1]"
if (result.toString().equals(Server[2])) {EndPoints = EndPointList[2]; Authorizationlist = "No Authorization";"2"} "Endpointsvalue" +EndPoints "Authvalue" + Authorizationlist "Server[2]"
//for all  testsuites


    def testSuites = testSuite.project.getTestSuiteList() testSuites.size
    testSuites.each { testSuite -> "TestSuite name:::"+testSuite.getName()


def testcases = testSuite.getTestCaseList() testcases.size "Test Cases under the test suite ::::"+testSuite.getName()
testcases.each { testCase -> "TestCase name:::"+testCase.getName() "Test Steps under the test Case ::::"+testCase.getName()
def teststeps = testCase.getTestStepList() teststeps.size
teststeps.each { testStep -> "TestStep name:::"+testStep.getName()

def teststeps = testcase.getTestStepList()

teststeps.each { teststep ->



if {teststep.config.type =="restrequest"} {

def httpRequest =teststep.getHttpRequest()









No RepliesBe the first to reply