Testing Xtext Languages
Xtext is a popular Eclipse framework for easily implementing Domain Specific Languages; Xtext deals not only with the compiler but also with all the typical Eclipse IDE tooling. Implementing an Xtext DSL in a test driven way makes the development easier, solid and resilient to new versions of Xtext itself. With that respect, Xtext provides a testing framework to easily implement Junit tests.
In this talk, using a simple DSL, we will show how to test with Junit the main aspects of a DSL implemented with Xtext, starting from the basic stages, e.g., the parser and the validator, up to the actual code generation. We will also show how to test UI features, e.g., the content assist and the integration in the Eclipse building mechanism. Finally, we will sketch the integration of all the above tests in the headless build.