Whatever make or model you have, first test the dynamo is giving volts, test the battery (charge if needed and refit) then start bike (reasonable tickover) watch ammeter, switch on all lights, ammeter should dive towards minus. rev the bike and the ammeter should rise to over 0 towards plus, after a while it may/will settle on 0 given a good battery.