-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sample for unit testing Perper applications #55
Comments
Proposal after discussing the topic:
|
* fix: rework PerperBinarySerializer, making it more useful * chore: Add versioned image tagging to fabric workflow * chore: add logging * feat: Implement Filter, Replay, and Query * chore: Reformat and bump version to 0.6.0-alpha6 * feat: Unit test mocks for IState, IStream, IContext, and IAgent Addresses part of #55 * refactor: Change Test -> Fake, make mocks more usable * feat: add DI support in custom handler * fix: temp fix for compile error * feat: Add extension methods for converting to/from Dataflow blocks Implements #73 in the simplest manner. Co-authored-by: Branimir Angelov <[email protected]>
Note: While (1) was implemented in 0.6, the code was subsequently dropped in the 0.7 refactor, and is still missing in 0.8. @branimirangelov @aph5nt ~ I think I spotted some discussions in the Apocryph Discord that (1)--unit testing with mocked state, stream, and context--might not be actually necessary, due to the interaction with Ignite being the main thing one would like to test. Am I right in thinking that? |
@bojidar-bg - this is correct. For Perper apps it seems that component integration test approach using fabric as a medium is a better fit. |
Sweet! In this case we pretty much have all that's needed implemented for 0.8 with the PerperStartup changes. |
Introduce a library for unit testing of Perper application. One approach is with creating pre-defined data for simulating stream / module interactions. This data can be generated in a pattern as VCR gem:
Live mode execution -> in this mode the test has direct access to remote ignite cluster (e.g. dev cluster) and interacts with it. During the interaction, recording is generated for the notifications and the ignite thin client cache responses. This recordings are saved for later use.
Playback mode execution -> in this mode the test executes without any remote access. All notifications and responses are simulated (played back) from the recordings in step 1.
The text was updated successfully, but these errors were encountered: