简短的错误描述:性能测试操作 - 没有终点听
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之类,但没有一个像上面的文章那样详细解释了需要采取的所有步骤。
我已经做了以下内容:
- 创建了任务录制的场景的记录中动力学365 的操作。
- 从Visual Studio中使用
PerfSDK
文件夹中的PerfSDKSample
项目创建C#性能测试。 - 遵循所有'使用Perf SDK运行单用户性能测试的步骤'从article;
- 构建解决方案,并成功从测试浏览器运行测试: 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方法如下:
- 我在
CloudEnvironment.Config
设置主机名到沙箱URL例如mysandbox.sandbox.operations.dynamics.com。 - 登录到沙箱机器并安装了之前为单用户测试生成的证书。
- 更新了沙盒机器上的wif.config,与之前在DEV中更新过的方式相同,并重新启动IIS。
- 在解决方案资源管理器中双击
vsonline.testsettings
,并使用上述article中推荐的设置(相应地对我的证书和测试场景进行了修改)。 - 从解决方案资源管理器中打开
SampleLoadTest.loadtest
,并将其调整为仅在测试混合节点中使用我的测试,缩短测试持续时间和用户数。 - 运行负载测试。
- 最后,即使我能够我的DEV的机器上运行
Ms.Dynamics.Performance.CreateUsers.exe
成功(若干测试AX用户的在usnconeboxax1aos.cloud.onebox.dynamics.com创建),在沙箱环境中的URL被CloudEnvironment.Config
设置,Ms.Dynamics.Performance.CreateUsers.exe
失败,同样错误:
单用户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();
}
负载测试以一些错误结束。第一性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..
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)