We use cookies on this site to enhance your user experience

By clicking the Accept button, you agree to us doing so. More info on our cookie policy

DevOps

Testing & Validation

Part 7: Testing & Validation

7.1 End-to-End Testing

Test Python Script Locally First:

Before running the complete CI/CD pipeline, test the deployment script locally:

# Install dependencies
pip install requests python-dotenv

# Test authentication and pipeline discovery
python scripts/deploy_all.py \
  "your-tenant-id" \
  "your-app-id" \
  "your-client-secret" \
  "PowerBI-Reports-Lifecycle" \
  0

# Expected output:
# πŸš€ Starting Microsoft Fabric Deployment
# πŸ“‹ Pipeline: PowerBI-Reports-Lifecycle
# πŸ“Š Source Stage Order: 0
# πŸ” Tenant ID: 12345678...
# --------------------------------------------------
# βœ… Successfully authenticated with Microsoft Fabric service
# βœ… Found pipeline: PowerBI-Reports-Lifecycle
# βœ… Found pipeline with ID: abc123def-456...
# πŸš€ Deploying from 'Development' to 'Test'
# πŸ“‹ Operation ID: operation-456789
# πŸ“Š Operation Status: Executing (Attempt 1/240)
# ⏳ Waiting for operation to complete...
# βœ… Deployment completed successfully!
# πŸŽ‰ Deployment completed successfully!

Complete Workflow Test:

  1. Feature Development
    βœ… Create feature in Feature Workspace
    βœ… Sync to feature branch
    βœ… Create and merge PR
    
  2. Manual DEV Sync
    βœ… Manually sync DEV workspace
    βœ… Verify latest changes in DEV
    
  3. Automated Deployment
    βœ… GitHub Actions trigger on main branch
    βœ… UAT deployment with approval
    βœ… PROD deployment with approval
    
  4. Validation
    βœ… Verify reports in UAT workspace
    βœ… Validate parameters updated correctly
    βœ… Confirm PROD deployment success
    

GitHub Actions Approval Process

Figure: GitHub Actions Approval Process

7.2 Validation Checklist

Pre-Deployment Validation:

  • Service principal authentication working
  • All workspaces assigned to active capacity
  • Deployment pipeline permissions configured
  • GitHub secrets properly set
  • Environment protection rules active

Post-Deployment Validation:

  • Reports deployed to correct workspaces
  • Parameters updated for each environment
  • Data connections working in all environments
  • Approval gates functioning correctly
  • Deployment logs available in GitHub Actions

Next: Best Practices & Troubleshooting