mardi 28 janvier 2020

How to resolve the error "Unexpected Element: CDATA" while running test step thru groovy script?

I'm running test suite which contains 15 test steps mixed with groovy script and soap request steps.

It runs perfectly when I'm running manually where as its giving the error message like "Unexpected Element: CDATA" while executing thru the groovy script.

Groovy Script:

for(tc in testsuite.testCaseList)
{
   for(stp in tc.testStepList)
   {
      if (!stp.isDisabled())
      {
         testRunner.runTestStep(stp)

         def assertionList = stp.getAssertionList()
         ..........
      }
   }
}

Get Response Data thru another groovy script step:

def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def responseHolder = groovyUtils.getXmlHolder("requestName#Response")
def appId = responseHolder.getNodeValue("//*:application/*:applicationId")

testRunner.testCase.testSuite.setPropertyValue("AppId",appId)

Could anyone give me your suggestion to resolve this issue?

Thanks
Karunagara Pandi G

Aucun commentaire:

Enregistrer un commentaire