Beispiel #1
0
        public void InitSimpleTest()
        {
            MainWindow.InitGameIDComboBox(MainWindow.Instance.comboBoxGameID, SimpleTestGameID);
            MainWindow.InitIPAdressComboBox(MainWindow.Instance.comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(0));

            m_NetTestUser.InitEngine();
            m_NetTestUser.SetPrintHanlde(PrintStatus);

            UpdateUI();
        }
Beispiel #2
0
        //-- Login And 10KB Test..
        public void StartTest(bool bAutoClick, int ClickIndex)
        {
            string PreFixUserID = MainWindow.Instance.PreFixUserID.Text.Trim();

            if (string.IsNullOrEmpty(PreFixUserID))
            {
                MessageBox.Show("Enter valid PreFixUserID");
                return;
            }

            int MaxConnectionUser = Convert.ToInt32(MainWindow.Instance.TenKBMaxUserNumber.Text);

            if (MaxConnectionUser > MaxUser)
            {
                MessageBox.Show(string.Format("{0} users limit!!", MaxUser));
                return;
            }

            int PrefixStartID = Convert.ToInt32(MainWindow.Instance.UserBeginIdNum.Text);

            if (PrefixStartID <= 0)
            {
                MessageBox.Show("Enter valid StartID!! be Higher than Zero");
                return;
            }

            if (bAutoClick == false)
            {
                mReTryCount       = 0;
                mFailedReTryCount = 0;
                IsAutoTest        = MainWindow.Instance.TenKBTestAutoCheck.IsChecked == true;

                MainWindow.Instance.buttonSendData_Manaul.IsEnabled  = false;
                MainWindow.Instance.buttonSendData_Manaul.Visibility = Visibility.Hidden;
            }

            if (bAutoClick == true && ClickIndex == 1)
            {
                PrintStatus(1, "ReTry Data Test!!");
            }

            if (bAutoClick == true && ClickIndex == 2)
            {
                mFailedReTryCount++;
            }

            CloseAllConnections();

            mCurrectMaxUser = MaxConnectionUser;

            InitStatusValue();
            UpdateTestUserStateUI();

            MainWindow.Instance.textOutput1.Text = string.Empty;

            var StresssTestGameID = MainWindow.GetGameIDFromUI(MainWindow.Instance.stress_comboBoxGameID_10KB);

            for (int i = 0; i < MaxConnectionUser; i++)
            {
                StressTest_TenKBUser Testuser = new StressTest_TenKBUser();
                Testuser.InitEngine();
                Testuser.SetPrintHanlde(PrintStatus);

                Testuser.m_LoginID = MakeStreesTestUserID(PrefixStartID, PreFixUserID, i);
                Testuser.gameID    = StresssTestGameID;
                mTestTenKBUsers.Add(Testuser);
            }

            ServerAddressRegistry.SaveGameID(0, StresssTestGameID);

            mServerAddress = MainWindow.Instance.GetServerAddressFromUI(1, MainWindow.Instance.stress_comboBoxIPAddress,
                                                                        () =>
            {
                MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(1));
            });


            CreateGroup();

            RunConnectGroup(mCurTestLoginSuccessfulGroupCount, mServerAddress);

            m_TenKBTimer       = new DispatcherTimer();
            m_TenKBTimer.Tick += new EventHandler((object ts, EventArgs te) =>
            {
                for (int i = 0; i < mTestTenKBUsers.Count; i++)
                {
                    mTestTenKBUsers[i].OnTimerTick(UpdateTick);
                }

                if (IsAutoTest)
                {
                    if (IsProgressFailed() && MainWindow.Instance.InfiniteReTryFailedRepeatCheck_10KBTest.IsChecked == true)
                    {
                        mCurDealyReTryTime += UpdateTick;

                        if (mCurDealyReTryTime >= 1000)
                        {
                            mCurDealyReTryTime = 0;
                            mTickCount++;
                            PrintStatus(1, "Plz ReTry Test!! {0}..", 3 - mTickCount);

                            if (mTickCount >= 3)
                            {
                                this.StartTest(true, 2);
                            }
                        }
                    }
                }
                else
                {
                    if (mMainStatus.mLoginSuccessCount != 0 && mMainStatus.mLoginSuccessCount == mTestTenKBUsers.Count)
                    {
                        if (mbStartSend == false)
                        {
                            MainWindow.Instance.buttonSendData_Manaul.IsEnabled  = true;
                            MainWindow.Instance.buttonSendData_Manaul.Visibility = Visibility.Visible;
                        }
                        //PrintStatus(1, "{0} User Login Success Plz SendData Push!!", mTestTenKBUsers.Count);
                    }
                    else
                    {
                        MainWindow.Instance.buttonSendData_Manaul.IsEnabled  = false;
                        MainWindow.Instance.buttonSendData_Manaul.Visibility = Visibility.Hidden;
                    }
                }
            });

            m_TenKBTimer.Interval = new TimeSpan(0, 0, 0, 0, UpdateTick);//, 0, UpdateTick);
            m_TenKBTimer.Start();
        }
 void UpdateServerAddressUI()
 {
     MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(0));
     ServerAddressRegistry.SaveServerAddressToRegistry();
 }
        // Matched And 10KB Chat Test
        public void StartTest(bool bAutoClick, int ClickIndex)
        {
            string PreFixUserID = MainWindow.Instance.PreFixUserID.Text.Trim();

            if (string.IsNullOrEmpty(PreFixUserID))
            {
                MessageBox.Show("Enter valid PreFixUserID");
                return;
            }

            int PrefixStartID = Convert.ToInt32(MainWindow.Instance.UserBeginIdNum.Text);

            if (PrefixStartID <= 0)
            {
                MessageBox.Show("Enter valid StartID!! be Higher than Zero");
                return;
            }

            if (bAutoClick == false)
            {
                mReTryCount       = 0;
                mFailedReTryCount = 0;
            }

            if (bAutoClick == true && ClickIndex == 1)
            {
                PrintStatus(1, "ReTry PartyChat Test!!");
            }

            if (bAutoClick == true && ClickIndex == 2)
            {
                mFailedReTryCount++;
            }

            CloseAllConnections();
            InitStatusValue();

            UpdateMatchedChatTestStatueUI();

            MainWindow.Instance.textOutput3.Text = string.Empty;
            var StresssTestGameID = MainWindow.GetGameIDFromUI(MainWindow.Instance.stress_comboBoxGameID_Matced10KB);


            for (int i = 0; i < 4; i++)
            {
                StressTest_Matched_Chat TestMatchedChatUser = new StressTest_Matched_Chat();
                TestMatchedChatUser.InitEngine();
                TestMatchedChatUser.SetPrintHanlde(PrintStatus);

                TestMatchedChatUser.m_LoginID = MakeStreesTestUserID(PrefixStartID, PreFixUserID, i);

                if (i == 0)
                {
                    TestMatchedChatUser.IsPartyBoss = true;
                    mCurPartyBossName = TestMatchedChatUser.m_LoginID;

                    this.mPartyBoss = TestMatchedChatUser;
                }
                else
                {
                    TestMatchedChatUser.IsPartyBoss = false;
                }

                TestMatchedChatUser.gameID = StresssTestGameID;
                mTestMatchedChatUsers.Add(TestMatchedChatUser);
            }


            UpdateMatchedChatTestStatueUI();

            ServerAddressRegistry.SaveGameID(2, StresssTestGameID);
            NetAddress serverAddress = MainWindow.Instance.GetServerAddressFromUI(1, MainWindow.Instance.stress_comboBoxIPAddress,
                                                                                  () =>
            {
                MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(1));
            });

            //mLoginCurrectConnectedUser

            for (int i = 0; i < mTestMatchedChatUsers.Count; i++)
            {
                mTestMatchedChatUsers[i].RunConnect(serverAddress,
                                                    (StressTest_Matched_Chat user) =>
                {
                    mLoginCurrectConnectedUser++;
                    UpdateMatchedChatTestStatueUI();
                },
                                                    (StressTest_Matched_Chat user, SF.Net.SendMessageLogin l) =>
                {
                    if (l != null)
                    {
                        mLoginCurrectConnectedUser--;
                    }

                    UpdateMatchedChatTestStatueUI();
                },
                                                    (StressTest_Matched_Chat user, int FailedIndex) =>
                {
                    mLoginFailedUserCount++;
                    UpdateMatchedChatTestStatueUI();
                },
                                                    (StressTest_Matched_Chat user) =>
                {
                    mPartyGameSvrCurrectConnectedUser++;
                    UpdateMatchedChatTestStatueUI();
                },
                                                    (StressTest_Matched_Chat user, SF.Net.SendMessageGame l) =>
                {
                    if (l != null)
                    {
                        mPartyGameSvrCurrectConnectedUser--;
                    }

                    UpdateMatchedChatTestStatueUI();
                },
                                                    (StressTest_Matched_Chat user) =>
                {
                    mPartyGameSvrFailedConnectUser++;
                    UpdateMatchedChatTestStatueUI();
                },

                                                    ///
                                                    (StressTest_Matched_Chat user, bool Success) =>
                {
                    if (Success)
                    {
                        mPartyGameSuccessJoinCount++;
                    }

                    UpdateMatchedChatTestStatueUI();
                },

                                                    // Party Create Res
                                                    (StressTest_Matched_Chat user) =>
                {
                    if (!user.IsPartyBoss)
                    {
                        return;
                    }

                    if (mWaitFullJoin != null)
                    {
                        MessageBox.Show("WaitFullJoin did not Stop!!");
                        return;
                    }

                    mPartyGameJoinedCount++;
                    UpdateMatchedChatTestStatueUI();

                    DateTime StartWaitTime = DateTime.Now;

                    mWaitFullJoin = new Thread(new ThreadStart(() =>
                    {
                        bool IsFullReadyJoin = false;
                        while (!IsFullReadyJoin)
                        {
                            if ((StartWaitTime - DateTime.Now).Seconds > 10)
                            {
                                PrintStatus(1, "Plz Retry Chat Test!!");
                                break;
                            }

                            if (mPartyGameSuccessJoinCount == 4)
                            {
                                int FreeUserCount = 0;
                                for (int j = 0; j < mTestMatchedChatUsers.Count; j++)
                                {
                                    if (mTestMatchedChatUsers[j].IsPartyBoss)
                                    {
                                        if (mTestMatchedChatUsers[j].CurState == StressTest_Matched_Chat.eTesterState.PARTY_MATCING)
                                        {
                                            FreeUserCount++;
                                        }
                                    }
                                    else
                                    {
                                        if (mTestMatchedChatUsers[j].CurState == StressTest_Matched_Chat.eTesterState.PARTY_WAIT_INVITE)
                                        {
                                            FreeUserCount++;
                                        }
                                    }
                                }

                                if (FreeUserCount == 4)
                                {
                                    IsFullReadyJoin = true;
                                    break;
                                }
                            }
                            Thread.Sleep(1000);
                        }

                        if (IsFullReadyJoin)    // == 4)
                        {
                            PrintStatus(1, "FullJoin!! Do it Test Invite");
                            OnTestPartyChatInvite();
                        }
                    }));

                    mWaitFullJoin.Start();
                },
                                                    // Party Joined
                                                    (StressTest_Matched_Chat user, bool success) =>
                {
                    if (success)
                    {
                        mPartyGameJoinedCount++;
                        UpdateMatchedChatTestStatueUI();

                        if (mPartyGameJoinedCount == 4)
                        {
                            //-- for..
                            for (int j = 0; j < mTestMatchedChatUsers.Count; j++)
                            {
                                if (mTestMatchedChatUsers[j].IsPartyBoss)
                                {
                                    mTestMatchedChatUsers[j].NextState = StressTest_Matched_Chat.eTesterState.SEND_CHATING;
                                }
                                else
                                {
                                    mTestMatchedChatUsers[j].NextState = StressTest_Matched_Chat.eTesterState.WAIT_RECV_CHATING;
                                }
                            }

                            // Send 1KB Chat Repeat 10
                            for (int scc = 0; scc < SendChatRepeatCount; scc++)
                            {
                                if (mPartyBoss.m_Game.PartyChatMessageCmd(0, mTestSend1KBData[scc]) == 0)
                                {
                                    mPartyOneKBChatSendCount++;

                                    mPartyChatSendTime[scc] = DateTime.Now;
                                    PrintStatus(1, "Send 1KB Chat Repeat {0} Time = {1}  / {2}", scc, mPartyChatSendTime[scc].ToString("hh/mm/ss.fff"), mPartyBoss.m_LoginID);
                                }
                            }

                            //PrintStatus(1, "Send 1KB Chat Repeat {0} Time = {1} ", SendChatRepeatCount, mPartyChatSendTime.ToString("hh/mm/ss.fff"));
                            UpdateMatchedChatTestStatueUI();
                        }
                    }
                    else
                    {
                    }
                },
                                                    (StressTest_Matched_Chat user, bool success) =>
                {
                    if (!user.IsPartyBoss)
                    {
                        return;
                    }

                    if (success)
                    {
                        mPartyOneKBChatSendSuccessCount++;
                        UpdateMatchedChatTestStatueUI();
                    }
                },
                                                    (StressTest_Matched_Chat user) =>
                {
                    mPartyChatRecevice_FinishUserCount++;

                    if (!user.IsPartyBoss)
                    {
                        // 1KB Recved 10
                        mPartyChatLAverageValue = user.GetChatRecved_AverageValue(mPartyChatSendTime[0]);
                        PrintStatus(1, "Receviced 10KB Average Speed = {0}ms / ID ={1}", mPartyChatLAverageValue, user.m_LoginID);
                        UpdateMatchedChatTestStatueUI();
                    }

                    if (mPartyChatRecevice_FinishUserCount == 4)
                    {
                        if (MainWindow.Instance.InfiniteRepeatCheck.IsChecked == true)
                        {
                            System.Threading.Tasks.Task.Delay(3000).ContinueWith(t =>
                            {
                                MainWindow.Instance.btnStressTestMatched_Cp_Chat.Dispatcher.Invoke(new UpdateButtonPress_Delegate(delegate()
                                {
                                    mReTryCount++;
                                    MainWindow.Instance.btnStressTestMatched_Cp_Chat.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
                                }));
                            });
                        }
                    }
                }
                                                    );
            }

            m_MatchedChatTestTimer       = new DispatcherTimer();
            m_MatchedChatTestTimer.Tick += new EventHandler(
                (object ts, EventArgs te) =>
            {
                for (int i = 0; i < mTestMatchedChatUsers.Count; i++)
                {
                    mTestMatchedChatUsers[i].OnTimerTick(UpdateTick);
                }

                if (IsProgressFailed() && MainWindow.Instance.InfiniteReTryFailedRepeattCheck_MatchChat.IsChecked == true)
                {
                    mCurDealyReTryTime += UpdateTick;
                    if (mCurDealyReTryTime >= 1000)
                    {
                        mTickCount++;
                        mCurDealyReTryTime = 0;
                        PrintStatus(1, "Plz ReTry Test!! {0}..", 3 - mTickCount);
                        if (mTickCount == 3)
                        {
                            this.StartTest(true, 2);
                        }
                    }
                }
            });

            m_MatchedChatTestTimer.Interval = new TimeSpan(0, 0, 0, 0, UpdateTick);
            m_MatchedChatTestTimer.Start();
        }
