Introduction to SpecFlow for Power Apps

Mark Cunningham
Capgemini Microsoft Blog
3 min readSep 17, 2020

Make Power Apps testing simple, easy and reliable.

Photo by Joshua Newton

Start with the Why?

Let’s start with a question and be honest with ourselves, how many projects have you worked on and not performed any form of acceptance testing / UI testing for a Power Apps project? My guess is quite a few.

The most likely reasons you do not perform UI testing, could be the lack of automation testing skills in house, you find it too difficult or even you find it too time consuming to get started. Those of you that have attempted this, no doubt have had a struggle and stumbled across EasyRepro.

We faced such challenges within our team too and it had been a pain point for us, especially having teams all over the country. A key challenge was how to perform such testing in a simple way. Every team is at a different stage of their projects maturity and we realised that the only way to perform enterprise scale quality, was to produce a tool to make writing UI tests for Power Apps a breeze.

What did good look like for us?

We wanted to build a reusable library to handle a number of complex scenarios with the ultimate aim of making UI testing for Power Apps a trivial task. Some factors and considerations that have driven our approach:

  • Human readable tests that any level of Developer / User could write
  • Minimise the amount of C# code required to write a test
  • Consistent way to load data and verify the outcome
  • Ability to run them as part of a CICD pipeline
  • Ability to write complex tests in a few minutes rather than hours

Our Approach and Tools used

We had collectively looked at all the tools available for the .NET ecosystem and few had stood the test of time like SpecFlow. Those that have not come across SpecFlow — I strongly recommend you read the SpecFlow website. In essence SpecFlow is a behaviour-driven approach to writing tests in a human readable way.

Examples

We have multiple examples of how to write tests. No need to write any C# code, just use the existing bindings. There are around 100 existing bindings that can be used out of the box, such as:

Example 1 — Log in Example feature

Example 2— Log in and Create a record feature

Notice we reuse the login binding from Example 1, preventing duplication of effort

Great — How do I get started?

This is an introduction and the official release will be coming soon. Watch this space, where we will be announcing it very soon with all the links to the tools and documentation.

In the meantime you can check out my colleague Jay’s posts on SpecFlow:

Ready to take your career to the next level? Check out our open roles here and join the Microsoft Team at Capgemini.

--

--