Forum Discussion

vikititor's avatar
vikititor
Contributor
3 years ago

JDBC responses including the table names - remove them

I have a big project to test my app using MySQL.. now there in JDBC the table names with dot and column name in the response.. 
OK.. accepted.. whole project build based on this "unclear" behavior.

NOW
I must test the app using the ORACLE DB.. There JDBC step behives as usual. normally.. without the table names before the column name.

Queston: I will fix the project in ReadyAPI - remove all the table names form all the assertions.. 
But I affraid, I can not return it normally when return testing back using MySQL. 

How to make MySQL working normaly? Like without the table names? Any idea?
Using ReadyAPI 3.20

com.mysql.cj.jdbc.Driver

 

Simple question: how to remove the table names from response when used the MySQL ??

7 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    You can use events feature to handle this case. Use SubmitListener.afterSubmit and write a script to remove the table name or not based on the condition. For example define a project level property IS_REMOVE_TABLE_NAME and set false or true; based on this value. have the logic to remove table name from the response xml and set the modified xml back to the response if value is true and leave it as is if the property name is false.

     

     

    • vikititor's avatar
      vikititor
      Contributor

      This is all nice.. So I need to develop something by my self.. 
      I am the first in the whole Earth, who is trying to solve this? 

       

       

    • vikititor's avatar
      vikititor
      Contributor

      Development of this script will be a nightmare.. 

      there is a lot of tables.. I have no idea.. how to acheave this. 
      Thanks for help.

      • nmrao's avatar
        nmrao
        Champion Level 3
        Should be simple find and replace the table name.
        In fact a common script can be created and called wherever needed and pass the table name as parameter.