From: vamsidhar s. <bva...@ya...> - 2007-11-16 10:55:52
|
Hi xmlunit users,=0A=0AHad a question regarding the behaviour of XMLUnit in= the below scenario:=0A=0AControl Doc =3D =0A<div class=3D"main">=0A <x/= >=0A <a href=3D"1232"/>=0A <div class=3D"top">top</div>=0A <div cl= ass=3D"bottom">bottom</div>=0A</div>=0A=0ATest Doc =3D=0A<div class=3D"main= ">=0A <a href=3D"123"/>=0A <div class=3D"top">top</div>=0A <div cl= ass=3D"bottom">bottom</div>=0A</div>=0A=0ALooking at the docs. it is clear = that 'x' tag is missing in test doc. =0ABelow is the report that XMLUnit th= at is generated.=0Afrom 2nd line I could infer that 'x' is missing element.= =0AHowever, when control reaches 'a' in control doc. it is compared with 'd= iv' in test doc. and hence reported as missing element=0Awhich is not the c= ase really. Is there a way to get a report that says x is missing and href = value of 'a' tags don't match?=0A=0ARegards,=0AVamsi=0A=0A=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A[no= t identical] Expected number of child nodes '4' but was '3' - comparing <di= v...> at /html[1]/body[1]/div[1] to <div...> at /html[1]/body[1]/div[1]=0A[= different] Expected element tag name 'x' but was 'a' - comparing <x...> at = /html[1]/body[1]/div[1]/x[1] to <a...> at /html[1]/body[1]/div[1]/a[1]=0A[n= ot identical] Expected number of element attributes '0' but was '1' - compa= ring <x...> at /html[1]/body[1]/div[1]/x[1] to <a...> at /html[1]/body[1]/d= iv[1]/a[1]=0A[not identical] Expected attribute name 'null' but was 'href' = - comparing <x...> at /html[1]/body[1]/div[1]/x[1] to <a...> at /html[1]/bo= dy[1]/div[1]/a[1]=0A[different] Expected element tag name 'a' but was 'div'= - comparing <a...> at /html[1]/body[1]/div[1]/a[1] to <div...> at /html[1]= /body[1]/div[1]/div[1]=0A[not identical] Expected attribute name 'href' but= was 'null' - comparing <a...> at /html[1]/body[1]/div[1]/a[1] to <div...> = at /html[1]/body[1]/div[1]/div[1]=0A[not identical] Expected attribute name= 'null' but was 'class' - comparing <a...> at /html[1]/body[1]/div[1]/a[1] = to <div...> at /html[1]/body[1]/div[1]/div[1]=0A[different] Expected presen= ce of child nodes to be 'false' but was 'true' - comparing <a...> at /html[= 1]/body[1]/div[1]/a[1] to <div...> at /html[1]/body[1]/div[1]/div[1]=0A[not= identical] Expected attribute value 'top' but was 'bottom' - comparing <di= v class=3D"top"...> at /html[1]/body[1]/div[1]/div[1]/@class to <div class= =3D"bottom"...> at /html[1]/body[1]/div[1]/div[2]/@class=0A[not identical] = Expected text value 'top' but was 'bottom' - comparing <div ...>top</div> a= t /html[1]/body[1]/div[1]/div[1]/text()[1] to <div ...>bottom</div> at /htm= l[1]/body[1]/div[1]/div[2]/text()[1]=0A[not identical] Expected sequence of= child nodes '3' but was '2' - comparing <div...> at /html[1]/body[1]/div[1= ]/div[2] to <div...> at /html[1]/body[1]/div[1]/div[2]=0A=0A=0A=0A=0A=0A = Forgot the famous last words? Access your message archive online at http= ://in.messenger.yahoo.com/webmessengerpromo.php |