You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)?
The text was updated successfully, but these errors were encountered:
More info to extend this later (in a separate issue that should be opened following this one):
A front end testing suite with consideration for Go interface generation for Solidity smart contracts. Building a testing harness around this that plugs into medusa will allow for complex contract deployments, simplification of testing provider code (assertion, property, others), capabilities to write complex custom testing logic with ease, custom cheat code integration, and more. This will inherently tell us where we should invest into API improvements to make querying of complex data easier, and help us standardize our Go API.
We currently have a good way to extend testing methodology using a lower level API. We'll want to add methods like
RegisterTestCase
andReportTestCaseFinished
into a higher level testing suite object that also wrapsCallSequenceTestFunc
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)?
The text was updated successfully, but these errors were encountered: