model-based-testing-tutorial icon indicating copy to clipboard operation
model-based-testing-tutorial copied to clipboard

manage context for filter in the testMachine, not the machine under test?

Open dr-skot opened this issue 2 years ago • 0 comments

Hey,

First of all, thank you for this repository & the videos. I don't know how else I would have figured out how to approach this at all.

It seems like in all your examples you have a testMachine whose definition is a duplicate of the machine under test, but expanded to add the counters that limit looping. So the success of your tests, as the machine grows more complicated, partly depends on your success at keeping these definitions in sync with each other.

Is there some way to derive the test machine from the machine under test, and then add the counters, so we don't have to keep them synced manually? And I'm assuming manually means: cut new machine code, paste into test file, re-interleave counter logic—or am I wrong?

I'm asking because you take such pains to separate the meta.test expect() code from the machine definition, and I wondered if you had any ideas for separating out the counter stuff, which after all is also test-only code.

Thanks for any insights you might have. Scott

dr-skot avatar Jun 21 '23 16:06 dr-skot