public void SetUp() { string filepath = @"G:\Code\TestLinkTransfer\trunk\Resource\CRM.xml"; XmlAnalysis xmlAnalysis = new XmlAnalysis(filepath); XmlToModel xtm = new XmlToModel(xmlAnalysis.GetAllTestCaseNodes()); this._testCaseList = xtm.OutputTestCases(); }
public void SetUp() { string filepath = @"F:\Code\TestLinkTransfer\trunk\Resource\CRM.xml"; XmlAnalysis xmlAnalysis = new XmlAnalysis(filepath); this._xmlNodes = xmlAnalysis.GetAllTestCaseNodes(); this._node = this._xmlNodes[0]; }
private void XmlToExcel(string fileDir) { _ = GoogleAnalyticsTracker.Tracker("Work", "XmlToExcel"); try { XmlAnalysis xmlAnalysis = new XmlAnalysis(fileDir); XmlToModel xtm = new XmlToModel(xmlAnalysis.GetAllTestCaseNodes()); List <TestCase> tcList = xtm.OutputTestCases(); this._tcDic = new Dictionary <string, List <TestCase> >(); _tcDic.Add("TestCase", tcList); } catch (Exception ex) { this._logger.Error(ex); OutputDisplay.ShowMessage(ex.ToString(), Color.Red); return; } }
/// <summary> /// XML转换为Excel /// </summary> /// <param name="fileDir">文件路径</param> private void XmlToExcel(string fileDir) { try { XmlAnalysis xmlAnalysis = new XmlAnalysis(fileDir); XmlToModel xtm = new XmlToModel(xmlAnalysis.GetAllTestCaseNodes()); List <TestCase> tcList = xtm.OutputTestCases(); this._tcDic = new Dictionary <string, List <TestCase> >(); _tcDic.Add("TestCase", tcList); ExcelHandler eh = new ExcelHandler(tcList); eh.WriteExcel(); } catch (Exception ex) { this._logger.Error(ex); OutputDisplay.ShowMessage(ex.ToString(), Color.Red); return; } }