Contributions
Re: stripping default '?' from soap requests
So I am looking into using the DOMBuilder to parse the xml then process the nodes, removing the '?'. All of this works. However, when I attempt to set the "Request" back into the testStep ("WsdlTestRequestStep"), it does not stick. Here's my code: for(testStep in testRunner.getTestCase().getTestStepList()) { if(testStep.getClass().getSimpleName().equalsIgnoreCase("WsdlTestRequestStep")) { myRequest = testStep.getPropertyValue("Request") reader = new StringReader(myRequest) doc = DOMBuilder.parse(reader) root = doc.documentElement use(DOMCategory) { items = root.'**'.findAll{ it.text() == '?' } items.each{ item -> item.value = '' } } myRequest = XmlUtil.serialize(root) log.info(myRequest) testStep.setPropertyValue("Request", myRequest) } } How can I set the request of a testStep with my new xml? Thanks, Rob12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0Comments- 12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes3Comments
How to assert an element in a SOAP response list?
I am getting a soap response, which includes the following fragment. How can I specify an assertion for a particular element of the list, without a guarantee of the order the response list is in? So, for instance, let us say the RAF_Intro element is sometimes the 2nd element and sometimes the 5th element. Thanks! <lookupPageContentHeadersOutput> <contentList> <content> <contentSID>111</contentSID> <contentId>RAF_Mail</contentId> <contentStatus>DEPLOYED</contentStatus> </content> <content> <contentSID>110</contentSID> <contentId>RAF_Intro</contentId> <contentStatus>DEPLOYED</contentStatus> </content> <content> <contentSID>109</contentSID> <contentId>RAF_Email</contentId> <contentStatus>DEPLOYED</contentStatus> </content> <content> <contentSID>112</contentSID> <contentId>RAF_Disclosures</contentId> <contentStatus>DEPLOYED</contentStatus> </content> </contentList> </lookupPageContentHeadersOutput>12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes1CommentRe: [Resolved] Trigger a listener when just a test step is run
That's too bad. It is inconsistent. If you allow a test step to be run alone, one should have the ability to install a listener to it, just like with a test suite or test case. It is ok, as I have managed a workaround, but still. Thanks for the support!12 years agoPlace ReadyAPI QuestionsReadyAPI Questions968Views0likes0Commentslogging from inside a groovy class
I am calling a groovy class, I wrote, from inside a groovy script test step and I am passing the "log" variable in. When I run the test step alone, I get a log message in the Log Output. When I run as a test case, I get no log message in the TestCase Log. What is going on and how can I ensure I get a log message in both cases? Thanks!12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes3Comments[Resolved] Trigger a listener when just a test step is run
I am trying to trigger a listener to manage my test environment, just when a test step is run, without the surrounding test case being run. Is there a way to do this? Thanks!12 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes2CommentsTrigger a listener when just a test step is run
I am trying to trigger a listener to manage my test environment, just when a test step is run, without the surrounding test case being run. Is there a way to do this? Thanks! ps. I am using Pro, but I cannot post in that forum yet.637Views0likes0Comments