DSL Testing
Hi,
currently I'm working on test automation for DSLs. Referring to MPS there are some aspects for which some kind of unit tests could be useful. Just to give some examples:
There are more examples of leverage points of testing. I know that there is a test aspect. But it seemingly does not cover all aspects. Is there any best practice or tutorial on how to write such tests?
Thank you in advance,
LaAck
currently I'm working on test automation for DSLs. Referring to MPS there are some aspects for which some kind of unit tests could be useful. Just to give some examples:
- I specified a constraint which should make sure that only children of a particular concept can be inserted. I could test this by creating a model and instantiating the respective parent node and then use the auto-completion menu. But if I have to make sure that everything has been tested, it would be more useful to go through a collection of programmatic aspect tests.
- How can I test programmatically if my TextGen works as believed? (This question comes from: Text generator unit tests)
- One could also write migration scripts. How can I make sure programmatically that the transformation from an old AST to the new one works as desired?
There are more examples of leverage points of testing. I know that there is a test aspect. But it seemingly does not cover all aspects. Is there any best practice or tutorial on how to write such tests?
Thank you in advance,
LaAck
Please sign in to leave a comment.
In common, you are right that now there's a problem with the whole system: there's no "universal" way to test any aspect and no tutorial. We'll think about what we could do here. If you have any ideas on that, don't hesitate to propose any.
I absolutely agree with you referring to your statement about the dependency between "what to test" and "how to test". Referring to your examples, I suggest the following:
Maybe there is a more expressive or useful notation.
If I can help with some requirements for testing, don't hestitate to ask me. I'm only one MPS user but my requirements may be a useful starting point.
Thank you again and kind regards,
LaAck