Authenticated Testing
Many app flows require users to be logged in. Swarm supports authenticated testing by securely passing login credentials to the AI agents.Basic usage
How it works
- You provide credentials (username + password) and optionally a login URL
- The CLI encrypts the credentials with AES-256-GCM before sending them to the server
- Each AI agent navigates to the login page and fills in the credentials
- After logging in, the agent proceeds with the test goal
Options
Interactive mode
If you don’t pass credentials as flags, the CLI asks interactively:CI/CD usage
Use--password-stdin to pipe credentials securely:
Security
- Credentials are encrypted client-side with AES-256-GCM before being sent to the Swarm API
- Encryption uses a shared key (
CREDENTIAL_ENCRYPTION_KEY) — credentials are never stored in plaintext on the server - Credentials are decrypted only at the point of use by the testing agent
- After the test completes, the encrypted credentials are not retained
Tips
- Use a test account — create a dedicated account for Swarm testing with realistic but non-sensitive data
- Pre-seed test data — if the test goal requires existing data (e.g., “edit an existing project”), make sure the test account has that data
- Specify the login URL — while agents can often find the login page on their own, providing
--login-urlmakes the test faster and more reliable

