> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing & Debugging

> Test calls, simulate scenarios, and debug your voice agents

## What is Testing?

Thorough testing is essential before deploying voice agents to production. Hamsa provides multiple testing methods to validate conversation flows, debug issues, and ensure quality experiences for your callers.

<Info>
  **Testing Methods Available:**

  * **Browser Testing** - Quick testing with microphone in your browser
  * **Phone Testing** - Real phone call testing with actual voice quality
  * **Call Simulation** - Automated test scenarios with assertions
  * **Live Call Monitoring** - Real-time debugging during actual calls
</Info>

## Testing Methods

**Browser Testing**

* Test directly in browser without making phone calls
* View real-time transcripts and variable extraction
* Monitor node transitions and execution logs
* Perfect for rapid iteration during development

**Phone Testing**

* Test with actual phone calls for production-ready validation
* Verify voice quality and DTMF functionality
* Experience real-world network conditions
* Test from different locations and devices

**Call Simulation**

* Create automated test scenarios
* Run regression tests after changes
* Validate specific conversation paths
* Ensure consistent behavior

**Live Debugging**

* Monitor active calls in real-time
* View transcripts as they happen
* Track variable extraction and tool calls
* Identify and fix issues immediately

## What to Test

**Conversation Quality**

* Natural greetings and introductions
* Accurate responses to common questions
* Smooth conversation flow and transitions
* Professional closings and next steps

**Technical Functionality**

* Variable extraction accuracy
* Tool integration and API calls
* DTMF menu navigation
* Webhook delivery

**Voice & Audio**

* Voice clarity and naturalness
* Appropriate speaking pace
* Background noise handling
* Interruption management

**Error Handling**

* Recovery from invalid inputs
* Timeout and silence detection
* System error management
* Graceful fallback responses

## Common Test Scenarios

**Happy Path Testing**

* Ideal conversation flows
* All information provided correctly
* Successful task completion

**Error Handling Testing**

* Invalid inputs and edge cases
* Missing or incorrect information
* System failures and timeouts
* Recovery and retry logic

**Edge Case Testing**

* Multiple speakers on call
* Heavy background noise
* Poor network connections
* Unexpected user responses

## Getting Started

Choose your testing approach:

<CardGroup cols={2}>
  <Card title="Test in Dashboard" href="/agents/testing/introduction" icon="browser">
    Use browser and phone testing tools in the web interface. Perfect for manual testing and debugging during development.
  </Card>

  <Card title="Automate via API" href="/developers/guides/testing" icon="code">
    Build automated test suites and CI/CD pipelines. Ideal for regression testing and continuous validation.
  </Card>
</CardGroup>

## Learn More

<CardGroup cols={2}>
  <Card title="Live Calls" href="/agents/dashboard/live-calls">
    Monitor active calls in real-time
  </Card>

  <Card title="Call History" href="/agents/call-history/introduction">
    Analyze completed call recordings
  </Card>

  <Card title="Performance Metrics" href="/agents/dashboard/performance">
    Track agent performance over time
  </Card>

  <Card title="Webhooks" href="/overview/features/webhooks">
    Set up event notifications for testing
  </Card>
</CardGroup>