Beispiel #5
0
        public void InitStressTest()
        {
            MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(1));

            InputMethod.SetIsInputMethodEnabled(MainWindow.Instance.UserBeginIdNum, false);


            MainWindow.Instance.PreFixUserID.Text   = ServerAddressRegistry.ReadValue(MainWindow.SAVE_PREFIX_KEY_ID, "Braves");
            MainWindow.Instance.UserBeginIdNum.Text = ServerAddressRegistry.ReadValue(MainWindow.SAVE_USER_BEGIN_NUM_KEY_ID, "3000");

            MainWindow.Instance.TenKBInGroupUserCount.Text = ServerAddressRegistry.ReadValue(MainWindow.SAVE_TENKBGRUCOUNT_KEY_ID, "50");
            MainWindow.Instance.TenKBMaxUserNumber.Text    = ServerAddressRegistry.ReadValue(MainWindow.SAVE_TENKBMAXUSERCOUNT_KEY_ID, "100");

            MainWindow.Instance.MatchInGroupUserCount.Text = ServerAddressRegistry.ReadValue(MainWindow.SAVE_MATCHGRUCOUNT_KEY_ID, "50");
            MainWindow.Instance.MatchKBMaxUserNumber.Text  = ServerAddressRegistry.ReadValue(MainWindow.SAVE_MATCHMAXUSERCOUNT_ID, "100");

            MainWindow.Instance.TestLoginInGroupUserCount.Text = ServerAddressRegistry.ReadValue(MainWindow.SAVE_LOGINTGRUCOUNT_KEY_ID, "50");
            MainWindow.Instance.TestLoginMaxUserNumber.Text    = ServerAddressRegistry.ReadValue(MainWindow.SAVE_LOGINTMAXUSERCOUNT_ID, "100");


            mDataTestWin.InitStressTest();
            mMatcingTestWin.InitStressTest();
            mMatched10KBTestWin.InitStressTest();
            mLoginTestWin.InitStressTest();
        }
