Skip to content

Run OpenSSH Pester Tests

Yanbing edited this page Mar 17, 2017 · 9 revisions

Build OpenSSH: (skip these steps if you’ve already done)

Import-Module  .\openssh-portable\contrib\win32\openssh\appveyor.psm1 –Force
Start-SSHBuild -Configuration Debug -NativeHostArch x64 –Verbose
Install-OpenSSH -OpenSSHDir $env:SystemDrive\OpenSSH -Configuration Debug -NativeHostArch x64

Run OpenSSH Pester Tests:

  • Deploy OpenSSH tests
Import-Module  .\openssh-portable\contrib\win32\openssh\appveyor.psm1 –Force
Install-TestDependencies
Deploy-OpenSSHTests -OpenSSHTestDir $env:SystemDrive\OpenSSH -Configuration Debug -NativeHostArch x64
  • Run pester tests : Launch powershell core windows (for example at "$env:ProgramFiles\PowerShell\6.0.0.12\powershell.exe") and run the below command:
cd $env:SystemDrive\OpenSSH
Import-Module  .\openssh-portable\contrib\win32\openssh\appveyor.psm1 –Force
Run-OpenSSHPesterTest –testRoot $env:SystemDrive\OpenSSH -outputXml testresult.xml

Note: If you want to run a particular test, skip step 3 and just launch it:

.\SCP.Tests.ps1
Clone this wiki locally