# client_bot Tool ## 說明 - 這是 React + Electron 框架開發的應用。 - BOT壓力測試系统。 ``` 提供開發者透過機器人來模擬玩家在遊戲Client端執行完整操作行為,並移除GUI圖形 界面減少運行效能達到模擬大量BOT機器人玩家在線遊玩的壓測系統,且支持各品牌 對接並提供客製化行為與遊戲種類以配合測試需求。 ``` ***** ## 安裝 - 需要 clone 此專案。並且在您的電腦上按裝[Git](https://git-scm.com/)和[Node.js](https://nodejs.org/en/download/)。 - 下面指令,請由command line操作。 ```javascript= // clone 該專案 git clone http://gitlab.knowhow.dm2/dev3-client/client_bot.git // 進入專案內的react-manager資料夾 cd react-manager // 安裝套件 npm (node package manager) npm install // 安裝套件 yarn (補足npm缺陷的套件) yarn ``` **** ## 啟動&打包 專案 :::warning **啟動** ``` yarn start ``` ::: :::success **打包** ``` yarn package ``` >這裡有引入 [run-script-os](https://www.npmjs.com/package/run-script-os) 在 windows 會去執行 [package_production.ps1](package_production.ps1) 詳見 package.json - 若打包未執行 可以至command line 下達指令 ``` ./package_production.ps1 ``` ::: ******* ## 打包 main - 此為目標遊戲專案入口 ```javascript= // 進入專案內的main資料夾 cd main // 打包 bot egret publish --version bot //搭配 manager 的 sync script, 因此要把檔案放在 bin-release/web/bot // publish then sync node ./tools/syncToManager.js ``` ******* ## 壓測BOT - 操作手冊 ### 基礎設定 :::success #### 表格說明 |欄位名稱 |用途 | 格式 | | -------------- | ---------------------------------- | ---- | |login api URL |索取登入token用的網址 |含有 http(s) 的字串| |login api Header|呼叫login api 時的 header 物件 |JSON 字串 `{"aaa":123,}`| |socket URL |B端 ip or host name |需包含 `ws://` or `wss://`| |socket Port |B端 port |數字字串 or<br>空值(表示不指定,預設為 [30050](https://docs.microsoft.com/zh-tw/azure/hdinsight/hdinsight-hadoop-port-settings-for-services#yarn-ports))| |id URL |實際用途不確定<br>預設對應 staticsHandle|含有 http(s) 的字串| |RoomSN factor |用於從房間序號推算game type 的係數 |數字| #### 參考輸入  #### 選單功能  | 欄位名稱 | 用途 | | -------- | ---- | |Reset|重置所有設定| |Save |將設定儲存至檔案| |Load|讀取檔案設定| ::: 相關連結:[版本存放](https://drive.google.com/drive/folders/1xILoxVIG-mVSgME5BOiPnB5iomyZpGqc) ###### tags: `React`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up