# RoostGPT multiple test flow

# 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.

# Automated Test Pyramid Generation: From User Stories to Code-Level Testing

This document outlines RoostGPT's comprehensive testing framework that establishes complete traceability from business requirements to implementation-level tests through a guided, user-driven workflow. Our methodology transforms Jira user stories into a multi-layered test suite where users create, verify, and build upon each testing phase sequentially.

**The RoostGPT Framework Flow:**

Starting with business requirements captured in Jira stories, users work through RoostGPT to create a complete testing ecosystem. Each phase requires user verification before proceeding to the next level:

- **Functional Tests** - Generated directly from Jira business requirements, creating comprehensive test scenarios along with API specifications and Gherkin feature files that serve as foundational artifacts for subsequent phases
- **Unit Tests** - Users implement code using Test Driven Development principles based on functional requirements, then create unit tests from the resulting code
- **API Tests** - Users generate tests from the validated API specifications, verify their accuracy, then use these tested contracts as input for integration testing
- **Integration Tests** - Created using verified feature files and API specs as inputs, with user validation before proceeding to ensure end-to-end functionality coverage

#### RoostGPT Testing Framework: Process Flow  
  


**Let's demonstrate the first phase of the RoostGPT workflow: transforming a Jira business requirement into a comprehensive functional test plan.**

**For this example, we'll walk through:**

- Taking a Jira user story as input
- Creating structured functional test scenarios in RoostGPT
- Generating the foundational test plan that will serve as input for subsequent API and integration test phases

**To proceed with this demonstration, please provide:**

- A sample Jira ticket/user story you'd like to use

Lets consider this Jira Ticket  
  
