-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description
In the Q3 retro, it has come up that the team isn't particularly happy with what gets caught in CI vs what issues we find in dev net.
In a focus meeting last week, we then narrowed it down further. Test coverage of the happy-path for most features is not the problem. These are well covered by integration tests. The problems are mostly around:
- We lack testing cases involving non-ideal behavior. Examples are long delays, offline nodes, indexers behaving badly, or generators hitting limits of concurrent generations.
- When identifying a bug, it often is a lot of work to create a test case for it.
Both of these are related. Integration tests aren't well-suited to force a specific misbehavior somewhere in an inner system component.
One goal this quarter is to improve our ability to test such corner cases. Based on the last team discussion, the primary focus should be on code where we are also adding new features. In particular, never-failing MPC request processing. Probably also anything to do with bidirectional messaging.
Possible Improvements
Here are a few concrete items that we can work on to achieve our goal:
- Better test fixture network manipulation: Component testing already allows to control the network behavior in a basic way, such as dropping certain messages. We should use this to add more test cases and simultaneously build out the testing framework to make it easier to control cross-node messaging.
- Better test result checks: Checking specific outcome in MPC component testing is currently still annoying and relies on list of produced actions typed as
String. We should make it easier to check what exactly the system did at the end of a test. - Component testing for indexers: We want a way to test indexer logic in corner cases, too. Adding a kind of component testing for indexers specifically could be the way forward here.
- Bidirectional corner case testing: Right now, we only have component testing for the core MPC functionality. Bidirectional messaging adds more logic that's between simple indexing of chains and MPC signing. Let's add test cases for all known corner cases, in what ever framework makes the most sense.