Step 1: Create Configuration File
testreport.config.js
in the root directory of your Cypress project.Step 2: Install testreport-io Dependency
Install the testreport-io
dependency by executing the following command in your terminal:
npm install testreport-io
Step 3: Add the Upload Script
Include the upload script in your package.json
file to enable automatic uploading of your test reports:
"upload": "testreport-io upload"
Step 4: Set sourceFilePath
Specify the path of the index.html
file within your project where it is generated inside the OutputDirectory
tag.
Example:
<sourceFilePath>add your project test file path</sourceFilePath>
Step 5: Set screenshotPath and videoPath
Configure paths for storing screenshots and videos of failed test cases:
Screenshot Example:
/cypress/screenshots
Video Example:
/cypress/video
Step 6: Run the Upload Command
Execute the upload command to send your test reports to Testreport.io:
npm run upload command on terminal**