TestModeller.io - Microsoft Dynamics 365 Tutorial

Welcome to the TestModeller.io Microsoft Dynamics 365 tutorial !

In this tutorial we'll be covering how to get started with TestModeller.io for Microsoft Dynamics 365 testing.

1. How it works

TestModeller.io is a browser-based solution that enables users to:

  • Model a system under test as BPMN-style flowcharts.
  • Automatically generate test cases from the model, optimising testing for time and risk.
  • Define test data at the model-level and generate data at the same time as test cases.
  • Define test automation, automatically executing tests generated in The VIP Test Modeller.
  • Analyse test results and manage existing artefacts, with visual dashboards and a file management system that introduces traceability between test assets.

This quick start guide provides an overview for new users to get started with creating automation for a Dynamics 365 application to quickly start creating models and associated automation.

For Dynamics365 this means creating models which automatically generate C# code which can be directly plugged into an automation framework for Dynamics 365.

TestModeller.io a modelling tool which creates the perfect set of tests into a wide array of test case management systems, and automation frameworks. Along with overlaying the right test data to support your testing.

This section is by no means comprehensive and intended as a quick start guide. If you wish to learn more about modelling we recommend you review our knowledge base along with our video tutorials for a comprehensive guide to creating models and test automation.

The goal is to equip the reader with the working knowledge needed to get started with creating test automation to test their own Dynamics 365 systems and integrate into their own automation frameworks. With TestModeller.io, this means automatically generating complete automated test suites from models that are quick to build and easy to maintain.

2. Prerequisites

Install Prerequisites

Here we'll be installing all the prerequisites you need to get started with test automation for Dynamics 365 through TestModeller.io.

  1. Create a free TestModeller.io account
  2. Install ChromeDriver (this needs to match the version of chrome you will be executing your tests on) and make sure you add it to your system PATH.
  3. You'll need visual studio installed for running and editing the automation framework. You can download a copy here.
  4. Download the Microsoft EasyRepro Dynamics 365 Automation Framework for TestModeller from our GitHub repo.
3. Configure framework

Configure framework

4. Import framework

Import framework

5. Build models

Build Models

6. Generate automation code

Generate automation code

7. Execute tests

Execute tests

8. Extend with custom actions (Advanced)

Extend with custom actions

9. Embed scanned objects (Advanced)

Embed scanned objects

9. Common Problems
ChromeDriver Mismatch
System.InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version x (SessionNotCreated)

There is a mismatch between the Chrome Browser installed and the chromedriver instance specified in the project. Update the chrome driver instance 'Selenium.Chrome.WebDriver' in the NuGet project manager to match the version of chrome installed on your operating system.

Dialog Boxes
Element not found exception.

Dialogs in Dynamics applications are exposed as IFrames. An Iframe is a web page which is embedded in another web page or an HTML document embedded inside another HTML document.

Selenium expects to be told which context (IFrame) the current web driver is to perform the automation in. To achieve this we must switch between IFrame contexts when performing an action.

This can be achieved by directly accessing the web driver within the Dynamics Framework and specifying the ID of the iframe to switch to client.Browser.Driver.SwitchTo().Frame("frameid");. After the action is then performed the context must be reset client.Browser.Driver.SwitchTo().DefaultContent().

You can learn more about using IFrames in Selenium here.