Hi,
much of our (functional) test are based on a simple structure:
* make a get/post request
* parse the resulting xml
* validate the result/make some asserts on it
We use a mix of home grown utility methods and low level
dom access to make the checks on the xml. When making the
WCS 1.1.1 tests I was annoyed by how verbose direct
Dom access was and I started using XPath thru an utility
class provided by Xalan, this makes access to very nested
xml much more convinient (one line of code instead of,
say, 5-10 for each test).
Just yesterday I stumbled upon this junit extension that
allows for unit tests and has all of what we're using
packaged in a more convenient way:
http://xmlunit.sourceforge.net/
http://www.infoq.com/articles/xml-unit-test
The latest version can be effectively used in Java5 without
the need to use their base test class.
I'm probably going to remove Xalan test dependency from
WCS 1.1.1 and use XMLUnit instead. What do you think of
using it to power the rest of our xml testing needs?
Cheers
Andrea
Andrea Aime ha scritto:
Hi,
much of our (functional) test are based on a simple structure:
... sorry... wrong mailing list
Cheers
Andrea
Well,
I have done some stuff with XMLUnit for some time ago and found it
very useful. Otherwise, to test end to end usability and User story
testing, I set up Selenium and it actually works after a few hours
tweaking Maven. Very good for e.g. testing that OpenLayers is actually
behaving and clicking around in popups from Markers etc, stuff that a
java testing framework cannot ensure.
/peter
On Feb 3, 2008 9:51 AM, Andrea Aime <aaime@anonymised.com> wrote:
Hi,
much of our (functional) test are based on a simple structure:
* make a get/post request
* parse the resulting xml
* validate the result/make some asserts on it
We use a mix of home grown utility methods and low level
dom access to make the checks on the xml. When making the
WCS 1.1.1 tests I was annoyed by how verbose direct
Dom access was and I started using XPath thru an utility
class provided by Xalan, this makes access to very nested
xml much more convinient (one line of code instead of,
say, 5-10 for each test).
Just yesterday I stumbled upon this junit extension that
allows for unit tests and has all of what we're using
packaged in a more convenient way:
http://xmlunit.sourceforge.net/
http://www.infoq.com/articles/xml-unit-test
The latest version can be effectively used in Java5 without
the need to use their base test class.
I'm probably going to remove Xalan test dependency from
WCS 1.1.1 and use XMLUnit instead. What do you think of
using it to power the rest of our xml testing needs?
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
GTalk: neubauer.peter
Skype peter.neubauer
ICQ 18762544
GTalk neubauer.peter
Phone +46704 106975
Mail peter.neubauer@anonymised.com
LinkedIn http://www.linkedin.com/in/neubauer
http://www.neo4j.org - New Energy for Data - the Netbase.
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.