Tels ha scritto:
-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On Wednesday 02 November 2005 18:02, Marcello wrote:

Tels ha scritto:

-----BEGIN PGP SIGNED MESSAGE-----

While this works mostly fine for ASCII, the HTML/SVG is undertested
because the text/code output can change quite radically, while still
rendering/representing the same graph. And of course I do want to
test that the end result is the right one, not that the generated
SVG/HTML code is a specific example.

If the output is valid xml, couldn't one "semantically" compare the
expected output and the actual output with something like
XML::SemanticDiff ?

Might be, but I am not generting XML, but HTML...

Valid XHTML is also valid XML.


But valid XHTML doesn't work well in the praxis. (It offers nothing what HTML can't do, but creates more problems)
And it still doesn't solve the problem, because a:

* div with 1px border
* table cell with 1px border

look exactly in the browser, but have much different (X)HTML source.

Testing 'visual equivalency' of two ([x]html|svg|whatever) documents is unfeasible IMHO. We need a compromise, like deciding to use a div or a table to produce some visual effect.

This is required anyway, because while it's true that there are a dozen ways to generate the same page, they will differ wildly on some relevant aspects (e.g. browser compatibility, table- or css- based layout, etc.), so you have to make a decision at some point and choose one.



And there are many ways to write code that looks visually the same,
and yet is wildly different. More so for, lets say SVG.

My point was that 'semantically' comparing XML data structures instead
of their ascii representations is an improvement.


Of course this doesn't take into account specific cases like SVG, where
you have 'semantically' different xml documents producing the same
(visual) output.


To address this specific case one would need a way to test the 'visual'
equivalence of two svg documents.


The same for HTML documents. Hm. Maybe one could convert them to PNG and compare the outputs. But this is also hard. *thinks*

Interesting...


Best wishes,

Tels


- -- Signed on Wed Nov 2 18:06:15 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "We're confident that DNF will be one of the greatest, if not the
 greatest, game of 1998. And this confidence is not misplaced." -Scott
 Miller, 1997 (http://tinyurl.com/6m8nh)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQ2jy+ncLPEOTuEwVAQGOTQf9FDcLaYVVoYdgfq41pcqQK9avi1oqaqmp
GKKMVnYT1PsDkhYxxgCj2MYJd7+nVZ+v5n+nW0PN2pjfHzPvDOq5bIHTbqqZaJ4s
k14oUBk0JRLx78k9jQORdWhGbgWR2vAtcRtN6thI1IqANRGNX9kMQscSPl1gVaEG
Wwz/NYY6JJJ5+DWZORa3xOPp3daE4lFY+pJl2ENSmcpqNBLlMBPm2/ajw0aa6Zkv
Iz0TOh3pyXxzPwT7c4lP3kwdySc1yikUftan753yvAErCEaFmXEFbNYZE8L2xal5
o/d+aQ1uBh1r2ycCG918y6z04CL9Y5QA0GRW1ztKFbLLhSXA+5Sq4A==
=M0v6
-----END PGP SIGNATURE-----



--
Marcello Romani
Developer
Spin s.r.l.
Reggio Emilia
http://www.spinsoft.it

Reply via email to