web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Regression Suite Autom...
Finance forum

Regression Suite Automation Tool (RSAT) - TestEssentialsRole Failure

(0) ShareShare
ReportReport
Posted on by 30

Hello! I am giving RSAT a try and after following along with the user manual (included in the download: https://www.microsoft.com/en-us/download/details.aspx?id=57357) without any trouble, I have gotten to the point of running my test case. My test case is failing with the error pasted below. I have emphasized what I believe to be the important parts.

My question is that I am unable to determine exactly what this error is referring to and thus how to fix. My environment is on PU 21.

Some investigations I have already tried:

  1. Checking against everything listed here: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/perf-test/perfsdk-tutorial
  2. I have already recompiled and database synchronized my environment multiple times.
  3. Double checked my environment has Test Essentials model, with the TestEssentialsRole, and that is compiles and syncs without error.
  4. My machine is an Azure DEV machine, so I have attempted various SOAP service addresses (eg: https://host_uri/soap/services/service_group_name), all of which failed immediately due to binding type discrepancies. My current configuration seems to be the most successful (it actually creates a user, whereas the others never get to that step).

Thank you for your recommendations and expertise!

I feel my RSAT configuration settings are accurate, but I will share a redacted version just in case:

RSAT-Settings.png

<?xml version="1.0" encoding="utf-16"?>
<Error xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">
<ExceptionType>System.TypeInitializationException</ExceptionType>
<Message>The type initializer for 'MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement' threw an exception.</Message>
<StackTrace> at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement.get_AdminUser()
at MS.Dynamics.Performance.Application.TaskRecorder.Create_an_Asset.TestSetup(Boolean verboseSnapshotsEnabled)</StackTrace>
<InnerError>
<ExceptionType>System.TypeInitializationException</ExceptionType>
<Message>The type initializer for 'MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserContext' threw an exception.</Message>
<StackTrace> at MS.Dynamics.TestTools.CloudCommonTestUtilities.RainierRuntimeConfig.Configure()
at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserManagement..cctor()</StackTrace>
<InnerError>
<ExceptionType>System.InvalidOperationException</ExceptionType>
<Message>Could not add role(s) TestEssentialsRole to AX user $00BD (testuser@microsoft.com)</Message>
<StackTrace> at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.DynamicsUser.AddSecurityRoles(String[] roles)
at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.KnownIdentity.get_SystemUser()
at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserContext..ctor()
at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.UserContext..cctor()</StackTrace>
<InnerError>
<ExceptionType>System.ServiceModel.FaultException`1[System.ComponentModel.Win32Exception]</ExceptionType>
<Message>Bad Request</Message>
<StackTrace>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc&amp; rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
at MS.Dynamics.TestTools.CloudCommonTestUtilities.AxUserManagementServiceReference.IAxUserManagement.ModifyUserRoles(AxUser user)
at MS.Dynamics.TestTools.CloudCommonTestUtilities.Authentication.DynamicsUser.AddSecurityRoles(String[] roles)</StackTrace>
</InnerError>
</InnerError>
</InnerError>
</Error>

Categories:
I have the same question (0)
  • eone Profile Picture
    40 on at

    The testuser@microsoft.com user should automatically be created when you run your test cases, if it doesn't exist already, and it will automatically set the TestEssentialsRole. For some reason this fails. If the role already exists on the user it should in theory not try to set this again. Can you check the user and see if the role is already set, if not can you check if you can set the role manually?

  • Mark Simek Profile Picture
    30 on at

    Thank you Erik - yes, I confirm the testuser@microsoft.com account is being created. No, it is not getting the 'TestEssentialsRole' --- nor am I able to assign the role myself; it does not appear as an option for roles. I confirm the TestEssentials model is present, compiled, and sync'd. The model has the 'TestEssentialsRole' role and 'TestEssentialsPrivilege' privilege. Both are set to Enabled = Yes and IsObsolete = No. And yet, I cannot get them to display as roles. I found this community post (https://community.dynamics.com/ax/f/33/t/246036), but adding labels has not helped.

  • eone Profile Picture
    40 on at

    Ok, did you also try to run Synchronize All function from System administration > Security > Security configuration > Data?

  • Mark Simek Profile Picture
    30 on at

    I have, yes. No changes occurred.

  • Verified answer
    Mark Simek Profile Picture
    30 on at

    I have not been able to figure out how-and-why the 'TestEssentialsRole' role in the 'TestEssentials' model is not being recognized by my system. As a work around, I duplicated the 'TestEssentialsRole' and 'TestEssentialsPrivilege' from the 'TestEssentials' model to a different model (naming them "xxx_Test"), and compiling-and-syncing that model created the "xxx_Test" versions just fine. I still received the error, however, as I guess the RSAT tool does a lookup by AOTNAME. Therefore, I changed my 'TestEssentialsRole_Test" AOTNAME to be 'TestEssentialsRole' and now everything works just fine.

    Obviously, this is not a valid solution for a production implementation, but I am only POC'ing the RSAT tool and if we decide to move forward, I will be raising the issue with a Microsoft ticket. Cheers.

  • eone Profile Picture
    40 on at

    Ok, good thing you managed to workaround the issue. Other than making sure the package is also loaded I feel like troubleshooting this could take a lot of time.

    But yes you are correct, it will lookup the AOT name for the role.

  • Suggested answer
    gdarmon Profile Picture
    on at

    Hi,

    You need to enable the TestEssentialsRole on the system Security configuration -

    you will find it here - 

    pastedimage1638278469666v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans