簡短的錯誤描述:性能測試操作 - 沒有終點聽
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)