FeaturesPersonas

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

  1. Go to your project
  2. Click “Personas” in the sidebar
  3. Click “New Persona”
  4. 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
  5. 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:

  1. In the test case editor
  2. Select “Use Persona” option
  3. Choose the Persona from dropdown
  4. BugBrain handles login automatically

AI-Generated Tests

When generating tests:

  1. In the generation form
  2. Select “Persona” field
  3. Choose appropriate Persona
  4. AI includes authentication steps

Discovery Sessions

When running Discovery:

  1. Start new Discovery session
  2. Enable “Authenticated Crawl”
  3. Select a Persona
  4. 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:

Use for: Subscription features, premium content

Guest/Limited User Persona

Purpose: Test restricted access

Example:

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

  1. Go to Personas page
  2. Click on the Persona to edit
  3. Update fields as needed
  4. 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:

  1. Go to Personas page
  2. Click the Persona
  3. Click “Delete”
  4. Confirm deletion

Duplicating Personas

To create a similar Persona:

  1. Click existing Persona
  2. Click “Duplicate”
  3. Modify details
  4. 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.

Next Steps