Test Data Manager

  • 1.  I want to compare the xml tag with DB Field for 100 records..

    Posted Jun 01, 2017 01:30 AM

    Scenario Description : I am having source as Queue, Target as DB. I am publishing some 10 messages via parameterization. I run the adapter. 10 messages are now getting transferred to 10 records in DB. 

     

    Note : Only few fields are mapped from xml to DB Column.

     

    I created a property to store the xml field and DB Column. But, while running the ITR. It is getting failed, because the DB values are not getting matched with xml entries.

     

    1xml field value should match with 1st entry of Result set of JDBC.

     

    If i post 10 messages after sometime. then the validation should be like 1xml message field value should match with my 11th entry of Result set of JDBC Step. 

     

    Help me if possible... Thanks in Advance.



  • 2.  Re: I want to compare the xml tag with DB Field for 100 records..
    Best Answer

    Posted Jun 08, 2017 06:39 PM

    Hi  PreethiManoj

     

    So it looks like you are trying to do a datapump type test to take data from a message queue and dump it into a table.  and its failing since you are not able to match up the fields in the XML message with the fields in the database.   If you are using the built in filters in DevTest to extract the DB column and value,  you should be able to pass those values to a sql statement.   The problem you might be running into is that if the columns are dynamic,  some of those values may need to be quoted.   I would suggest logging the SQL statement in the log files (which should be the request of the JDBC step) and log it to a file and test externally to see if it will work.  If you are still having issues,  suggest opening a support ticket, and a support engineer will be happy to help you out



  • 3.  Re: I want to compare the xml tag with DB Field for 100 records..

    Posted Jun 09, 2017 01:41 AM

    Thanks Joe for your suggestion.

     

    If I extract the Result set from JDBC, it will be in excel. Again it is a manual work for me to do validation for those records. Its not exactly 100 Records I want to match and validate. But, atleast randomly 10 Records I should match with the Queue message.

     

    For Example (Message in Queue) :

    <TagA1>Apple</TagA1>

    <TagA2>Banana</TagA2>

    <TagA3>Orange</TagA3>... <TagAn>Strawberry</TagAn>

     

    DB Columns :

    TagA1, TagA2, TagA5, TagA7, TagA11.

     

    Note : I really want to store the message in a temp file from MQ. The output of DB also I want to keep in a file. Then, I have to do comparison of both data. Will it be done by our DevTest Tool ? If yes, pls proceed with steps.

     

    I don't know how to open a support ticket. If you know the steps. please let me out.

     

    Thanks much...