Recall & Review
beginner
What is Pester in PowerShell?
Pester is a testing framework for PowerShell scripts. It helps you write tests to check if your scripts work as expected.
Click to reveal answer
beginner
What is a Describe block in Pester?
A Describe block groups related tests together. Think of it like a chapter title for your tests.
Click to reveal answer
beginner
What does the It block do in Pester?
An It block contains a single test. It describes what the test should check, like a small task or question.
Click to reveal answer
beginner
How do you check if a value equals another in Pester?
Use the Should keyword with the -Be operator. For example: $result | Should -Be 5 checks if $result equals 5.
Click to reveal answer
beginner
How do you run Pester tests in PowerShell?
Run the command Invoke-Pester in the folder with your test files. It runs all tests and shows results.
Click to reveal answer
What keyword starts a group of tests in Pester?
✗ Incorrect
Describe groups related tests together in Pester.
Which block contains a single test in Pester?
✗ Incorrect
It block holds one test case in Pester.
How do you assert that a value equals 10 in Pester?
✗ Incorrect
Use Should -Be to check equality in Pester.
Which command runs all Pester tests in the current folder?
✗ Incorrect
Invoke-Pester runs Pester tests.
What is the main purpose of Pester?
✗ Incorrect
Pester is used to test PowerShell scripts.
Explain the roles of Describe and It blocks in Pester testing.
Think of Describe as a chapter and It as a paragraph.
You got /3 concepts.
How do you write a simple test in Pester to check if a function returns the number 5?
Start with Describe, then It, then assertion.
You got /4 concepts.