【问题标题】:Auto-web test : ExpectedResponseUrl error自动网络测试:ExpectedResponseUrl 错误
【发布时间】:2011-10-03 08:53:55
【问题描述】:

在运行我的自动网络测试时,我收到了这条消息:

响应 URL 验证 ExpectedResponseUrl 属性“http://localhost:4800/FirstPage.aspx”的值不等于有效响应 URL“http://localhost:4800/SecondPage.aspx”。 QueryString 参数已被忽略。

注意:对于重定向,我使用的是:

Response.Redirect(Url2, false);

将参数更改为 true 时,我收到相同的消息。

【问题讨论】:

  • 能否将错误信息翻译成英文?
  • 你能发布更多关于你的测试的信息吗?看起来您只是在声明错误的 url?
  • 非常感谢亲爱的 Knvn 和 Buh Buh,我很抱歉收到法语消息,我已经翻译了。
  • 我找到了解决方案,但我不明白为什么!但没关系:解决方案是使用 Server.Transfere() 而不是 Response.Redirect()

标签: c# asp.net testing automated-tests asp.net-3.5


【解决方案1】:

我找到了解决方案,但我不明白为什么!但没关系:

解决方案是使用 Server.Transfere() 而不是 Response.Redirect()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-14
    • 2014-01-16
    • 2011-03-05
    • 2020-09-29
    相关资源
    最近更新 更多