If employed by a farmer, you can operate under the farm exemption and do not need a CDL. However, if you are employed by a custom combiner, a CDL is required. A restricted CDL can be obtained based on custom combine work.
There is no knowledge test or skills test for a restricted CDL, but there are other limitations, view CFR 49.383.3 (F) for an outline of the limitations.