As evidenced in the settings.php, the $base_url of a site should NOT include trailing slashes. But, in DrupalRemoteTestCase::setUp(), we run $this->remoteUrl = url('', array('absolute' => TRUE)). This will *always* return a URL with a trailing slash (base_path defaults to /, an absolute directory always ends with a slash, etc.). remoteUrl is then used to set the various other base_urls in a Drupal installation. The above code will cause doubleslashes in non-clean URLs: http://example.com/~morbus/qa//?q=user/login.

I've fixed it locally with a simple rtrim:

      $this->remoteUrl = rtrim(url('', array('absolute' => TRUE)), '/');