Tuesday 29 September 2015

Powershell unit-testing

Last week I started Powershell. As a luser I'm spoiled with the Linux command prompt and cram testing. Powershell is the same but different. Since I'm bound to the evil OS supporting Powershell I thought to myself, why not have a look into it. Batch-scripts are way too limited, echo'ing something to the screen is about as much as one can do with it. So Powershell is the only option.

After my first nifty script I wanted to test it. Tricky, no unit-test framework by default. So I stumbled in my search upon Pester. After a download (.zip) and some tweaking it's running! Looks great, needs some work, but it will do the job, go check it out: https://github.com/pester/Pester