load strings with results summary details

Download and share automation modules and examples.
Posts: 1
Joined: Thu Dec 23, 2021 12:20 pm

load strings with results summary details

Post by LisaK2009 » Tue Jul 11, 2023 1:19 pm

I have a requirement to record in either a CSV or Excel file the number of success, fails and blocked test cases for each time a solution is run to provide management with a matrix of how often the solution is run and summarise results. I currently have this code to write to an excel spread sheet

Code: Select all

			string xlPath = "[i][filePath][/i]";
			Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
			Microsoft.Office.Interop.Excel.Workbook xlBook = xlApp.Workbooks.Open(xlPath);
			Microsoft.Office.Interop.Excel.Worksheet xlSheet = (Worksheet)xlBook.Worksheets["Sheet1"];
			Microsoft.Office.Interop.Excel.Range xlrange = (Range)xlSheet.Cells[2,2];
			xlApp.DisplayAlerts = false;
			string[] sArray = new string[] { TestSuiteName, StartDTG, SuiteTime.ToString("mm\\:ss"), sEnviroment , sDomian , sServerName};
			Range rng = xlApp.get_Range("A2", "F2");
			rng.Value = sArray;
I have noticed that the details I need to include/add to the above report are in the rxlog.data file.

Is there a way of getting the details from the rxlog.data file I require or is there a simpler method to get these values?