// For GUI test only private static string GetHierarchyFullName(XmlReport.GUITest.StepReport stepReport, string split = " / ") { string hierarchyName = stepReport.Name; GeneralReportNode parentReport = stepReport.Owner as GeneralReportNode; while (parentReport != null) { string name = parentReport.Name; if (parentReport is XmlReport.GUITest.ContextReport) { parentReport = parentReport.Owner as GeneralReportNode; continue; } else if (parentReport is XmlReport.GUITest.ActionIterationReport actionIterationReport) { // if it is GUI action iteration, prepend "Action Iteration" term name = string.Format("{0} {1}", Properties.Resources.PropName_ActionIteration, actionIterationReport.Index); } else if (parentReport is XmlReport.GUITest.IterationReport iterationReport) { // if it is GUI iteration, prepend "Iteration" term name = string.Format("{0} {1}", Properties.Resources.PropName_Iteration, iterationReport.Index); } // concat hierarchy name hierarchyName = name + split + hierarchyName; parentReport = parentReport.Owner as GeneralReportNode; } return(hierarchyName); }
public static string GetBCHierarchyName(BusinessComponentReport bcReport, string split = " / ") { string hierarchyName = bcReport.Name; GeneralReportNode parentReport = bcReport.Owner as GeneralReportNode; while (parentReport != null) { string name = parentReport.Name; // if it is iteration, prepend "Iteration" term IterationReport iterationReport = parentReport as IterationReport; if (iterationReport != null) { name = Properties.Resources.PropName_Iteration + iterationReport.Name; } // if it is branch, use the case name since the branch case node name is empty BranchReport branchReport = parentReport as BranchReport; if (branchReport != null) { name = Properties.Resources.PropName_Prefix_BPTBranchCase + branchReport.CaseName; } // concat hierarchy name hierarchyName = name + split + hierarchyName; parentReport = parentReport.Owner as GeneralReportNode; } return(hierarchyName); }
private IEnumerable <testsuiteProperty> ConvertTestsuiteCommonProperties(GeneralReportNode reportNode) { return(new testsuiteProperty[] { new testsuiteProperty(Properties.Resources.PropName_TestingTool, Input.TestingToolNameVersion), new testsuiteProperty(Properties.Resources.PropName_OSInfo, Input.OSInfo), new testsuiteProperty(Properties.Resources.PropName_Locale, Input.Locale), new testsuiteProperty(Properties.Resources.PropName_LoginUser, Input.LoginUser), new testsuiteProperty(Properties.Resources.PropName_CPUInfo, Input.CPUInfoAndCores), new testsuiteProperty(Properties.Resources.PropName_Memory, Input.TotalMemory) }); }
// For API test only private static string GetHierarchyFullName(XmlReport.APITest.ActivityReport activityReport, int iterationNum, string split = " / ") { string hierarchyName = activityReport.Name; GeneralReportNode parentReport = activityReport.Owner as GeneralReportNode; while (parentReport != null) { string name = parentReport.Name; if (parentReport is XmlReport.APITest.IterationReport iterationReport) { // if it is API iteration, prepend "Iteration" term name = string.Format("{0} {1}", Properties.Resources.PropName_Iteration, iterationNum); } // concat hierarchy name hierarchyName = name + split + hierarchyName; parentReport = parentReport.Owner as GeneralReportNode; } return(hierarchyName); }