PowerShell / Operation-Validation-Framework

MIT License
225 stars 32 forks source link

Add support for Pester tags #10

Closed devblackops closed 7 years ago

devblackops commented 8 years ago

Pester supports adding tags to Describe blocks. I propose extending OVF to filter for tests with matching tags and only return the matching tests. Similar support should be added for excluding tags as well.

Example of retrieving all tests from the WindowsServerOvf module with a tag of disk

$tests = Get-OperationValidation -ModuleName 'WindowsServerOvf` -Tag 'disk'

Example of running all OVF tests except for any with a tag of memory

Invoke-OperationValidation -ExcludeTag `memory` -IncludePesterOutput
michaeltlombardi commented 8 years ago

Strongly desire this; we have a basic set of tests and want to run them both during deployment-artifact-creation and post-deployment; there are some tests that should not run during artifact-creation (domain checks, etc).

JamesWTruher commented 8 years ago

please feel free to create a PR, I'm hoping that the folks that need this will make it better!

devblackops commented 8 years ago

A PR will be coming in the near future for this. I'm currently working on merging the changes I've made in my internal OVF implementation in another project. That PR will add the ability to send script parameters to the Pester tests referenced in #6.