Alright!
I just released a first functional version of a new crate:
test-dsl
at 0.1.0
https://github.com/TheNeikos/test-dsl/
To paraphrase the readme: test-dsl
allows you to easily author tests by decoupling between the 'test harness', 'verbs' and 'conditions'.
It's role in your testing infra would be as boilerplate reduction, so that you can focus on just writing tests around the behaviour of your system. I'm using this pattern for example in a client-server context. So I have verbs like start_server 1
, start_client 2
, connect_client 2 1
etc...
Of course the meaning of these verbs is highly project-specific.
If a verb does fail, either by panicking or returning an error, you get a nice error output telling you exactly which file and which verb caused the error. Allowing you to more easily pin-point directly what went wrong, rather than potentially searching through a log.
It works great together with datatest-stable
from the nextest
project, but it works just as fine standalone.
It uses #KDL as the language to write your testcases in, so its fairly nice to read.
It's still missing more comprehensive documentation, but as a prototype it should work just fine!
It actually sprung out from having used this pattern a few times, and I didn't want to re-write the boilerplate around it, and maybe re-use some code between projects.