MySQL Like for Like - 100% accurate Backup/ Restore
It's not safe to copy data files unless mysqld is stopped.
I would suggest Percona XtraBackup for a physical backup of the database. This should be close to preserving the exact pages, including any fragmentation.
Another alternative is filesystem snapshots. You could revert to the snapshot after each of your tests.