Groups
Sign in
Groups
Pester
Conversations
About
Send feedback
Help
Pester
Contact owners and managers
1–30 of 113
Welcome to the Pester group!
Mark all as read
Report group
0 selected
Citizen Earth
10/8/22
Issue while learning TestDrive functionality
I am using below code , and seeing error , please advice and correct me. Thanks in advance. Import-
unread,
Issue while learning TestDrive functionality
I am using below code , and seeing error , please advice and correct me. Thanks in advance. Import-
10/8/22
Matthew Hatch
, …
Alex Zammitt
8
1/9/20
Mocking New-PSSession and Invoke-Command
I've been able to mock a PSSession like this: [System.Runtime.Serialization.FormatterServices]::
unread,
Mocking New-PSSession and Invoke-Command
I've been able to mock a PSSession like this: [System.Runtime.Serialization.FormatterServices]::
1/9/20
craig buchanan
,
Gianluca Salvo
3
10/19/18
Mock Invoke-WebRequest to throw an ErrorRecord
Hi, this snippet works very well. May you help me with the same but for the powershell Desktop (5.1)?
unread,
Mock Invoke-WebRequest to throw an ErrorRecord
Hi, this snippet works very well. May you help me with the same but for the powershell Desktop (5.1)?
10/19/18
craig buchanan
,
Dave Wyatt
2
3/19/18
Correct way to reference a helper function
Your helper functions were dot-sourced into the test script, but your mock exists in the psTwillo
unread,
Correct way to reference a helper function
Your helper functions were dot-sourced into the test script, but your mock exists in the psTwillo
3/19/18
craig buchanan
, …
Wojciech Sciesinski
3
2/12/18
Test long-running tasks?
Hi Craig! You can be interested to follow the issue Support `-Timeout` for test cases #983. Wojciech
unread,
Test long-running tasks?
Hi Craig! You can be interested to follow the issue Support `-Timeout` for test cases #983. Wojciech
2/12/18
Mark Taylor
,
Chris Dent
3
6/5/17
Assert-MockCalled is passing when parameters don't match
Ah that's great - thanks Chris! I obviously misunderstood how the parameter filter worked. On
unread,
Assert-MockCalled is passing when parameters don't match
Ah that's great - thanks Chris! I obviously misunderstood how the parameter filter worked. On
6/5/17
Michael Landeros
,
Chris Dent
5
3/28/17
When to execute Pester Tests (Deployment of your DSC Configurations/DSC Resources)
Awesome! Thanks again. I'm reading this now for my lunch break. On Monday, March 20, 2017 at 4:09
unread,
When to execute Pester Tests (Deployment of your DSC Configurations/DSC Resources)
Awesome! Thanks again. I'm reading this now for my lunch break. On Monday, March 20, 2017 at 4:09
3/28/17
Peter Taylor
,
Chris Dent
8
2/19/17
Ideas of using TODO in pester tests.
Just a quick touch base to my thread here to say I am really, really happy that "-Pending"
unread,
Ideas of using TODO in pester tests.
Just a quick touch base to my thread here to say I am really, really happy that "-Pending"
2/19/17
craig buchanan
1/13/17
BeforeAll for all tests?
I know that BeforeAll fires once for all tests in a given Command.Test.ps1 file. Is there a way to
unread,
BeforeAll for all tests?
I know that BeforeAll fires once for all tests in a given Command.Test.ps1 file. Is there a way to
1/13/17
Gregory Tate
,
Chris Dent
3
12/2/16
Choosing Context blocks or It blocks for testing
Let's assume they belong in the same set of tests from the Context perspective. It doesn't
unread,
Choosing Context blocks or It blocks for testing
Let's assume they belong in the same set of tests from the Context perspective. It doesn't
12/2/16
Peter Taylor
, …
Wojciech Sciesinski
3
11/20/16
How to make a pester test script validate that I had filled in a help template completely?
Hi, you can use tests described http://www.lazywinadmin.com/2016/05/using-pester-to-test-your-comment
unread,
How to make a pester test script validate that I had filled in a help template completely?
Hi, you can use tests described http://www.lazywinadmin.com/2016/05/using-pester-to-test-your-comment
11/20/16
craig buchanan
,
Dave Wyatt
4
11/14/16
Should prompt?
Well, you could mock Read-Host and then use Assert-MockCalled to ensure that it was called, for
unread,
Should prompt?
Well, you could mock Read-Host and then use Assert-MockCalled to ensure that it was called, for
11/14/16
Mariusz Wojcik
,
craig buchanan
2
11/14/16
Asserting custom objects are equal
I asked a similar question on StackOverflow: Compare the properties of two PsCustomObjects. On Friday
unread,
Asserting custom objects are equal
I asked a similar question on StackOverflow: Compare the properties of two PsCustomObjects. On Friday
11/14/16
Wojciech Sciesinski
2
11/12/16
How mock user interaction New-Object System.Management.Automation.Host .ChoiceDescription ?
I resolved that issue by moving part of code to a separate function. Then a mocked that function.
unread,
How mock user interaction New-Object System.Management.Automation.Host .ChoiceDescription ?
I resolved that issue by moving part of code to a separate function. Then a mocked that function.
11/12/16
Dave Wiard
,
Chris Dent
4
10/13/16
Import-Module Automatically Runs Pester
Thanks, Chris. This was indeed exactly what was triggering the tests to run on import. I added a -
unread,
Import-Module Automatically Runs Pester
Thanks, Chris. This was indeed exactly what was triggering the tests to run on import. I added a -
10/13/16
Dave Wiard
,
Dave Wyatt
3
10/12/16
Mock Environment Variable
Thanks, Dave. This is probably what we'll end up doing. For now I've moved on to other,
unread,
Mock Environment Variable
Thanks, Dave. This is probably what we'll end up doing. For now I've moved on to other,
10/12/16
Wojciech Sciesinski
9/12/16
Survey - If/how do you store results of Pester tests
Hi, I'm supporter of Format-Pester project. Format-Pester is Powershell module for documenting
unread,
Survey - If/how do you store results of Pester tests
Hi, I'm supporter of Format-Pester project. Format-Pester is Powershell module for documenting
9/12/16
craig buchanan
, …
Chris Dent
10
6/2/16
Mock when resource is not available?
Makes sense. Thanks for the help. On Wednesday, June 1, 2016 at 2:23:42 PM UTC-5, Chris Dent wrote:
unread,
Mock when resource is not available?
Makes sense. Thanks for the help. On Wednesday, June 1, 2016 at 2:23:42 PM UTC-5, Chris Dent wrote:
6/2/16
Matt Short
,
Chris Dent
4
5/31/16
Pester Test doesn't like code that works in script when run manually
Just a quick correction; this proof: $list.GetType() -isnot [System.Collections.ArrayList] Should
unread,
Pester Test doesn't like code that works in script when run manually
Just a quick correction; this proof: $list.GetType() -isnot [System.Collections.ArrayList] Should
5/31/16
jck...@gmail.com
,
Dave Wyatt
3
5/28/16
How to test a Cmdlet that Uses SupportsShouldProcess for User Confirmation?
Hmm, Ok that would be a way to do it, but I don't think that would be the best way for the cmdlet
unread,
How to test a Cmdlet that Uses SupportsShouldProcess for User Confirmation?
Hmm, Ok that would be a way to do it, but I don't think that would be the best way for the cmdlet
5/28/16
Dexter Dhami
,
Dave Wyatt
3
5/23/16
Invoke-Command's Mock & Code Coverage issue
Thanks Dave, Let me try that. On Wednesday, May 18, 2016 at 6:54:21 PM UTC+5:30, Dave Wyatt wrote:
unread,
Invoke-Command's Mock & Code Coverage issue
Thanks Dave, Let me try that. On Wednesday, May 18, 2016 at 6:54:21 PM UTC+5:30, Dave Wyatt wrote:
5/23/16
Jamie Thomson
,
Dave Wyatt
3
5/10/16
Display correct number of tests in TeamCity
excellent news, thanks Dave. When is v4 due? (No rush, just interested to know) On Tuesday, 10 May
unread,
Display correct number of tests in TeamCity
excellent news, thanks Dave. When is v4 due? (No rush, just interested to know) On Tuesday, 10 May
5/10/16
Chris Dent
,
Dave Wyatt
4
2/17/16
Contributing assertions
ErrorId is in now. Adds quite a lot of handling code to PesterThrow to achieve that, may or may not
unread,
Contributing assertions
ErrorId is in now. Adds quite a lot of handling code to PesterThrow to achieve that, may or may not
2/17/16
Ankit Gupta
,
Chris Dent
2
2/17/16
need to mock SqlCommand Object
Is it that you need to expose the methods? If you're not constrained by type you can create: Mock
unread,
need to mock SqlCommand Object
Is it that you need to expose the methods? If you're not constrained by type you can create: Mock
2/17/16
Justin Grote
,
Dave Wyatt
2
2/9/16
Invoke-Pester using Scriptblock instead of files?
Not yet, but that would be pretty easy to add as a feature, and wouldn't even bloat the interface
unread,
Invoke-Pester using Scriptblock instead of files?
Not yet, but that would be pretty easy to add as a feature, and wouldn't even bloat the interface
2/9/16
Justin Grote
, …
Justin Grote
6
1/21/16
Adding Results to Test Output?
Err sorry my example has some redundant variable definition. Here is a cleaned up version that also
unread,
Adding Results to Test Output?
Err sorry my example has some redundant variable definition. Here is a cleaned up version that also
1/21/16
Trond Hindenes
,
Dave Wyatt
3
12/8/15
Testing for terminating/non-terminating errors
Cool, that make sense. Thanks! On Wednesday, December 9, 2015 at 2:22:06 AM UTC+1, Dave Wyatt wrote:
unread,
Testing for terminating/non-terminating errors
Cool, that make sense. Thanks! On Wednesday, December 9, 2015 at 2:22:06 AM UTC+1, Dave Wyatt wrote:
12/8/15
Stuart Leeks
,
Matt Wrock
2
10/28/15
Naming custom assertions - help/guidance appreciated
You might call it MatchValues and use Compare-Object instead of –contains which will likely simplify
unread,
Naming custom assertions - help/guidance appreciated
You might call it MatchValues and use Compare-Object instead of –contains which will likely simplify
10/28/15
Dexter Dhami
,
Dave Wyatt
5
10/25/15
Mock to New-ADUser failing
Thanks Dave, Linking my blog post around the topic to here. I have few other questions and will be
unread,
Mock to New-ADUser failing
Thanks Dave, Linking my blog post around the topic to here. I have few other questions and will be
10/25/15
Jafar Soltani
, …
Dexter Dhami
7
10/24/15
Fail to mock Get-WindowsFeature
Sorry the comments still say load the dummy AD Module :) The code sample is from my tests. On
unread,
Fail to mock Get-WindowsFeature
Sorry the comments still say load the dummy AD Module :) The code sample is from my tests. On
10/24/15