Forum Discussion

skelander's avatar
skelander
Occasional Contributor
7 years ago

Show all columns from a empty JDBC-request

Hello!

 

When executing sql from a JDBC Request Test Step which gives no result, this is what is shown in Response:

 

<Results>
   <ResultSet fetchSize="10"/>
</Results>

 

 

I would like to get something like this:

<Results>
   <ResultSet fetchSize="10">
      <Row rowNumber="1">
         <ID>null</ID>
         <NAME>null</NAME>
      </Row>
   </ResultSet>
</Results>

 

 Any ideas how to get that done?

 

Cheers!

Rikard

3 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    You can submit this as a feature request here. That would probably be a way to try to get this functionality. 

  • nmrao's avatar
    nmrao
    Champion Level 3
    skelander, You may like different response due to unknown reasons. But there is a reason why it has showing you the current response. Because, it is less payload that it has to transmit.

    Let us assume that there are a 100 columns, imagine, how big it has to be.

    Another one. If you query the data base directly, do you see the response which you are expecting columns with null data? No, right?
    It may just say: No records or something like that.

    If you are about to compare, then you should change the way the assertion is currently being done, but the way ReadyAPI's response.
  • PaulMS's avatar
    PaulMS
    Super Contributor

    If you just need to test that no rows are returned, add XPath Match assertion with expression count(//ResultSet/Row) and expected result 0.