Forum Discussion

dvallabhuni1's avatar
dvallabhuni1
Occasional Contributor
9 years ago

PostgresQL select query results giving tablename for each node in respose for ReadyAPI1.4.1

with ReadyAPI1.4.1 when did select query on PostGreSQL the response is having following format,

 

<Results>
    <ResultSet fetchSize="0">
        <Row rowNumber="1">
            <TBLCNACCOUNTS.MASTER_USER_ID>1234</TBLCNACCOUNTS.MASTER_USER_ID>
            <TBLCNACCOUNTS.USER_NAME>abc</TBLCNACCOUNTS.USER_NAME>
            <TBLCNACCOUNTS.PASSWORD>pwd</TBLCNACCOUNTS.PASSWORD>
  
        </Row>
    </ResultSet>
</Results>

 

where as SoapUI Pro 5.1.2 gives the response for same scenario without tablename for each node as,

<Results>
    <ResultSet fetchSize="128">
        <Row rowNumber="1">
            <MASTER_USER_ID>1234</MASTER_USER_ID>
            <USER_NAME>abc</USER_NAME>
            <PASSWORD>pwd</PASSWORD>
        </Row>
    </ResultSet>
</Results>

 

This is totally changing the formatting and re-use of properties from response to other test steps.

Also, when switching from MS SQL DB to PostGreSQL (Migration Tests Or different environments have different DB servers), we see this as an issue with ReadyAPI1.4.1

 

Request you to review and eliminate table name in responses and keep same for all DB drivers.

 

Thanks,

DhanaRaj.

 

 

7 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Since that is an xml, you can easily transform as needed if you want.
    • dvallabhuni1's avatar
      dvallabhuni1
      Occasional Contributor

      Thank you for the reply.

      My concern is with changing all the existing test steps (We had them in MS SQL and now migrating some envirnments to PostGreSQL). So it will be more work to build the logic and handle them separately.

      If ReadyAPI1.4.1 provides the similar response as SoapUI or other tools/drivers it should be good.

      I think its more of an issue/enhancement needed on ReadyAPI side.

    • Olga_T's avatar
      Olga_T
      SmartBear Alumni (Retired)

      Hi all,

      RachelJones, please try a
      dding an event handler TestRunListener.afterStep,

      import com.eviware.soapui.impl.wsdl.teststeps.JdbcTestStepResult
      if (testStepResult instanceof com.eviware.soapui.impl.wsdl.teststeps.JdbcTestStepResult){
      def response = testStepResult.getResponse() 
      def content = response.getContentAsString() 
      log.info content
      content = content.replaceAll("<TABLENAME.", "<")
      content = content.replaceAll("</TABLENAME.", "</")
      log.info content
      response.setContentAsString(content) 
      testStepResult.setResponse(response, false) 
      log.info testStepResult.getResponseContentAsXml() 

      }

      Does this work for you?

      • RachelJones's avatar
        RachelJones
        New Contributor

        Hi ,

        I was just curious to know that this is happening only in PostgreSql .

        For oracle and SQL it is giving only the alias name. Is this issue related with the ReadyAPI version since i am using 2.2. I will definitely give a try to the proposed solution.