Well, don't use danger rooms, they kill your dwarves.
Start with small-group training (which prioritizes sparring) and if you're Dwarves or Orcs, you can use the weight room to get a little bit of skill up. Shield and dodge are key. With other races look for opportunities to practice on wildlife.
Then train your half-decently trained and equipped dwarves with live action. Be aggressive but never fight "fair" -- use archers, warbeasts, and any other tricks you like (poison, traps, magic) to weaken the enemy so you always win. Target elite enemy melee from a safe distance with rangers, and elite rangers should be ambushed with melee as they walk through a door. Use doors, bridges, or blind corners so you always outnumber the enemy. Once your guys are engaged there's no retreat, so don't even try to deactivate them, you'll just get them killed. Have a good hospital.
Live action training can get your guys to high levels of skill in no time, and once they're veterans, training in the barracks will be even more effective, just be sure to set a duty schedule that has less than 10/10 members active so they have a little down time. Otherwise they'll stand around waiting all the time.
p.s. Some fortress defense "easy" races make the warfare game easier actually, (for the strong player races like dwarves and orcs) because you can fight and win against them with very bare equipment. Dark stranglers or beak dogs for example. Shield, helm, weapons.