Passed test - return values #2661
Unanswered
SQLDBAWithoutABeard
asked this question in
Q&A
Replies: 1 comment 4 replies
-
|
You should get tags like this (even though the code above looks like it won't work in pester 5, because you use $_ in the it, but there is no -ForEach provided) $r = Invoke-Pester -Container (New-PesterContainer -ScriptBlock {
Context "Checking path is set" -Tag "CCCCCCC" {
It "should be set to the server name" -Tag "TTTTTTTTT" {
}
}
}) -PassThru
$r.Containers.Blocks.Tag
$r.Containers.Blocks.Tests.Tag |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Within my test script, I return the server name as a Tag e.g.
In my script that executes my tests, I pull back values from my scripts like this:
My question is, how can I pull back the Context, It and Because for Passed tests?
For failed tests, it's straightforward as the ErrorRecord is returned:
Many thanks
Beta Was this translation helpful? Give feedback.
All reactions