0

私は PowerShell、Pester 、および新しい VSO ビルド システムを初めて使用し、チェックインごとに Pester でテストを実行しようとしています。チェックインごとに実行する単純な PowerShell スクリプトをセットアップして構成しました。

PowerShell 構成済み

最初に、VSO チームがこれを想定して共通の単体テスト フレームワークをセットアップしたかどうかを確認するために、単純に Invoke-Pester を試してみましたが、次の予測可能な結果になりました。

Invoke-Pester : The term 'Invoke-Pester' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\a\64df1c11\Operations Tools\powershell\runPowershellTests.ps1:1 char:1
+ Invoke-Pester
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-Pester:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

私はPSGetを使用しようとしました:

(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
install-module Pester
Invoke-Pester

しかし、それも機能していません:

New-Item : Access to the path 'PsGet' is denied.
At line:17 char:5
+ New-Item -Path ($Destination + "\PsGet\") -ItemType Directory -Force | Out-N ...

Pester をリモートでインストールして実行し、単体テストを実行するにはどうすればよいですか?

4

2 に答える 2