Forum Discussion

Perchishka's avatar
Perchishka
Occasional Contributor
8 years ago

JDBC request with date from another JDBC response and stored procedure

I have a JDBC response: <Results> <ResultSet fetchSize="0"> <Row rowNumber="1"> <PS_SUBSCRIBE_DATA_290.CHANGED_DATE>2017-02-01 12:13:51.378</PS_SUBSCRIBE_DATA_290.CHANGED_DAT...
  • Perchishka's avatar
    Perchishka
    8 years ago

    Thank you, very much!

    I did it!

     

    assert context.ResponseasXML
    def parsedXml = new XmlSlurper().parseText(context.ResponseasXML)
    def dt = parsedXml.'**'.find { it.name() == 'PS_SUBSCRIBE_DATA_290.CHANGED_DATE'} as String 
    
    def dd = dt.substring(0, dt.lastIndexOf("."))
    log.info( dd )
    context.testCase.setPropertyValue('CHANGED_DATE', dd)