TestModeller.io - Selenium C# Tutorial

Welcome to the TestModeller.io Selenium C# tutorial !

In this tutorial we'll be covering how to get started with TestModeller.io for Selenium C#.

This is aimed for first-time users along with users who have an existing Selenium C# automation framework.

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 Selenium C# based automation framework to quickly start creating models and associated automation.

For Selenium C# this means creating models which automatically generate C# code which can be directly plugged into your Selenium C# automation framework.

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 selenium C# test automation to test their own 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 in selenium C# through TestModeller.io.

  1. Create a free TestModeller.io account
  2. Install node.js
  3. 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.
  4. Download our example selenium C# project (if you don't have your own).
    • You can download the framework from out GitHub repo here.

Integrate Generated Assets

Generated assets from the TestModeller.io Scanner, and Code Generators just need to be copied into the right directories.

  1. Place the `PageObject` files generated by TestModeller.io into the Pages directory in the project.
  2. Place the `TestCase` files generated by TestModeller.io into the Tests directory in the project.
3. Configuration

Configure Test Modeller

All code created using TestModeller.io uses code templates which define the structure and type of code to be created. Test Modeller provides support for numerous open source frameworks out-the-box made available on the Curiosity Software GitHub page.

The sample framework provides pre-configured code templates within the ‘Code Template’ directory. To import these into Test Modeller follow these steps or watch the video below.

  1. Login to Test Modeller and go to the 'workspace' and then the 'configuration' tab


  2. Select code templates from the configuration view.


  3. Upload both the page object and test case code templates by selecting the ‘Import’ button next to the code template header.


  4. Register a new automaton framework using the code templates. You will need to select the code template and test case templates which have previously been uploaded.




  5. Create a new project within Test Modeller which will be used as a workspace for our page objects and models created for consumption by the automation framework.


    • To do this go to ‘Project & Releases’. Select to create a new project and enter a suitable name for the project.


    • In the wizard select the automation framework you just created to bind to create the project. This tells Test Modeller to use this specific framework for generations (although it can be overridden at any time).


Note: This is using the sample framework and configuration provided by Test Modeller. You may have your own automation framework which you wish to utilise. This can be integrated into Test Modeller by configuring your own code templates. A video tutorial is available here.