Beispiel #6
0
        // Matching Test..
        public void StartTest(bool bAutoClick, int ClickIndex)
        {
            string PreFixUserID = MainWindow.Instance.PreFixUserID.Text.Trim();

            if (string.IsNullOrEmpty(PreFixUserID))
            {
                MessageBox.Show("Enter valid PreFixUserID");
                return;
            }

            int MaxConnectionUser = Convert.ToInt32(MainWindow.Instance.MatchKBMaxUserNumber.Text);

            if (MaxConnectionUser > MaxUser)
            {
                MessageBox.Show(string.Format("{0} users limit!!", MaxUser));
                return;
            }

            int PrefixStartID = Convert.ToInt32(MainWindow.Instance.UserBeginIdNum.Text);

            if (PrefixStartID <= 0)
            {
                MessageBox.Show("Enter valid StartID!! be Higher than Zero");
                return;
            }

            if (bAutoClick == false)
            {
                mReTryCount       = 0;
                mFailedReTryCount = 0;
                // IsAutoTest = MainWindow.Instance.TestMatcingAutoCheck.IsChecked == true;
                //  MainWindow.Instance.buttonManual_Matcing.IsEnabled = false;
                // MainWindow.Instance.buttonManual_Matcing.Visibility = Visibility.Hidden;
            }

            if (bAutoClick == true && ClickIndex == 1)
            {
                PrintStatus(1, "ReTry Matcing Test!!");
            }

            if (bAutoClick == true && ClickIndex == 2)
            {
                mFailedReTryCount++;
            }

            mTestSendDataStatus.Clear();

            CloseAllConnections();
            mCurrectMaxUser = MaxConnectionUser;

            InitStatusValue();
            UpdateMatchingTestStatueUI();

            MainWindow.Instance.textOutput2.Text = string.Empty;

            var StresssTestGameID = MainWindow.GetGameIDFromUI(MainWindow.Instance.stress_comboBoxGameID_Match);

            for (int i = 0; i < MaxConnectionUser; i++)
            {
                StressTest_MatchingUser TestMatchingUser = new StressTest_MatchingUser();
                TestMatchingUser.InitEngine();
                TestMatchingUser.SetPrintHanlde(PrintStatus);

                TestMatchingUser.m_LoginID = MakeStreesTestUserID(PrefixStartID, PreFixUserID, i);
                TestMatchingUser.gameID    = StresssTestGameID;
                mTestMatchingBUsers.Add(TestMatchingUser);
            }

            ServerAddressRegistry.SaveGameID(1, StresssTestGameID);
            mServerAddress = MainWindow.Instance.GetServerAddressFromUI(1, MainWindow.Instance.stress_comboBoxIPAddress,
                                                                        () =>
            {
                MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(1));
            });


            CreateGroup();

            RunConnectGroup(0, mServerAddress);

            m_MatchingTestTimer       = new DispatcherTimer();
            m_MatchingTestTimer.Tick += new EventHandler(UpdateTickProcess);

            m_MatchingTestTimer.Interval = new TimeSpan(0, 0, 0, 0, UpdateTickTime);
            m_MatchingTestTimer.Start();
        }
