Black-box testing vs White-box testing #311
smol-ninja
started this conversation in
Ideas
Replies: 1 comment
-
Interesting concept. However, I think that the line is fuzzier (pun-intended) between white-box and black-box testing than it may seem at first blush. Presumably, black-box testing involves writing middleware that converts the internal logic into some abstracted interfaces. So then the maintenance moves to the middlewares. I could be wrong, though. A PR that shows how black-box testing works in practice would be helpful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Flow follows the white-box testing approach.
From ChatGPT
What is white-box testing?
Should testing of a code be dependent on the internal logic/implementation?
What is black-box testing?
Currently, all Flow tests (concrete, fuzz, invariant) follow white-box testing, which means if we change an internal implementation of a function without affecting the APIs (inputs, outputs) and expected returned values, we would also be required to change a lot of tests. IMO a good testing system should test for the behavior of the system and not rely on the internal implementation of the functions.
A good approach would be to have white-box testing in concrete whereas black-box testing in fuzz and invariant, though more knowledge is needed in this domain.
So, starting this discussion to brainstorm on these lines, gather resources, understand it better and eventually refactor our tests to use a mix of black and white box techniques.
Resources
cc @sablier-labs/engineers as it may be relevant to Solana and other repos.
Beta Was this translation helpful? Give feedback.
All reactions