I would like to perform Automated UI tests via TestExecute in Azure DevOps pipeline which is using Azure Virtual Machine Scale Sets as agent pool.
When I "Configure VMs to run interactive tests", the new agent/OS is booting with new auto-login user called "AzDevOps", instead of using the user I provided with the Azure VMSS image. The problem is that this user does not have license for TextExecute nor some other config.
After few months of exploring options. I found solutions.
There is no way to choose other than "AzDevOps" user for Azure DevOps agents running in interactive mode on Azure VMSS instances. But I could configure new user called "AzDevOps" in the base gallery image and add required licenses to that user account.
I had to add a custom extension to the VMSS which would change "AzDevOps" account password to a known password after each instance is created, because pipeline generates a random password by default.
Also, Test Execute has its tool "SessionCreator" which can create a specific sessions with specified user config per test run and evade this issue with AzDevOps account.