In the Settings for the testing server, make sure that you have the correct WebURL Entered.
in some cases, you may need to specify a site root as well.
The FTP or Database connection can still be made if these settings are not correct, but if the Web URL does not match to the same location that the FTP is connecting to, you will get that error.