Mofi is of course correct. When you change between RCA and XLR you are not only changing the cable, you are changing between different interface circuit designs in both of the components that are being connected, and you are changing between kinds of connections that operate on different principles.
Often, although not always (depending on the specific component designs), XLR connections will result in 6 db greater volume than RCA connections between the same components.
I think a good way to "test" cables would be to run let's say 100 frequencies between 20Hz-20kHz and see how "purely" the cable transferred each given frequency.
I doubt that would be likely to prove anything. Partly because music signals are much more complex than the simple sine waves each of those frequencies would consist of; partly because the sonic effects of a cable can be expected to vary significantly depending on the technical characteristics of the components the cable is connecting (a point that seems to be under-recognized by many audiophiles, IMO); and partly because there would be no consensus on what parameters should be measured to assess the "purity" of the transfer.
Regards,
-- Al