[![Screenshot 2025-09-15 at 11.50.19 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/Ah9JFSYsQmO3NWku-screenshot-2025-09-15-at-11-50-19-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/Ah9JFSYsQmO3NWku-screenshot-2025-09-15-at-11-50-19-pm.png)

We'll demonstrate using a Jira ticket containing a credit card lifecycle user story as our business requirement input.  
  
**Action:** Navigate to RoostGPT and initiate the functional test creation workflow.  
  
[![Screenshot 2025-09-15 at 11.52.29 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/vkuZdJcKNdqZVUBq-screenshot-2025-09-15-at-11-52-29-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/vkuZdJcKNdqZVUBq-screenshot-2025-09-15-at-11-52-29-pm.png)

Select our Jira Ticket

[![Screenshot 2025-09-15 at 11.58.11 PM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/YaMoZt2nbipYFqe1-screenshot-2025-09-15-at-11-58-11-pm.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/kx22g4MShZpyqwy1-screenshot-2025-09-15-at-11-54-50-pm.png)

  
**Trigger Functional Test Creation:** Once the Jira ticket is selected, initiate RoostGPT's functional test generation process.

**Generated Results:** Upon completion, RoostGPT produces three foundational artifacts:

- **Functional Test Scenarios** - Comprehensive test cases derived from business requirements
- **Gherkin Feature File** - Behavior-driven development scenarios in gherkin feature format.
- **API Specification** - Technical contract definitions for service interactions

[![Screenshot 2025-09-16 at 12.01.01 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/QK3mREIkjwOdoanf-screenshot-2025-09-16-at-12-01-01-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/QK3mREIkjwOdoanf-screenshot-2025-09-16-at-12-01-01-am.png)

[![Screenshot 2025-09-16 at 12.02.40 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/eH4TjaTSEFu3MWqv-screenshot-2025-09-16-at-12-02-40-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/eH4TjaTSEFu3MWqv-screenshot-2025-09-16-at-12-02-40-am.png)

##### [![Screenshot 2025-09-16 at 12.01.45 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/957ZTrxmOlqA8Zt5-screenshot-2025-09-16-at-12-01-45-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/957ZTrxmOlqA8Zt5-screenshot-2025-09-16-at-12-01-45-am.png)  
  
**Test-Driven Development and Unit Test Generation**  


**Test-Driven Development Implementation:** Using the verified functional test cases as your guide, implement the required code functionality following Test-Driven Development principles. The functional test scenarios provide clear requirements for what your code needs to accomplish.

**Code Generation Foundation:** The API specification file serves as the single source of truth for generating initial source code structure using the OpenAPI Generator as a helping tool. The OpenAPI Generator serves as a productivity aid that accelerates development by creating standardized code scaffolding and reducing manual setup effort.

`openapi-generator generate -i functional_tests/ZBIO-5213.yaml  -g spring -o . --additional-properties=javaVersion=1.8`

  
  
[![Screenshot 2025-09-16 at 12.14.23 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/dLzv2DuihHALLUay-screenshot-2025-09-16-at-12-14-23-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/dLzv2DuihHALLUay-screenshot-2025-09-16-at-12-14-23-am.png)  
  
  
**VS Code Integration:** Once your code implementation is complete, generate comprehensive unit tests directly within your development environment. Simply right-click on your code file and select **"Generate Test using RoostGPT"** from the context menu.

[![Screenshot 2025-09-16 at 12.16.23 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/p55l8SZQJA7aCi19-screenshot-2025-09-16-at-12-16-23-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/p55l8SZQJA7aCi19-screenshot-2025-09-16-at-12-16-23-am.png)

**Framework Preferences:** Configure your testing setup by selecting your preferred dependency management tools and testing frameworks. RoostGPT will adapt the generated tests to match your technology stack and project requirements.

**Trigger Generation:** Initiate the unit test creation process.

  
And **Voila**!! Test Generation is in progress for user written code based on functional test.

[![Screenshot 2025-09-16 at 12.17.04 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/jRmnQhaEfEO3Eqhf-screenshot-2025-09-16-at-12-17-04-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/jRmnQhaEfEO3Eqhf-screenshot-2025-09-16-at-12-17-04-am.png)

  
**Code-Lens Integration:** Alternatively, you can generate targeted unit tests using RoostGPT's code-lens functionality. Interactive action items appear above your Package, Class, and Function declarations, allowing for granular test generation at any code level.

[![Screenshot 2025-09-16 at 12.20.29 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/xRjISW9DILsRFi5w-screenshot-2025-09-16-at-12-20-29-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/xRjISW9DILsRFi5w-screenshot-2025-09-16-at-12-20-29-am.png)

**Java Structure Preservation:** Generated unit tests are automatically organized in the test folder while maintaining the original Java package structure, ensuring seamless integration with your existing project architecture.

**Dependency Management:** RoostGPT automatically adds all required testing dependencies to your pom.xml file, eliminating manual configuration overhead.

  
[![Screenshot 2025-09-16 at 8.33.59 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/aiCCUBnFHwpjp59j-screenshot-2025-09-16-at-8-33-59-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/aiCCUBnFHwpjp59j-screenshot-2025-09-16-at-8-33-59-am.png)

**Automated Test Execution:** Upon generation, RoostGPT executes the unit tests and generates comprehensive execution reports along with detailed code coverage analysis.

**Coverage Analysis:** View detailed coverage metrics to understand how thoroughly your tests validate the implemented code.

**Intelligent Error Resolution:** If any generated tests fail to compile, RoostGPT automatically iterates over the problematic Java files, analyzing compilation errors and attempting to resolve them programmatically.

**Fallback Mechanism:** After reaching the maximum iteration limit without resolution, RoostGPT changes the file extension to "\*.java.invalid" to prevent project-wide compilation issues while preserving the problematic code for manual review.

  
[![Screenshot 2025-09-16 at 8.41.18 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/d2JuiebdKZxm1JFV-screenshot-2025-09-16-at-8-41-18-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/d2JuiebdKZxm1JFV-screenshot-2025-09-16-at-8-41-18-am.png)

**Improvement Sidebar:** Access the dedicated improvement panel where you can provide feedback on generated tests and request modifications based on specific requirements.

**Iterative Refinement:** Use the feedback mechanism to enhance test quality and coverage, ensuring the unit tests meet your exact testing standards and business requirements.

[![Screenshot 2025-09-16 at 8.43.24 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/J6t689kJLbV7WlON-screenshot-2025-09-16-at-8-43-24-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/J6t689kJLbV7WlON-screenshot-2025-09-16-at-8-43-24-am.png)

##### **[![Screenshot 2025-09-16 at 8.41.03 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/uJPwJEbfjKXUMXru-screenshot-2025-09-16-at-8-41-03-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/uJPwJEbfjKXUMXru-screenshot-2025-09-16-at-8-41-03-am.png)  
  
  
API Test Generation from Specification**

**Swagger Integration:** Navigate to your Swagger/OpenAPI specification file within VS Code. This specification was generated in Phase 1 as part of the functional test creation process.  
  
**RoostGPT Integration:** Right-click on your Swagger specification file and select **"Generate Test using RoostGPT"** from the context menu, then choose **"API tests using API Spec file"** to initiate API test creation.

[![Screenshot 2025-09-16 at 12.27.26 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/DKmE899egclNSr7z-screenshot-2025-09-16-at-12-27-26-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/DKmE899egclNSr7z-screenshot-2025-09-16-at-12-27-26-am.png)

  
  
**Output Framework Selection:** Choose your preferred API testing framework from the available options. RoostGPT will generate tests compatible with your selected framework and project structure.

[![Screenshot 2025-09-16 at 12.37.10 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/DthCaXF01EiPl6ge-screenshot-2025-09-16-at-12-37-10-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/DthCaXF01EiPl6ge-screenshot-2025-09-16-at-12-37-10-am.png)

**Live Server Integration:** Configure your testing environment by providing live server details if available for real-time API validation. This allows tests to run against your actual API endpoints for comprehensive verification.

**Mock Server Alternative:** If no live server is available, RoostGPT automatically provisions a Prism mock server to simulate API responses, ensuring your tests can be executed and validated immediately.

  
[![Screenshot 2025-09-16 at 12.30.09 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/YCSHuP9jca3PrNfz-screenshot-2025-09-16-at-12-30-09-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/YCSHuP9jca3PrNfz-screenshot-2025-09-16-at-12-30-09-am.png)  
  
  
  
**Karate Test Creation:** RoostGPT generates comprehensive Karate API tests organized in a dedicated project folder structure. Each test suite includes detailed documentation and execution instructions and also its data csv for different cases.

[![Screenshot 2025-09-16 at 12.32.16 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/LrL4PUH9C2iXdlzK-screenshot-2025-09-16-at-12-32-16-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/LrL4PUH9C2iXdlzK-screenshot-2025-09-16-at-12-32-16-am.png)

[![Screenshot 2025-09-16 at 12.38.52 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/xK3pv6hYCzXwocha-screenshot-2025-09-16-at-12-38-52-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/xK3pv6hYCzXwocha-screenshot-2025-09-16-at-12-38-52-am.png)

##### **Integration Test Generation Using API Spec and Feature Files**

**API Specification Context:** Right-click on the Swagger API specification file that was generated during the functional test creation phase. This serves as the foundation for your integration test structure.

**RoostGPT Integration Menu:** From the context menu, select **"Generate test using RoostGPT"** then choose **"Integration Test using API spec and gherkin feature"** to initiate the integration test generation workflow.

[![Screenshot 2025-09-16 at 12.40.59 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/pJcPzlSBW26k8KFF-screenshot-2025-09-16-at-12-40-59-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/pJcPzlSBW26k8KFF-screenshot-2025-09-16-at-12-40-59-am.png)

**Output Framework Selection:** Choose your preferred integration testing framework from the available options. RoostGPT will structure the generated tests according to your selected framework's conventions and best practices.  
  
**Gherkin Feature Location:** When prompted, navigate to and select the Gherkin feature file location. This feature file was generated alongside the functional tests in Phase 1 and contains the behavior-driven development scenarios.  
  
[![Screenshot 2025-09-16 at 12.42.06 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/ujOcuZoKD6SFiFM4-screenshot-2025-09-16-at-12-42-06-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/ujOcuZoKD6SFiFM4-screenshot-2025-09-16-at-12-42-06-am.png)  
  
**Scenario Processing:** RoostGPT triggers the integration test creation process by parsing the selected feature file and extracting individual test scenarios. Each scenario is analyzed for its specific testing requirements and data needs.  
  
[![Screenshot 2025-09-16 at 12.42.33 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/OUE8S6zJbn1lVoNI-screenshot-2025-09-16-at-12-42-33-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/OUE8S6zJbn1lVoNI-screenshot-2025-09-16-at-12-42-33-am.png)  
  
**Organized Test Output:** The generation process creates a comprehensive test suite with separate files for each scenario identified in the feature file. Additionally, corresponding CSV test data files are automatically generated to support data-driven testing for each scenario.

### [![Screenshot 2025-09-16 at 12.46.50 AM.png](https://docs.roost.ai/uploads/images/gallery/2025-09/scaled-1680-/ES1yOh6KBWOW7kQV-screenshot-2025-09-16-at-12-46-50-am.png)](https://docs.roost.ai/uploads/images/gallery/2025-09/ES1yOh6KBWOW7kQV-screenshot-2025-09-16-at-12-46-50-am.png)  
  
  
**Conclusion: Complete Testing Ecosystem Achievement**

#### **RoostGPT Workflow Summary**

Through this comprehensive four-phase workflow, RoostGPT transforms a single Jira business requirement into a complete, multi-layered testing ecosystem. Starting with user stories and ending with validated code implementation, every aspect of your application is thoroughly tested and traceable back to original business needs.

#### **Achieved Test Coverage:**

- ✅ **Functional Tests** - Business requirement validation and acceptance criteria verification
- ✅ **Unit Tests** - Component-level code validation following TDD principles
- ✅ **API Tests** - Service contract and endpoint functionality verification
- ✅ **Integration Tests** - End-to-end workflow and system interaction validation

#### **Key Workflow Benefits Realized:**

**Complete Requirements Traceability:** Every generated test directly maps back to your original Jira business requirements, ensuring no functionality gaps.

**Seamless Development Integration:** VS Code integration enables developers to generate tests contextually without leaving their development environment.

**Framework Flexibility:** Support for multiple testing frameworks ensures compatibility with your existing technology stack.

**Data-Driven Testing:** Automated CSV generation provides comprehensive test data coverage for thorough validation.

**Quality Assurance:** User verification at each phase ensures accuracy and alignment with business expectations.