Skip to content
Jon Wagner edited this page Feb 18, 2013 · 1 revision

PSate v Pester

PSate was inspired by the great work by the Pester team. Unfortunately, we hit few limitations, so we needed to extend it on our own, and ended up with an entirely separate implementation. Here are some differences:

  • PSate can run individual test scripts from the command line, or more importantly through PowerShell ISE F5. Pester requires tests to be run through Invoke-Pester.
  • PSate makes sure that variables defined in higher test scopes are available in lower test scopes. Pester has some issues with variables not being available, forcing you to copy values in your test code.
  • PSate has Setup/TearDown constructs.
  • PSate supports automatically managing temporary folder, file, registry, and other resources.
  • PSate supports both TDD-style and BDD-style test cases, and lets you define your own style if you like.
  • PSate does not contain a mocking or assertion library, but was designed to work with PSMock and PShould, so just use those (or another one if you like).
  • PSate has a handy $TestScriptDirectory variable that lets you easily import additional scripts in a path relative to the test script's file. Pester made you manually calculate this from $MyInvocation.