{"id":30664667,"url":"https://github.com/dreamquality/playwright-report-uploader","last_synced_at":"2026-05-08T07:31:41.121Z","repository":{"id":310202416,"uuid":"1039068200","full_name":"dreamquality/playwright-report-uploader","owner":"dreamquality","description":"Automatically upload Playwright HTML reports to cloud storage providers","archived":false,"fork":false,"pushed_at":"2025-08-16T12:43:40.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-02T03:19:03.965Z","etag":null,"topics":["aws","azure","cloud-storage","cross-platform","gcp","playwright","reports","testing","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamquality.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-16T12:12:53.000Z","updated_at":"2025-08-16T12:43:43.000Z","dependencies_parsed_at":"2025-08-16T13:54:50.244Z","dependency_job_id":"a9a86439-bc3d-4ada-8b1f-98bb49ec7272","html_url":"https://github.com/dreamquality/playwright-report-uploader","commit_stats":null,"previous_names":["dreamquality/playwright-report-uploader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dreamquality/playwright-report-uploader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamquality%2Fplaywright-report-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamquality%2Fplaywright-report-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamquality%2Fplaywright-report-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamquality%2Fplaywright-report-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamquality","download_url":"https://codeload.github.com/dreamquality/playwright-report-uploader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamquality%2Fplaywright-report-uploader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32770981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","azure","cloud-storage","cross-platform","gcp","playwright","reports","testing","typescript"],"created_at":"2025-08-31T19:48:34.886Z","updated_at":"2026-05-08T07:31:41.100Z","avatar_url":"https://github.com/dreamquality.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Playwright Report Uploader\n\nAutomatically upload Playwright HTML reports to cloud storage providers with cross-platform support for AWS S3, Azure Blob Storage, Google Cloud Storage, and custom providers.\n\n[![npm version](https://badge.fury.io/js/playwright-report-uploader.svg)](https://badge.fury.io/js/playwright-report-uploader)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n[![Tests](https://img.shields.io/badge/Tests-Passing-green.svg)](#testing)\n\n## ✨ Features\n\n- 🌥️ **Multi-Cloud Support**: AWS S3, Azure Blob Storage, Google Cloud Storage\n- 🎭 **Playwright Integration**: Seamless integration as a custom reporter\n- 🔧 **Flexible Configuration**: Environment variables, JSON config files, programmatic setup\n- 📋 **Index Generation**: Automatic creation of index.html with file links\n- �� **Extensible**: Support for custom cloud providers\n- 📘 **TypeScript**: Full TypeScript support with type definitions\n- 🖥️ **Cross-Platform**: Windows, macOS, Linux support\n- 🔒 **Security**: Secure credential handling and access control\n- ✅ **Tested**: Comprehensive unit and integration tests\n- 🔄 **CI/CD Ready**: Easy integration with popular CI/CD platforms\n\n## 📋 Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Configuration](#configuration)\n- [Usage](#usage)\n- [Cloud Provider Setup](#cloud-provider-setup)\n- [Platform-Specific Setup](#platform-specific-setup)\n- [API Reference](#api-reference)\n- [Examples](#examples)\n- [Testing](#testing)\n- [CI/CD Integration](#cicd-integration)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n\n## 📦 Prerequisites\n\n### System Requirements\n\n- **Node.js**: \u003e= 14.0.0\n- **npm**: \u003e= 6.0.0 (or yarn \u003e= 1.22.0)\n- **Playwright**: \u003e= 1.20.0\n\n### Platform Support\n\n| Platform | Status | Notes |\n|----------|--------|-------|\n| Windows 10/11 | ✅ Supported | PowerShell or Git Bash recommended |\n| macOS | ✅ Supported | All versions supported |\n| Linux | ✅ Supported | Ubuntu, CentOS, Alpine, etc. |\n| Docker | ✅ Supported | All major base images |\n\n### Cloud Provider Requirements\n\n| Provider | Required | Optional |\n|----------|----------|----------|\n| **AWS S3** | Access Key ID, Secret Access Key, Region, Bucket | KMS Key, IAM Roles |\n| **Azure** | Connection String, Container | Storage Account Key, SAS Token |\n| **Google Cloud** | Project ID, Bucket | Service Account Key, IAM |\n\n## 🚀 Installation\n\n### NPM\n\n```bash\nnpm install playwright-report-uploader\n```\n\n### Yarn\n\n```bash\nyarn add playwright-report-uploader\n```\n\n### Development Installation\n\n```bash\ngit clone https://github.com/dreamquality/playwright-report-uploader\ncd playwright-report-uploader\nnpm install\nnpm run build\n```\n\n## ⚡ Quick Start\n\n### 1. Basic Playwright Integration\n\n```typescript\n// playwright.config.ts\nimport { defineConfig } from '@playwright/test';\nimport { PlaywrightReportUploader } from 'playwright-report-uploader';\n\nexport default defineConfig({\n  reporter: [\n    ['html', { outputFolder: 'playwright-report' }],\n    [PlaywrightReportUploader, {\n      provider: 'aws',\n      reportDir: './playwright-report',\n      awsBucket: process.env.AWS_BUCKET,\n      awsRegion: process.env.AWS_REGION || 'us-east-1',\n      publicAccess: true,\n      generateIndex: true\n    }]\n  ],\n  // ... other configuration\n});\n```\n\n### 2. Environment Setup\n\n```bash\n# Create .env file\necho \"AWS_BUCKET=my-playwright-reports\" \u003e\u003e .env\necho \"AWS_REGION=us-east-1\" \u003e\u003e .env\necho \"AWS_ACCESS_KEY_ID=your-access-key\" \u003e\u003e .env\necho \"AWS_SECRET_ACCESS_KEY=your-secret-key\" \u003e\u003e .env\n```\n\n### 3. Run Tests\n\n```bash\nnpx playwright test\n# Reports will be automatically uploaded after test completion\n```\n\n## ⚙️ Configuration\n\n### Configuration Methods\n\nThe uploader supports multiple configuration methods with the following precedence:\n\n1. **Programmatic configuration** (highest priority)\n2. **Environment variables**\n3. **JSON configuration files**\n4. **Default values** (lowest priority)\n\n### Environment Variables\n\n```bash\n# General Configuration\nexport UPLOAD_PROVIDER=aws              # Provider: aws, azure, gcp, custom\nexport REPORT_DIR=./playwright-report   # Report directory path\nexport OUTPUT_DIR=./upload-metadata     # Metadata output directory\nexport PUBLIC_ACCESS=true               # Make files publicly accessible\nexport GENERATE_INDEX=true              # Generate index.html\nexport METADATA_FILE=report-metadata.json\nexport RETENTION_DAYS=30                # File retention period\n\n# AWS S3 Configuration\nexport AWS_REGION=us-east-1\nexport AWS_BUCKET=my-playwright-reports\nexport AWS_ACCESS_KEY_ID=your-access-key\nexport AWS_SECRET_ACCESS_KEY=your-secret-key\nexport AWS_PREFIX=reports/               # Optional prefix for S3 keys\n\n# Azure Blob Storage Configuration\nexport AZURE_CONNECTION_STRING=\"DefaultEndpointsProtocol=https;AccountName=...\"\nexport AZURE_CONTAINER=playwright-reports\nexport AZURE_PREFIX=reports/\n\n# Google Cloud Storage Configuration\nexport GCP_PROJECT_ID=my-project-id\nexport GCP_BUCKET=my-playwright-reports\nexport GCP_KEY_FILE_PATH=./service-account-key.json\nexport GCP_PREFIX=reports/\n```\n\n### JSON Configuration Files\n\n#### AWS Configuration (config-aws.json)\n\n```json\n{\n  \"provider\": \"aws\",\n  \"reportDir\": \"./playwright-report\",\n  \"outputDir\": \"./upload-metadata\",\n  \"awsRegion\": \"us-east-1\",\n  \"awsBucket\": \"my-playwright-reports\",\n  \"awsPrefix\": \"reports/\",\n  \"publicAccess\": true,\n  \"generateIndex\": true,\n  \"retentionDays\": 30\n}\n```\n\n#### Azure Configuration (config-azure.json)\n\n```json\n{\n  \"provider\": \"azure\",\n  \"reportDir\": \"./playwright-report\",\n  \"outputDir\": \"./upload-metadata\",\n  \"azureConnectionString\": \"DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net\",\n  \"azureContainer\": \"playwright-reports\",\n  \"azurePrefix\": \"reports/\",\n  \"publicAccess\": true,\n  \"generateIndex\": true\n}\n```\n\n#### Google Cloud Configuration (config-gcp.json)\n\n```json\n{\n  \"provider\": \"gcp\",\n  \"reportDir\": \"./playwright-report\",\n  \"outputDir\": \"./upload-metadata\",\n  \"gcpProjectId\": \"my-project-id\",\n  \"gcpBucket\": \"my-playwright-reports\",\n  \"gcpKeyFilePath\": \"./service-account-key.json\",\n  \"gcpPrefix\": \"reports/\",\n  \"publicAccess\": true,\n  \"generateIndex\": true\n}\n```\n\n## 🎯 Usage\n\n### CLI Usage\n\n```bash\n# With configuration file\nnpx playwright-report-uploader ./config.json\n\n# Using environment variables\nnpx playwright-report-uploader\n\n# With specific report directory\nnpx playwright-report-uploader --report-dir ./custom-report-dir\n```\n\n### Programmatic Usage\n\n```typescript\nimport { uploadReport, UploadManager } from 'playwright-report-uploader';\n\n// Simple upload with config file\nawait uploadReport('./config.json');\n\n// Advanced usage with programmatic config\nconst config = {\n  provider: 'aws',\n  reportDir: './playwright-report',\n  awsBucket: 'my-reports',\n  awsRegion: 'us-west-2',\n  publicAccess: true\n};\n\nconst manager = new UploadManager(config);\nconst results = await manager.uploadReport();\n\nconsole.log('Upload results:', results);\n```\n\n### Custom Provider Implementation\n\n```typescript\nimport { UploadManager } from 'playwright-report-uploader';\n\nconst config = {\n  provider: 'custom',\n  reportDir: './playwright-report',\n  customUploader: async (config, filePath) =\u003e {\n    // Your custom upload logic\n    const uploadedUrl = await myCustomUpload(filePath);\n    return uploadedUrl;\n  }\n};\n\nconst manager = new UploadManager(config);\nawait manager.uploadReport();\n```\n\n## ☁️ Cloud Provider Setup\n\n### AWS S3 Setup\n\n1. **Create S3 Bucket**:\n   ```bash\n   aws s3 mb s3://my-playwright-reports --region us-east-1\n   ```\n\n2. **Create IAM User with S3 Permissions**:\n   ```json\n   {\n     \"Version\": \"2012-10-17\",\n     \"Statement\": [\n       {\n         \"Effect\": \"Allow\",\n         \"Action\": [\n           \"s3:PutObject\",\n           \"s3:PutObjectAcl\",\n           \"s3:GetObject\",\n           \"s3:DeleteObject\"\n         ],\n         \"Resource\": \"arn:aws:s3:::my-playwright-reports/*\"\n       }\n     ]\n   }\n   ```\n\n3. **Configure Credentials**:\n   ```bash\n   aws configure\n   # OR set environment variables\n   export AWS_ACCESS_KEY_ID=your-key\n   export AWS_SECRET_ACCESS_KEY=your-secret\n   ```\n\n### Azure Blob Storage Setup\n\n1. **Create Storage Account**:\n   ```bash\n   az storage account create \\\n     --name myplaywrightreports \\\n     --resource-group myResourceGroup \\\n     --location eastus \\\n     --sku Standard_LRS\n   ```\n\n2. **Get Connection String**:\n   ```bash\n   az storage account show-connection-string \\\n     --name myplaywrightreports \\\n     --resource-group myResourceGroup\n   ```\n\n3. **Create Container**:\n   ```bash\n   az storage container create \\\n     --name reports \\\n     --connection-string \"your-connection-string\"\n   ```\n\n### Google Cloud Storage Setup\n\n1. **Create Bucket**:\n   ```bash\n   gsutil mb gs://my-playwright-reports\n   ```\n\n2. **Create Service Account**:\n   ```bash\n   gcloud iam service-accounts create playwright-uploader \\\n     --display-name \"Playwright Report Uploader\"\n   ```\n\n3. **Grant Permissions**:\n   ```bash\n   gsutil iam ch serviceAccount:playwright-uploader@project-id.iam.gserviceaccount.com:objectAdmin gs://my-playwright-reports\n   ```\n\n4. **Create and Download Key**:\n   ```bash\n   gcloud iam service-accounts keys create ./service-account-key.json \\\n     --iam-account playwright-uploader@project-id.iam.gserviceaccount.com\n   ```\n\n## 🖥️ Platform-Specific Setup\n\n### Windows Setup\n\n#### Prerequisites\n```powershell\n# Install Node.js from https://nodejs.org/\n# Or using Chocolatey\nchoco install nodejs\n\n# Verify installation\nnode --version\nnpm --version\n```\n\n#### Environment Variables\n```powershell\n# Using PowerShell\n$env:AWS_BUCKET=\"my-playwright-reports\"\n$env:AWS_REGION=\"us-east-1\"\n\n# Or create .env file\nNew-Item -Path .env -ItemType File\nAdd-Content -Path .env -Value \"AWS_BUCKET=my-playwright-reports\"\n```\n\n#### Git Bash Alternative\n```bash\n# In Git Bash (recommended for better compatibility)\nexport AWS_BUCKET=my-playwright-reports\nexport AWS_REGION=us-east-1\n```\n\n### macOS Setup\n\n#### Prerequisites\n```bash\n# Install Node.js using Homebrew\nbrew install node\n\n# Or download from https://nodejs.org/\n# Verify installation\nnode --version\nnpm --version\n```\n\n#### Environment Variables\n```bash\n# Add to ~/.zshrc or ~/.bash_profile\necho 'export AWS_BUCKET=my-playwright-reports' \u003e\u003e ~/.zshrc\necho 'export AWS_REGION=us-east-1' \u003e\u003e ~/.zshrc\nsource ~/.zshrc\n```\n\n### Linux Setup\n\n#### Ubuntu/Debian\n```bash\n# Install Node.js\ncurl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -\nsudo apt-get install -y nodejs\n\n# Verify installation\nnode --version\nnpm --version\n```\n\n#### CentOS/RHEL\n```bash\n# Install Node.js\ncurl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -\nsudo yum install -y nodejs\n\n# Verify installation\nnode --version\nnpm --version\n```\n\n#### Alpine Linux (Docker)\n```dockerfile\nFROM node:18-alpine\nRUN apk add --no-cache git\nWORKDIR /app\nCOPY package*.json ./\nRUN npm ci --only=production\n```\n\n## 📚 API Reference\n\n### UploadConfig Interface\n\n```typescript\ninterface UploadConfig {\n  // Common configuration\n  provider: 'aws' | 'azure' | 'gcp' | 'custom';\n  reportDir: string;\n  outputDir?: string;\n  publicAccess?: boolean;\n  generateIndex?: boolean;\n  metadataFile?: string;\n  retentionDays?: number;\n\n  // AWS S3 configuration\n  awsRegion?: string;\n  awsBucket?: string;\n  awsAccessKeyId?: string;\n  awsSecretAccessKey?: string;\n  awsPrefix?: string;\n\n  // Azure Blob Storage configuration\n  azureConnectionString?: string;\n  azureContainer?: string;\n  azurePrefix?: string;\n\n  // Google Cloud Storage configuration\n  gcpProjectId?: string;\n  gcpBucket?: string;\n  gcpKeyFilePath?: string;\n  gcpPrefix?: string;\n\n  // Custom provider configuration\n  customUploader?: (config: UploadConfig, filePath: string) =\u003e Promise\u003cstring\u003e;\n}\n```\n\n### Main Functions\n\n#### uploadReport(configPath?: string): Promise\u003cvoid\u003e\n\nUploads the Playwright report using the specified configuration.\n\n```typescript\n// With config file\nawait uploadReport('./config.json');\n\n// With environment variables\nawait uploadReport();\n```\n\n#### UploadManager Class\n\n```typescript\nclass UploadManager {\n  constructor(config: UploadConfig);\n  \n  async uploadReport(): Promise\u003cMap\u003cstring, UploadResult\u003e\u003e;\n}\n```\n\n#### PlaywrightReportUploader Class\n\n```typescript\nclass PlaywrightReportUploader {\n  constructor(config: Partial\u003cUploadConfig\u003e);\n  \n  async onEnd(): Promise\u003cvoid\u003e;\n}\n```\n\n### Configuration Loading\n\n#### loadConfig(configPath?: string): Promise\u003cUploadConfig\u003e\n\nLoads configuration from file and environment variables.\n\n```typescript\nimport { loadConfig } from 'playwright-report-uploader';\n\nconst config = await loadConfig('./my-config.json');\n```\n\n## 🧪 Testing\n\n### Running Tests\n\n```bash\n# Run all tests\nnpm test\n\n# Run unit tests only\nnpm run test:unit\n\n# Run integration tests only\nnpm run test:integration\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Run tests with coverage\nnpm run test:coverage\n```\n\n### Integration Test Setup\n\nFor integration tests, you need to set up cloud provider credentials:\n\n```bash\n# AWS\nexport AWS_ACCESS_KEY_ID=your-test-key\nexport AWS_SECRET_ACCESS_KEY=your-test-secret\nexport AWS_BUCKET=test-bucket\nexport AWS_REGION=us-east-1\n\n# Azure\nexport AZURE_CONNECTION_STRING=\"DefaultEndpointsProtocol=https;...\"\nexport AZURE_CONTAINER=test-container\n\n# Google Cloud\nexport GCP_PROJECT_ID=test-project\nexport GCP_BUCKET=test-bucket\nexport GCP_KEY_FILE_PATH=./test-service-account.json\n```\n\n### Testing Custom Providers\n\n```typescript\n// tests/custom-provider.test.ts\nimport { UploadManager } from 'playwright-report-uploader';\n\ndescribe('Custom Provider', () =\u003e {\n  it('should upload with custom provider', async () =\u003e {\n    const uploadedFiles: string[] = [];\n    \n    const config = {\n      provider: 'custom',\n      reportDir: './test-report',\n      customUploader: async (config, filePath) =\u003e {\n        uploadedFiles.push(filePath);\n        return `https://example.com/uploads/${path.basename(filePath)}`;\n      }\n    };\n\n    const manager = new UploadManager(config);\n    const results = await manager.uploadReport();\n    \n    expect(uploadedFiles.length).toBeGreaterThan(0);\n    expect(Array.from(results.values()).every(r =\u003e r.success)).toBe(true);\n  });\n});\n```\n\n## 🔄 CI/CD Integration\n\n### GitHub Actions\n\n```yaml\nname: E2E Tests with Report Upload\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    \n    steps:\n      - uses: actions/checkout@v4\n      \n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: '18'\n          cache: 'npm'\n      \n      - name: Install dependencies\n        run: npm ci\n      \n      - name: Install Playwright\n        run: npx playwright install --with-deps\n      \n      - name: Run Playwright tests\n        run: npm run test:e2e\n        env:\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          AWS_BUCKET: ${{ secrets.AWS_BUCKET }}\n          AWS_REGION: us-east-1\n      \n      - name: Upload reports on failure\n        if: failure()\n        uses: actions/upload-artifact@v4\n        with:\n          name: playwright-report\n          path: playwright-report/\n```\n\n### Jenkins Pipeline\n\n```groovy\npipeline {\n    agent any\n    \n    environment {\n        AWS_ACCESS_KEY_ID = credentials('aws-access-key-id')\n        AWS_SECRET_ACCESS_KEY = credentials('aws-secret-access-key')\n        AWS_BUCKET = 'playwright-reports'\n        AWS_REGION = 'us-east-1'\n    }\n    \n    stages {\n        stage('Install Dependencies') {\n            steps {\n                sh 'npm ci'\n                sh 'npx playwright install --with-deps'\n            }\n        }\n        \n        stage('Run Tests') {\n            steps {\n                sh 'npm run test:e2e'\n            }\n        }\n    }\n    \n    post {\n        always {\n            publishHTML([\n                allowMissing: false,\n                alwaysLinkToLastBuild: true,\n                keepAll: true,\n                reportDir: 'playwright-report',\n                reportFiles: 'index.html',\n                reportName: 'Playwright Report'\n            ])\n        }\n    }\n}\n```\n\n### Azure DevOps\n\n```yaml\ntrigger:\n- main\n\npool:\n  vmImage: 'ubuntu-latest'\n\nvariables:\n  - group: 'playwright-secrets'  # Variable group with cloud credentials\n\nsteps:\n- task: NodeTool@0\n  inputs:\n    versionSpec: '18.x'\n  displayName: 'Install Node.js'\n\n- script: |\n    npm ci\n    npx playwright install --with-deps\n  displayName: 'Install dependencies'\n\n- script: npm run test:e2e\n  env:\n    AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)\n    AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)\n    AWS_BUCKET: $(AWS_BUCKET)\n  displayName: 'Run Playwright tests'\n\n- task: PublishTestResults@2\n  condition: succeededOrFailed()\n  inputs:\n    testResultsFormat: 'JUnit'\n    testResultsFiles: 'test-results/junit.xml'\n```\n\n### GitLab CI\n\n```yaml\nstages:\n  - test\n\nvariables:\n  NODE_VERSION: \"18\"\n\ntest:\n  stage: test\n  image: node:${NODE_VERSION}\n  \n  before_script:\n    - npm ci\n    - npx playwright install --with-deps\n  \n  script:\n    - npm run test:e2e\n  \n  variables:\n    AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID\n    AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY\n    AWS_BUCKET: $AWS_BUCKET\n    AWS_REGION: us-east-1\n  \n  artifacts:\n    when: always\n    reports:\n      junit: test-results/junit.xml\n    paths:\n      - playwright-report/\n    expire_in: 1 week\n```\n\n## 🛠️ Troubleshooting\n\n### Common Issues\n\n#### 1. Authentication Errors\n\n**AWS Issues:**\n```bash\n# Check AWS credentials\naws sts get-caller-identity\n\n# Common solutions:\nexport AWS_PROFILE=your-profile\naws configure list\n```\n\n**Azure Issues:**\n```bash\n# Test connection string\naz storage account show --connection-string \"your-connection-string\"\n\n# Common solutions:\n# - Regenerate storage account keys\n# - Check firewall settings\n# - Verify container permissions\n```\n\n**Google Cloud Issues:**\n```bash\n# Check authentication\ngcloud auth list\ngcloud config list\n\n# Test service account\ngcloud auth activate-service-account --key-file=service-account-key.json\n```\n\n#### 2. File Upload Failures\n\n**Large Files:**\n```typescript\n// Increase timeout for large files\nconst config = {\n  provider: 'aws',\n  reportDir: './playwright-report',\n  awsBucket: 'my-bucket',\n  uploadTimeout: 300000  // 5 minutes\n};\n```\n\n**Network Issues:**\n```typescript\n// Implement retry logic\nconst config = {\n  provider: 'aws',\n  reportDir: './playwright-report',\n  awsBucket: 'my-bucket',\n  retryAttempts: 3,\n  retryDelay: 1000\n};\n```\n\n#### 3. Permission Issues\n\n**S3 Bucket Policy:**\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"PlaywrightReportUpload\",\n      \"Effect\": \"Allow\",\n      \"Principal\": {\n        \"AWS\": \"arn:aws:iam::ACCOUNT:user/playwright-uploader\"\n      },\n      \"Action\": [\n        \"s3:PutObject\",\n        \"s3:PutObjectAcl\"\n      ],\n      \"Resource\": \"arn:aws:s3:::my-bucket/*\"\n    }\n  ]\n}\n```\n\n#### 4. Platform-Specific Issues\n\n**Windows Path Issues:**\n```typescript\n// Use forward slashes or path.join()\nconst config = {\n  reportDir: './playwright-report',  // ✅ Good\n  // reportDir: '.\\\\playwright-report',  // ❌ Avoid\n};\n```\n\n**Linux Permission Issues:**\n```bash\n# Fix file permissions\nchmod +x node_modules/.bin/playwright-report-uploader\n\n# Or use npx\nnpx playwright-report-uploader\n```\n\n### Debug Mode\n\nEnable debug logging:\n\n```bash\n# Enable debug mode\nexport DEBUG=playwright-report-uploader:*\n\n# Run with verbose logging\nnpx playwright-report-uploader --verbose\n```\n\n### Performance Optimization\n\n**Large Reports:**\n```typescript\nconst config = {\n  provider: 'aws',\n  reportDir: './playwright-report',\n  awsBucket: 'my-bucket',\n  // Optimize for large files\n  multipartThreshold: 20971520,  // 20MB\n  partSize: 10485760,            // 10MB\n  maxConcurrentParts: 5\n};\n```\n\n**Parallel Uploads:**\n```typescript\nconst config = {\n  provider: 'aws',\n  reportDir: './playwright-report',\n  awsBucket: 'my-bucket',\n  maxConcurrentUploads: 3  // Upload 3 files simultaneously\n};\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Development Setup\n\n```bash\n# Clone repository\ngit clone https://github.com/dreamquality/playwright-report-uploader\ncd playwright-report-uploader\n\n# Install dependencies\nnpm install\n\n# Run in development mode\nnpm run dev\n\n# Run tests\nnpm test\n\n# Build project\nnpm run build\n\n# Check code quality\nnpm run lint\nnpm run lint:fix\n```\n\n### Release Process\n\n```bash\n# 1. Update version\nnpm version patch|minor|major\n\n# 2. Build and test\nnpm run build\nnpm test\n\n# 3. Publish\nnpm publish\n\n# 4. Create GitHub release\ngit push origin main --tags\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🆘 Support\n\n- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/dreamquality/playwright-report-uploader/issues)\n- 💬 **Discussions**: [GitHub Discussions](https://github.com/dreamquality/playwright-report-uploader/discussions)\n- 📖 **Documentation**: [Full Documentation](https://github.com/dreamquality/playwright-report-uploader#readme)\n- 📧 **Email**: support@playwright-report-uploader.com\n\n## 🙏 Acknowledgments\n\n- [Playwright Team](https://github.com/microsoft/playwright) for the amazing testing framework\n- [AWS SDK](https://github.com/aws/aws-sdk-js) for S3 integration\n- [Azure SDK](https://github.com/Azure/azure-sdk-for-js) for Blob Storage integration\n- [Google Cloud SDK](https://github.com/googleapis/nodejs-storage) for Cloud Storage integration\n\n---\n\n**⭐ If this project helped you, please give it a star!**\n\n[![GitHub stars](https://img.shields.io/github/stars/dreamquality/playwright-report-uploader?style=social)](https://github.com/dreamquality/playwright-report-uploader/stargazers)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamquality%2Fplaywright-report-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamquality%2Fplaywright-report-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamquality%2Fplaywright-report-uploader/lists"}