Skip to content

Instantly share code, notes, and snippets.

@cbilson
Created June 11, 2009 19:40
Show Gist options
  • Save cbilson/128178 to your computer and use it in GitHub Desktop.
Save cbilson/128178 to your computer and use it in GitHub Desktop.
. .\Scripts\Startup.ps1
$integrationFixture = "$env:ProjectRoot\Product\IntegrationTests\Ris.Fx.Integration.Tests\bin\Debug\Ris.Fx.Integration.Tests.dll"
function Start-WebDev {
$webdev = "$env:CommonProgramFiles\Microsoft Shared\DevServer\9.0\WebDev.WebServer.exe"
$webdir = "$env:ProjectRoot\Product\Production\Ris.Fx.Web"
$arguments = @(
'/port:9008',
"/path:""$webdir"""
'/vpath:"/"')
Start-Process -FilePath $webdev -ArgumentList $arguments
}
function Stop-WebDev {
Stop-Process -name WebDev.WebServer
}
function Start-BrowserToLocalWebApp {
Start-Process 'http://localhost:9008/'
}
function Start-SeleniumRC {
$jar = Resolve-Path ThirdParty\Selenium\selenium-server-1.0\selenium-server.jar
Start-Process 'cmd' -ArgumentList @('/c', "java -jar ""$jar""")
}
function Stop-SeleniumRC {
Get-WmiObject Win32_Process -filter "name='java.exe'" `
| Where-Object { $_.CommandLine -match 'selenium' } `
| ForEach-Object { $_.Terminate() } `
| Out-Null
}
function Start-IntegrationMode {
Start-WebDev
Start-SeleniumRC
}
function Stop-IntegrationMode {
Stop-SeleniumRC
Stop-WebDev
}
function Start-IntegrationTests {
Run-Gallio -Assemblies @($integrationFixture)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment