diff --git a/src/MusicStore/project.json b/src/MusicStore/project.json
index f60d44df11..d23278e719 100644
--- a/src/MusicStore/project.json
+++ b/src/MusicStore/project.json
@@ -5,6 +5,7 @@
"description": "Music store application on K",
"version": "1.0.0-*",
"dependencies": {
+ "Kestrel": "1.0.0-*",
"Microsoft.AspNet.Server.IIS": "1.0.0-*",
"Microsoft.AspNet.Mvc": "6.0.0-*",
"Microsoft.AspNet.Server.WebListener": "1.0.0-*",
@@ -18,13 +19,12 @@
"Microsoft.Framework.OptionsModel": "1.0.0-*"
},
"commands": {
- "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002",
+ "WebListener": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5002",
+ "Kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004",
"run": "run server.urls=http://localhost:5003"
},
"configurations": {
- "net451": {
- },
- "k10": {
- }
+ "net451": { },
+ "k10": { }
}
-}
\ No newline at end of file
+}
diff --git a/test/E2ETests/DeploymentUtility.cs b/test/E2ETests/DeploymentUtility.cs
index 205d9e5f4e..b9b398e305 100644
--- a/test/E2ETests/DeploymentUtility.cs
+++ b/test/E2ETests/DeploymentUtility.cs
@@ -43,7 +43,7 @@ namespace E2ETests
private const string APP_RELATIVE_PATH = @"..\..\src\MusicStore\";
- public static Process StartApplication(HostType hostType, KreFlavor kreFlavor, string identityDbName)
+ public static Process StartApplication(ServerType hostType, KreFlavor kreFlavor, string identityDbName)
{
string applicationPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, APP_RELATIVE_PATH));
//Tweak the %PATH% to the point to the right KREFLAVOR
@@ -53,13 +53,13 @@ namespace E2ETests
Environment.SetEnvironmentVariable("KRE_DEFAULT_LIB", string.Empty);
Process hostProcess = null;
- if (hostType == HostType.Helios)
+ if (hostType == ServerType.Helios)
{
hostProcess = StartHeliosHost(applicationPath);
}
else
{
- hostProcess = StartSelfHost(applicationPath, identityDbName);
+ hostProcess = StartSelfHost(hostType, applicationPath, identityDbName);
}
//Restore the KRE_DEFAULT_LIB after starting the host process
@@ -85,12 +85,14 @@ namespace E2ETests
return hostProcess;
}
- private static Process StartSelfHost(string applicationPath, string identityDbName)
+ private static Process StartSelfHost(ServerType hostType, string applicationPath, string identityDbName)
{
+ Console.WriteLine(string.Format("Executing klr.exe --appbase {0} \"Microsoft.Framework.ApplicationHost\" {1}", applicationPath, hostType.ToString()));
+
var startInfo = new ProcessStartInfo
{
FileName = "klr.exe",
- Arguments = string.Format("--appbase {0} \"Microsoft.Framework.ApplicationHost\" web", applicationPath),
+ Arguments = string.Format("--appbase {0} \"Microsoft.Framework.ApplicationHost\" {1}", applicationPath, hostType.ToString()),
UseShellExecute = true,
CreateNoWindow = true
};
diff --git a/test/E2ETests/E2ETests.kproj b/test/E2ETests/E2ETests.kproj
index ac8f44539d..198b9ec30d 100644
--- a/test/E2ETests/E2ETests.kproj
+++ b/test/E2ETests/E2ETests.kproj
@@ -29,7 +29,7 @@
-
+
diff --git a/test/E2ETests/HostType.cs b/test/E2ETests/HostType.cs
deleted file mode 100644
index 5587a1d475..0000000000
--- a/test/E2ETests/HostType.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace E2ETests
-{
- public enum HostType
- {
- Helios,
- SelfHost
- }
-}
diff --git a/test/E2ETests/ServerType.cs b/test/E2ETests/ServerType.cs
new file mode 100644
index 0000000000..aee4b4ef3e
--- /dev/null
+++ b/test/E2ETests/ServerType.cs
@@ -0,0 +1,9 @@
+namespace E2ETests
+{
+ public enum ServerType
+ {
+ Helios,
+ WebListener,
+ Kestrel
+ }
+}
diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs
index ba33e62e5e..9c0a3c3f4e 100644
--- a/test/E2ETests/SmokeTests.cs
+++ b/test/E2ETests/SmokeTests.cs
@@ -16,12 +16,16 @@ namespace E2ETests
private HttpClientHandler httpClientHandler;
[Theory]
- [InlineData(HostType.Helios, KreFlavor.DesktopClr, "http://localhost:5001/")]
- [InlineData(HostType.SelfHost, KreFlavor.DesktopClr, "http://localhost:5002/")]
- [InlineData(HostType.Helios, KreFlavor.CoreClr, "http://localhost:5001/")]
- [InlineData(HostType.SelfHost, KreFlavor.CoreClr, "http://localhost:5002/")]
- public void SmokeTestSuite(HostType hostType, KreFlavor kreFlavor, string applicationBaseUrl)
+ [InlineData(ServerType.Helios, KreFlavor.DesktopClr, "http://localhost:5001/")]
+ [InlineData(ServerType.WebListener, KreFlavor.DesktopClr, "http://localhost:5002/")]
+ [InlineData(ServerType.Kestrel, KreFlavor.DesktopClr, "http://localhost:5004/")]
+ [InlineData(ServerType.Helios, KreFlavor.CoreClr, "http://localhost:5001/")]
+ [InlineData(ServerType.WebListener, KreFlavor.CoreClr, "http://localhost:5002/")]
+ [InlineData(ServerType.Kestrel, KreFlavor.CoreClr, "http://localhost:5004/")]
+ public void SmokeTestSuite(ServerType hostType, KreFlavor kreFlavor, string applicationBaseUrl)
{
+ Console.WriteLine("Variation Details : HostType = {0}, KreFlavor = {1}, applicationBaseUrl = {2}", hostType, kreFlavor, applicationBaseUrl);
+
var testStartTime = DateTime.Now;
var musicStoreDbName = Guid.NewGuid().ToString().Replace("-", string.Empty);
var musicStoreIdentityDbName = Guid.NewGuid().ToString().Replace("-", string.Empty);
@@ -35,6 +39,7 @@ namespace E2ETests
ApplicationBaseUrl = applicationBaseUrl;
Process hostProcess = null;
+ bool testSuccessful = false;
try
{
@@ -103,9 +108,15 @@ namespace E2ETests
var testCompletionTime = DateTime.Now;
Console.WriteLine("[Time]: All tests completed in '{0}' seconds", (testCompletionTime - initializationCompleteTime).TotalSeconds);
Console.WriteLine("[Time]: Total time taken for this test variation '{0}' seconds", (testCompletionTime - testStartTime).TotalSeconds);
+ testSuccessful = true;
}
finally
{
+ if (!testSuccessful)
+ {
+ Console.WriteLine("Some tests failed. Proceeding with cleanup.");
+ }
+
if (hostProcess != null && !hostProcess.HasExited)
{
//Shutdown the host process