advancedtelematic / quickcheck-state-machine

Test monadic programs using state machine based models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Towards the possibility of mocking parts of the system under test

stevana opened this issue · comments

In the paper Modelling of Autosar Libraries for Large Scale Testing a mocking framework is used to simplify the testing process. The framework is described in the paper An expressive semantics of mocking [PDF].

It seems the mocking part also uses a model, a pre-condition and a transition function, but instead of semantics and post-conditions it has a so called callout function. This callout function is what constructs the mocked return value from the model and the arguments to the mocked action.

How exactly this works and how it can be fit into our library is still not clear to me...

Some ideas about mocking can perhaps also be stolen from: https://github.com/abailly/ioautomata/blob/master/src/IOAutomaton/Model.hs .

The following approach seems to be a step in the right direction of making mocking easier: http://www.well-typed.com/blog/2019/01/qsm-in-depth/