O'Reilly logo

JUnit Recipes: Practical Methods for Programmer Testing by J B Rainsberger, Scott Stirling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Testing and XML

This chapter covers

  • Comparing XML documents with XMLUnit
  • Ignoring superficial differences in XML documents
  • Testing static web pages with XMLUnit
  • Testing XSL transformations with XMLUnit
  • Validating XML documents during testing

XML documents are everywhere in J2EE: deployment descriptors, configuration files, XHTML and XSL transformations, Web Services Description Language, and on and on. If you are going to test J2EE applications, you are going to need to write tests involving XML documents. Notice the title of this chapter is “Testing and XML,” and not “Testing XML.” It is not our mission here to test XML parsers, but rather to describe how to write tests involving XML documents and other XML-related technologies, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required