eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
725 stars 65 forks source link

Testing facilities generated out of the box #1282

Closed acherm closed 9 months ago

acherm commented 11 months ago

Hi,

I hope new versions of Langium generator will offer the ability to generate testing facilities out of the box, as part of the DSL project. It was a bit the case with Xtext, with an ***/test package and a parseHelper ready to use https://eclipse.dev/Xtext/documentation/103_domainmodelnextsteps.html#tutorial-unit-tests

As part of my experience with setting such testing facilities (see https://dev.to/diverse_research/testing-your-dsls-in-langium-gp9), I encountered two issues:

Not only DSL developers will enjoy a testing facility out of the box and ready-to-use, but it will enforce best practices, and not forcing developers to dig into the API/documentation.

I am seeing it as a "feature" of the langium generator, and perhaps a flag or a configuration option somewhere should be introduced to generate or not testing facilities.

Kudos for the great work!

Mathieu

sailingKieler commented 9 months ago

Contributed with #1298.