A MongoDB reporter for Playwright test results that saves suite and test outcomes directly to a MongoDB database. Current stable version is 0.1.7. The package is maintained and follows Playwright's release cadence. It supports both connection string and credential-based MongoDB authentication, and uniquely allows splitting test and suite titles into common and unique parts using a '-|-' separator for better organization. Ships TypeScript types. Requires @playwright/test ^1.49.1 and Node >=18.
npm install playwright-mongodb-reporterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Playwright config using playwright-mongodb-reporter with MongoDB connection string and database options.
Update @playwright/test to ^1.49.1 or later, and ensure Node >=18.
Provide either mongoUri or credentials, not both.
Replace credentials with mongoUri connection string.
Avoid using '-|-' in your test titles unless you intend to use the split feature.
Use default import: import MongoReporter from 'playwright-mongodb-reporter'
Design tests to be idempotent or use a cleanup mechanism for partial runs.
Change import to: import MongoReporter from 'playwright-mongodb-reporter'
Ensure you provide either mongoUri (string) or credentials object in the reporter options.
Run: npm install playwright-mongodb-reporter @playwright/test@^1.49.1
Make sure to pass an options object with at least mongoUri or credentials.