Beispiel #7
0
        // Matched And 10KB Chat Test
        public void StartTest(bool bAutoClick, int ClickIndex)
        {
            string PreFixUserID = MainWindow.Instance.PreFixUserID.Text.Trim();

            if (string.IsNullOrEmpty(PreFixUserID))
            {
                MessageBox.Show("Enter valid PreFixUserID");
                return;
            }

            int PrefixStartID = Convert.ToInt32(MainWindow.Instance.UserBeginIdNum.Text);

            if (PrefixStartID <= 0)
            {
                MessageBox.Show("Enter valid StartID!! be Higher than Zero");
                return;
            }

            if (bAutoClick == false)
            {
                mReTryCount       = 0;
                mFailedReTryCount = 0;
            }

            if (bAutoClick == true && ClickIndex == 1)
            {
                PrintStatus(1, "ReTry PartyChat Test!!");
            }

            if (bAutoClick == true && ClickIndex == 2)
            {
                mFailedReTryCount++;
            }

            CloseAllConnections();
            InitStatusValue();

            UpdateMatchedChatTestStatueUI();

            MainWindow.Instance.textOutput3.Text = string.Empty;
            var StresssTestGameID = MainWindow.GetGameIDFromUI(MainWindow.Instance.stress_comboBoxGameID_Matced10KB);


            for (int i = 0; i < MaxMatchedTestUserCount; i++)
            {
                StressTest_Matched_Chat TestMatchedChatUser = new StressTest_Matched_Chat();
                TestMatchedChatUser.InitEngine();
                TestMatchedChatUser.SetPrintHanlde(PrintStatus);

                TestMatchedChatUser.m_LoginID = MakeStreesTestUserID(PrefixStartID, PreFixUserID, i);

                if (i == 0)
                {
                    TestMatchedChatUser.IsPartyBoss = true;
                    mCurPartyBossName = TestMatchedChatUser.m_LoginID;

                    this.mPartyBoss = TestMatchedChatUser;

                    TestMatchedChatUser.IsPutRecvChatLog = bPutBossChatLog;
                }
                else
                {
                    TestMatchedChatUser.IsPartyBoss = false;
                }

                TestMatchedChatUser.gameID = StresssTestGameID;
                mTestMatchedChatUsers.Add(TestMatchedChatUser);
            }


            UpdateMatchedChatTestStatueUI();

            ServerAddressRegistry.SaveGameID(2, StresssTestGameID);
            NetAddress serverAddress = MainWindow.Instance.GetServerAddressFromUI(1, MainWindow.Instance.stress_comboBoxIPAddress,
                                                                                  () =>
            {
                MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(1));
            });

            //mLoginCurrectConnectedUser

            RunTestAction(serverAddress);


            m_MatchedChatTestTimer       = new DispatcherTimer();
            m_MatchedChatTestTimer.Tick += new EventHandler(
                (object ts, EventArgs te) =>
            {
                for (int i = 0; i < mTestMatchedChatUsers.Count; i++)
                {
                    mTestMatchedChatUsers[i].OnTimerTick(UpdateTick);
                }

                if (IsProgressFailed() && MainWindow.Instance.InfiniteReTryFailedRepeattCheck_MatchChat.IsChecked == true)
                {
                    mCurDealyReTryTime += UpdateTick;
                    if (mCurDealyReTryTime >= 1000)
                    {
                        mTickCount++;
                        mCurDealyReTryTime = 0;
                        PrintStatus(1, "Plz ReTry Test!! {0}..", 3 - mTickCount);
                        if (mTickCount == 3)
                        {
                            this.StartTest(true, 2);
                        }
                    }
                }
            });

            m_MatchedChatTestTimer.Interval = new TimeSpan(0, 0, 0, 0, UpdateTick);
            m_MatchedChatTestTimer.Start();
        }
        public void StartTest(bool bAutoClick, int ClickIndex)
        {
            string PreFixUserID = MainWindow.Instance.PreFixUserID.Text.Trim();

            if (string.IsNullOrEmpty(PreFixUserID))
            {
                MessageBox.Show("Enter valid PreFixUserID");
                return;
            }

            int MaxConnectionUser = Convert.ToInt32(MainWindow.Instance.TestLoginMaxUserNumber.Text);

            if (MaxConnectionUser > MaxUser)
            {
                MessageBox.Show(string.Format("{0} users limit!!", MaxUser));
                return;
            }

            int PrefixStartID = Convert.ToInt32(MainWindow.Instance.UserBeginIdNum.Text);

            if (PrefixStartID <= 0)
            {
                MessageBox.Show("Enter valid StartID!! be Higher than Zero");
                return;
            }

            if (bAutoClick == false)
            {
                mReTryCount       = 0;
                mFailedReTryCount = 0;
            }

            if (bAutoClick == true && ClickIndex == 1)
            {
                PrintStatus(1, "ReTry Login Test!!");
            }

            if (bAutoClick == true && ClickIndex == 2)
            {
                mFailedReTryCount++;
            }

            CloseAllConnections();
            mCurrectMaxUser = MaxConnectionUser;

            InitStatusValue();
            UpdateStatueUI();

            MainWindow.Instance.textOutput4.Text = string.Empty;
            var StresssTestGameID = MainWindow.GetGameIDFromUI(MainWindow.Instance.stress_comboBoxGameID_TestLogin);

            for (int i = 0; i < MaxConnectionUser; i++)
            {
                StressTest_LoginUser TestUser = new StressTest_LoginUser();
                TestUser.InitEngine();
                TestUser.SetPrintHanlde(PrintStatus);

                TestUser.m_LoginID = MakeStreesTestUserID(PrefixStartID, PreFixUserID, i);
                TestUser.gameID    = StresssTestGameID;
                mLoginTesterUsers.Add(TestUser);
            }

            ServerAddressRegistry.SaveGameID(3, StresssTestGameID);
            mServerAddress = MainWindow.Instance.GetServerAddressFromUI(1, MainWindow.Instance.stress_comboBoxIPAddress,
                                                                        () =>
            {
                MainWindow.InitIPAdressComboBox(MainWindow.Instance.stress_comboBoxIPAddress, ServerAddressRegistry.GetServerAddresses(1));
            });

            CreateGroup();

            RunConnectGroup(0, mServerAddress);

            m_LoginTestTimer       = new DispatcherTimer();
            m_LoginTestTimer.Tick += new EventHandler(
                (object ts, EventArgs te) =>
            {
                for (int i = 0; i < mLoginTesterUsers.Count; i++)
                {
                    mLoginTesterUsers[i].OnTimerTick(1000);
                }

                if (IsProgressFailed() && MainWindow.Instance.InfiniteReTryFailedRepeattCheck_LoginTest.IsChecked == true)
                {
                    mCurDealyReTryTime += 1000;
                    PrintStatus(1, "Plz ReTry Test!! {0}..", 3 - (mCurDealyReTryTime / 1000));
                    if (mCurDealyReTryTime >= 3000)
                    {
                        this.StartTest(true, 2);
                    }
                }
            });

            m_LoginTestTimer.Interval = new TimeSpan(0, 0, 1);
            m_LoginTestTimer.Start();
        }