Back to QMetry All Products Help Page
Import Test Results using Gradle Plugin
QMetry Test Management plugin for Gradle has been designed to seamlessly integrate your gradle project with QMetry.
QTMGradlePlugin uploads result file(s), generated in a Gradle project, to QMetry. The plugin, if used in a gradle project, provides an additional gradle task "qtmUploadResults".
Using the Plugin
You can use the plugin from anywhere in your gradle project, by including the following code in the 'build.gradle' file.
Code Snippet
plugins { id 'com.qmetry.QTMGradlePlugin' version '1.0' } qtmConfig { qtmUrl='https://testmanagement.qmetdry.com/' qtmAutomationApiKey='zEzs7iy77D8ARWX8xMFzJRZTzb66W0LCyaK6xdec' automationFramework='JUNIT' testResultFilePath='/test-results/test/TEST-ispl.sample.AppSecondTest.xml' testSuiteId='STR-TS-01' project='Demo Project' platform='Chrome' release='Default Release' cycle='Default Cycle' build='Demo Build' }
Use the following command from your project.
gradle test qtmUploadResults
The task qtmUploadResults always refers qtmConfig in build.gradle file of your project.
Provide the following details.
Parameter | Type | Required | Description |
qtmUrl | string | Yes | URL to QMetry Test Management instance |
qtmAutomationApiKey | string | Yes | Automation Key |
automationFramework | string | Yes | Supported frameworks are:
|
testResultFilePath | string | Yes | Path to result file (or directory for multiple files) relative to build directory |
testSuiteId | string | No | Id or Entity key of the target test suite. |
project | string | Yes | Project Id or Project Key or Project name |
platform | string | No | Platform Id or Platform Name |
release | string | No | Release Id or Release name |
cycle | string | No | Cycle Id or Cycle Name |
build | string | No | Build Id or Build name |
Working Sample
Please look at Sample projects sections for a more concrete end-to-end example.
Back to QMetry All Products Help Page