An FTP (Functional Threshold Power) test helps establish a baseline level of your fitness. The result of the test can be used to calculate both your power zones and heart rate zones.
An FTP test begins with a 10 min warmup and a 20 min sustained effort. The effort part of the test needs to be done at the maximum level that you feel you can sustain for 20 mins. Your HR should average at least 90% of max capacity, but not max out.
If you've taken an FTP test before, or you know your power zones based on perceived effort, you want to start your test fully warmed up and go immediately into low zone 4.
If this is your first time, find a 45 or 60 min class you've taken where you got a recent personal record. Take the average output and aim to beat that output during the 20 min effort part of the FTP test.
Some people like to do "over-unders", i.e. pick a target average output to beat and then do intervals: 2 minutes just above the target, 90 seconds just below, keeping an eye on the average output to structure your intervals. Others like to gradually increase their output either by increasing cadence or by increasing resistance until the last few mins are in zone 5/zone 6.
No matter what you do, do not do your FTP test out of saddle! The entire test must be in the saddle.
See pace zones for outdoor runs.