# From Business requirement to Unit Test,API Test & Integration Test

## 1. Integration Test (via UI)

#### Test Suite Setup

- **Test Name**: Provide a descriptive name (e.g. `IntegrationTestExample`).
- **Test Type**: Select **Integration Test** (options: Unit / Functional / Integration).
- **Test Framework**: Choose from supported frameworks:
    
    
    - Rest Assured
    - Karate *(example used here)*
    - Postman
- **Selected Test Framework Version:** Choose from supported versions  
      
    [![Screenshot 2025-09-15 at 4.36.40 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/QOTtODZaJbRVOpSF-screenshot-2025-09-15-at-4-36-40-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/QOTtODZaJbRVOpSF-screenshot-2025-09-15-at-4-36-40-pm.png)[![Screenshot 2025-09-15 at 4.36.47 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/gEyBsBDVRpxfK9wH-screenshot-2025-09-15-at-4-36-47-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/gEyBsBDVRpxfK9wH-screenshot-2025-09-15-at-4-36-47-pm.png)

#### GenAI Models Setup

- **Select AI Provider**: Choose an AI provider (e.g. OpenAI, Vertex AI, Azure OpenAI, Claude, LLaMA).
    
    
    - Enter required credentials:
        
        
        - **API Key / Token** (from provider)
        - **Model Name** (e.g. `gpt-4`, `claude-3`, etc.)
    - Or choose connector [![Screenshot 2025-09-15 at 4.37.11 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/qCWK1q4HjbXQp2vy-screenshot-2025-09-15-at-4-37-11-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/qCWK1q4HjbXQp2vy-screenshot-2025-09-15-at-4-37-11-pm.png)

#### Code Repository Setup

- **Select Repository Type**: GitHub, GitLab, Bitbucket, Azure Repos.
- **Repository Details(**Or choose connector**)**: 
    - **Access Token / PAT**: Token with valid permissions.
    - **Username/Organization Name:** for Azure/Bitbucket give username/organization name
- **Branch**: Branch where test PR will be created
- **Project Path:** Path for your project  
    [![Screenshot 2025-09-15 at 8.55.27 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/KxujV8tf0i6NE7U7-screenshot-2025-09-15-at-8-55-27-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/KxujV8tf0i6NE7U7-screenshot-2025-09-15-at-8-55-27-pm.png)

#### Business Requirement Source

Integration with requirement management tools:

- **Choose Source**: Jira or Azure DevOps.
- **Authentication**:
    
    
    - Jira: Base URL, Email/Username, API Token.
    - Azure DevOps: Org URL, PAT token.
- **Requirement Reference**:
    
    
    - Provide **Ticket ID** (e.g. `PROJ-1234`) for Jira.
    - System will fetch business requirement details for context.  
        [![Screenshot 2025-09-15 at 4.39.11 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/ZkpkoI4NfhXqZ8cT-screenshot-2025-09-15-at-4-39-11-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/ZkpkoI4NfhXqZ8cT-screenshot-2025-09-15-at-4-39-11-pm.png)

### Gherkin Setup

- **Gherkin Source**: Choose how to provide acceptance criteria. Options:
    
    
    - **File Upload**: Upload `.feature` file.
    - **URL**: Provide direct URL to Gherkin spec.
    - **Git Path**: Specify repository and file path to `.feature` file.  
        [![Screenshot 2025-09-15 at 4.39.11 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/ZkpkoI4NfhXqZ8cT-screenshot-2025-09-15-at-4-39-11-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/ZkpkoI4NfhXqZ8cT-screenshot-2025-09-15-at-4-39-11-pm.png)

### Save the Test:  


1. Once you have configured the test Save configuration and your test will be ready for the trigger

### [![Screenshot 2025-09-15 at 9.00.59 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/w2JQysa0YyRuHPcf-screenshot-2025-09-15-at-9-00-59-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/w2JQysa0YyRuHPcf-screenshot-2025-09-15-at-9-00-59-pm.png)  


### Test Execution  


1. Click on execute test button to trigger the test
2. UI will prompt with Test Server Configuration details this provide the details and click on generate test  
    [![Screenshot 2025-09-15 at 9.04.18 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/fCx0UnqeMKu50O7D-screenshot-2025-09-15-at-9-04-18-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/fCx0UnqeMKu50O7D-screenshot-2025-09-15-at-9-04-18-pm.png)  
    [![Screenshot 2025-09-15 at 9.04.25 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/dIR7F7ZZAeNyKumI-screenshot-2025-09-15-at-9-04-25-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/dIR7F7ZZAeNyKumI-screenshot-2025-09-15-at-9-04-25-pm.png)
3. Test will be triggered after tokens are verified
4. Logs will be available in the UI in logs tab.  
    [![Screenshot 2025-09-15 at 9.07.48 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/Y4UIIgF1vLxCJWRJ-screenshot-2025-09-15-at-9-07-48-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/Y4UIIgF1vLxCJWRJ-screenshot-2025-09-15-at-9-07-48-pm.png)
5. Once test creation is complete:
    
    
    - A **Pull Request (PR)** will be automatically generated in the selected repository.
    - PR link will be displayed.
    - You can view test insights from the generated PR.

### Improving Tests

- Select the created test.
- Provide improvement instructions (e.g. “Add negative test for invalid payment ID”).
- Re-run improvement process.
- Updated PR will reflect the improved test suite.