I want to test the components of my app in isolation from each other. I know, it sounds obvious--maybe I'm asking the wrong questions.
Say I have a component "A" and a component "B". When I build my whole app, I need both components in full, naturally. But when I test "A", I don't want it to require anything from "B". I want to be able to run an "A" test that needs nothing from the other components--I don't want to build the whole app. In fact, I want to exclude certain components so I can use mockups instead.
It seems obvious, but I can't find anyone who talks about how to do this. I've cobbled something together, but it's clunky as hell. I've done quite a bit of research on the matter--I won't bore you with it here. I'm just wondering whether it's ok to post this kind of question on SO, and whether anyone has any tips for making it a more effective question. If it's not okay here, which SE site would be better?