static void Main(string[] args) { ConsoleWriter.WriteLine(Resources.GeneralStarted); if (args.Count() == 0 || args.Contains("/?")) { ShowHelp(); return; } for (int i = 0; i < args.Count(); i = i + 2) { string key = args[i].StartsWith("-") ? args[i].Substring(1) : args[i]; string val = i + 1 < args.Count() ? args[i + 1].Trim() : String.Empty; argsDictionary[key] = val; } string paramFileName, runtype; string failOnTestFailed = "N"; argsDictionary.TryGetValue("runtype", out runtype); argsDictionary.TryGetValue("paramfile", out paramFileName); TestStorageType enmRuntype = TestStorageType.Unknown; if (!Enum.TryParse<TestStorageType>(runtype, true, out enmRuntype)) enmRuntype = TestStorageType.Unknown; if (string.IsNullOrEmpty(paramFileName)) { ShowHelp(); return; } var apiRunner = new Launcher(failOnTestFailed, paramFileName, enmRuntype); apiRunner.Run(); }
public void TestQcTestSetFolderFromAPIRunner() { string file1 = "c:\\stam1.ini"; JavaProperties props = new JavaProperties(); props["TestSet1"] = "Aaron\\"; props["TestSet2"] = "Tomer"; props["almServer"] = "http://vmsoa22:8080/qcbin"; props["almUser"] = "******"; props["almPassword"] = ""; props["almDomain"] = "Default"; props["almProject"] = "Aaron"; props["almRunMode"] = "RUN_LOCAL"; props["almTimeout"] = "-1"; props["almRunHost"] = ""; props.Save(file1, ""); Launcher runner = new Launcher("false", file1, TestStorageType.Alm); runner.Run(); }