Contributions
Re: SoapUI 5.4.0 query on setup script :dynamic endpoint url
I got the solution for disable /enable ...Thanks a lot for your help. One query here we how we can use by test case name and by test case step instead of using ".each" here cases[0].getTestStepList().each { step -> step.setPropertyValue("endpoint", endpoints[result][0]) }2KViews0likes0CommentsSoapUI 5.4.0 query on setup script :dynamic endpoint url
Hi i want to place the endpoint url dynamically on the basis of test case name through setup script in SOAPUI 5.4.0 version. If I am having three test cases in a test suite ,Testcase-A and Testcase-b should run at one url and Testcase-C should run at different url ,I am using below code but its replacing all endpoint urls in all test cases. ----------------------- def result = com.eviware.soapui.support.UISupport.prompt("Please select the enviornment", "Environment", ['UAT_API','IT2','IT3','UAT1','UAT2','UAT3']) def testcases = testSuite.getTestCaseList() if(result == 'UAT1'){ testcases.each { testcase -> def teststeps = testcase.getTestStepList() teststeps.each { teststep -> teststep.setPropertyValue('endpoint','') } } }else if(result == 'UAT2'){ testcases.each { testcase -> def teststeps = testcase.getTestStepList() teststeps.each { teststep -> teststep.setPropertyValue('endpoint','') } } }else if(result == 'UAT3'){ testcases.each { testcase -> def teststeps = testcase.getTestStepList() teststeps.each { teststep -> teststep.setPropertyValue('endpoint','') } } }else if(result == 'UAT_API'){ testcases.each { testcase -> def teststeps = testcase.getTestStepList() teststeps.each { teststep -> teststep.setPropertyValue('endpoint','https://alpha-api.com') } } }else if(result == 'IT2'){ testcases.each { testcase -> def teststeps = testcase.getTestStepList() teststeps.each { teststep -> teststep.setPropertyValue('endpoint','https://it2-webservices.com:1') } } }else if(result == 'IT3'){ testcases.each { testcase -> def teststeps = testcase.getTestStepList() teststeps.each { teststep -> teststep.setPropertyValue('endpoint','') } } } ------------------------------- What is the solution for this.Can anyone help on thisSolved2.1KViews0likes5Comments