0

I am trying to follow the tutorial PerfSDK to create a single user test for D365 operations (update 4). When I try to run a sample test (same for my recorded test), I get the following exception:

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].

It seems like I might have made some mistake while configuring the CouldEnvironment.config file. But I am not able to figure it out. Could someone who have successfully set this up point me in the right direction?

This is how my CloudEnvironment.config file is setup:

<?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 Answers3

0

It looks like you need the resolve the System.IO.FileNotFoundException: Could not load file or assembly exception.

Which means you a probably missing the Microsoft.CE.VaultSDK assembly or one of its dependent assemblies from your environment.

Check out this question which has the same problem.

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

James Wood
  • 17,286
  • 4
  • 46
  • 89
0

I encountered this error message and it was caused by the assembly reference to WebDriver.dll not being included in the solution. The problem got resolved after the reference was added.

Microsoft article: https://learn.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/perf-test/perfsdk-tutorial

These are the steps:

  1. Download the selenium-dotnet-strongnamed-2.42.0.zip and IEDriverServer_Win32_2.42.0.zip files from http://selenium-release.storage.googleapis.com/index.html?path=2.42/.

  2. Extract the files, and copy the dynamic-link libraries (DLLs) to the PerfSDK\Common\External\Selenium folder. Add a reference to WebDriver.dll to your project.

cavpollo
  • 4,071
  • 2
  • 40
  • 64
Tony
  • 1
-1

To enable further verbose .NET Fusion log, run the below Command on CMD prompt (Start -> search cmd -> open as Admin and run the below line) :

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

Eriawan Kusumawardhono
  • 4,796
  • 4
  • 46
  • 49