Running Tests
Headed mode, re-running, and debugging failures.
Running tests
There are two ways to run tests in Lama:
- Sidebar - click the play button next to any test file in the file explorer
- Agent - ask the agent to run your test: "run the login test"
Both methods execute the test using your framework's CLI and show results directly in the app.
Headed mode
By default, tests run in headless mode (no visible browser). To watch the test execute in a real browser window, enable headed mode. How this works depends on your framework:
- Playwright - runs with the --headed flag
- Cypress - opens the Cypress Test Runner UI
- Selenium - configured through the driver settings
Headed mode is useful for debugging - you can see exactly what the test does and where it fails.
Test results
After a test runs, you see the full output in the terminal panel. The sidebar shows pass/fail status for each test file. The agent can also interpret results and explain what went wrong.
Debugging failures
When a test fails, you can ask the agent to help debug it. The agent is good at diagnosing test failures and figuring out what went wrong.
Effective debugging prompts:
- "This test is failing, can you figure out why?"
- "The login test passes locally but the submit button isn't being found"
- "Fix the timeout error in the checkout test"
Re-running tests
After the agent fixes a test, it automatically runs it again to verify the fix. A test task isn't considered complete until the test passes.
You can also re-run tests manually from the sidebar or by asking the agent.
Need help? Contact us at hi@lamaqa.com