private static void CreateInitialHtmlSteps() { for (int i = 0; i < CurrentTestCase.GetSteps().Count(); i++) { var step = "<tr ><td style=\"white - space:nowrap\">" + CurrentTestCase.GetSteps()[i].description + "</td><td style=\"white - space:nowrap\">" + CurrentTestCase.GetSteps()[i].status + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[i].RunTime + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[i].details + "</td></tr>"; HtmlReport[HtmlHeader.Count + 3 + i] = step; } }
public static void UpdateHtmlStep(int stepPosition) { //Update Step Data if (CurrentTestCase.GetSteps()[stepPosition].status.Equals("Passed")) { var step = "<tr class=\"success\"><td style=\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].description + "</td><td style=\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].status + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].RunTime + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].details + "</td></tr>"; HtmlReport[HtmlHeader.Count + 3 + stepPosition] = step; } if (CurrentTestCase.GetSteps()[stepPosition].status.Equals("Failed")) { var step = "<tr class=\"danger\"><td style=\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].description + "</td><td style=\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].status + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].RunTime + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].details + "</td></tr>"; HtmlReport[HtmlHeader.Count + 3 + stepPosition] = step; } if (CurrentTestCase.GetSteps()[stepPosition].status.Equals("Not Run")) { var step = "<tr><td style=\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].description + "</td><td style=\"white - space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].status + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].RunTime + "</td><td style =\"white-space:nowrap\">" + CurrentTestCase.GetSteps()[stepPosition].details + "</td></tr>"; HtmlReport[HtmlHeader.Count + 3 + stepPosition] = step; } }