Get a short length (about 6″ long) and bare about 1/2″ of wire each end, but don’t twist the bare ends.
While you’re here, it might also be worth cleaning the ferules with some wire wool (or similar) to ensure a good electrical connection to the dynamo when you put it back together.
The earth point can be anywhere on some bare metal, but somewhere on the engine is probably best to ensure a good earth.
I found that I could wedge the end of the test lead down the side of one of the engine casing nuts and this was enough to hold it in place long enough for the test. the negative test lead if the bike is positive earth, or the positive test lead if the bike is negative earth) needs to be connected to the dynamo.
Conversely, if your bike is wired negative earth, then connect the negative (black) test lead of the multimeter to a suitable earth point on the engine, gearbox or frame.
My bike is positive earth and so the photo below shows the negative lead of the multimeter inserted into the dynamo terminals.