Skip to content

Instantly share code, notes, and snippets.

@egomesbrandao
Created May 2, 2011 20:08
Show Gist options
  • Select an option

  • Save egomesbrandao/952260 to your computer and use it in GitHub Desktop.

Select an option

Save egomesbrandao/952260 to your computer and use it in GitHub Desktop.
Script Powershell para rodar os testes do MbUnit usando Gallio gerando e abrindo os relatórios em HTML
if ( (Get-PSSnapin -Name Gallio -ErrorAction SilentlyContinue) -eq $null )
{
Add-PsSnapin Gallio
}
$result = Run-Gallio "c:\[CAMINHO]\Test.dll" -ReportDirectory "c:[CAMINHO]\TestReports" -ReportTypes "Html" -ShowReports -Filter Type:@args[0]
if ($result.Statistics.FailedCount -gt 0)
{
Write-Warning "Some unit tests have failed."
}
@egomesbrandao
Copy link
Author

Fiz uma pequena revisão, acrescente o parâmetro -Filter e estou selecionando o teste a ser executado pelo Type, exemplo no command, o argumento "XYZTest" é a classe do teste unitário que eu quero executar:

powershell -file Script.ps1 XYZTest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment