Here is the actual test which works well for both running and cycling:
5 min. warm up slowly to a pace at the end where you are beginning to breathe a little hard
5 min. maintain the pace, increasing a bit at the end
5 min. increase pace again to labored breathing.
5 min. on a gradual incline increase the pace from just breathing hard to
breathing very hard. Transition directly into…
2 min. all out sprint on a steep hill to maximum speed!
1 min. push this max speed while still going up and hold for a minute or
as long as possible!! Record MHR.
10 min. cool down at a very easy pace and stretch.
------------------
33 min. total ( 18 minutes hard, 15 minutes warm up/down)
Why include the hill climbing in addition to already killing yourself? I found quite by accident that I could push a higher heart rate climbing hills than standard flat running tests. I had an treadmill test performed in a laboratory and another sprinting test around a track and both had registered a running MHR of 179. A couple years later after moving here to Switzerland I did basically the same test time with the final minutes on a very steep incline and recorded a new MHR of 184. I felt the same level of complete exhaustion in all tests, but with a new high value.
If you happen to have nothing resembling an incline in your area, you can do the same test on flat ground, but keep in mind that it will probably not be a true maximum for the activity, but a "level ground maximum."
I used to do a MHR test about twice a year, but now that I think I’ve determined an accurate max, I only do it once a year. Your MHR for each activity does not change with fitness level but may however, decline slightly with advancing age.