Contributions
Hi, i need to clear my response everytime before i fire a new request.
Hi, i need to clear my response everytime before i fire a new request. Test suite A is where i fire the request from.Test Suite B has the test Step. How do i clear the response of test step in another test suite?943Views0likes0CommentsRe: how to replace entire parent node in request xml
thank you rao. I treid for long but figured out that i can dom object. Below code wored. def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context); def namespace = "http://pos.odc.vzwcorp.com"; def holder = groovyUtils.getXmlHolder("Get Edge Installment Device#Request"); def npanxxholder =groovyUtils.getXmlHolder("Npanxx Lookup Call#Request"); holder.namespaces["ns1"] = namespace; npanxxholder.namespaces["ns1"] = namespace; use (groovy.xml.dom.DOMCategory){ for( node in npanxxholder.getDomNodes( "//ns1:orderKeyInfo")) { node.children().each { child -> childname=child.name() childtext=child.text() log.info child.name() log.info child.text() //log.info "//ns1:"+"$childname" holder.setNodeValue("//ns1:"+"$childname",child.text()) holder.updateProperty() } } }9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews0likes0CommentsHow to remove a specific node and its child
<?xml version="1.0"?> <faq> <item> <q>Question 1</q> <a>Answer 1</a> </item> <item> <q>Question 2</q> <a>Answer 2</a> </item> <item> <q>Question 4</q> <a>Answer 4</a> </item> </faq> Hi all, My requirement is to remove only two<item > tags and the child nodes under it has anyone tried it before ? Thank you.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions686Views0likes1CommentRe: how to replace entire parent node in request xml
Rao,I need to transfer node and child nodes from one api to other using groovy.all child nodes inside the main node are common meaning they are both same tags.only values needs to be replaced/ transferred9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes2Commentshow to replace entire parent node in request xml
Hi all, I have multiple tags in a request.i need to replace the root tag<Testing Root> so i dont have to do it tag by tag.Doesanyone have idea on how to do this ? <Testing Root> <Sub Test 1> <Sub Test 2> <Sub Test 3> </Testing Root> thanks youSolved9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes4CommentstestRunner methods/objects are not coming up intuitively.Code completing is not working completelty
Somehow i dont see the intuitive code is not showing some of the methods that is supported for example, i when i enter testRunner.testCase. i expect it to show getTestStepbyName etc etc but it only shows check,checkcontains ,checkequals etc. If i manually type in the code and execute , it still works but the code completion is not listing all possibilities.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions703Views0likes1CommentRe: Update XML request in another test case
def TargetTestcase=testRunner.testCase.testSuite.project.getTestSuiteByName(CalleeSuite).getTestCaseByName(CalleeTestCase) def step = TargetTestcase.getTestStepByName("Features Lookup Call").getProperty('request').value holder = groovyUtils.getXmlHolder(step) //holder.setNodeValue("//ns1:Id", "CNT=0:CNTID=0048") //holder.setNodeValue("//ns1:description", "0 Month") holder.setNodeValue("//ns1:Id","CNT=2:CNTID=0012") holder.setNodeValue("//ns1:description","24 Months") holder.updateProperty() String tmpRequest=holder.getPrettyXml() TargetTestcase.getTestStepByName("Features Lookup Call").setPropertyValue('request',tmpRequest) Do it this way and it should work1.6KViews0likes0CommentsAccess testRunner objects from external jar files
Hi all, Has anyone tried accessing testrunner objects from external jar file? I have same properties in all testcases.I want to see if i can access property based on run context from jar file.Also,I want to be able to access the test step from external file. I could only think of jar file but not sure how to go about it. TIA.Solved9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes3Comments