Open JoshuaStorm opened 5 years ago
My brother @0x00ify (Sam), may help out on this one too :)
fantastic!
On Mon, Jun 10, 2019 at 10:50 PM Joshua Storm Becker < notifications@github.com> wrote:
My brother @0x00ify https://github.com/0x00ify, (Sam) may help out on this one too :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/spiricom/MantaMate/issues/107?email_source=notifications&email_token=AAGAY7HTC23XWYUHWZEZ5BLPZ4HIBA5CNFSM4HW2CMKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXLZCJA#issuecomment-500666660, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGAY7GNBIUJN6ISZNSL5FTPZ4HIBANCNFSM4HW2CMKA .
-- Composer, musician, instrument designer snyderphonics.com * @snyderphonics
I think we would all like a slight upgrade to the stability of the MantaMate. Here's an approach I had in mind and think I will try to bust out over this summer. The main motivating factor here is (1) to make the MantaMate releases more stable, and (2) to have more confidence when editing the MantaMate code that you didn't break anything.
Here's one way I could see us testing MantaMate code:
Refactoring the MantaMate code to be oriented around "Actions," in essence everything would be defined by handler functions such as
pressHex(hexNumber)
andpressSlider(sliderNumber)
. I think the code is already sort like this in some ways, but it'd need to be a bit stricter I believeThen we could serialize behavior in such a way that, given a starting MantaMate state and Manta UI state, and a sequence of "Actions," we could define an Expected EndMantaMate state and EndMantaUIState. In effect, we could define our tests with those parameters (BeginMantaMateState, BeginMantaUIState, [Actions], EndMantaMateState, EndMantaUIState). With the code refactored to be oriented around these Actions, writing code to run through a a set of actions and assert it ends on the EndStates would be fairly easy.
The main issue with the above is writing the beginning and end states out by hand might be particularly cumbersome, so I have been using this as an opportunity to play around with some C# to see how hard it'd be to make a little application that could spit out C-style structs for us, given some simple GUI input. (https://github.com/JoshuaStorm/MantaMateTestBuilder)
Considering (3) will only really work out if my refactor actually makes sense in practice, I think I'm gonna hit pause on the MantaMateTestBuilder and try getting the refactor done on a separate MantaMate branch. Then I'll write a few tests out by hand to see if the testing system will actually work out how I think it will.