我就不贴所有的了,如果有谁想要所有源码和应用程序,可以密我
这里我贴下如何在第一次运行的时候自动建立一个ALMConfig的xml文件
private static void CreateALMConfigFile() { ALMConnect ac1 = new ALMConnect(); ac1.Url = Properties.Resources.ALM_SERVER_URL; ac1.Id = Properties.Resources.USERNAME; ac1.Pwd = Properties.Resources.PASSWORD; ac1.Domain = Properties.Resources.ALM_DOMAIN; ac1.Project = Properties.Resources.ALM_PROJECT; ac1.TestSetInfo = new TestSetData(); ac1.TestSetInfo.FolderPath = @"Root\SmokeTests\ProductAndPricing"; ac1.TestSetInfo.TestSetName = DateTime.Now.ToString("dd-MMM-yyyy HHmm") + " TrialRun"; ac1.TestSetInfo.Status = "Open"; ac1.TestSetInfo.Attachment = @"C:\ATResult\Attachment\Report.txt"; Console.WriteLine("Created: " + CONFIG_FILE_NAME); Console.WriteLine(" - = - AML Config - = -"); Console.WriteLine("ALM URL: " + ac1.Url); Console.WriteLine("ALM Domain: " + ac1.Domain); Console.WriteLine("ALM Project: " + ac1.Project); string xmlText = XMLUtils.XMLUtils.SerializedToXML(typeof(ALMConnect), ac1); System.IO.File.WriteAllText(@ABPATH+CONFIG_FILE_NAME, xmlText); }
时间: 2024-10-10 13:16:22