It depends a lot on how the truck is used. I do a lot of towing, and I put a set of rear shocks on at about 55,000 miles. I was surprised they lasted that long, since the stock shocks I've had on all my Dodges (both front and rear) needed replacement at about 12,000 miles.
My front struts are still pretty good, at 65,000 but I'm thinking I'll replace them in spring after the Christmas debts are all leveled - since we're looking at about $400 for that.
You can test shocks by getting the corner of the truck bouncing a bit then stepping away. More than 2 rebounds and the shocks are dead. Struts are a little different, because they're supposed to resist hard in both directions. So you really shouldn't get any rebounding with struts; they should immediately damp it out and level the corner of the truck.