The configuration as code is a huge deal today, and everything needs to be automated in order to roll out new releases quickly or roll back in case of issues. In the Windows case, PowerShell is widely used and new scripts are daily created by the community to automate processes like tools installation and configuration, monitoring services status, send a notification, generating specific files in a specific path as well as populating dynamically content. With all these features out there, it is mandatory to generate components with high quality. Therefore, how to generate Powershell code with high quality, how to help DevOps to design solutions focus on the expected behavior before start coding, how to generate good reports like Code-Coverage? Well, we can use the Pester. Pester is a Behavior-Driven Development (BDD) open-source framework with powerful features like: Unit Tests framework to perform and verify PowerShell commands. Easy and clear file naming convention for naming tests to be discovered under your projects. It follows the same concepts used by other TDD/BDD frameworks like Describe, Context, It. The DSL language contains Mocking functions that allow mimic 3rd party tools or any command inside the PowerShell code. Generates Test Results artifacts that can be used in Test Code Coverage metrics reports. Integration with CI/CD tools like TeamCity, Azure DevOps, and others. In this presentation, I will provide real examples of these features and how to do the integration with Azure DevOps Pipelines.
May 6 @ 11:45
11:45 — 12:25 (40′)