Test-Lab.aiDocs
Examples

General

Test prompts for authentication, forms, and common web functionality

General Test Prompts

Common functionality found in most web applications.

Replace https://yoursite.com with your actual domain. Adjust paths like /login, /signup to match your site's URL structure.

Using credentials in tests? Store them as Credentials and reference them with {{credentials.<name>}} syntax. This keeps sensitive data out of your test prompts.


Authentication

User Registration

Go to /signup (or /register).

Fill the registration form with:
- Email: test-{timestamp}@example.com
- Password: TestPassword123!
- Confirm password: TestPassword123!

Submit the form.

Verify that either:
- A success message is shown, OR
- Redirect to /dashboard or /welcome occurs, OR
- Email verification message is displayed

The registration should complete without errors.

Login - Valid Credentials

Go to /login.

Enter credentials:
- Email: {{credentials.testEmail}}
- Password: {{credentials.testPassword}}

Click the login button.

Verify successful login by checking for:
- Redirect to /dashboard or /home
- User menu or avatar visible in header
- Welcome message with user's name or email

Login - Invalid Credentials

Go to /login.

Enter invalid credentials:
- Email: nonexistent@example.com
- Password: WrongPassword123!

Submit the form.

Verify that:
- An error message is displayed (e.g., "Invalid credentials")
- User remains on /login
- No sensitive information is revealed in the error

Forgot Password

Go to /login, then click "Forgot password" link.
(Or go directly to /forgot-password)

Enter email: {{credentials.testEmail}}

Submit the form.

Verify that:
- Confirmation message appears (e.g., "Check your email")
- No error occurs
- Page does not reveal whether email exists (security)

Logout

Ensure user is logged in. Go to /dashboard or any authenticated page.

Find and click the logout option (usually in user menu).

Verify that:
- User is logged out (no user menu/avatar visible)
- Redirect to / or /login occurs
- Visiting /dashboard redirects to /login

Profile & Account

View Profile

Log in and go to /profile (or /account, /settings).

Verify that the profile page shows:
- User's email or username
- Profile picture or avatar placeholder
- Edit option or link to settings

Update Profile

Log in and go to /profile/edit (or /settings/profile).

Update the following fields:
- Display name: "Updated Test User"
- Bio: "This is a test bio update"

Click Save.

Verify that:
- Success message is displayed
- Changes persist after page refresh
- New values are shown in profile

Change Password

Log in and go to /settings/password (or /account/security).

Fill the password change form:
- Current password: {{credentials.testPassword}}
- New password: NewTestPassword456!
- Confirm new password: NewTestPassword456!

Submit the form.

Verify that:
- Success message appears
- User can log in with new password

Forms & Contact

Contact Form

Go to /contact.

Fill the contact form:
- Name: Test User
- Email: testuser@example.com
- Subject: Test Inquiry
- Message: This is an automated test message to verify the contact form works correctly.

Submit the form.

Verify that:
- Success/thank you message is displayed
- Form is cleared or confirmation page shown
- No errors during submission

Newsletter Subscription

Go to / (homepage) or /newsletter.

Find the newsletter signup form (often in footer).

Enter email: newsletter-test@example.com

Submit the form.

Verify that:
- Success message appears (e.g., "Thanks for subscribing!")
- No errors occur
- Email field is cleared or shows confirmation

Search & Navigation

Search Functionality

Go to / (homepage).

Locate the search bar in header.

Enter search term: "test query"

Submit search (press Enter or click search icon).

Verify that:
- Redirect to /search?q=test+query (or similar)
- Search results page loads
- Results are displayed OR "no results" message appears
- Search term is visible on page
Go to / (homepage).

Click each main navigation link and verify:
1. Click "About" → loads /about without errors
2. Click "Products" or "Services" → loads /products or /services
3. Click "Contact" → loads /contact
4. Click logo → returns to /

All pages should load without 404 errors.

Mobile Menu

Go to / on mobile viewport (or resize browser to <768px).

Click the hamburger menu icon.

Verify that:
- Mobile menu opens/expands
- Navigation links are visible
- Clicking a link navigates and closes menu
- Close button or outside click closes menu

Error Handling

404 Page

Go to /this-page-does-not-exist-12345.

Verify that:
- A 404 error page is displayed
- Page includes "not found" message
- Link to homepage is provided
- Page has proper styling (not broken)

Form Validation

Go to /contact.

Submit the form without filling any fields.

Verify that:
- Validation errors appear for required fields
- Form is not submitted
- Error messages are clear and helpful
- Errors are associated with correct fields

On this page