Like someone else said, there isn't a test (and if you ever come across one on the internet, be wary of any "result" you may get!). And I'm sure you can see from the answers others have given that it's highly individualized. Each person came to their own conclusion. Some knew they couldn't live being seen as female or couldn't see themselves growing old as female or in a typical female role (husband, kids), for instance.
My own unique viewpoint is that from my earliest memory I've identified as male (for example, there was an incident when I was about 2 where my parents found me putting things down my pants and when asked why I said, "because I'm missing some parts" - so yeah, not exactly normal "female" behavior!). There was never a time in my life where I "felt female" or wished to peruse those traditional female roles. The most I've done is dealt with being perceived as female by others and dealt with a few physical things unique to those born into female bodies. But somewhere along the way, I rejected the notion of transition and I haven't looked back. My viewpoint goes against the grain a bit, but like I said it's personalized to the way I've come to think of myself. These days, women don't have to play that traditional role, so that's one thing. Maybe you'll get some slack from a parent or grandparent, but is it any worse than the slack that some gay people have to deal with when it comes to family? Career choices are pretty open. Female bodied people wearing male clothing, having masculine mannerisms or liking traditionally masculine things is generally accepted (sure, there's always exceptions but I think in general it's more accepted). I also would never be satisfied without a fully functional OEM penis. I have a crazy fear of surgery and am generally all about natural health. I already have a cool career, married someone who accepts me, and at this point in my life doing a gender transition would really not be for my benefit at all and would mostly likely make a wreck of my life. But that's my situation. Obviously I'm not one of the people where, "transition or die" was a factor. I can accept that I've always been male but there are people who will always treat me female out there (or at the very least, see me as female - even though my appearance and presentation is androgynous to male). So right now, I'm just trying to be myself. Slowly I've "come out" to more people this year than I ever have in my life, and things seem to be going ok. I'm not a stickler for pronouns (although I can be irritated by them in certain instances), and I'm not even interested in changing my name. Because of all this, I'm sure there's people who would say I'm not trans. But they're not privy to how my brain actually is set up, so other people's opinions of me are becoming less and less of a concern as I just continue to do my own thing.
I mention my experiences because it's an untypical trans perspective and because I believe that gender really is a spectrum rather than a hard definition. The "one size fits all" approach didn't work for me, and I know I can't be the only one. I think life is about exploration as much as it is about finding balance, comfort, and confidence. And that exploration can often lead to the other 3.