Message comparison modes

waclaw
centeractive people
Posts: 44
Joined: 11 Sep 2012, 20:27

Message comparison modes

Postby waclaw » 15 Oct 2012, 20:17

Hi

Message comparison component offers few comparison methods: "compare all for equality", "compare equality not structure" etc. It's not very clear to me how and when they should be used. Could you please explain it with details, and maybe give some examples of typical usage scenarios for each of the comparison methods?

thank you
waclaw
urs.minder
centeractive people
Posts: 68
Joined: 06 Jun 2012, 16:45
Contact:

Re: Message comparison modes

Postby urs.minder » 17 Oct 2012, 17:58

compare all for equality
All message fields of the compared messages must be identical with the message fields of the reference message. This applies to the field names, the field IDs (if any), the values and the message structure.

compare equality not structure
All fields of the compared message must be equal to that of the reference message. Fields that are in the compared message but not in the reference message are ignored.

Lets assume we want to compare the below Rendezvous message where the fields with the same name have identical value each. The comparison will fail with "compare all for equality" but it will successful with "compare equality not structure"
Image
waclaw
centeractive people
Posts: 44
Joined: 11 Sep 2012, 20:27

Re: Message comparison modes

Postby waclaw » 18 Oct 2012, 20:36

And what about "Compare all for equality (include nested XML)"? How does it differ from simple "Compare all for equality"?
urs.minder
centeractive people
Posts: 68
Joined: 06 Jun 2012, 16:45
Contact:

Re: Message comparison modes

Postby urs.minder » 19 Oct 2012, 16:35

waclaw wrote:And what about "Compare all for equality (include nested XML)"? How does it differ from simple "Compare all for equality"?

compare all for equality (include nested XML)
All elements of a compared message must be identical to that of the reference message. The actual message must not contain fields that are not present in the reference message. This also checks the structure and values of nested XML content.

While "compare all for equality" converts and considers the values of each field as one compact string, "compare all for equality (include nested XML)" checks whether such values are of XML format and processes them as such. This means that it will ignore comments and differences due to different formatting. Furthermore "compare all for equality (include nested XML)" reports differences in a much more detailed way, on an element and attribute level.
woosoo707
Posts: 1
Joined: 25 Oct 2013, 12:14

Re: Message comparison modes

Postby woosoo707 » 25 Oct 2013, 12:28

Lets assume we want to compare the below Rendezvous message where the fields with the same name have identical value each.
self test engine self test engine
leather-jackets leather-jackets
womens leather vest womens leather vest
security training security training

Return to “General Opensphere Topics”

Who is online

Users browsing this forum: No registered users and 1 guest