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, ...

Get JUnit Recipes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.