Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

JMS reading and comparing - best practice?

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
Dear support,

The relevant logic of the application we need to test is this:
1. A JMS message is put on a queue on Server A.
2. The message (if is valid) it is slightly transformed and put onto another JMS queue on Server B.
We need to compare the messages put on server A with those read from server B.

The Messaging Client Tool is used to write and the Call Back Tool to read the JMS messages.
The JMS messages are defined with schema files (.xsd). We would prefer to use a File data source for the messages.

The best solution to compare the messages we found by now is adding a Data Bank to the writer, a Diff Control to the reader, then refer to the fields in the Data Bank from a Diff Control chained to the reader. Unfortunately this does not work if another xml message is used, with different (but still valid) structure: e.g. if we the new xml has one more child than the xml we used to set up the Data Bank.

It would be better if we had a solution something like this:
- Use the same data source for the readers as used for the writers
- Define the XPATH value referring to the elements that should left out of comparison (in the read messages some information is changed/missing, but otherwise they are the same as the written).

Is there a way with SOATest (v5.5.1SP4) to do this?

Thank you,
Andras v.

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    The diff tool actually has that functionality of ignoring specific xpaths that you don't want to validate. If you run the scenario, you will be, as expected, seeing the errors such as extra xml elements. Simply right click these errors and select "Ignore XPath". You'll be prompted with a dialog options box which allows you to configure the way the XPath should be ignored. This is available in SOAtest 5.5.1 SP 4.0 (it's been available for a while so earlier version should support this as well).

    Dear support,

    The relevant logic of the application we need to test is this:
    1. A JMS message is put on a queue on Server A.
    2. The message (if is valid) it is slightly transformed and put onto another JMS queue on Server B.
    We need to compare the messages put on server A with those read from server B.

    The Messaging Client Tool is used to write and the Call Back Tool to read the JMS messages.
    The JMS messages are defined with schema files (.xsd). We would prefer to use a File data source for the messages.

    The best solution to compare the messages we found by now is adding a Data Bank to the writer, a Diff Control to the reader, then refer to the fields in the Data Bank from a Diff Control chained to the reader. Unfortunately this does not work if another xml message is used, with different (but still valid) structure: e.g. if we the new xml has one more child than the xml we used to set up the Data Bank.

    It would be better if we had a solution something like this:
    - Use the same data source for the readers as used for the writers
    - Define the XPATH value referring to the elements that should left out of comparison (in the read messages some information is changed/missing, but otherwise they are the same as the written).

    Is there a way with SOATest (v5.5.1SP4) to do this?

    Thank you,
    Andras v.