3 ms·
I'll try. Unit testing frontends is hard because to create a test case, you must simulate a human user's behavior (clicks/taps on a UI) which is inherently com
by danans 9y ago
I'll try.
Unit testing frontends is hard because to create a test case, you must simulate a human user's behavior (clicks/taps on a UI) which is inherently complex, and has a lot of possible variations, and then test the correctness of the response the system displays as a human would perceive it. Just because the system sent back the correct data doesn't mean it was rendered in a way that the user can see/understand.
With non-user-facing systems, you can just send the input, and test computationally that the output fits the expected value or range of correct responses.
Of course, one could create a vision system that tested the response of a UI for correctness, but that would be ... super-hard.