Personas
Store and manage test user credentials securely for testing authenticated areas of your application.
What are Personas?
Personas represent test users with specific credentials (username, password, API tokens). Use them to:
- Test login flows
- Access authenticated pages
- Test with different user roles
- Run Discovery on protected areas
- Simulate real user scenarios
Think of Personas as “test accounts” that BugBrain can use automatically during testing.
Why Use Personas?
Without Personas
Testing authenticated areas means:
- Hardcoding credentials in tests (insecure!)
- Manually updating credentials everywhere
- Can’t share tests safely
- Credentials visible in test steps
With Personas
Testing becomes:
- ✅ Secure (credentials encrypted)
- ✅ Maintainable (update once, applies everywhere)
- ✅ Shareable (no credentials exposed)
- ✅ Simple (just select a Persona)
Creating a Persona
- Go to your project
- Click “Personas” in the sidebar
- Click “New Persona”
- Enter Persona details:
- Name: Descriptive name (e.g., “Admin User”, “Regular Customer”)
- Username/Email: Login username or email
- Password: User password
- Additional Fields: Any other credentials needed
- Click “Save”
Security: All credentials are encrypted with AES encryption before storage. Only members of your organization can use them.
Persona Fields
Basic Fields
Name (required)
- Descriptive name for the persona
- Examples: “Admin User”, “Premium Member”, “Guest User”
Username/Email (required)
- Login identifier
- Usually email or username
Password (required)
- User password
- Encrypted at rest
Optional Fields
Role/Type
- User role (admin, member, guest)
- Helpful for organizing personas
Notes
- Additional context
- Special instructions
- Known limitations
API Tokens
- Authentication tokens
- API keys
- OAuth tokens
Custom Fields
- Any additional credentials
- Security questions
- 2FA backup codes
Using Personas in Tests
Manual Test Cases
When creating a test manually:
- In the test case editor
- Select “Use Persona” option
- Choose the Persona from dropdown
- BugBrain handles login automatically
AI-Generated Tests
When generating tests:
- In the generation form
- Select “Persona” field
- Choose appropriate Persona
- AI includes authentication steps
Discovery Sessions
When running Discovery:
- Start new Discovery session
- Enable “Authenticated Crawl”
- Select a Persona
- Discovery logs in and crawls protected pages
Auto-Login: When a Persona is selected, BugBrain automatically handles the login process before executing test steps.
Persona Types by Use Case
Admin Persona
Purpose: Test admin/dashboard features
Example:
- Name: “Admin User”
- Email: admin@example.com
- Password: [encrypted]
- Role: Administrator
Use for: Admin panel testing, user management, settings
Standard User Persona
Purpose: Test regular user flows
Example:
- Name: “Regular User”
- Email: user@example.com
- Password: [encrypted]
- Role: Member
Use for: Standard features, normal workflows
Premium/Pro User Persona
Purpose: Test paid features
Example:
- Name: “Premium Member”
- Email: premium@example.com
- Password: [encrypted]
- Role: Premium
Use for: Subscription features, premium content
Guest/Limited User Persona
Purpose: Test restricted access
Example:
- Name: “Guest User”
- Email: guest@example.com
- Password: [encrypted]
- Role: Guest
Use for: Limited access, read-only features
Best Practices
1. Use Descriptive Names Name Personas clearly (e.g., “Admin - Full Access” instead of “User1”)
2. One Persona Per Role Create separate Personas for different user types/roles
3. Keep Test Accounts Don’t use real user credentials - create dedicated test accounts
4. Document Permissions Add notes about what this Persona can access
5. Update Regularly If passwords change, update Personas immediately
6. Don’t Over-Share Only create Personas that team members actually need
Managing Personas
Editing Personas
- Go to Personas page
- Click on the Persona to edit
- Update fields as needed
- Click “Save Changes”
Note: Changes apply to all tests using this Persona.
Deleting Personas
Warning: Deleting a Persona will cause tests using it to fail. Update tests to use a different Persona first.
To delete:
- Go to Personas page
- Click the Persona
- Click “Delete”
- Confirm deletion
Duplicating Personas
To create a similar Persona:
- Click existing Persona
- Click “Duplicate”
- Modify details
- Save as new Persona
Security Features
Encryption
All credentials are:
- Encrypted at rest using AES-256
- Encrypted in transit via HTTPS
- Never logged in execution logs
- Masked in UI (show •••• instead of actual password)
Access Control
Personas are scoped to:
- Organization level - Only your org members can access
- Project level - Optionally restrict to specific projects
- Role-based - Admins can manage, Members can use
Audit Trail
Track Persona usage:
- When Persona was used
- Which tests used it
- Who created/modified it
- All changes logged
Troubleshooting
Login fails during test?
- Verify credentials are correct
- Check if account is locked
- Ensure 2FA is disabled for test accounts
- Verify login URL hasn’t changed
Can’t create Persona?
- Check you have the required role (Admin)
- Ensure all required fields are filled
- Try refreshing the page
Tests using Persona fail?
- Test the login manually
- Check if password expired
- Verify account permissions
- Review execution logs for details
Persona not available in test?
- Check it’s not deleted
- Verify project access
- Ensure you have permission to use it
Advanced Features
API Token Storage
For API testing, store tokens:
Bearer Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
API Key: sk_test_abc123...OAuth Credentials
Store OAuth tokens:
- Access tokens
- Refresh tokens
- Client IDs
- Client secrets
Multi-Factor Authentication
For accounts with 2FA:
- Store backup codes
- Use authenticator app recovery codes
- Consider disabling 2FA on test accounts
Common Use Cases
Testing User Roles
Create Personas for each role:
- Super Admin → Access everything
- Admin → Manage users, limited settings
- Editor → Create/edit content
- Viewer → Read-only access
Then test that each role sees appropriate features.
Testing Subscription Tiers
Create Personas for each tier:
- Free User → Basic features
- Pro User → Premium features
- Enterprise → All features + API
Test feature access matches subscription level.
Testing Multi-Tenant Apps
Create Personas in different tenants:
- Tenant A User
- Tenant B User
- Cross-tenant Admin
Verify data isolation between tenants.