运行Sample PerfSDK项目 - Dynamics 365操作的样本测试时的身份验证异常

时间:2018-02-04 23:20:49

标签: c# microsoft-dynamics

我正在尝试按照教程PerfSDK为D365操作创建单个用户测试(更新4)。当我尝试运行样本测试时(我记录的测试相同),我得到以下异常:

Test Name:  CreatePurchReq
Test FullName:  MS.Dynamics.Performance.Application.SCM.CreatePurchReqBase.CreatePurchReq
Test Source:    J:\PerfSDK\PerfSDKLocalDirectory\SampleProject\PerfSDKSample\PurchaseReq.cs : line 85
Test Outcome:   Failed
Test Duration:  0:00:00.20745

Result StackTrace:  
at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.SelfMintedTokenAuthenticator.Initialize(AuthenticatorConfiguration configElement)
   at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.AuthenticatorFactory.GetConfiguredAuthenticator(AuthenticatorConfiguration config)
   at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.AuthenticatorFactory.GetConfiguredAuthenticator(String authenticatorId)
   at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.AuthenticatorFactory.get_AdminAuthenticator()
   at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.AuthenticatorFactory.get_AdminAuthenticatorToken()
   at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement.get_Service()
   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.Application.SCM.CreatePurchReqBase.TestSetup() in J:\PerfSDK\PerfSDKLocalDirectory\SampleProject\PerfSDKSample\PurchaseReq.cs:line 55
Result Message: 
Initialization method MS.Dynamics.Performance.Application.SCM.CreatePurchReqBase.TestSetup threw exception. System.TypeInitializationException: System.TypeInitializationException: The type initializer for 'MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CE.VaultSDK, Version=0.5.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

在配置CouldEnvironment.config文件时,我似乎犯了一些错误。但我无法弄明白。成功解决这个问题的人能指出我正确的方向吗?

这是我的CloudEnvironment.config文件的设置方式:

<?xml version="1.0" encoding="utf-8"?>
<EnvironmentalConfigSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <EnvironmentalConfigSettingsCollection>
    <EnvironmentalConfigSetting ConfigName="DEVFABRIC">
      <!-- NOTE: the HostName value needs to be specified -->
      <ExecutionConfigurations Key="HostName" Value="sands-testaos.sandbox.ax.dynamics.com" />
      <ExecutionConfigurations Key="SoapHostName" Value="sands-testaossoap.sandbox.ax.dynamics.com" />
      <ExecutionConfigurations Key="SelfSigningCertificateThumbprint" Value="86F447584D9DBB8C031BD8852211FC33EA2FCD54" />
      <ExecutionConfigurations Key="AdminAuthenticatorConfigurationId" Value="SelfMintingAdminUser" />
      <ExecutionConfigurations Key="DefaultBrowser" Value="InternetExplorer" />
      <ExecutionConfigurations Key="FederationRealm" Value="spn:00000015-0000-0000-c000-000000000000" />
      <ExecutionConfigurations Key="DefaultDispatcher" Value="Microsoft.Dynamics.TestTools.Dispatcher.JsDispatcher, Microsoft.Dynamics.TestTools.Dispatcher.JsDispatcher" />
      <ExecutionConfigurationsNodes ConfigurationName="SVC">
        <ConfigurationSpecificDetails Key="AppConfig" Value="DEVFABRIC.Config" />
      </ExecutionConfigurationsNodes>
      <ExecutionConfigurationsNodes ConfigurationName="PRF">
        <ConfigurationSpecificDetails Key="UserCount" Value="10" />
        <ConfigurationSpecificDetails Key="UserFormat" Value="TST_{0}@TAEOfficial.ccsctp.net" />
        <ConfigurationSpecificDetails Key="UserRole" Value="-SYSADMIN-" />
        <ConfigurationSpecificDetails Key="ThinkTime" Value="0" />
        <ConfigurationSpecificDetails Key="Company" Value="USMF" />
      </ExecutionConfigurationsNodes>
    </EnvironmentalConfigSetting>
  </EnvironmentalConfigSettingsCollection>
  <AuthenticatorConfigurationCollection>
    <AuthenticatorConfiguration Id="SelfMintingRunnerUser" Class="MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.SelfMintedTokenAuthenticator">
      <Credentials IsFromKeyVault="false" Username="daxrunneruser@daxmdsrunner.com" NetworkDomain="urn:Microsoft:Dynamics:Cloud:DaxRunner" />
    </AuthenticatorConfiguration>
    <AuthenticatorConfiguration Id="SelfMintingSysUser" Class="MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.SelfMintedTokenAuthenticator">
      <Credentials IsFromKeyVault="false" Username="testuser@microsoft.com" />
    </AuthenticatorConfiguration>
    <AuthenticatorConfiguration Id="SelfMintingAdminUser" Class="MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.SelfMintedTokenAuthenticator">
      <!-- NOTE: admin username needs to be specified -->
      <!-- <Credentials IsFromKeyVault="false" Username="[Topology/Configuration/Setting[@Name='AxAdminAlias']/@Value]" /> -->
      <Credentials IsFromKeyVault="false" Username="myusername@mycompany.com" Password="mypassword" />      
    </AuthenticatorConfiguration>
  </AuthenticatorConfigurationCollection>
</EnvironmentalConfigSettings>

3 个答案:

答案 0 :(得分:0)

您似乎需要解决System.IO.FileNotFoundException: Could not load file or assembly例外。

这意味着你可能遗漏了Microsoft.CE.VaultSDK程序集或其环境中的一个依赖程序集。

查看具有相同问题的此问题。

System.IO.FileNotFoundException: Could not load file or assembly 'X' or one of its dependencies when deploying the application

答案 1 :(得分:0)

我遇到此错误消息,这是由解决方案中未包含WebDriver.dll的程序集引用引起的。 添加引用后问题得到解决。

微软文章: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/perf-test/perfsdk-tutorial

以下是步骤:

  1. http://selenium-release.storage.googleapis.com/index.html?path=2.42/下载selenium-dotnet-strongnamed-2.42.0.zip和IEDriverServer_Win32_2.42.0.zip文件。

  2. 提取文件,并将动态链接库(DLL)复制到PerfSDK \ Common \ External \ Selenium文件夹。将WebDriver.dll的引用添加到项目中。

答案 2 :(得分:-1)

要启用更多详细的.NET Fusion日志,请在CMD提示符下运行以下命令(开始->搜索cmd->以管理员身份打开并运行以下行):

  

reg add HKLM\software\microsoft\fusion /v Enablelog /t REG_DWORD /d 1