Loading…
Workflow goal
Test for confluence workflow
Variable Source Value Phase Status
Frontend Application Structure
Empty
Sample Documentation for development
Phase 1: Metadata
β€” Not fetched
Phase 2: Raw Content
⏳ Pending
Phase 3: Final Content
⏳ Pending
0/1 0/1 0/1
Legacy Test Cases
Empty

Frontend Application Structure

Sample Documentation for development

290848769v1 ID: 290848769v1
*290848769v1 - Not yet fetched*

Legacy Test Cases

1 Legacy Test Analysis
Analyze existing legacy test cases
pending
Value will be available once processing is complete.
Input will be available once processing is complete.
System Prompt (raw)
You are a test migration expert specializing in legacy test analysis.
Your task is to analyze existing test cases and understand their current structure and approach.

Focus on identifying:
1. Current test framework or approach
2. Test structure and organization
3. Element identification methods
4. Data handling approach
5. Assertion methods
6. Common patterns and anti-patterns
User Prompt (raw)
Legacy Test Cases: {userInput}

Analyze these legacy tests and identify:

1. **Current Technology**
   - Test framework used
   - Programming language
   - Browser automation approach

2. **Code Structure**
   - Test organization
   - Setup/teardown patterns
   - Test data management

3. **Element Identification**
   - Locator strategies
   - Hardcoded vs dynamic locators
   - Wait strategies

4. **Anti-patterns**
   - Code duplication
   - Hardcoded waits
   - Direct WebDriver calls
   - Missing error handling

5. **Strengths**
   - Good practices to preserve
   - Reusable components
   - Clear test logic

Document the current state comprehensively.
2 Pattern Identification
Identify reusable patterns and anti-patterns
pending
Value will be available once processing is complete.
Input will be available once processing is complete.
System Prompt (raw)
You are a pattern recognition expert in test automation.
Your task is to identify patterns that can be standardized and anti-patterns that need correction.
User Prompt (raw)
Legacy Analysis: {legacy_analysis}

Framework Functions: {selenium_function_library}

Identify patterns for migration:

1. **Reusable Patterns**
   - Common workflows (login, navigation)
   - Validation patterns
   - Data-driven patterns
   - Setup/teardown routines

2. **Anti-patterns to Fix**
   - Thread.sleep() β†’ Explicit waits
   - Hardcoded values β†’ Configurable data
   - Repeated code β†’ Reusable functions
   - Direct element access β†’ Page Objects

3. **Mapping Opportunities**
   - Legacy operations β†’ Framework functions
   - Custom methods β†’ Standard functions
   - Complex workflows β†’ Simplified approaches

4. **Improvement Areas**
   - Performance optimizations
   - Maintainability improvements
   - Readability enhancements

Create a comprehensive pattern catalog.
3 Framework Mapping
Map legacy operations to framework functions
pending
Value will be available once processing is complete.
Input will be available once processing is complete.
System Prompt (raw)
You are a framework mapping specialist with expertise in test modernization.
Your task is to create detailed mappings from legacy operations to modern framework functions.
User Prompt (raw)
Pattern Analysis: {pattern_identification}

Using resources:
- Framework Functions: {selenium_function_library}
- Frontend Structure: {frontend_application}

Create migration mappings:

1. **Direct Mappings**
   ```
   Legacy: driver.findElement(By.id("submit")).click()
   Modern: click(By.id("submit"))
   ```

2. **Complex Mappings**
   ```
   Legacy: 
   Thread.sleep(5000);
   driver.findElement(By.xpath("//button")).click();
   
   Modern:
   waitForElementClickable(By.xpath("//button"), 10);
   click(By.xpath("//button"));
   ```

3. **Workflow Mappings**
   - Login sequence β†’ loginUser(username, password)
   - Form filling β†’ fillForm(formData)
   - Validation β†’ verifyPageContent(expected)

4. **Data Handling**
   - Hardcoded β†’ Data providers
   - Inline data β†’ External files
   - Test data β†’ Configuration

Create comprehensive mappings for all identified patterns.
4 Refactored Structure
Refactor test structure following best practices
pending
Value will be available once processing is complete.
Input will be available once processing is complete.
System Prompt (raw)
You are a test architecture expert specializing in Page Object Model and best practices.
Your task is to refactor the test structure for maintainability and scalability.
User Prompt (raw)
Framework Mapping: {framework_mapping}

