1

简短的错误描述:性能测试操作 - 没有终点听

Ms.Dynamics.Performance.CreateUsers.exe从PerfSDK抛出错误

There was no endpoint listening at https://mytest.sandbox.operations.dynamics.com/Services/AxUserManagement/Service.svc/ws2007FedHttp that could accept the message.

长的错误描述:

我有从XML记录创建单个用户C#测试,并使用PerfSDK成功运行它完全按照PerfSDK and multiuser testing with Visual Studio Online指南的第一部分所述。

我在运行多用户负载测试时遇到了问题,如实验的第二部分所述。上面的链接似乎是唯一的在线资源,描述了如何通过单用户测试创建多用户测试,以及如何使用Visual Studio Online在沙箱环境中运行它。我还观看了一些视频,如Tools to Measure and Improve Microsoft Dynamics AX Performance,Performance Tools之类,但没有一个像上面的文章那样详细解释了需要采取的所有步骤。

我已经做了以下内容:

  1. 创建了任务录制的场景的记录中动力学365 的操作
  2. 从Visual Studio中使用PerfSDK文件夹中的 PerfSDKSample项目创建C#性能测试。
  3. 遵循所有'使用Perf SDK运行单用户性能测试的步骤'从article;
  4. 构建解决方案,并成功从测试浏览器运行测试: Internet Explorer打开并重播I 记录的场景。

注意:我用DEV环境usnconeboxax1aos.cloud.onebox.dynamics.com进行测试。当我在CloudEnvironment.Config(沙盒,例如mysandbox.sandbox.operations.dynamics.com)尝试使用另外的主机名,所述单用户测试失败,出现以下错误消息

System.TypeInitializationException: The type initializer for 'MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement' threw an exception. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://mysandbox.sandbox.operations.dynamics.com/Services/AxUserManagement/Service.svc/ws2007FedHttp that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found..

  • 对于多用户检测,我发起从Visual Studio 在线门户网站的Visual Studio https://app.vssps.visualstudio.com/profile/view
  • 我修改了TestSetup方法如下:
  • 单用户TestSetup:

    public void TestSetup() 
    { 
        SetupData(); 
        _userContext = new UserContext(UserManagement.AdminUser); 
        Client = DispatchedClient.DefaultInstance; 
        Client.ForceEditMode = false; 
        Client.Company = "GB01"; 
        Client.Open(); 
    } 
    

    多用户TestSetup:

    public void TestSetup() 
    { 
        var testroot = System.Environment.GetEnvironmentVariable("DeploymentDir"); 
        if (string.IsNullOrEmpty(testroot)) 
        { 
         testroot = System.IO.Directory.GetCurrentDirectory(); 
        } 
        Environment.SetEnvironmentVariable("testroot", testroot); 
        if (this.TestContext != null) 
        { 
         timerProvider = new TimerProvider(this.TestContext); 
        } 
        SetupData(); 
        _userContext = new UserContext(UserManagement.AdminUser); 
        Client = new DispatchedClientHelper().GetClient(); 
        Client.ForceEditMode = false; 
        Client.Company = "GB01"; 
        Client.Open(); 
    } 
    
  • 我在CloudEnvironment.Config设置主机名到沙箱URL例如mysandbox.sandbox.operations.dynamics.com
  • 登录到沙箱机器并安装了之前为单用户测试生成的证书。
  • 更新了沙盒机器上的wif.config,与之前在DEV中更新过的方式相同,并重新启动IIS。
  • 在解决方案资源管理器中双击vsonline.testsettings,并使用上述article中推荐的设置(相应地对我的证书和测试场景进行了修改)。
  • 从解决方案资源管理器中打开SampleLoadTest.loadtest,并将其调整为仅在测试混合节点中使用我的测试,缩短测试持续时间和用户数。
  • 运行负载测试。
  • 负载测试以一些错误结束。第一性TestError相同如上所述:

    Initialization method MS.Dynamics.Performance.Application.TaskRecorder.GenJnlBase.TestSetup threw exception. System.TypeInitializationException: System.TypeInitializationException: The type initializer for 'MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement' threw an exception. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://mysandbox.sandbox.operations.dynamics.com/Services/AxUserManagement/Service.svc/ws2007FedHttp that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found..

  • 最后,即使我能够我的DEV的机器上运行Ms.Dynamics.Performance.CreateUsers.exe成功(若干测试AX用户的在usnconeboxax1aos.cloud.onebox.dynamics.com创建),在沙箱环境中的URL被CloudEnvironment.Config设置,Ms.Dynamics.Performance.CreateUsers.exe失败,同样错误
  • C:\PerfSDK>Ms.Dynamics.Performance.CreateUsers.exe 3 GB01 Failed with the following error: System.TypeInitializationException: The type initializer for 'MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement' threw an exception. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at https://mytest.sandbox.operations.dynamics.com/Services/AxUserManagement/Service.svc/ws2007FedHttp that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ... Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at MS.Dynamics.TestTools.CloudCommonTestUtilities.AxUserManagementServiceReference.IAxUserManagement.EnumUsers() at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement.PopulateAxUsers() at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement..cctor() --- End of inner exception stack trace --- at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement.get_AdminUser() at MS.Dynamics.Performance.CreateUsers.Program.Main(String[] args)

    回答

    0

    具体根据walkthrough

    If you have an ARR-enabled environment, i.e. you have 2 endpoints like this:

    • apr-arr8aossoap.axcloud.test.dynamics.com
    • apr-arr8aos.axcloud.test.dynamics.com

    You would need to enter both endpoints in CloudEnvironment.Config

    endpoints

    no endpoint listening误差可以通过指定正确SOAP的主机名,例如被解析

    <ExecutionConfigurations Key="HostName" Value="mysandbox.sandbox.operations.dynamics.com" /> 
    <ExecutionConfigurations Key="SoapHostName" Value="mysandboxaossoap.sandbox.operations.dynamics.com" />