> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stably.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PR Review Installation

> Set up Stably's AI-powered exploratory testing on pull requests

<Info>
  **Perfect for**: Augmenting your PR review process and working alongside your existing PR code review bots.
</Info>

## Overview

Stably's exploratory testing analyzes your PR feature specifications and automatically performs comprehensive testing:

* Analyzes code changes and PR description to understand what functionality needs testing
* Intelligently navigates through your application
* Tests edge cases and feature user flows
* Posts detailed test reports with findings and UI/UX feedback
* Skips testing for changes that it can't test

***

## Setup Process

<Steps>
  <Step title="Install GitHub App">
    The first step is to connect your GitHub repository to Stably:

    1. Navigate to **Settings** > **GitHub PR Testing** in your Stably dashboard
    2. Click **Install GitHub App**
    3. This will connect your GitHub repository to Stably and enable automated testing on pull requests

    <Info>
      GitLab and API-based triggers are coming soon for exploratory testing.
    </Info>
  </Step>

  <Step title="Configure Repository">
    Next, configure which repository and branch Stably should monitor:

    <Accordion title="Repository Configuration Details">
      1. In the **Configure Repository** section:
         * **GitHub Organization**: Select your GitHub organization or user account
         * **Repository**: Choose the specific repository you want to enable PR testing for
         * **Primary Branch**: Select the main branch (usually `main` or `master`)

      2. Click **Save Configuration** to apply your settings
    </Accordion>
  </Step>

  <Step title="Configure Exploratory Testing">
    The final step involves setting up how exploratory testing will operate:

    <AccordionGroup>
      <Accordion title="Authentication Configuration">
        * **Use credentials from project-level variables**: Enable this option to have the agent log in using your existing project credentials
        * If unchecked, login information may need to be provided in the PR description or custom prompts
      </Accordion>

      <Accordion title="Custom Prompt Configuration">
        Provide additional instructions or context for exploratory testing:

        * Add specific testing instructions (e.g., "Always login with TEST\_ACCOUNT")
        * Include additional test data requirements
        * Specify particular areas of focus for testing (e.g. "The color schemes should be consistent across the app")
      </Accordion>

      <Accordion title="Pull Request Template (Optional)">
        Set up a PR template to help exploratory testing understand what to test:

        * Click **Update Pull Request Template** to configure
        * The template helps the agent understand the context and scope of each pull request
        * This ensures more targeted and relevant testing
      </Accordion>
    </AccordionGroup>

    <Frame type="glass">
      <img src="https://mintcdn.com/stablyai/kbD1mPIS9Ksvjr53/images/testing-guide/pr-exploratory-testing-config.png?fit=max&auto=format&n=kbD1mPIS9Ksvjr53&q=85&s=c4360749634abcd79ffe74244dd99268" width="1505" height="989" data-path="images/testing-guide/pr-exploratory-testing-config.png" />
    </Frame>
  </Step>
</Steps>

## How Exploratory Testing Works

<AccordionGroup>
  <Accordion title="Automatic & Manual Triggering">
    Once configured, exploratory testing will:

    * **Automatically trigger** when new pull requests are created
    * **Manually trigger** by commenting `@stablyai` on any pull request
  </Accordion>

  <Accordion title="Intelligent Testing">
    The AI agent performs comprehensive testing by:

    * Understanding the functionality affected by your changes
    * Navigating through your application intelligently
    * Testing edge cases and user workflows
    * Validating both positive and negative scenarios
  </Accordion>

  <Accordion title="Test Reporting">
    After testing completes, you'll receive:

    * **Detailed test reports** posted as PR comments
    * **Summary** of testing activities performed
    * **Objectives coverage** showing what was tested
    * **Detailed findings** for each test objective
    * **UI/UX feedback** on user experience observations
    * **Status indicators** (✅ COMPLETED, ❓ UNSURE, etc.)
  </Accordion>

  <Accordion title="Smart Skipping">
    The system intelligently skips testing when:

    * Changes are documentation-only (README, .md files, etc.)
    * No user-facing features or UI interactions are affected
    * The PR template indicates no testing is needed
  </Accordion>
</AccordionGroup>

***

## Best Practices

**Configuration Tips**

* Use descriptive custom prompts to provide context about your application
* Set up authentication properly so the agent can access all necessary parts
* Update PR templates regularly to keep them current with your testing needs

**Team Workflow**

* Review test reports and check the detailed findings in PR comments
* Act on feedback and address any issues raised by exploratory testing
* Iterate on configuration and refine setup based on testing results

**Optimization**

* Monitor test coverage to ensure the agent tests the right areas
* Adjust custom prompts and fine-tune instructions based on outcomes
* Keep test accounts and credentials current

## Troubleshooting

<AccordionGroup>
  <Accordion title="Common Issues">
    * **Agent not triggering**: Check repository and branch configuration
    * **Authentication failures**: Verify environment-level variables are set correctly
    * **Limited test coverage**: Review and update custom prompts for better guidance. Also, make sure the PR description contains the necessary information about the changes.
  </Accordion>
</AccordionGroup>

## Related Features

* [AI Test Generation](/ai-test-generation) - Create comprehensive test suites
* [Release Testing](/testing-guides/release-testing) - Comprehensive release validation
* [Scheduled Checks](/testing-guides/scheduled-checks) - Regular automated testing
* [CI Integration](/integrate-with-ci) - Run tests in your deployment pipeline
* [Environment Variables](/core-configuration/test-data#environment-variables) - Manage test data and credentials
