I want to remove comments in xml files based on the xml tags inside the comment with Powershell. Constraints: Multi line comments should be suppor ...
I want to remove comments in xml files based on the xml tags inside the comment with Powershell. Constraints: Multi line comments should be suppor ...
I would like to define stand-alone functions in my PowerShell script and be able to Pester test the functions without executing the rest of the script ...
In my Pester-test I've created a function to Test-SQLConnection. I can test the function like this: This approach works when I run the test locally ...
I'm stuck on how to pass parameters to my Pester v5 tests. This is my config-file in Pester: This is my simple test where I need to pass value to ...
POV: I'm generating Powershell test code coverage with pester. Problem: The generated Coverage.xml file remains empty. Question What am I doing wron ...
Background I have a PowerShell module where I am starting to write the tests. Each function is stored in its own file with the same name (e.g. functi ...
I have Azure powershell function which run.ps1 looks pretty much This is in the directory /func/myFunction/run.ps1 And my pester test is in the /fu ...
I am creating a module which contains a class file as well as a unit test file (Pester). The class B in the class file inherits from a class A found ...
I have added a new unit test file for Pester 5 to my Powershell repo in VS code. When I try to run/debug it, I get a prompt in Terminal: If I ente ...
This is my setup (simplified) where I create a function and pass it to Run-Test and then Run-Test invokes the function. But what is happening is I onl ...
I want to create a mock with Pester which is supposed to be called in stead of a script. Simplified example below. somecmd.ps1 somemodule.psm1 ...
So I'm working on a powershell script that runs a pester test. The script connects to a Kubernetes pod with a Mongo database. The goal is to check whe ...
I have written a function to write the errors that occur in my functions in a csv file, this function is called in the catch block of my functions. I ...
I am an utter newbie regarding PowerShell and Pester. I followed some trainings about Pester and how to create tests but I am not very clear about it. ...
Hi i am trying to test my functions in the module but I need to know the right syntax. Here is what i have so far. #array of functions $functi ...
Hey guys so I have this code (Powershell v5), and when I run the pester for it, the else statement is not being detected. Runs perfectly fine on power ...
I am using the following test code: And it gives me the following error: The call to Start-Process in My-CustomFunction does not get any pipeline ...
Is there a way to manually clear the pester TestDrive, other than something like Remove-Item "TestDrive:\" -Recurse -Force ...
I would like to be able to skip tests if list is empty. a very simplified example: No name is -eq to "jens", therefore the $newlist would be empty, ...
I have written multiple classes. All of them are being used interchangeably. The main script (Main.ps1) imports some of them and runs the program. I' ...