protected void DoSetup()
        {
            _killWindows();

            var websitePath = GetRootPath(Environment.CurrentDirectory) + @"\Main_Site";
            var parameters = new Parameters {Path = websitePath, Port = Port};
            _iisExpress = new IISExpress(parameters, @"..\..\..\Tools\iisexpress\iisexpress.exe");
            _chromeDriver = new ChromeDriver();
            var fakeUriGenerator = new UriGenerator(new Uri("http://localhost:{0}/functionaltests".Format(Port)));
            var ffmUriGenerator = new UriGenerator(new Uri("http://localhost:{0}".Format(Port)));
            Api = new FFMApi(ffmUriGenerator, _chromeDriver);
            Fake = new FakeBuilder(new FakeApi(fakeUriGenerator));
        }
        public void Start(int port)
        {
            if (iis != null)
            {
                throw new InvalidDataException("IIS Express is already running");
            }

            iis = new IISExpress(new Parameters
            {
                Path = Path.GetFullPath(@"..\..\..\..\..\src\Adilicious.Web"),
                Port = port
            });
        }
Example #3
0
        public void BeforeScenario()
        {
            var processesToKill = MavenThought.Commons.Extensions.Enumerable.Create("chrome", "chromedriver", "iisexpress");
            _killWindows = () => MavenThought.Commons.Extensions.Enumerable.ForEach(Process.GetProcesses().Where(p => Enumerable.Any(processesToKill, pk => p.ProcessName.ToLower() == pk)),
                p => CatchException(p.Kill));
            _port = 8534;

            var websitePath = GetRootPath(Environment.CurrentDirectory) + @"\Calculator";
            var parameters = new Parameters { Path = websitePath, Port = _port };
            _iisExpress = new IISExpress(parameters, @"..\..\..\Tools\iisexpress\iisexpress.exe");
            _chromeDriver = new ChromeDriver();

            CurrentScenario.WebDriver = _chromeDriver;
        }
Example #4
0
        public static void Init(TestContext ctx)
        {
            ServicePointManager.Expect100Continue = false;
            ServicePointManager.CheckCertificateRevocationList = false;
            ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => { return true; };

            _serviceManager = ServerManager.Servers().StartAll();

            var iexps = Process.GetProcessesByName("IISExpress");
            foreach (var iexp in iexps)
            {
                iexp.Kill();
            }

            var projDir = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.Parent.Parent.FullName;
            var webroot = Path.Combine(projDir, "Websites");

            _iisExpress = new IISExpress(new Parameters
            {
                Path = webroot,
                Port = 56123,
                Systray = false
            });
        }
 public void Stop()
 {
     iis.Dispose();
     iis = null;
     driver.Quit();
 }