XML checkpoints on un-ordered lists?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
XML checkpoints on un-ordered lists?
I would like to use an XML checkpoint to check a file that has a list of node items that appear in different orders each time the application is run. I was hoping that the "Ignore Node Order" checkbox would do the trick, but apparently it does not.
By way of example:
Test Run #1 results
<List>
<Item>Item1</Item>
<Item>Item2</Item>
</List>
Test Run #2 results
<List>
<Item>Item2</Item>
<Item>Item1</Item>
</List>
I would like to create an XML checkpoint that accepts the results of Test Run #1 or Test Run #2 as a "Pass". Is there anyway to do this without having to write a custom checkpoint script?
Thanks.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggest you contact Support directly for this question. You can use this link:
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Considering the "node order" flag... your example doesn't show a change in node order... the nodes are still in the same order they were in... just the "content" of the nodes has changed. That's probably why it didn't work for you.
What you can do is instantiate an instance of the MSXML.DOMDocument object in your automation and build your own XML Parser.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Considering the node definition from https://www.w3schools.com/xml/dom_nodes.asp and process description from https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/xml/how-comparison-works.ht..., I would stick to Robert's explanation.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
