UNPKG

tdpw

Version:

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

100 lines (84 loc) • 3.4 kB
"use strict"; /** * Help command implementation */ Object.defineProperty(exports, "__esModule", { value: true }); exports.HelpCommand = void 0; /** * Help command to display usage information */ class HelpCommand { name = 'help'; description = 'Display help information'; /** * Execute the help command */ async execute(_options) { console.log(` šŸ¦• TestDino Playwright CLI Upload Playwright test reports to TestDino platform with ease. USAGE: npx tdpw <report-directory> [options] ARGUMENTS: <report-directory> Directory containing Playwright test reports OPTIONS: -t, --token <value> TestDino API token (required) --upload-images Upload image attachments (screenshots) to TestDino server --upload-videos Upload video attachments to TestDino server --upload-html Upload HTML reports with images and videos to TestDino server --upload-traces Upload trace files to TestDino server (not implemented yet) --json-report <path> Specific JSON report file path --html-report <path> Specific HTML report directory path --trace-dir <path> Specific trace files directory path -v, --verbose Enable verbose logging --dry-run Validate without uploading -h, --help Display this help message --version Show version number EXAMPLES: # Basic upload (JSON only) npx tdpw ./playwright-report --token="trx_dev_abc123..." # Upload with image attachments npx tdpw ./test-results --upload-images --token="$TOKEN" # Upload with images and videos npx tdpw ./test-results --upload-images --upload-videos --token="$TOKEN" # Upload complete HTML bundle (includes images and videos) npx tdpw ./test-results --upload-html --token="$TOKEN" # Dry run to validate setup npx tdpw ./playwright-report --dry-run --verbose FLAG COMBINATIONS: No flags: Only JSON report uploaded --upload-images: JSON + image attachments --upload-videos: JSON + video attachments --upload-images --upload-videos: JSON + images + videos --upload-html: JSON + HTML + images + videos (complete bundle) ENVIRONMENT VARIABLES: TESTDINO_API_URL API endpoint (development only) TESTDINO_TOKEN API authentication token TESTDINO_UPLOAD_IMAGES Upload image attachments (true/false) TESTDINO_UPLOAD_VIDEOS Upload video attachments (true/false) TESTDINO_UPLOAD_HTML Upload HTML reports (true/false) TESTDINO_UPLOAD_TRACES Upload trace files (true/false) TESTDINO_VERBOSE Enable verbose logging (true/false) CI/CD INTEGRATION: GitHub Actions: - name: Upload Test Results run: npx tdpw ./playwright-report --token="\${{ secrets.TESTDINO_TOKEN }}" --upload-html GitLab CI: script: - npx tdpw ./playwright-report --token="$TESTDINO_TOKEN" --upload-html Jenkins: sh 'npx tdpw ./playwright-report --token="$TESTDINO_TOKEN" --upload-html' TOKEN FORMAT: API tokens must follow the format: trx_{environment}_{64-character-hex} Examples: - trx_development_a1b2c3d4e5f6... - trx_staging_x1y2z3a4b5c6... - trx_production_m1n2o3p4q5r6... For more information and documentation, visit: šŸ“– https://docs.testdino.com/cli šŸ› https://github.com/testdino/playwright-cli/issues `); } } exports.HelpCommand = HelpCommand; //# sourceMappingURL=help.js.map