public void PerformanceTest1() { _mySelenium = new SeleniumWorker.SelWorker("CreateBorObject"); SelWorker.ChangeLogFileNameWoDate("RollingLogFileAppender", "CreateBorObject"); if (TestContext.DataRow["CreateBorObject"].ToString() == "true") { var result = SelWorker.SendRequestToRest(DateTime.Now, TestContext.DataRow["Category"].ToString(), TestContext.DataRow["Location"].ToString(), TestContext.DataRow["Channel"].ToString(), TestContext.DataRow["Rescan"].ToString(), TestContext.DataRow["Sender"].ToString()).Result; } }
private static void Main() { for (var i = 1; i <= 500; i++) { _mySelenium = new SeleniumWorker.SelWorker("P_Adressänderung"); var result = SelWorker.SendRequestToRest(DateTime.Now, "Adressänderung", "BLN", "Fax", "true", "IP Dynamics\nLyonel-Feininger Str. 28\n80807 München").Result; Console.WriteLine(DateTime.Now.ToString("yyyyMMddHHmmss") + " " + result.ToString()); //_mySelenium.Init(new Uri("http://172.17.10.196:4444/wd/hub"), new Uri("https://iis-srv.post-test.de/Webclient/"), "Chrome"); //_mySelenium.GetBrowserTitle("Voxtron Web Client"); //_mySelenium.Login("IPD_Agent1", "IPD_Agent1" , "true"); ////_mySelenium.Login("IPD_Agent" + i.ToString(), "IPD_Agent" + i.ToString(), "true"); //_mySelenium.AcceptTask(1,1); //_mySelenium.Logout(); //_mySelenium.Terminate(); } }
public void P_Functional4() { _mySelenium = new SeleniumWorker.SelWorker(TestContext.DataRow["TestCaseName"].ToString()); _mySelenium.ChangeLogFileName("RollingLogFileAppender", TestContext.DataRow["TestCaseName"].ToString()); if (TestContext.DataRow["CreateBorObject"].ToString() == "true") { var result = SelWorker.SendRequestToRest(DateTime.Now, TestContext.DataRow["Category"].ToString(), TestContext.DataRow["Location"].ToString(), TestContext.DataRow["Channel"].ToString(), TestContext.DataRow["Rescan"].ToString(), TestContext.DataRow["Sender"].ToString()).Result; Assert.IsTrue(result != null); } _mySelenium.Init(new Uri(TestContext.DataRow["NodeURL"].ToString()), new Uri(TestContext.DataRow["URLTestObject"].ToString()), TestContext.DataRow["Browser"].ToString()); Assert.IsTrue(_mySelenium.GetBrowserTitle("Voxtron Web Client")); _mySelenium.Login(TestContext.DataRow["UserId"].ToString(), TestContext.DataRow["Password"].ToString(), TestContext.DataRow["VoxWebCltStatus"].ToString()); _mySelenium.AcceptTask(0, int.Parse(TestContext.DataRow["ContactCodeItemIdx"].ToString())); _mySelenium.Logout(); _mySelenium.Terminate(); var InstanceCaller = new Thread(new ThreadStart(() => _mySelenium.CreateVideo())); InstanceCaller.Start(); }
public void P_AdressaenderungDetailed() { var test = Extent.CreateTest(TestContext.DataRow["TestCaseName"].ToString(), "This test is about testing usecase Adressänderung within DynamicBrain regression testing"); test.Log(Status.Info, "Step1: Test case has started"); _mySelenium = new SeleniumWorker.SelWorker(TestContext.DataRow["TestCaseName"].ToString()); if (null != _mySelenium) { test.Log(Status.Pass, "Step2: Selenium instance could by serialized"); } _mySelenium.ChangeLogFileName("RollingLogFileAppender", TestContext.DataRow["TestCaseName"].ToString()); // Check weather to send task to Rest if (TestContext.DataRow["CreateBorObject"].ToString() == "true") { var result = SelWorker.SendRequestToRest(DateTime.Now, TestContext.DataRow["Category"].ToString(), TestContext.DataRow["Location"].ToString(), TestContext.DataRow["Channel"].ToString(), TestContext.DataRow["Rescan"].ToString(), TestContext.DataRow["Sender"].ToString()).Result; test.Log(Status.Pass, "Step3: Task (Bor-Object) has been created: " + TestContext.DataRow["Category"].ToString() + " ContactID: " + result.ToString()); Assert.IsTrue(result != null); } _mySelenium.Init(new Uri(TestContext.DataRow["NodeURL"].ToString()), new Uri(TestContext.DataRow["URLTestObject"].ToString()), TestContext.DataRow["Browser"].ToString()); test.Log(Status.Pass, "Step4: Selenium-Initialization has been performed"); var browserTitle = _mySelenium.GetBrowserTitle("Voxtron Web Client"); Assert.IsTrue(browserTitle); var ScreenShotImagePath1 = SelWorker.GetScreenShot(ref _mySelenium._driver); test.Log(Status.Info, "Snapshot below: " + test.AddScreenCaptureFromPath(ScreenShotImagePath1, "CheckBrowserName")); test.Log(Status.Pass, "Step5: Browser Title: Voxtron Web Client: " + browserTitle); _mySelenium.Login(TestContext.DataRow["UserId"].ToString(), TestContext.DataRow["Password"].ToString(), TestContext.DataRow["VoxWebCltStatus"].ToString()); test.Log(Status.Pass, "Step6: Login has been performed!"); test.Log(Status.Info, "User: "******"UserId"].ToString()); test.Log(Status.Info, "Password: "******"Password"].ToString()); test.Log(Status.Info, "Client status: " + TestContext.DataRow["VoxWebCltStatus"].ToString()); test.Log(Status.Info, "Snapshot below: " + test.AddScreenCaptureFromPath(SelWorker.GetScreenShot(ref _mySelenium._driver), "CheckStatusAfterLogin")); _mySelenium.AcceptTask(1, int.Parse(TestContext.DataRow["ContactCodeItemIdx"].ToString())); test.Log(Status.Pass, "Step 7: Task has been accpeted"); _mySelenium.Logout(); test.Log(Status.Info, "Snapshot below: " + test.AddScreenCaptureFromPath(SelWorker.GetScreenShot(ref _mySelenium._driver), "CheckStatusAfterLogout")); test.Log(Status.Pass, "Step 8: Logout has been performed"); _mySelenium.Terminate(); test.Log(Status.Pass, "Step 9: Selenium Terminated successful"); //Create video in another thread var InstanceCaller = new Thread(new ThreadStart(() => _mySelenium.CreateVideo())); InstanceCaller.Start(); test.Log(Status.Pass, "Steph 10: Video has been created"); test.Log(Status.Pass, "Test case has successfully passed"); }