13 Testing your scripts
This chapter covers
- Writing unit tests using Pester
- Creating mocks to ensure consistency in testing
- Writing integration tests with Pester
If you asked me what one key takeaway I would like people to get from this book, it would be to plan for the future. Throughout this book, we have discussed things like creating functions and modules with your reusable code. By making things modular and extensible, you are giving yourself a great foundation. However, there will come a time when you may need to make changes to these foundational parts. If you have a function or module used across multiple automations, you need to ensure that your changes do not break existing functionality. The best way to do that is by creating unit ...
Get Practical Automation with PowerShell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.