/// <summary> /// The write status file to testlab. /// </summary> /// <param name="status"> /// The status. /// </param> public void WriteStatusFileToTestlab(TestStatus.Status status) { string jobFileLocation = this.testlabShare + this.testlabJobLocation + "\\" + this.vmName; string[] files = Directory.GetFiles(jobFileLocation, "*.txt"); string statusString = string.Empty; if (status == TestStatus.Status.Running) { statusString = "test_running"; } else if (status == TestStatus.Status.ConfigNotCopied) { statusString = "test_config_not_copied"; } else if (status == TestStatus.Status.Finished) { statusString = "testfinished_VM"; } else if (status == TestStatus.Status.Timeout) { statusString = "timeout"; } if (files.Length > 0) { if (File.Exists(files[0])) { File.Delete(files[0]); } } string pathAndStatus = jobFileLocation + "\\" + statusString + ".txt"; Report.Info("PATH AND STATUS " + pathAndStatus); File.Create(pathAndStatus); }
/// <summary> /// The write status file. /// </summary> /// <param name="status"> /// The status. /// </param> public static void WriteStatusFile(TestStatus.Status status) { (new TestlabHelper()).WriteStatusFileToTestlab(status); }