码迷,mamicode.com
首页 > 其他好文 > 详细

建立连接ALM的xml config文件

时间:2015-10-11 11:25:23      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:

我就不贴所有的了,如果有谁想要所有源码和应用程序,可以密我

这里我贴下如何在第一次运行的时候自动建立一个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);
        }

 

建立连接ALM的xml config文件

标签:

原文地址:http://www.cnblogs.com/goldenRazor/p/4868876.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!