The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Check out the latest Business Central updates!Learn about the key capabilities and features of Dynamics 365 Business Central and experience some of the new features.
Download overview guide | Watch Business Central video
2020 release wave 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Apologies for another post about AL Test Runner. If you don’t use or care about the extension you can probably stop reading now and come back next time. It isn’t my intention to keep banging on about it – but the latest version (v0.2.1) does plug a significant gap.
Next time I’ll move onto a different subject – some thoughts about how we use Git to manage our code effectively.
While I still prefer developing against a local Docker container I know that many others publish their apps to a container hosted somewhere else. In which case your options for running tests against that container are:
Again, shout out to Max and colleagues for opening a pull request with their changes to enable this and for testing these latest mods.
Firstly, you’re going to need to be able to open a PowerShell session to the Docker host with:
New-PSSession <computer name>
I won’t pretend to understand the intricacies of setting this up in different scenarios – you should probably read the blog of someone who knows what they are talking about if you need help with it.
The solution will likely include:
To connect to my test server in Azure I run the following:
New-PSSession <server name> -Credential (Get-Credential) -Authentication Basic
They are several new keys in the AL Test Runner config file to accommodate remote containers. There are also a few new commands to help create the required config.
The Open Config File command will open the config JSON file or create it, if it doesn’t already exist. Set Container Credential and Set VM Credential can be used to set the credentials used to connect to the container and the remote host respectively.
The required config keys are:
The extension uses New-PSSession to open the PowerShell session to the Docker host. The ComputerName and Credential parameters will populated from the dockerHost and vmUserName / vmSecurePassword config values respectively.
Any additional parameters that must be specified should be added to the newPSSessionOptions config key. As in my case I run
New-PSSession <server name> -Credential <credential> -Authentication Basic
I need to set newPSSessionOptions in the config file to “-Authentication Basic”. You can use this key for -useSSL, -Port, -SessionOption or whatever else you need to open the session.
With the config complete you should be able to execute tests, output the results and decorate the test codeunits as if you were working locally. Beautiful.
As ever, feedback, suggestions and contributions welcome. Hosted on GitHub.
Business Applications communities