You can tell a lot by scrunching the leg in your fist before you've even found the changing room. A good pair of brown trousers holds a bit of its shape back when you let go, doesn't flop out looking like you've just unballed a pair of socks. There's a weight to decent ones, something that sits between stiff and soft, and you feel it the second you pick them up off the rail.
If you've got none in this colour yet, go for something closer to a milk chocolate than a dark espresso, in a straight or slightly tapered leg rather than anything too cropped or too wide. That shade does more for you across the year and doesn't read as costume-y the way a very dark chocolate or a reddish tan sometimes can under certain lights. Check the waistband sits where you actually want it rather than where the label thinks your waist is, and pull the fabric across your thigh to see if it's got any give. A trouser with zero stretch in a stiff cotton will tell on you by lunchtime.
Brown does something with the rest of an ordinary wardrobe that black never quite manages, it looks considered without you having to try. It sits well against cream, ecru, a soft pink, olive, and pretty much any other neutral you already own, and it makes navy look more interesting than navy has any right to be. I wear mine with a plain white shirt and loafers for something that looks like I planned my outfit, when really I just grabbed the first clean top I saw. The one thing to watch is pairing them with anything orange toned, which can tip the whole look into a very specific 1970s estate agent territory, charming on some people, not on me.
These earn their keep from early autumn right through to the start of spring, when the rest of your clothes have gone muted and you want something that isn't black or grey but still feels serious. They work for an office day, for a lunch where you want to look like you made an effort without announcing it, for a long train journey where you need to sit for hours and not feel strangled by the waistband. In high summer they can feel a bit heavy unless you find a lighter weight fabric, so I tend to put mine away for a few months and I don't miss them, which tells you something about how hard they work the rest of the year.
Next time you're looking, check the fabric holds a crease without going shiny after one wear.