Escape testId when constructing URL

The testId can contain anything include space or # (when using data providers), so these chars should be properly escaped.