public static void WrapperToAseemblyInit(Microsoft.VisualStudio.TestTools.WebTesting.WebTestContext context)
        {
            try
            {
                Logger.WriteGeneralLog("INit Here ...................WrapperToAseemblyInit");
                //first get controller ip address
                //controllerIPAddress = CommonFunctions.GetControllerHostIPAddress();

                controllerIPAddress = context.ControllerName;
                controllerIPAddress = controllerIPAddress.Split(':')[0].ToString().ToLower(); //Using this we can get controller IP - Fix Applied

                // if (controllerIPAddress.ToLower().Equals("localhost"))

                //controllerIPAddress = CommonFunctions.GetControllerHostIPAddress(); //Using this code to get Controller IP while debug.

                //Read Table Names from XML
                objTableType = CommonFunctions.GetInputTableNamesFromXML();
                //read load test setting config
                CommonFunctions.ReadLoadTestSettingsConfig();
                //new System.Collections.Generic.Mscorlib_DictionaryDebugView<string, string>(appSettings).Items[1].Key;
                // environment= new System.Collections.Generic.Mscorlib_DictionaryDebugView<string, string>(appSettings).Items[1].Value
                //Get environment Name
                enviornmentName = appSettings["EnvironmentToPoint"];
                TwfcndURL       = appSettings["TwfcndURL"];
                //Get Load balancer Name
                switch (enviornmentName)
                {
                case "Perf":
                    LoginMain     = appSettings["Perf_LoginMain"];
                    AccountingURL = appSettings["Perf_AccountingURL"];
                    break;

                case "RC_Azure":
                    LoginMain     = appSettings["RC_Azure_LoginMain"];
                    AccountingURL = appSettings["RC_Azure_AccountingURL"];
                    break;
                }
                Password = appSettings["Password"];

                //RTmonitor log
                rtMonitorLog = Convert.ToBoolean(appSettings["RTMonitorLog"].ToLower());
                //InputData Fetching Setting
                DataSetToUse_CreateInvoice         = appSettings["DataSetToUse_CreateInvoice"];
                InputSetOrder_CreateInvoice        = appSettings["InputSetOrder_CreateInvoice"];
                DataSetToUse_EditInvoice           = appSettings["DataSetToUse_EditInvoice"];
                InputSetOrder_EditInvoice          = appSettings["InputSetOrder_EditInvoice"];
                DataSetToUse_CompanySettings       = appSettings["DataSetToUse_CompanySettings"];
                InputSetOrder_CompanySettings      = appSettings["InputSetOrder_CompanySettings"];
                DataSetToUse_ExtendedTBReport      = appSettings["DataSetToUse_ExtendedTBReport"];
                InputSetOrder_ExtendedTBReport     = appSettings["InputSetOrder_ExtendedTBReport"];
                DataSetToUse_NeoFixedAsset         = appSettings["DataSetToUse_NeoFixedAsset"];
                InputSetOrder_NeoFixedAsset        = appSettings["InputSetOrder_NeoFixedAsset"];
                DataSetToUse_NeoSalesInvoices      = appSettings["DataSetToUse_NeoSalesInvoices"];
                InputSetOrder_NeoSalesInvoices     = appSettings["InputSetOrder_NeoSalesInvoices"];
                DataSetToUse_ClassicSalesInvoices  = appSettings["DataSetToUse_ClassicSalesInvoices"];
                InputSetOrder_ClassicSalesInvoices = appSettings["InputSetOrder_ClassicSalesInvoices"];
                DataSetToUse_CreateTransaction     = appSettings["DataSetToUse_CreateTransaction"];
                InputSetOrder_CreateTransaction    = appSettings["InputSetOrder_CreateTransaction"];
                DataSetToUse_ReadTransaction       = appSettings["DataSetToUse_ReadTransaction"];
                InputSetOrder_ReadTransaction      = appSettings["InputSetOrder_ReadTransaction"];
                DataSetToUse_UserAccessSettings    = appSettings["DataSetToUse_UserAccessSettings"];
                InputSetOrder_UserAccessSettings   = appSettings["InputSetOrder_UserAccessSettings"];
                DataSetToUse_DocumentManagement    = appSettings["DataSetToUse_DocumentManagement"];
                InputSetOrder_DocumentManagement   = appSettings["InputSetOrder_DocumentManagement"];
                DataSetToUse_PayAndCollectRun      = appSettings["DataSetToUse_PayAndCollectRun"];
                InputSetOrder_PayAndCollectRun     = appSettings["InputSetOrder_PayAndCollectRun"];
                DataSetToUse_ExportCustomers       = appSettings["DataSetToUse_ExportCustomers"];
                InputSetOrder_ExportCustomers      = appSettings["InputSetOrder_ExportCustomers"];

                //read controller config section
                CommonFunctions.ReadControllerSettingsConfig();
                //inside this function controller ipaddress is matched with machine name and then the controllerName variable is set along with its location on environment
                CommonFunctions.GetControllerDestinationAndNameOnEnviornmentUsingIP(controllerIPAddress);
                //Generate Connection string from controller ip
                m_ConnectionString = CommonFunctions.InputDBConnectionString(controllerBelongstoEnv);

                ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                RTMonitor.SetHost(controllerIPAddress, 11000, RTMonitor.ConnectionMethod.UDP);

                Logger.WriteGeneralLog("controllerIPAddress: " + controllerIPAddress);

                System.Threading.Interlocked.Increment(ref assmCnt);
                if (Convert.ToInt32(context.AgentCount) > 0)
                {
                    agentCount = context.AgentCount;
                }
                Logger.WriteGeneralLog("agentCount " + agentCount.ToString());

                Logger.WriteGeneralLog("Initialize input table start - InitializeTwinfieldWeb");

                CustomDS.Instance.InitializeWeb(m_ConnectionString, context);

                Logger.WriteGeneralLog("Initialize input table end - InitializeTwinfieldWeb" + context["ScenarioName"].ToString());
                Thread.AllocateNamedDataSlot("Params" + context["ScenarioName"].ToString());

                AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory);
            }
            catch (Exception ex)
            {
                Logger.WriteGeneralLog("Exception in AssemblyInit!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : " + System.Environment.MachineName);
                Logger.WriteGeneralLog(ex.ToString());
                throw ex;
            }
        }
 public static void AssemblyInitWeb(Microsoft.VisualStudio.TestTools.WebTesting.WebTestContext context)
 {
     Logger.WriteGeneralLog("INit Here ...................AssemblyInitWeb");
     WrapperToAseemblyInit(context);
 }