public async Async.Task <Task?> GetRegressionReportTask(RegressionReport report) { if (report.CrashTestResult.CrashReport != null) { return(await _context.TaskOperations.GetByJobIdAndTaskId(report.CrashTestResult.CrashReport.JobId, report.CrashTestResult.CrashReport.TaskId)); } if (report.CrashTestResult.NoReproReport != null) { return(await _context.TaskOperations.GetByJobIdAndTaskId(report.CrashTestResult.NoReproReport.JobId, report.CrashTestResult.NoReproReport.TaskId)); } _logTracer.Error($"unable to find crash_report or no repro entry for report: {JsonSerializer.Serialize(report)}"); return(null); }
public string getRegressionReport(string runName) { List <RegressionReport> RegressionReports = new List <RegressionReport>(); string[] queryParams = new string[] { runName }; string query = QueryHelperService.QueryDictionary["GetRegressionReport"]; var parsedQuery = string.Format(query, queryParams); using (SqlConnection conn = new SqlConnection(_connectionString)) { using (SqlCommand command = new SqlCommand(parsedQuery, conn)) { conn.Open(); using (var reader = command.ExecuteReader()) { while (reader.HasRows) { while (reader.Read()) { var regressionReport = new RegressionReport(); regressionReport.ScenarioHeaderId = reader.GetInt32(0); regressionReport.ScenarioName = reader.GetString(1); regressionReport.ModuleName = reader.GetString(2); regressionReport.ScenarioRunStatus = reader.GetString(3); regressionReport.LogType = reader.GetString(4); regressionReport.Log = reader.GetString(5).Replace("\r\n", " ").Replace("\n", " ").Replace("\r", " "); RegressionReports.Add(regressionReport); } reader.NextResult(); } } } } string jsonstring = JsonConvert.SerializeObject(RegressionReports); JArray json = JArray.Parse(jsonstring); jsonstring = _excelService.WriteTsv <JArray>(json); return(jsonstring); }
public bool RegressionReport(RegressionReport e) { return(Test(e)); }