Environment unit tests
After provisioning the resources, it is important to test them. Tests should be executed on these resources to verify that they are provisioned successfully, configured according to given values, and are in the expected desired state.
Chapter 5, Building a Sample Application, introduced the OnlinePharmacy.Configuration
project within the overall sample solution. This project contains the Tests
folder containing both unit and operational validation tests.
Pester was introduced in Chapter 3, DevOps Automation Primer. It is used to execute the test cases defined in this section. The UnitTests
folder contains all the Pester tests. The test cases are defined in PowerShell script files, one for each resource that should be tested.
These tests can be executed manually by executing the scripts directly using a PowerShell console. It can also be executed using the VSTS release pipelines. The preferred mechanism to execute these tests is through the VSTS release pipeline. After...