This Wikipedia article on "Tameshigiri" (test cutting) briefly mentions:
During the Edo period, only the most skilled swordsmen were chosen to test swords, so that the swordsman's skill was not a variable in how well the sword cut... In addition, there were a wide variety of cuts used on cadavers and occasionally convicted criminals,[2] from tabi-gata (ankle cut) to O-kesa (diagonal cut from shoulder to opposite hip).
There is also an image on the same article depicting two swordsmen doing just that.
Did this actually happen during the Edo Period? Or any point in Japanese history?
Happily, the wikipedia article cites its claims with links directly to the original pages in Google books, so you can read the sources with one click.
Interestingly, the primary sources for a lot of these claims is the swords themselves. A proper tameshigiri was a formal affair, and once completed, the details would be engraved into the steel of the blade itself (usually on the tang, beneath the handle wrappings). The inscription was considered very important, and would even be inlaid with gold or silver. It greatly increased the value of the weapon, and the whole process could cost as much as the weapon itself.
As such, these are often well-known blades with clear provenances going right back to the original smith. The inscriptions are well-preserved, including the tester's name and the details of the number of bodies that were cut, and which cuts were used. You can even buy one on Ebay and read it for yourself.