Esempio n. 1
0
            public void AddActivityType()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_AddActivityType");
                FpActivityTypesPage activityTypesPage = new FpActivityTypesPage();

                strTestCaseNo = "TC001_Reg";
                strtblname    = "automation_activitytype";
                strTestType   = "Regression";

                var connection            = new ConnectToMySQL_Fetch_TestData();
                var testdataActivityBoard = connection.Select(strtblname, strTestCaseNo, strTestType);

                string strTDShortCode        = testdataActivityBoard[3];
                string strTDActivityTypeName = testdataActivityBoard[4];
                string strTDColour           = testdataActivityBoard[5];

                activityTypesPage.AddActivitydetails(strTDShortCode, strTDActivityTypeName, strTDColour);

                Thread.Sleep(5000);
                string[] strFPActivityName = activityTypesPage.RetrieveActivitydetails(strTDActivityTypeName);

                try
                {
                    Assert.AreEqual(strFPActivityName[1], strTDActivityTypeName);
                    PropertiesCollection.test.Log(Status.Pass, "ADD ACTIVITY TYPE => Activity Type: " + strTDActivityTypeName + " created and validated");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "ADD ACTIVITY TYPE => Activity Type creation has failed");
                }
            }
Esempio n. 2
0
           public void TS05_PlanningBoard_TC01_AddActivityTypes()
           {
               PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS05_PlanningBoard_TC01_AddActivityTypes");

               FpActivityTypesPage ActivityTypes = new FpActivityTypesPage();

               String strTestCaseNo = "TC001";
               String strtblname = "automation_activitytype";
               String strTestType = "Smoke";

                string strTDActivityShortCode = String.Empty;
                string strTDActivityName = String.Empty;
                string strTDActivityColour = String.Empty;

                /* Get test data from MySQL */

                var connection = new ConnectToMySQL_Fetch_TestData();
                var testdataActivityTypes = connection.Select(strtblname, strTestCaseNo, strTestType);

                strTDActivityShortCode = testdataActivityTypes[3];
                strTDActivityName = testdataActivityTypes[4];
                strTDActivityColour = testdataActivityTypes[5];

                ActivityTypes.AddActivitydetails(strTDActivityShortCode, strTDActivityName, strTDActivityColour);
                 //ActivityTypes.AddActivitydetails(strTDActivityShortCode, strTDActivityName);
                String[] strFPwebActivityName = ActivityTypes.RetrieveActivitydetails(strTDActivityName);

                try
                {
                    Assert.AreEqual(strTDActivityName, strFPwebActivityName[1]);
                    PropertiesCollection.test.Log(Status.Pass, "Activity: " + strFPwebActivityName[1] + " created and validated");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Activity Name: " + strTDActivityName +"and" + strFPwebActivityName[1] + "is not matching");
                    throw;
                }

            }