Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
playwright-testmo-reporter
Advanced tools
Playwright Testmo Reporter is a specialized test reporter designed for integration with the Testmo test management SaaS platform. It's crafted to generate a JUnit XML file that includes test steps, links to attachments, and details of fails, passes, etc. The project is written in TypeScript and aims to provide a seamless and lightweight experience.
fast-xml-parser
) to generate XML data.Installing the Playwright Testmo Reporter is a breeze. Simply run the following command:
npm install --save-dev playwright-testmo-reporter
To configure the reporter, add it to your playwright.config.ts
file. That's all you need to do to set it up!
Example playwright.config.ts
file:
import { TestmoReporterOptions } from "playwright-testmo-reporter";
...
reporter: [
[
'playwright-testmo-reporter',
{
outputFile: 'testmo/testmo.xml', // Optional: Output file path. Defaults to 'testmo.xml'.
embedBrowserType: false, // Optional: Embed browser type in the XML file. Defaults to false.
embedTestSteps: true, // Optional: Embed test steps in the XML file. Defaults to true.
testStepCategories: ["hook","expect","pw:api","test.step"], // Optional: Test step categories to include in the XML file. Defaults to ["hook","expect","pw:api","test.step"]. Possible options are "hook", "expect", "pw:api", "test.step".
testTitleDepth: 1, // Optional: Test case title depth to report in the XML file. Defaults to 1. Increase this to 2 include suite name. Increase this even further to include the path.
includeTestSubFields: false, // Optional: Include test sub fields in the XML file. Defaults to false.
attachmentBasePathCallback: (basePath) => `http://playwright-s3.services.mycompany.example:9000/test/${TEST_RUN_UUID}/` + basePath.split(/[\\/]/g).join('/'), // Optional: Specify a callback which accepts and returns a string to generate a custom attachment base path. Useful for referring to an artifact storage location for example.
} satisfies TestmoReporterOptions
]
]
...
Or for JavaScript, example playwright.config.js
file:
...
reporter: [
[
'playwright-testmo-reporter',
{
outputFile: 'testmo/testmo.xml', // Optional: Output file path. Defaults to 'testmo.xml'.
embedBrowserType: false, // Optional: Embed browser type in the XML file. Defaults to false.
embedTestSteps: true, // Optional: Embed test steps in the XML file. Defaults to true.
testStepCategories: ["hook","expect","pw:api","test.step"], // Optional: Test step categories to include in the XML file. Defaults to ["hook","expect","pw:api","test.step"]. Possible options are "hook", "expect", "pw:api", "test.step".
testTitleDepth: 1, // Optional: Test case title depth to report in the XML file. Defaults to 1. Increase this to 2 include suite name. Increase this even further to include the path.
includeTestSubFields: false, // Optional: Include test sub fields in the XML file. Defaults to false.
attachmentBasePathCallback: (basePath) => `http://playwright-s3.services.mycompany.example:9000/test/${TEST_RUN_UUID}/` + basePath.split(/[\\/]/g).join('/'), // Optional: Specify a callback which accepts and returns a string to generate a custom attachment base path. Useful for referring to an artifact storage location for example.
}
]
]
...
Once installed and configured, all you have to do is run your tests:
# Run all tests
npx playwright test
The rest works like magic. You'll have the JUnit XML file generated with all the required details.
After the tests have run, you need to use the Testmo CLI tool to import the data into Testmo.
fast-xml-parser
@playwright/test
, playwright-core
(usually already installed in a Playwright project)You can find the package on NPM at playwright-testmo-reporter.
For any issues, queries, or contributions, please refer to the official repository or reach out to the Testmo contacts provided in the package documentation.
Please refer to the license file in the repository for information on the usage terms and conditions.
Happy Testing with Playwright and Testmo! 🚀
FAQs
A Playwright Reporter for the Testmo SaaS.
The npm package playwright-testmo-reporter receives a total of 12,882 weekly downloads. As such, playwright-testmo-reporter popularity was classified as popular.
We found that playwright-testmo-reporter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.