Unless you’re replacing the bolt or barrel, or both it shouldn’t be necessary. That should have been done when it was built. If you’re just curious or checking, it is as SSS stated. The easiest way is with the proper caliber go – no/go gauges.
Strip the bolt of the extractor and ejector. With just the upper clamped in your vise, insert the go gauge in the chamber, insert the bolt, it should fit in and turn locking the lugs. A slight resistance is fine. Then insert the no/go gauge. It should not fit and turn.