config:
  target: "http://localhost:3000" # Replace this with your actual server URL

scenarios:
  - flow:
      # Connect and Join Room
      - think: 2000 # Simulate user thinking time before joining room
      - emit:
          channel: "joinRoom"
          data:
            roomId: "room1" # Replace this with the desired roomId
            userId: "user_{{ __VU }}_{{ __ITER }}" # Generate dynamic user IDs
            isBlocked: false
      - think: 3000 # Simulate user thinking time after joining room

      # Send Messages
      - loop:
          count: 10 # Adjust the number of messages to be sent per user
          flow:
            - emit:
                channel: "message"
                data:
                  roomId: "room1" # Replace this with the desired roomId
                  message:
                    senderId: "user_{{ __VU }}_{{ __ITER }}" # Use dynamic user ID as senderId
                    messageType: "TEXT"
                    messageSpecialStatus: "NORMAL"
                    senderName: "User {{ __VU }}"
                    senderImage: "image_url_{{ __VU }}" # Generate different sender images for each user
                    createdAt: "{{ Date.now() }}" # Use current timestamp as createdAt
                    updatedAt: "{{ Date.now() }}" # Use current timestamp as updatedAt
            - think: 1000 # Simulate user thinking time between messages

      # Disconnect
      - think: 500 # Add a delay before disconnecting
      - emit:
          channel: "disconnect"
Scenario validation error: "scenarios[0].flow[3].loop" must be an array