♠️
RACE Protocol
NFT PresaleDiscord
  • ❤️Official Docs & Links
  • ⏳Progress Overview
  • RACE Protocol
    • 🏗️System Architecture
      • Components
      • On-chain Accounts
      • Synchronization
      • Randomization
      • Payment
    • 🎲Game Development
      • Game Handler
      • Effect
      • Event Handling
      • Race API
        • Arweave Integration
      • Race JS SDK
        • Installation and Setup
        • Key Components
          • AppClient
          • SubClient
          • Events
          • Game Context
          • Decryption Cache
        • Advanced Features
          • Getting Revealed Knowledge
          • Exiting and Detaching
          • Submitting Messages
          • Sub-game Interaction
        • Best Practices
        • API Reference
        • Troubleshooting
    • 🧪Testing
      • Race Test Kit
      • Unit Testing
      • Integration Testing
      • Additional Considerations
    • 🧱Modules & Features
      • Encryption Methods
      • Command-line Tools
      • Configuration Options
      • Blockchain Transport Implementations
    • 📃Smart Contract
      • Solana Program
    • 🔦Examples and Use Cases
      • Draw Card Game
      • Raffle Game
      • Other Examples
  • RACE Games
    • ♠️RACE Poker app
      • 🎮Start playing in minutes
        • 💰Cash and sit-n-go
        • 🏆Tournaments
      • 🎨Workshop
        • 🏆Create cash games
        • 🏨Create tourneys
      • 💡Concept introduction
      • 🏗️System architecture
      • 👾Game Flow
      • 🎲Cards shuffling
      • ☎️Communication
      • 🔐Key sharing/decryption
      • 💱Cash flow structure
    • ⚡Solfast
      • 🎲Game modes
  • RACE RESEARCH
    • 👾No-Code Development
      • Brainstorming
      • Implementation Approach
      • Project Status
    • 0️⃣Zero-Knowledge Proofs
      • Brainstorming
      • Integration steps
        • Verifiable Randomness Generation
        • Private Game State Updates
        • Verifiable Settlements
        • Private Player Actions
      • Project Status
    • 🛡️Security Audit Report
      • Executive summary
        • Introduction to Race Protocol
        • Audit Methodology
      • Findings
        • Smart Contract Security
        • WebAssembly Security
        • Client-side Security (Race SDK)
        • Server-side Security
        • Randomization and Encryption
        • On-chain Account Management
        • Synchronization Mechanisms
        • Payment Handling
      • Recommendations
      • Conclusion
  • RACE DAO
    • 😎About
    • 🫂Community
    • 🖼️NFT Collection [!]
Powered by GitBook
On this page
  • WASM Bundle (Game Handler) Testing Considerations
  • Client-Side Testing Considerations
  1. RACE Protocol
  2. Testing

Additional Considerations

PreviousIntegration TestingNextModules & Features

Last updated 1 year ago

WASM Bundle (Game Handler) Testing Considerations

When testing the WASM bundle, which contains the core game logic, focus on:

  • Testing State Machine Transitions: Verify that the game handler transitions between different game stages correctly in response to various events.

  • Validating Event Handling Logic: Test the logic within the handle_event function to ensure that it processes events correctly, updates the game state as expected, and generates appropriate effects.

  • Testing Randomness Generation: If your game uses randomness, test the interaction with the to ensure that randomness is generated and revealed correctly and securely.

  • Testing Settlement Generation: Verify that the game handler generates accurate and fair settlements based on the game outcome and player states.

Client-Side Testing Considerations

When testing the client-side integration with the , there are some additional considerations:

  • Mocking Blockchain Interactions: Since the client-side code does not directly interact with the blockchain, you may need to mock blockchain interactions during testing. The test kit provides utilities for creating mock game accounts and simulating blockchain responses.

  • Testing Decryption Logic: If your game involves hidden knowledge and decryption, make sure to test the decryption logic in your client application to ensure it functions correctly and securely.

  • Simulating Network Interruptions: Test how your client application handles network interruptions and reconnects to the Transactor server to ensure a smooth gameplay experience even in the face of network issues.

By utilizing the Race test kit and following best practices for unit and integration testing on both the WASM bundle and client sides, developers can build robust, secure, and fair blockchain games on the Race Protocol infrastructure.

🧪
Race API
Race JS SDK