How to integrate Playwright results with QTM4J?

This article is intended for users who wish to integrate Playwright results with QTM4J. QMetry supports import for the following framework files that are JUnit, TestNG, QAF, Cucumber, and Specflow. By default the playwright produces a test results file in JUnit format, which can then be imported into QTM4J.

In case the JUnit format test result file is not generated, playwright Test comes with a built-in Junit reporter, which produces a JUnit-style XML report. To generate the report in a JUnit-style XML execute the following commands as appropriate -

  • Bash

    • PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml npx playwright test --reporter=junit

  • Batch

    • set PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml

npx playwright test --reporter=junit

  • PowerShell

    •  $env:PLAYWRIGHT_JUNIT_OUTPUT_NAME="results.xml"

npx playwright test --reporter=junit

Refer to this help guide for more information on Playwright Reporter 

Note: Any questions related to the above steps can be directly raised to playwright support.

Once the test result file is generated in JUnit/XML format that QMetry support uploads it into QTM4J using QTM4J automation. 

Resources -

  1. Import Test results in QTM4J

  2. Test using Junit

For any queries regarding the import of JUnit test results to QTM4J, reach out to QMetry support.