I did test with Graphical XML Side-by-Side Comparison and got differences of XML, but only in "console".
I want to put it on some property for future sending all the text in email step.
This thought to take all of the text through a script.
Or maybe have another way to do it?
Hi Orlan03, I believe it is possible to get at the message by setting up a custom listener to trap the assertion.
Let me begin by saying that I am not 100% certain that the attached 'hack' uses the correct Event filter. Maybe someone with more experience can provide better guidance.
The idea is:
1) Add a step (I used a JSR-223) prior to the step that contains the Side-by-Side-Comparison.
This step initializes and adds a Custom Event Listener that stores the long message value for Test Event Assertion.
It also initializes a property that the long message is moved into
2) Set your Graphical Compare assertion to branch to a step that processes the result when the Side-By-Side Comparison fails. This model assumes that you do not care to record the content when the compare matches.
3) In the step that fires when the assertion fails, access the long message that was trapped by your Custom Listener and append it into a property.
4) The last step removes the Custom Listener.
The attached test case is a hack, but hopefully it gets you a little closer to a resolution. The sample demonstrates appending the output from multiple Side-by-Side compares into a single file. If you make one of your compares equal / equal, the assertion does not fail and the step branches around dropping the long message into the property. Maybe this could be done in a subprocess -- not sure.
But when you try to use this code I came across some problems.
Maybe someone faced with the same issue.
development environment of script in DevTest gives an error message.
Just if I make little changes the code compiled successfully.
But when I try to test it I get this error:
After a long investigation, I saw that in this java TestEvent class doesn't have default public constructor.
He is there but with an access modifier, private .
Maybe I missed something here?