There is no difference in quality between the regular fragrances and testers or unboxed fragrances.
Testers are products manufactured by the original designer of the fragrance for promotional purposes.
Some are offered in plain white or plain brown boxes with or without a cap at the discretion of the designer.
The content of the bottle does not differ.
The only difference is the packaging.
Some might even have the word “tester” or “demonstration” written on the bottle and they are offered at additional savings to you because you are not paying for the designer box.