public long RunScenario(Scenario model) { log.Debug(Debugging.HatcheryService_Invoked); var scenarioExecution = new ScenarioExecution { ScenarioId = model.Id, Started = DateTime.UtcNow, Status = ExecutionStatus.Created }; executionRepository.Add(scenarioExecution); LoadTestScenario scenario = Load(model); scenario.ExecutionId = scenarioExecution.Id; using (var wcf = GetWcfConnectionToDrone()) { log.Debug(Debugging.HatcheryService_Request); wcf.Channel.StartLoadTest(scenario); log.Debug(Debugging.HatcheryService_Response); } return(scenarioExecution.Id); }
public ActionResult Scenario(long id) { ScenarioExecution execution = executionService.GetById(id); IEnumerable <Snapshot> snapshots = snapshotService.GetByScenarioExecution(execution); IList <SnapshotModel> snapshotModel = mapper.Map <IEnumerable <Snapshot>, IList <SnapshotModel> >(snapshots); var reportModel = new ReportModel { ExecutionId = id, Snapshots = snapshotModel, Status = execution.Status.ToString() }; var json = JsonConvert.SerializeObject(reportModel); var model = new ReportViewModel { Report = reportModel, Json = new MvcHtmlString(json) }; return(View(model)); }
public IEnumerable <Snapshot> GetByScenarioExecution(ScenarioExecution execution) { return(GetByScenarioExecutionId(execution.Id)); }
public void Update(ScenarioExecution scenarioExecution) { connection.Update(scenarioExecution); }
public ScenarioExecution Add(ScenarioExecution scenarioExecution) { connection.Insert(scenarioExecution); return(scenarioExecution); }
public ScenarioExecution Add(ScenarioExecution scenarioExecution) { executionRepository.Add(scenarioExecution); return(scenarioExecution); }
public void Update(ScenarioExecution scenarioExecution) { executionRepository.Update(scenarioExecution); }