private void buttonNVTDescription_Click(object sender, EventArgs e) { TestSuit testSuit = new TestSuit(null); string result = testSuit.Open(textBoxNVTTestSuitFile.Text); if (result == null) { NVTTestDescription nvtTestDescription = new NVTTestDescription(testSuit); nvtTestDescription.CreateExcelDescription(); } else { MessageBox.Show(result, "Error"); } }
private void buttonTestSuitFileSelect_Click(object sender, EventArgs e) { DialogResult dialogResult = openFileDialog.ShowDialog(); if (dialogResult == DialogResult.OK) { textBoxTestSuitFile.Text = openFileDialog.FileName; m_testSuit = new TestSuit(textBoxLogFile.Text); string result = m_testSuit.Open(textBoxTestSuitFile.Text); if (result == null) { textBoxLog.Text = m_testSuit.TestSuitInfo; } else { textBoxLog.Text = result; } } }
private void OpenTestSuitForTest() { m_testSuitForTest = new TestSuit(textBoxTestResult.Text); string result = m_testSuitForTest.Open(comboBoxTestSuitTest.Text); treeViewTests.Nodes.Clear(); if (result == null) { foreach (XmlNode service in m_testSuitForTest.XMLDocument.SelectNodes("TestSuit/TestList/Service[@enabled=\"true\"]")) { TreeNode treeNodeService = new TreeNode(); treeNodeService.Text = "[" + service.Attributes.GetNamedItem("id").InnerText + "] " + service.Attributes.GetNamedItem("name").InnerText; treeViewTests.Nodes.Add(treeNodeService); foreach (XmlNode command in service.SelectNodes("TestGroup[@enabled=\"true\"]")) { TreeNode treeNodeCommand = new TreeNode(); treeNodeCommand.Text = "[" + command.Attributes.GetNamedItem("id").InnerText + "] " + command.Attributes.GetNamedItem("command").InnerText; treeNodeService.Nodes.Add(treeNodeCommand); foreach (XmlNode test in command.SelectNodes("Test[@enabled=\"true\"]")) { TreeNode treeNodeTest = new TreeNode(); treeNodeTest.Text = "[" + test.Attributes.GetNamedItem("id").InnerText + "] " + test.FirstChild.InnerText; treeNodeTest.Tag = test; treeNodeCommand.Nodes.Add(treeNodeTest); } } } } else { MessageBox.Show(result, "Error"); } }
public NVTTestDescription(TestSuit testSuit) { m_testSuit = testSuit; }