DevOps BDD Automated Tests using Gherkin and PowerShell Pester

A mob programming style workshop recorded with live audience learning how to use Behavior Driven Development BDD test automation with PowerShell.

Part 1 – BDD Automated API tests using PowerShell Pester Gherkin syntax.


Part 2 – DevOps BDD testing infrastructure as code and operational scripts.


The PowerShell Pester module already offers mostly human readable ‘Describe’ and ‘It should..’ statements specifying expected behaviour, similar to Chef InSpec framework.

The 4.0.3 version of Pester introduced the Gherkin style BDD syntax to PowerShell;
GIVEN some pre-condition,
WHEN some action is performed,
THEN the result should match my expected behaviour.

The Gherkin style has become popular in agile software development teams and automated test designers may already be familiar with the syntax using the SpecFlow framework to drive web browser Selenium tests. However the use of Gherkin syntax in PowerShell means this powerful business or behaviour driven development language can be applied to infrastructure and operational scripts too.

PowerShell is installed on every Microsoft Windows machine so its easy (and free) to get started with BDD testing.

You will need to update to latest version of PowerShell and install the Pester module

Install-Module Pester

and start writing your first .feature file!

You  may also want to learn more about Mob Programming and see “all the brilliant minds working on the same thing, at the same time, in the same space, and at the same computer.’  – Woddy Zuill