How do you do it.
1. Be early.
2. Don't dress scruffily (but there's no need to be in a suit). The only scruffy people who are in Business are the rock stars that have paid to be there.
3. Be a member of their frequent flyer programme (even if you've only just joined and got the basic level one)
4. Be happy and smiley at checkin.
5. Don't ask to be upgraded, they'll only say no. Hint at it but ask a different question straight away: "I hope there's a chance of being upgraded as I'm a bit tired. Is the flight busy today?" That way they don't have to say no to being upgraded.
6. Be happy and smiley to them as you've checked-in and walk off.
A combination of those have worked more than 50% of the time for me.