Skip to main content
Microsoft Dynamics NAV forum
Unanswered

Simulate multiple users in unit tests

editSubscribe (0) ShareShare
ReportReport
Posted on by 66

Hi All,

I'm trying to write unit tests for approvals functionality that needs controls of two or more users. Simple scenario would be one user send request, and other user approve that request. The problem that I'm facing is that I can't switch from one user to another in unit test as some standard approval procedures use USERID as a parameter.

Do you have any tips how to simulate work of two users in tests?

Regards,
Stefan

Categories:

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans