playwright-archive
Version:
A lightweight CLI tool to archive and serve your Playwright test run history with a web interface. Useful for CI environments and local development.
63 lines (56 loc) • 1.77 kB
JavaScript
/** @type {import('./types/config').PlaywrightArchiveConfig} */
const config = {
// Server settings
server: {
port: 3000, // Server port (default: 3000)
host: "localhost" // Server host (default: localhost, use 0.0.0.0 for Docker/external access)
},
// Display settings for test metrics and metadata
display: {
// Hide specific metrics from the report
hideMetrics: [
// 'workers', // number of worker processes
// 'projects', // number and names of Playwright projects
// 'duration', // test execution time
// 'totalTests', // total number of tests
// 'passed', // number of passed tests
// 'failed', // number of failed tests
// 'skipped', // number of skipped tests
// 'flaky' // number of flaky tests
],
// Hide passed/failed test suite names in the report
hideTestNames: false
},
// Run results file configuration
runResults: {
enabled: true,
path: './playwright-results.txt',
format: 'text',
include: [
'status',
'summary',
'duration',
'failedTests',
'errorMessages'
],
// You can customize the text output using a template with variables
template: `
Test Run Results
---------------
Status: {status}
Duration: {duration}
Summary:
* Total: {totalTests}
* Passed: {passedTests}
* Failed: {failedTests}
* Skipped: {skippedTests}
{hasFailedTests?
Failed Tests:
{failedTestsList}
Error Messages:
{errorMessages}
:}
`
}
};
module.exports = config;