This is something I will ultimately have to do when I have put my lathe together. I see there are many YouTube videos on exactly how to do this, including how to interpret the test bar measurements to then adjust the difference out in (almost) one step. The MrPete (Tubalcain) videos mentioned earlier look like all we need.
The quite sensitive test for whether the headstock and tailstock centres meet up exactly is to put a steel rule in between their points, and move the tailstock up to touch them together. If they are even the slightest amount misaligned, the rule will tilt. If the steel rule can be held between the points approximately 90° to them, all is well. If not, you can immediately tell which direction the (tiny) offset is.
However you fashion the test bar, even if it is a from a old pipe with end bungs, a key point is that the final cut on the dumbell-like ends, done between each adjustment, is a very minimal depth finishing cut deliberately to minimize the forces.