private TestRunStartInfo ConvertKeyword(string keyword, Dictionary <string, string> testparameters) { TestRunStartInfo TestRunStartInfo = new TestRunStartInfo(); TestRunStartInfo.AgentName = "localhost"; TestRunStartInfo.BazookaRepositoryNetworkDir = ConfigManager.BazookaRepositoryNetworkDir; TestRunStartInfo.BazookaReposityPath = ConfigManager.BazookaReposityPath; TestRunStartInfo.BuildNumber = "null"; TestRunStartInfo.BazookaWorkingDirectory = ConfigManager.BazookaWorkingDirectory; TestRunStartInfo.ConnectionString = ConfigManager.ConnectionString; TestRunStartInfo.DataFilesDir = ConfigManager.BazookaDataFilesDir; TestRunStartInfo.Iteration = null; TestRunStartInfo.RunType = null; TestRunStartInfo.ShutdownDelay = 0; //External optional TestRunStartInfo.StartNewInstence = _startnewinstence; TestRunStartInfo.ShutdownOnCompletion = _shutdownoncompletion; TestRunStartInfo.StartingStep = _startingstep; TestRunStartInfo.EndingStep = _endingstep; TestRunStartInfo.StepToRun = null; TestRunStartInfo.ShouldCreateResultFiles = ShouldCreateResultFiles; TestRunStartInfo.TestRunParameters = testparameters; TestRunStartInfo.TeamProject = "Claw"; //TestRunStartInfo.TestFile = Path.Combine(ConfigManager.BazookaTestFile, "SWAT_" + keyword + ".xml"); TestRunStartInfo.TestFile = Path.Combine(Path.GetTempPath(), "SWAT_" + keyword + ".xml"); TestRunStartInfo.TestPlan = "WTF Test"; return(TestRunStartInfo); }
public string Execute(string keyword, Dictionary <string, string> testparameters) { try { WTFTestManager TestManager = new WTFTestManager(); TestRunStartInfo TestRunStartInfo = ConvertKeyword(keyword, testparameters); TestManager.RunTest(TestRunStartInfo); ResultManager ResultManager = TestManager.ResultManager; ProccessResult(ResultManager); return(ResultManager.Result.ToString()); } catch (Exception ex) { MyLogger.Log(ex.Message); return("Failed"); } }