Performance test of QU-fitting in cosmic magnetism study