IIS Express Bootstrapper is a very simple library built to make easy run IIS Express from your C# code for a web application project.
It's a great library for acceptance tests.
You can install this package via NuGet Package Manager or via Package Manager Console:
PM> Install-Package IISExpressBootstrapper
namespace IISExpressSample
{
[TestFixture]
public class YourTestClass
{
[Test]
public void YourTestMethod()
{
// You must replace "IISExpressBootstrapper.SampleWebApp" parameters for your web Application Name
var host = new IISExpressHost("IISExpressBootstrapper.SampleWebApp", 8088);
// Your amazing test code goes here
host.Dispose();
}
}
}
Yes, simple as that. With this library you can easily setup IIS Express and write your acceptance tests for your web application using Selenium Webdriver, WatyN or whatever you want.
Note: In order to work, the web application and the acceptance test project must be in the same solution folder. You can see a full sample here.