Chapter 8. Testing DSLs

In this chapter

  • Why create testable DSLs?
  • Approaches for building testable DSLs
  • Building a Testing DSL
  • Integrating the Testing DSL with a unit-testing framework

The reasons for creating testable systems have been debated elsewhere for years, so we won’t go over them again here. It’s well accepted that testable and tested systems have lower maintainability costs, are easier to change and grow, and generally are more effective in the long run. I have a high regard for testability, and I consider it a first-level concern in any application or system that I build.

Unlike most systems, a DSL isn’t a closed environment. DSLs are built explicitly to enable greater openness in the environment. It’s almost guaranteed that ...

Get DSLs in Boo 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.