Skip to content

Running Individual Tests

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

Running Individual Tests

Running individual test scripts is easy. Just run them. Let's say you have Calculator.Tests.ps1:

Describing "Calculator" {
	Given "two numbers" {
        It "adds them" {
            1 + 1 | Should Be 2
        }
    }
}

You can run it a few ways:

  • Open it in Powershell ISE and hit F5 (my favorite, because you can also easily debug it)
  • Run .\Calculator.Tests.ps1
  • Invoke-Tests .\Calculator.Tests.ps1