【问题标题】:WebTestRequest.ReportingName is ignored when using VS Team Services使用 VS Team Services 时忽略 WebTestRequest.ReportingName
【发布时间】:2017-01-15 16:36:40
【问题描述】:

我的自定义WebTest中有以下方法:

private WebTestRequest CreateRequest(CommandInput command)
{
    WebTestRequest request = new WebTestRequest(URL);
    request.ReportingName = command.CommandName;
    request.Method = command.HttpMethod;

    // ...

    return request;
}

在我的GetRequestEnumerator 上,我正在调用这样的方法:

public override IEnumerable<WebTestRequest> GetRequestEnumerator()
{
     return new CommandInput[]
     {
         new CommandInput() { CommandName = "configuration", HttpMethod = "POST" },
         new CommandInput() { CommandName = "login", HttpMethod = "POST" },
         new CommandInput() { CommandName = "quick_view", HttpMethod = "GET" },
         new CommandInput() { CommandName = "esign_document", HttpMethod = "POST" }
     }.Select(CreateRequest).GetEnumerator();
}

注意:原代码比这个复杂,但无关。

在我的本地机器上运行负载测试时,这工作正常:

您可以看到每个请求都由ReportingName 属性的值标识

但是,如果我在 Visual Studio Online 服务上运行负载测试,请求将按 URL 分组,而不是 ReportingName 上的值:

请求被分组为 command {GET} 和 command {POST},因为我的测试用例 (https://test.xxxx.com/api/command) 上的每个请求的 URL 都是相同的,只是其中一些请求的 HTTP 方法不同。

我在互联网上搜索了几个小时,只在 MSDN 上找到了这个关于它的开放线程:

Reporting Name does not show up in Page Results of Online Load Test

发生了什么?

【问题讨论】:

标签: c# visual-studio azure-devops performance-testing


【解决方案1】:

此问题将于 10 月 16 日修复。

由 Shiva [MSFT] 于 2016 年 9 月 28 日上午 8:59 发布

感谢您报告此问题。我们已经解决了这个问题,并将 在 10 月 16 日之前部署它。

【讨论】:

    猜你喜欢
    • 2023-03-28
    • 2016-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-24
    相关资源
    最近更新 更多