This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
See also bug 80777 The Test Run compares the actual output to the (expected output) as defined in a output.xml file. If the comparison returns false then the test fails. The problem is that the comparison seems to be overly strict and does a strict literal comparison of text. In xml the white space should not matter for comparison of results, but the test driver is comparing white space. This problem surfaces in the Ent Pack samples following the fix for bug 80777. Prior to the fix for bug 80777, the sample test runs were succesful. But after the fix for but 80777, the sample test runs fail. The reason is that the original output.xml files in the samples match the previous style of actual output from the runtime. But fix for bug 80777 changed the actual output by adding carriage returns. So now, the strict comparator fails because the expected output no longer matches the actual output. So workaround is that we can (and should) change the sample output.xml to be the more nicely formatted version. However, I think the comparator is still a problem as customers may intrdoduce whitespace on either side of the fence - runtime output or expected result output.xml.
I believe that the comparator used by the IDE Diff action is what you need to use. It seems that the IDE diff action ignores the white space differences.
Since all sample tests are failed. I upgraded this bug to P1.
Fixed now.
Verified that bug is fixed in nightly build 060731. All tests for the 3 sample apps are passed.
Is the current solution vulnerable to any known edge cases? That is to say, do you know how to break the 81465 comparator today? It would help for users and demo people to know what format edge cases to avoid.
There is no known case to break the comparison. For the comparison, we will use XML Diffs in the XML project - 81554 is filed.
It seems to be forgiving in places that I would not expect. For example the two messages below do not show any difference: <paramA>Hello World </paramA> <paramA>Hello World</paramA> However, I think that even though the spaces between tags can be ignored, the spaces within a "value" should be considered.
This is probably related to simple algorithm for ignoring whitespace.
I doubt this can be improved without switching to full blow XML diff comparator. So question for bug council is whether to leave as is for beta or implement switch to XML Diff comparator which is currently planned post-beta.
The mentioned white space difference is always ignored even before the fix.
Fixed. now using xdm diff and the issue mentioned below "the spaces within a "value" should be considered" is now fixed.
Reopening this issue. 1.The white space are within the values are considered during comparision, but white spaces between the stags are also considered. These should be ignored. attaching the screenshot
Created attachment 34492 [details] screenhsot for the comparision
The screenshot you attached doesn't seem to have the comparison.
Created attachment 34495 [details] diff screenshot
The complete text content inside an element should be compared. So in this case, the comparison failed correctly. Previously, the beginning and trailing white spaces of an element's text content were ignored and that was a bug.
Verified in 060925_1 build. complete text content inside an element is compared. (As per jqian's comments)
Created attachment 34571 [details] White spaces considered for comparison