I have been trying the danger room (For Kids!) method and it has failed, dwarven children aren't though enough to withstand the constant poking it seems.
I built a few one-person danger rooms with a bed and a food stockpile, then locked the test subjects inside. The results so far have been:
subject 1, 1 training spear per tile: both hands and wrists fractured, died of blood loss (went faint, then pale, and his cell ended up covered in blood so...)
subject 2, 2 training spears per tile: multiple fractures, permanently unconscious, infection
subject 3, 3 training spears per tile: broken wrist and ankle, infection, taken to hospital a few days after commencing experiment
subject 4, 4 training spears per tile: multiple fractures, experiment was abandoned due to forgotten beasts
For the record, most hits were deflected by the subjects' *cave spider leather whatevers*, but they did suffer fractures occasionally, with eventual fatal consequences. The longest surviving one, subject 1, lasted barely 2 years, and he started very tough in his description, as well as only one spear per tile that didn't trigger all that often due to the pressure plate being place in a non ideal tile. The other subjects had more extreme testing conditions, such as more spears per tile and faster repetition, and they were quickly destroyed by the repeating spears.
I also tried making their cells hospital zones, but it didn't work, they were taken to the real hospital when allowed.
My guess is for this to work the subjects would have to be placed in a "danger crθche" that included beds, a food stockpile, a well, soap and a hospital zone, with dedicated doctor(s) to tend to their wounds. And even then I don't know if it would work, because as I mentioned one subject died of blood loss, which I don't think can be cured.