You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
Want to know what a test file does in plain English? Open the test file in an editor to view the $Description.
Expected Behavior
# Run all VM tests included with the moduleGet-VesterTest-Scope VM |Invoke-Vester# Run all tests matching *dns*.Vester.ps1 included with the moduleGet-VesterTest-Name dns |Invoke-Vester
Get-VesterTest should return info about a file's contents, so that you could do something like this to figure out what a test does:
Get-VesterTest-Name NTP-Service-Policy
# Would return: FullName (Path) and all variable definitions within (like $Description)# Probably subject to a format xml to modify default displayed returns
Possible Solution
New public function Get-VesterTest
Wraps Get-ChildItem and always includes:
-File
-Recurse
-Filter '*.vester.ps1'
Defaults to -Path "$((Get-Module Vester).ModuleBase)\Tests\"
Parameters:
-Name: Wildcard searches the Vester test filenames
Would modify -Filter '*.vester.ps1' --> -Filter "*$Name*.vester.ps1"
-Scope: A [ValidateSet()] param for all scopes Vester ships
Context
Piping Get-VesterTest with basic info is a lot easier than expecting every single user to know how to perform the Get-ChildItem examples shown above.
Users should not have to dig into .ps1 files to view basic info (like $Description) about an included Vester test file.
The text was updated successfully, but these errors were encountered:
I implemented Get-VesterTest -Simple, which returns just the full file path. Vester currently expects to just pass a path string down to the private template, and the test extraction happens within the private template. This feels re-writable now, but not as part of this issue/PR.
I also can't pipe them in right now (Get-VesterTest | Invoke-Vester) because config files take precedence. Bleh.
This "current" vs. "expected" info is valid as of release
1.1.0
.Current Behavior
Want to run just VM tests, instead of all included tests?
Want to run all DNS tests included with the module?
Want to know what a test file does in plain English? Open the test file in an editor to view the
$Description
.Expected Behavior
Get-VesterTest should return info about a file's contents, so that you could do something like this to figure out what a test does:
Possible Solution
New public function
Get-VesterTest
Get-ChildItem
and always includes:-File
-Recurse
-Filter '*.vester.ps1'
-Path "$((Get-Module Vester).ModuleBase)\Tests\"
Parameters:
-Name
: Wildcard searches the Vester test filenames-Filter '*.vester.ps1'
-->-Filter "*$Name*.vester.ps1"
-Scope
: A[ValidateSet()]
param for all scopes Vester shipsContext
Piping
Get-VesterTest
with basic info is a lot easier than expecting every single user to know how to perform theGet-ChildItem
examples shown above.Users should not have to dig into
.ps1
files to view basic info (like$Description
) about an included Vester test file.The text was updated successfully, but these errors were encountered: