The documentation given in PluginTemplate refers to "after the verification" in mapVerificationResult and beforeFinish.
In the context of verification result streaming, i.e. using entity result messages, verification results for individual methods have to be transformed by plugins.
In this context, these are the resulting requirements:
mapVerificationResult is applied once per entity result message (which are supposed to contain disjoint verification errors)
mapVerificationResult might be applied once more on the overall result message (this is the case for ViperServer but not all backend user's might actually do this)
Additionally, it's unclear when to call beforeFinish: The documentation could specify that it must be called exactly once.
The current plugins seem to be compliant with these requirements except for the refute plugin (@JonasAlaif): The refute plugin uses mapVerificationResult not only to remove (the expected) verification errors but also to add verification errors for those that did not occur. The latter functionality could either be moved to beforeFinish (which would require updating the test framework because beforeFinish is according to the documentation not called in tests) or mapVerificationResult would need to take an additional argument specifying the entity, i.e. method, when invoked for entity verification results
The documentation given in
PluginTemplaterefers to "after the verification" inmapVerificationResultandbeforeFinish.In the context of verification result streaming, i.e. using entity result messages, verification results for individual methods have to be transformed by plugins.
In this context, these are the resulting requirements:
mapVerificationResultis applied once per entity result message (which are supposed to contain disjoint verification errors)mapVerificationResultmight be applied once more on the overall result message (this is the case for ViperServer but not all backend user's might actually do this)Additionally, it's unclear when to call
beforeFinish: The documentation could specify that it must be called exactly once.The current plugins seem to be compliant with these requirements except for the refute plugin (@JonasAlaif): The refute plugin uses
mapVerificationResultnot only to remove (the expected) verification errors but also to add verification errors for those that did not occur. The latter functionality could either be moved tobeforeFinish(which would require updating the test framework becausebeforeFinishis according to the documentation not called in tests) ormapVerificationResultwould need to take an additional argument specifying theentity, i.e. method, when invoked for entity verification results