1.  Track when someone  you work with, and especially a manager or client, says something nice about you.  Then when you ask for a testimonial, you can even say, “After we finished the ACME project, you said something really kind to me, to the effect of this, and I was hoping I could use something like that as a testimonial” and then you can quote what they said as best as you recall.

2.  Track your results on key projects, so that when you ask for a testimonial, you can provide specific bullets describing your work in your request.  For example, you could say “I’m hoping you’d be willing to write a testimonial for me, which talks about our work together doubling revenue for the XYZ brand.”

3.  Make it as easy as possible for the person to write it—offer to draft something based on your work together that they can edit as they like.

4.  Help the person to understand why the testimonial is important to you.

5.  The most important thing is to nurture your community and build relationships with the people who can help you and whom you’ve helped.  If you have real, authentic relationships, people are going to be much more likely to want to help you, and it’s going to be much easier to ask for that help too!