예제 #1
0
        public async Task RunTestsAsync(
            ServerType serverType,
            string applicationBaseUrl,
            ApplicationType applicationType)
        {
            var testName = $"SmokeTestsOnNanoServer_{serverType}_{applicationType}";

            using (StartLog(out var loggerFactory, testName))
            {
                var logger = loggerFactory.CreateLogger(nameof(SmokeTestsOnNanoServerUsingStandaloneRuntime));
                var deploymentParameters = new RemoteWindowsDeploymentParameters(
                    Helpers.GetApplicationPath(applicationType),
                    _remoteDeploymentConfig.DotnetRuntimePathOnShare,
                    serverType,
                    RuntimeFlavor.CoreClr,
                    RuntimeArchitecture.x64,
                    _remoteDeploymentConfig.FileSharePath,
                    _remoteDeploymentConfig.ServerName,
                    _remoteDeploymentConfig.AccountName,
                    _remoteDeploymentConfig.AccountPassword)
                {
                    TargetFramework        = Helpers.GetTargetFramework(RuntimeFlavor.CoreClr),
                    ApplicationBaseUriHint = applicationBaseUrl,
                    ApplicationType        = applicationType
                };

                deploymentParameters.EnvironmentVariables.Add(
                    new KeyValuePair <string, string>("ASPNETCORE_ENVIRONMENT", "SocialTesting"));

                using (var deployer = new RemoteWindowsDeployer(deploymentParameters, loggerFactory))
                {
                    var deploymentResult = await deployer.DeployAsync();

                    await SmokeTestRunner.RunTestsAsync(deploymentResult, logger);
                }
            }
        }
예제 #2
0
 public SmokeTests_X64(ITestOutputHelper output)
 {
     _smokeTestRunner = new SmokeTestRunner(output);
 }