Exemple #1
0
        public RequestWriter(StressTester stressTester, List <HttpRequestData> resultData = null)
        {
            if (resultData == null)
            {
                Results = new List <HttpRequestData>();
            }
            else
            {
                Results = resultData;
            }

            _stressTester = stressTester;
        }
Exemple #2
0
        public FileCollectionRequestWriter(StressTester tester) : base(tester)
        {
            string name = "WebSurge_" + Process.GetCurrentProcess().Id;

            TempFolderName = Path.Combine(Path.GetTempPath(), name);

            try
            {
                Directory.Delete(TempFolderName, true);
            }
            catch
            {
            }

            Directory.CreateDirectory(TempFolderName);
        }
        public void Basic3SiteValidatorTest()
        {
            var requestList = new List<HttpRequestData>()
            {

                // should work because it's local loopback
                new HttpRequestData
                {
                    Url = "http://rasxps/WebLog"
                },
                              new HttpRequestData
                {
                    Url = "http://rasxps/WebLog/posts"
                }

            };
            var stress = new StressTester();

            var validator = new SiteValidator(stress);
            bool result = validator.CheckAllServers(requestList);

            Console.WriteLine(validator.ErrorMessage);
            Assert.IsTrue(result);
        }
Exemple #4
0
 public SiteValidator(StressTester stressTester)
 {
     StressTester = stressTester;
 }
 public SiteValidator(StressTester stressTester)
 {
     StressTester = stressTester;
 }
        private void StressTestForm_Load(object sender, EventArgs e)
        {
            Watcher = new FileSystemWatcher();

            // resize the window with configured values
            App.Configuration.WindowSettings.Load(this);

            StressTester = new StressTester();
            StressTester.RequestProcessed += StressTester_RequestProcessed;
            StressTester.Progress += StressTester_Progress;

            if (string.IsNullOrEmpty(FileName) && !string.IsNullOrEmpty(App.Configuration.LastFileName))
            {
                FileName = Path.GetFullPath(App.Configuration.LastFileName);
                if (!File.Exists(FileName))
                    FileName = null;
            }

            if (!string.IsNullOrEmpty(FileName))
                OpenFile(FileName);
            else
                Requests = new List<HttpRequestData>();

            LoadOptions();

            OptionsPropertyGrid.SelectedObject = StressTester.Options;

            cmbListDisplayMode.SelectedItem = "Errors";
            TabsResult.SelectedTab = tabOptions;

            AddRecentFiles();

            if (!UnlockKey.IsRegistered())
            {
                var t = new System.Windows.Forms.Timer();
                t.Interval = 15*60*1000; // 15 mins
                t.Tick += t_Tick;
                t.Start();
            }

            UpdateButtonStatus();
        }
        public void BasicSiteValidatorTest()
        {
            var requestList = new List<HttpRequestData>()
            {
                new HttpRequestData
                {
                    Url = "http://www.microsoft.com/en-us/default.aspx"
                },
                new HttpRequestData
                {
                    Url = "http://localhost/WebLog"
                },
                              new HttpRequestData
                {
                    Url = "http://localhost/WebLog/posts"
                }

            };
            var stress = new StressTester();

            var validator = new SiteValidator(stress);
            bool result= validator.CheckAllServers(requestList);

            Assert.IsFalse(result);
            Console.WriteLine(validator.ErrorMessage);
        }