ClientTest Tool

ClientTest Tool เป็นตัวช่วยในการเชื่อมต่อระบบกับ Casino Game เพื่อตรวจสอบความถูกต้องในการเชื่อมต่อ ซึ่งสามารถดาวน์โหลดไฟล์ ClientTest Tool ได้ตามนี้

ระบบปฏิบัติการที่รองรับ

  • Windows

  • MacOS

  • Linux

*** การทดสอบโอเปอเรเตอร์ต้องเตรียมเครดิตให้ยูสเซอร์ 300 เครดิต

ตัวอย่างการรันเพื่อทดสอบ

./cg_client_tools_darwin_arm64 \
 --player_id=1665 \
 --api_key=109u98huygtyfr54de7ufgiujo90 \
 --currency=THB \
 --verify_url=https://operator-domain.com/player/verify \
 --balance_url=https://operator-domain.com/player/balance \
 --debit_url=https://operator-domain.com/transaction \
 --credit_url=https://operator-domain.com/transaction \
 --cancel_url=https://operator-domain.com/transaction \
 --wallet_session_id=R5a1vJXzRP4VKLbDN4nLdRAmqzyxYLZMTzqdTm52EZPJ6ZsAbw \
 --table_id=184 \
  -test.v
Parameter
Description

player_id

user_id ของระบบโอเปอเรเตอร์

api_key

api key ที่โอเปอเรเตอร์ใส่ที่ระบบหลังบ้าน Casino Game

currency

สกุลเงิน 3 หลัก ตามมาตราฐาน ISO 4217 (Ex. THB)

verify_url

ใช้สำหรับตรวจสอบเซสชั่นของผู้เล่น เพื่อให้แน่ใจว่าผู้เล่นได้รับการตรวจสอบสิทธิ์และได้รับอนุญาตให้เข้าถึงระบบ

balance_url

ใช้สำหรับอัปเดตยอดคงเหลือแบบเรียลไทม์ระหว่างการเล่นเกม

debit_url

ใช้สำหรับตัดเครดิตผู้เล่นหลังจากวางเดิมพัน และการใช้ทิปในหน้าโต๊ะเกม

credit_url

ใช้สำหรับส่งผลการวางเดิมพันกลับไปยังโอเปอเรเตอร์ หลังจากออกผล

cancel_url

ใช้สำหรับให้ทาง Casino Game ส่งยกเลิกรายการวางเดิมพัน

wallet_session_id

เซสชั่นไอดีของผู้เล่น ที่โอเปอเรเตอร์สร้าง

table_id

ไอดีโต๊ะเกม ที่โอเปอเรเตอร์สร้างในระบบ Casino Game

Test case

ตัว ClientTest จะทำการทดสอบตาม case ข้างล่างนี้

Case
Description

TC_001

Given request to verify endpoint, then return success

TC_002

Given request to verify endpoint with invalid wallet session ID, then return error with code INVALID_SESSION_ID

TC_003

Given request to verify endpoint with invalid player ID, then return error with code USER_NOT_FOUND

TC_004

Given request to verify endpoint with invalid API key, then return error with code UNAUTHORIZED_ACCESS

TC_005

Given request to balance endpoint, then return success and correct format

TC_006

Given request to balance endpoint with invalid player ID, then return error with code USER_NOT_FOUND

TC_007

Given request to balance endpoint with invalid wallet session ID, then return error with code INVALID_SESSION_ID

TC_008

Given request to balance endpoint with invalid API key, then return error with code UNAUTHORIZED_ACCESS

TC_009

Given request to balance endpoint with invalid player ID, then return error USER_NOT_FOUND

TC_010

Given bet on PLAYER 100, when result is TIE game, then balance is correct

TC_011

Given bet on PLAYER 100, when result is PLAYER win, then balance is correct

TC_012

Given bet on PLAYER 100, when result is BANKER win, then balance is correct

TC_013

Given bet on PLAYER 100, when cancel bet or void game, then balance is correct

TC_014

Given bet exceeds limit, then return error CREDIT_EXCEED and user credit must be correct

TC_015

Given duplicate debit request, then return success and user credit must be correct

TC_016

Given tip 100, when tip is successful, then balance is correct

TC_017

Given tip exceeds limit, then return error CREDIT_EXCEED and user credit must be correct

TC_018

Given duplicate tip request, then return success and user credit must be correct

TC_019

Send a cancel request with no betting records, then return error TRANSACTION_NOT_FOUND and user credit must be correct. (no credit refund required)

TC_020

Betting records exist and a cancel request is sent twice, then return success and user credit must be correct. (credit should only be refunded once)

TC_021

Betting records exist and credit is sent twice, then return success and user credit must be correct. (credit should only be credited once)

TC_022

Given player wins leaderboard reward, when credit request is processed then player balance must be correct

TC_023

Given duplicate leaderboard reward request, then return success and player balance must be correct

TC_024

Given bet on PLAYER 100, when result is PLAYER win with jackpot, then balance is correct

Last updated