Frontend Structure: {frontend_application}

Refactor the test structure:

1. **Page Object Model**
   ```javascript
   class PolicyPage extends BasePage {
       constructor(driver) {
           super(driver);
           this.url = '/policies';
           this.elements = {
               addButton: By.id('add-policy'),
               deductibleSelect: By.id('deductible'),
               submitButton: By.css('.submit-btn')
           };
       }
       
       async addPolicy(policyData) {
           await this.click(this.elements.addButton);
           await this.fillPolicyForm(policyData);
           await this.submit();
       }
   }
   ```

2. **Test Structure**
   ```javascript
   describe('Policy Management', () => {
       let policyPage;
       
       beforeEach(async () => {
           policyPage = new PolicyPage(driver);
           await policyPage.navigate();
       });
       
       it('should create policy with $300 deductible', async () => {
           await policyPage.addPolicy(testData.policy300);
           await policyPage.verifyPolicyCreated();
       });
   });
   ```

3. **Utility Classes**
   - TestDataProvider
   - ReportGenerator
   - ScreenshotHelper

4. **Configuration**
   - Environment settings
   - Test data files
   - Execution profiles

Create a well-structured, maintainable test architecture.
5 Migrated Scripts
Generate migrated test scripts
pending
Value will be available once processing is complete.
Input will be available once processing is complete.
System Prompt (raw)
You are a test script generation expert specializing in creating clean, modern test automation code.
Your task is to generate the complete migrated test scripts.
User Prompt (raw)
Refactored Structure: {refactored_structure}

Framework Mapping: {framework_mapping}

Selenium Functions: {selenium_function_library}

Generate migrated test scripts:

## Complete Test Suite

### Base Classes
```javascript
// BasePage.js
class BasePage {
    constructor(driver) {
        this.driver = driver;
        this.timeout = 10000;
    }
    
    async click(element) {
        await this.waitForElementClickable(element);
        await element.click();
    }
    
    async enterText(element, text) {
        await this.waitForElementVisible(element);
        await element.clear();
        await element.sendKeys(text);
    }
}
```

### Page Objects
```javascript
// PolicyPage.js
class PolicyPage extends BasePage {
    // Page-specific implementation
}
```

### Test Scripts
```javascript
// policyTests.spec.js
describe('Insurance Policy Tests', () => {
    // Migrated test cases
});
```

### Configuration
```javascript
// config.js
module.exports = {
    baseUrl: process.env.BASE_URL,
    timeout: 30000,
    retries: 2
};
```

### Test Data
```json
// testData.json
{
    "policies": {
        "standard": {...},
        "with300Deductible": {...}
    }
}
```

Generate the complete migrated test suite with all components.
6 Migration Report
Create comprehensive migration report
pending
Value will be available once processing is complete.
Input will be available once processing is complete.
System Prompt (raw)
You are a technical documentation expert specializing in migration reports.
Your task is to create a comprehensive report documenting the migration process and improvements.
User Prompt (raw)
Legacy Analysis: {legacy_analysis}

Migrated Scripts: {migrated_scripts}

Patterns Identified: {pattern_identification}

Create migration report:

# Test Migration Report

## Executive Summary
- Total tests migrated
- Technologies updated
- Improvements achieved
- ROI metrics

## Migration Overview

### Before Migration
- Technology stack
- Code metrics
- Known issues
- Maintenance burden

### After Migration
- Modern stack
- Improved metrics
- Issues resolved
- Maintenance benefits

## Detailed Changes

### 1. Framework Migration
| Legacy | Modern | Benefit |
|--------|--------|---------|
| Raw Selenium | Framework Functions | 50% less code |
| Thread.sleep | Explicit waits | More reliable |
| XPath only | Multiple strategies | More maintainable |

### 2. Structure Improvements
- Page Object Model adoption
- Test data externalization
- Configuration management
- Reusable components

### 3. Code Quality Metrics
- Lines of code: -40%
- Duplication: -60%
- Complexity: -35%
- Maintainability: +80%

## Migration Guide

### Running Migrated Tests
1. Installation steps
2. Configuration setup
3. Execution commands
4. Reporting

### Maintenance Guide
- Adding new tests
- Updating page objects
- Managing test data
- Troubleshooting

## Recommendations
- Next steps
- Continuous improvements
- Training needs
- Tool upgrades

Generate a professional migration report.