/// <summary> /// Writes a pretty-printed .csv compatible string to data file /// </summary> /// <param name="test">The test whose results will be captured in the file change</param> public void WriteParadeTestResultToFile(ParadeTest test) { if (!File.Exists(filePath)) { createBaseFile(); } string result = ""; result += test.TestDate.ToString(dateFormat) + ","; ParadeConfiguration testConfig = test.TestConfiguration; result += testConfig.ConfigName + ","; #if UNITY_EDITOR result += "Editor" + ","; #elif DEVELOPMENT_BUILD result += "Development Build" + ","; #else result += "Production Build" + ","; #endif result += test.ElapsedTestTime + ","; result += test.TestFrameCount + ","; result += (test.TestFrameCount / test.ElapsedTestTime) + ""; result += Environment.NewLine; try { File.AppendAllText(filePath, result); } catch (Exception e) { Debug.LogError("FileWriter.WriteParadeTestResultToFile():: Exception ocurred: '" + e.Message + "'"); } finally { } }
public ParadeTest(ParadeConfiguration config) { testConfiguration = config; }