public LoadGenerator(LoadTest loadTest, Type testType, LoadTestContext context, CancellationToken cancellationToken) { _loadTest = loadTest; _testType = testType; _context = context; _cancellationToken = cancellationToken; }
public void Initialize(LoadTest loadTest) { myLoadTest = loadTest; myLoadTest.LoadTestFinished += new EventHandler(myLoadTest_LoadTestFinished); myLoadTest.TestStarting += myLoadTest_TestStarting; myLoadTest.Context["testNumber"] = 0; }
public ILoadTest Build() { var loadTest = new LoadTest(_testType, _configuration, _cancellationToken); if (_handler != null) { loadTest.Heartbeat += _handler; } return loadTest; }
public LoadTestResultBuilder(LoadTest loadTest, List<LoadGenerator> loadGenerators, HeartRateMonitor heartRateMonitor) { if (loadTest == null) { throw new ArgumentNullException("loadTest"); } if (loadGenerators == null) { throw new ArgumentNullException("loadGenerators"); } if (heartRateMonitor == null) { throw new ArgumentNullException("heartRateMonitor"); } _loadTest = loadTest; _loadGenerators = loadGenerators; _heartRateMonitor = heartRateMonitor; }
public DLT EditTest(string folderName, string testName) { LoadTest test = EditLoadTest(folderName, testName); return(new DLT(test)); }
public DltGroupsAndWorkloadPage(LoadTest loadTest) : base(loadTest) { }
public IList <LoadTest> ConvertToDomain(IEnumerable <LoadTestViewModel> viewModels) { List <LoadTest> loadtests = new List <LoadTest>(); LoadTestingContext context = new LoadTestingContext(); foreach (LoadTestViewModel vm in viewModels) { Guid id = vm.Id; LoadTestParameters ltParams = new LoadTestParameters(vm.StartDateUtc, vm.UserCount, vm.DurationSec); Agent agent = context.Agents.FirstOrDefault(a => a.Location.City.Equals(vm.AgentCity, StringComparison.InvariantCultureIgnoreCase) && a.Location.Country.ToLower() == vm.AgentCountry.ToLower()); if (agent == null) { throw new ArgumentException("There is no agent with the given properties."); } Customer customer = context.Customers.FirstOrDefault(c => c.Name.Equals(vm.CustomerName, StringComparison.InvariantCultureIgnoreCase)); if (customer == null) { throw new ArgumentException("There is no customer with the given name."); } Guid?engineerId = null; if (!string.IsNullOrEmpty(vm.EngineerName)) { Engineer engineer = context.Engineers.FirstOrDefault(e => e.Name.Equals(vm.EngineerName, StringComparison.InvariantCultureIgnoreCase)); if (engineer == null) { throw new ArgumentException("There is no engineer with the given properties."); } engineerId = engineer.Id; } LoadTestType ltType = context.LoadTestTypes.FirstOrDefault(t => t.Description.ShortDescription.Equals(vm.LoadTestTypeShortDescription, StringComparison.InvariantCultureIgnoreCase)); if (ltType == null) { throw new ArgumentException("There is no load test type with the given properties."); } Project project = context.Projects.FirstOrDefault(p => p.Description.ShortDescription.ToLower() == vm.ProjectName.ToLower()); if (project == null) { throw new ArgumentException("There is no project with the given properties."); } Scenario scenario = context.Scenarios.FirstOrDefault(s => s.UriOne.Equals(vm.ScenarioUriOne, StringComparison.InvariantCultureIgnoreCase) && s.UriTwo.Equals(vm.ScenarioUriTwo, StringComparison.InvariantCultureIgnoreCase) && s.UriThree.Equals(vm.ScenarioUriThree, StringComparison.InvariantCultureIgnoreCase)); if (scenario == null) { List <Uri> uris = new List <Uri>(); Uri firstUri = string.IsNullOrEmpty(vm.ScenarioUriOne) ? null : new Uri(vm.ScenarioUriOne); Uri secondUri = string.IsNullOrEmpty(vm.ScenarioUriTwo) ? null : new Uri(vm.ScenarioUriTwo); Uri thirdUri = string.IsNullOrEmpty(vm.ScenarioUriThree) ? null : new Uri(vm.ScenarioUriThree); if (firstUri != null) { uris.Add(firstUri); } if (secondUri != null) { uris.Add(secondUri); } if (thirdUri != null) { uris.Add(thirdUri); } scenario = new Scenario(Guid.NewGuid(), uris); context.Scenarios.Add(scenario); context.SaveChanges(); } LoadTest converted = new LoadTest(id, ltParams, agent.Id, customer.Id, engineerId, ltType.Id, project.Id, scenario.Id); loadtests.Add(converted); } return(loadtests); }
public void Initialize(LoadTest loadTest) { _myLoadTest = loadTest; _myLoadTest.LoadTestStarting += new EventHandler(LoadTestStarting); }
public void Initialize(LoadTest loadTest) { m_loadTest = loadTest; warmUpPlusRunDuration = m_loadTest.RunSettings.WarmupTime + m_loadTest.RunSettings.RunDuration; }
public void Initialize(LoadTest loadTest) { _myLoadTest = loadTest; _myLoadTest.LoadTestStarting += new EventHandler(LoadTestStarting); }
public DLT(LoadTest loadTest) { this._loadTest = loadTest; _workload = new DltGroupsAndWorkloadPage(_loadTest); _summary = new DltSummaryPage(_loadTest); }
public OnlineScreen(LoadTest loadTest) { this.LoadTest = loadTest; this.Url = onlineTab.Url; }
public IReport Create(LoadTest loadTest) { return(new ProcessReport { LoadTest = loadTest }); }
public IReport Create(LoadTest loadTest) { return(new GeneralReport { LoadTest = loadTest }); }