testreport-io
v1.0.10
Published
A CLI tool for uploading test reports to the TestReport dashboard (https://testreport.io/). Easily integrate your test results into TestReport for better visualization and analysis.
Downloads
95
Readme
TestReport.io
Integrate test report generation with the frameworks, bug tracking systems, and infrastructure providers you already use to streamline the development and testing process.
Installation and Setup
Follow these steps to set up TestReport.io in your project.
Step 1: Create Configuration File
Create a configuration file named testreport.config.js
in the root directory of your Playwright project. Then, paste the following code inside the file:
module.exports = {
projectAccessKey: 'Project Access Key',
projectBaseUrl: 'Project Base URL',
targetDir: '<generated test report index.html directory path>',
screenshotsDir: '<screenshots directory path>',
}
Step 2: Install testreport-io Dependency
Add the testreport-io dependency to your project by running the following command:
npm install testreport-io
Step 3: Add the Upload Script
Add the following script to your package.json file to enable uploading your test reports:
{
"scripts": {
"upload": "testreport-io upload"
}
}
Step 4: Set sourceFilePath
Set the path of the index.html file in your project where the file is generated inside the OutputDirectory tag.
<sourceFilePath>add your project test file path</sourceFilePath>
Step 5: Set screenshotPath
Set the screenshot path to the image directory of your project to capture failed test cases.
/playwright/screenshots
Step 6: Run the Upload Command
Run the following command in your terminal to upload the test report:
npm run upload