UNPKG

tdpw

Version:

CLI tool for uploading Playwright test reports to TestDino platform with Azure storage support

161 lines (121 loc) โ€ข 6.2 kB
# Changelog All notable changes to the TDP (TestDino Playwright) CLI will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.0.0] - 2025-06-17 ### ๐ŸŽ‰ Initial Release This is the first public release of the TDP (TestDino Playwright) CLI for uploading Playwright test reports. ### โœจ Features Added #### Core Functionality - **Smart File Discovery** - Automatically discovers Playwright JSON reports, HTML reports, and trace files - **Azure Storage Integration** - Uploads HTML reports and trace files to Azure Blob Storage using SAS tokens - **TestDino API Integration** - Uploads test results and metadata to TestDino platform - **Comprehensive Metadata Collection** - Automatically gathers Git, CI/CD, and system information #### CLI Experience - **Zero Configuration Setup** - Works out of the box with standard Playwright report structures - **Manual Path Override** - Support for custom file locations via CLI flags - **Environment Variable Support** - Secure token management and configuration - **Progress Tracking** - Real-time upload progress with spinners and percentages - **Verbose Logging** - Detailed output for debugging and troubleshooting - **Dry Run Mode** - Validate configuration without performing uploads #### Error Handling & Reliability - **Robust Retry Logic** - Exponential backoff for network failures with 3 retry attempts - **Graceful Fallbacks** - Continues with JSON-only upload if file uploads fail - **Comprehensive Error Messages** - Clear, actionable error messages with suggested solutions - **Multiple Exit Codes** - Appropriate exit codes for different error scenarios #### CI/CD Integration - **GitHub Actions Ready** - Pre-configured examples and seamless integration - **GitLab CI Support** - Native support with pipeline examples - **Jenkins Integration** - Groovy pipeline examples and configuration - **Azure DevOps Support** - YAML pipeline templates - **Environment Detection** - Automatic CI/CD provider detection and metadata extraction #### Security & Authentication - **Token-based Authentication** - Secure API key authentication with format validation - **Environment-specific Tokens** - Support for development, staging, and production tokens - **Secure Defaults** - No sensitive information logged or exposed ### ๐Ÿ”ง Technical Features #### File Upload Capabilities - **Concurrent Uploads** - Optimal batch processing with 5 concurrent uploads - **File Type Validation** - Automatic filtering of allowed file types (html, css, js, png, jpg, zip, json) - **Size Validation** - Automatic file size checking against server limits - **Content Type Detection** - Proper MIME type detection for all uploaded files #### Smart Discovery Engine - **JSON Report Discovery** - Finds `report.json`, `results.json`, `test-results.json` automatically - **HTML Report Discovery** - Locates directories containing `index.html` and assets - **Trace File Discovery** - Identifies trace directories and `.zip` files - **Fallback Scanning** - Recursive directory scanning when standard patterns aren't found #### Metadata Collection - **Git Integration** - Branch, commit, repository, and author information - **CI/CD Detection** - Automatic detection of GitHub Actions, GitLab CI, Jenkins, and Azure DevOps - **System Information** - OS, CPU, memory, Node.js version, and hostname - **Test Configuration** - Extraction of Playwright browser configs, worker settings, and reporter options ### ๐Ÿ“ฆ Package Distribution #### NPM Package - **Global Installation** - Install globally via `npm install -g tdpw` - **NPX Support** - Run without installation via `npx tdpw` - **Project Dependency** - Add as dev dependency for team workflows - **Binary Executable** - Native `tdpw` command with proper error handling #### Cross-Platform Support - **Node.js 18+** - Support for Node.js 18 LTS and higher - **Multi-OS** - Compatible with Linux, macOS, and Windows - **CI/CD Optimized** - Designed for containerized and cloud environments ### ๐ŸŽฏ Supported Scenarios #### Basic Usage ```bash npx tdpw ./playwright-report --token="trx_development_..." ``` #### Advanced Usage ```bash npx tdpw ./playwright-report \ --token="trx_production_..." \ --upload-html \ --upload-traces \ --verbose ``` #### Custom Paths ```bash npx tdpw ./custom-dir \ --json-report ./custom/results.json \ --html-report ./custom/html \ --trace-dir ./custom/traces ``` ### ๐Ÿ”’ Security Considerations - Token validation with proper format checking - No token exposure in logs or error messages - Secure environment variable handling - HTTPS-only API communication - No local storage of sensitive information ### ๐Ÿš€ Performance Characteristics - **Fast Discovery** - Smart file discovery in under 1 second for typical projects - **Efficient Uploads** - Concurrent file uploads with progress tracking - **Memory Optimized** - Streams large files without loading into memory - **Network Resilient** - Retry logic handles temporary network issues ### ๐Ÿ“‹ Requirements - Node.js 18.0.0 or higher - NPM 9.0.0 or higher - Valid TestDino API token - Playwright test reports in supported format ### ๐Ÿงช Known Limitations - Maximum file size: 2GB per file (Azure limitation) - Supported file types: html, css, js, png, jpg, gif, zip, json, txt - Maximum 3 retry attempts for failed uploads - Requires internet connectivity for uploads ### ๐ŸŽฏ What's Next Future releases will include: - Multi-project upload support - Custom metadata injection - Report filtering and selection - Configuration file support - Watch mode for continuous uploads - Enhanced progress reporting with ETA --- ## Development Notes ### Breaking Changes None - this is the initial release. ### Migration Guide Not applicable - this is the first version. ### Deprecations None in this release. For upgrade instructions and migration guides for future versions, see our [upgrade documentation](https://docs.testdino.com/cli/upgrade). --- **Full Changelog**: https://github.com/alphabin-01/testdino-cli/releases/tag/v1.0.0