All you need to know about the technology behind Automated Testing for Microsoft Dynamics 365
The technology to perform efficient automated testing has been here for at least a decade and resources with test automation skills are available at reasonable prices. Still, I hardly see any Microsoft Dynamics implementations using it!
This is the third blog post in a series on the topic Automated Testing on the Microsoft Dynamics platform. We’ve addressed the potential to draw business value, and we showcased how it can form part of a very strong business case. Now, let’s take a look at it from a technology perspective.
All of us have reached out to IT support claiming that “it is not working”. We are immediately met with a series of questions to narrow down exactly what is not working. And after answering this, IT still has a whole list of verifications to narrow down the issue even more.
So, do you want to test “whether it works” (high-level) or do you want to verify each element that combined should enable it to work (low-level).
Low-level testing gives you great test-coverage. You will have many minor tests and cover many logical scenarios, which a high-level test would never catch. But it can be rather complex to design a low-level test suite to ensure that the intended high-level functionality works.
Low-level test is quick to write and quick to execute. High-level testing is a bit more cumbersome to define and write and you will leave a bit more work for IT to resolve why your test failed. But here you are ensured, that you are testing the actual intended usage.
If this is the beginning of your journey with test automation, I recommend kicking off with high-level testing. Create a 1-to-1 automation of the actions that a real person would do using the system. It is a test everyone can relate to, making it easy to get a buy-in from the entire organization. It is usually also the easiest test to define a reasonable level of quality and coverage.
I would recommend low-level testing for specific key components with large complexity e.g. to test the output of an algorithm generating prices, migrating data or populating complex schedules.
Technologies for high-level testing
There is a bunch of third-party tools available in the market. Here, business users create their test suite by creating recordings of them navigating the system and then have the recordings replayed in sequences generating a test report.
Microsofts LCS (Life Cycle Services) has a task-recorder intended to automate your routine tasks. In the fall of 2019, Microsoft released a minor tool called RSAT (Regression Suite Automation Tool) in which you can execute all of your task recordings in a sequence and output a report. The drawback of this approach is that LFS does not cover all Dynamics 365 applications and in my opinion using a task-recording as a test case is a bit too simple. Basically, your checkpoint is whether you can perform a given task without a system error or not. Some test cases are just a bit more complex than that.
Most of these tools convert your recordings to coded scripts. An alternative is naturally to code these scripts yourselves. This requires a bit more time per test case but leaves you with a much greater freedom to construct a complex test case with multiple users, roles and systems verifying calculations against external sources.
These scripts can be written by either interfacing the Dynamics 365 application via the API e.g. using Microsoft PowerShell or mimicking the real-time usage via the browser e.g. Selenium Webdriver. The first approach is faster and the latter is easier and relatable by end-users and will also catch issues with client-side scripting and browser compatibility.
The task recorder in Microsoft LCS uses Selenium and Microsoft developers has published an open-source framework on GitHub called EasyRepro intended to speed up your own Selenium scripting.
This was the third blog post in our series on the topic of automated testing. I hope that I’ve inspired you to read the other blog post as well:
- It’s just so obvious! 4 reasons why Automated Testing for Microsoft Dynamics 365 makes big business sense
- The ultimate Business Case for Automated Testing on Microsoft Dynamics 365
- AlfaPeople Automated Test: Now you get the gist, it’s time to dive into your Dynamics 365
Contact us today!
AlfaPeople has, for the 10th consecutive year, been recognized as a top-1% Microsoft Partner and a leading consultancy firm for Microsoft Business Applications including Microsoft Dynamics 365 Customer Engagement and Microsoft Dynamics 365 Finance.
Would you like to hear more about AlfaPeople’s Automated Test? Our talented consultants are ready to speak with you today. Contact us at +45 70 20 27 40 or email email@example.com to let us discuss how we can help you!