I don't understand your question. Are you looking for a test kit for Mg, or a formula for how much to dose?
Don't bother with a test kit.
Let us know your tank size, whatever else you are dosing, wattage of lighting, plant mass (light, moderate, heavy), and someone will help you with the dosing.
Or you can go here and type your info. in and get the proper dosing amounts of everything: http://www.aquaticplantcentral.com/forumapc/fertilator.php?