Description
We currently have a good way to extend testing methodology using a lower level API. We'll want to add methods like RegisterTestCase
and ReportTestCaseFinished
into a higher level testing suite object that also wraps CallSequenceTestFunc
and makes writing complex post call/event properties (per contract, method, or globally) just a few lines of code. It should contextualize all important info about the current state of execution in a test context object.
For more info, see here:
https://github.com/trailofbits/medusa/wiki/API-Overview-(WIP)#extending-testing-methodology
We envision this should look like for generic callback that just broadly take arguments for any call:
fuzzer.Testing.AddPostCallTest(contractName, functionName, callBackThatProvidesArgsAndTestContext)
fizzer.Testing.AddPostEventEmitTest(eventID, callback)
While we can also make method specific arguments that need to match the signature (but in Go) and will direct outputs into that callback's input, so we can (e.g. match our property test callback with event argument types, and the test suite will populate them for us through reflection maybe)?