

From the title of this article, you’ve guessed by now the tool of choice for testing PowerShell code is Pester. Just as automation is the answer to infrastructure management, so too is it the answer to testing. But what about bigger code bases? Modules composed of multiple PS1 files, or scripts that rely on many different modules? A developer may be able to test the small script they created, or the function they updated. Unfortunately, this type of testing just doesn’t scale. A developer makes changes, runs a test on their computer, and deploys. “I test my code.” But in a shockingly high number of environments testing is still a manual process. These and other questions can be answered through the use of testing. “Can you prove to me your scripts do everything they are supposed to?” “How do we know your changes don’t break other modules?” “How can I be confident your code meets requirements?” Given the importance of PowerShell, imagine that your boss, project manager, or similar authority figure comes to you with some basic questions.
PESTER TESTING MAC OSX
With its usefulness on the Windows platform long established, and now the ability to run on the Linux and Apple Mac OSX platforms, PowerShell has firmly established itself as a powerful player in the world of automation. The DevOps movement has added to the importance of having a good automation strategy. Advanced Testing of Your PowerShell Code with PesterĪutomation has become the backbone of infrastructure management within most corporations.Introduction to Testing Your PowerShell Code with Pester.Introduction to Testing Your PowerShell Code with Pester - Simple Talk Skip to content
