Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel4
outlinefalse
style

...

default
typelist
printablefalse
Info

Automation-related rights are assigned from Customization > Roles. The logged-in user will have access rights over the Agent feature accordingly.

Understanding Agent Concept

Users can define Agent Alias and add tasks for QMetry Agent. On activation, the Agent requests tasks through QMetry. QMetry Automation Agent checks the schedule(s) set in QMetry and executes the automation tests. Users can run Custom Command regardless of Automation Framework or Build Framework. The automation agent can be run immediately or can be scheduled on future dates and times. Users can schedule recurring execution of commands. The execution will be scheduled automatically as per set occurrences. QMetry Agent keeps running the jobs accordingly.

The flow works like this:

  1. Configure QMetry Agent in Integration > Automation Agent. Download the Agent. Run custom command through QMetry Automation Agent wizard.

  2. QMetry Automation Agent will trigger the execution through a custom command, and the test result file will be generated accordingly.

  3. Import the above result file in QMetry using REST API

...

  1. .

QMetry Agent Configuration

Compatibility: QMetry Agent is a Java executable file that needs Open JDK 17.

Automation Agent Key

Use this key to configure QMetry Automation Agent.

To generate an Automation Key, go to Integration > Automation Agent and click on the Generate new Key.

...

image-20241025-051149.pngImage Added

Steps to

...

Configure QMetry Automation Agent

Configure QMetry Automation Agent using UI

Expand
titleExpand to view steps...

Step 1. Go to Integration > Automation Agent.

Step 2. Expand the Download & Run Agent section, if not expanded already.

...

Image Added

Step

...

3. Download QMetryAgent.zip by clicking on the Automation Agent

...

.

...

Image Added

Step 4. Extract

...

QMetryAgent.zip on

...

your computer drive.

Step 5. Open the QMetryAgent folder.

Step 6. Run <QMetry Agent Directory>/ QmetryAutomationAgent.jar by clicking on it.

The QMetry Automation Agent wizard opens.

...

image-20240904-045501.pngImage Added

The QMetry Automation Agent has the following fields on it:

  • URL: The URL of your QMetry Test Management application instance.

  • API Key: Enter Automation Agent Key. To generate the Automation Key, go to Integration > Automation Agent and click on the Generate Key as described under Automation Agent Key above.

  • Agent Name: Enter the name of your preference as Agent Alias to identify the specific agent.

  • Running on VM: Users who want to run the agent on a virtual machine, can do so by setting this configuration. The manual settings are not required.

Interval Time: By default, the interval time between two scheduled jobs will be 180 seconds. You can change the time by modifying the "Interval" parameter in the QMetryAgent.properties. The minimum value should be 60 seconds.

Click on the Start Agent button.

Users can also view logs by clicking on the View Logs button.

...

Image Added

Once the Agent is configured, it will be added to the list of Registered Agents with the Status “Active”.

...

Image Added

Configure QMetry Automation Agent using Command Line

Follow the steps mentioned below to configure QMetry Automation Agent for Windows and Linux/MacOS.

Configure QMetry Automation Agent using Command Line on Windows

Expand
titleExpand to view steps...

Step 1. Go to Integration > Automation Agent.

Step 2. Expand the Download & Run Agent section, if not expanded already.

...

Image Added

Step 3. You will find Agent download and installation instructions on the screen. Download QMetryAgent.zip by clicking on the Automation Agent download link.

...

Image Added

...

The downloaded zip file will be in the format QMetryAgent_A.B.C.zip where A.B.C will be the version of QMetry Agent.

Step 4: Copy the QMetryAgent_A.B.C.zip file to your server. Navigate to the directory where this file is kept and extract the zip file on the computer drive.

...

Image Added

Step 5: Execute the following command to run the agent.

Code Block
startAgent.bat

The QMetry Automation Agent command line wizard will open. Users need to fill required information.

Fields

Description

URL

The URL of your QMetry Test Management application instance.

Key

Enter Automation Agent Key. To generate Automation Key, go to Integration > Automation Agent and click on the Generate Key as described under Automation Agent Key above.

Alias

Enter name of your preference as Agent Alias to identify the specific agent.

Enable Proxy

Users who want to run agent on proxy, can do so by setting this configuration.

Enable VM

Users who want to run agent on virtual machine, can do so by setting this configuration. The manual settings are not required.

...

Image Added

...

This will enable the agent to start automatically when the system reboots.

To stop the running agent: Run stopAgent.bat by clicking on it.

→ Interval Time: By default, the interval time between two scheduled jobs will be 180 seconds. You can change the time by modifying the "Interval" parameter in the QMetryAgent.properties. The minimum value should be 60 seconds.

Configure QMetry Automation Agent using Command Line on Linux / MacOS

Expand
titleExpand to view steps...

Step 1. Go to Integration > Automation Agent.

Step 2. Expand the Download & Run Agent section, if not expanded already.

...

Image Added

Step 3. You will find Agent download and installation instructions on the screen. Download QMetryAgent.zip by clicking on the Automation Agent download link.

...

Image Added

...

The downloaded zip file will be in the format QMetryAgent_A.B.C.zip where A.B.C will be the version of QMetry Agent.

Step 4: Copy the QMetryAgent_A.B.C.zip file to your server. Navigate to the directory where this file is kept and execute the following commands.

Code Block
unzip QMetryAgent_A.B.C.zip

...

Replace A.B.C with the actual version of QMetryAgent.

...

image-20240904-045618.pngImage Added

Step 5: Execute the following commands.

Code Block
chmod +x startAgent.sh

...


chmod +x stopAgent.sh

...

Replace A.B.C with the actual version of QMetryAgent.

...

image-20240904-045721.pngImage Added

Step 6: Run the agent by executing the following command.

Code Block
sh startAgent.sh

The QMetry Automation Agent command line wizard will open. Users need to fill required information.

Field

Description

URL

The URL of your QMetry Test Management application instance.

Key

Enter Automation Agent Key. To generate Automation Key, go to Integration > Automation Agent and click on the Generate Key as described under Automation Agent Key above.

Alias

Enter name of your preference as Agent Alias to identify the specific agent.

Enable Proxy

Users who want to run agent on proxy, can do so by setting this configuration.

Enable VM

Users, who want to run the agent on the virtual machine, can do so by setting this configuration. The manual settings are not required.

...

image-20240904-045824.pngImage Added

...

This will enable the agent to start automatically when the system reboots.

To stop the running agent:

Code Block
sh stopAgent.sh

→ Interval Time: By default, the interval time between two scheduled jobs will be 180 seconds. You can change the time by modifying the "Interval" parameter in the QMetryAgent.properties. The minimum value should be 60 seconds.

Once the Agent is configured, it will be added to the list of Registered Agents with the Status “Active”.

...

image-20241026-094629.pngImage Added

The screen lists all agents added in QMetry with the details of OS, Machine Address, Status (Not Registered, Active, Inactive, Not Applicable), Scheduled,

...

and

...

In Progress.

Filter Options

You can filter the Registered Agents on the following criteria:

  • Alias

  • OS

  • Status

...

After configuring the Agent in Integration > Automation Agent, download and run the Agent

...

. Schedule tasks for the Agent to perform automation testing.

The columns on the screen are described below:

  • Alias: This is Agent Alias mentioned by the user while adding Agent. 

  • OS: Operating System on the hosting machine on which the command will be executed.

  • MAC Address: The machine address of the hosting machine on which the command will be executed.

  • Status: The Agent status could be ‘Active’

...

  • , ‘Inactive’.

    • Active: QMetry Agent is executed to request a schedule from the QMetry application. When you start the agent, it attains ‘Active’ status and remains ‘Active’ till it keeps requesting for schedule from QMetry application at the frequency defined.

    • Inactive: As stated above, QMetry Agent and its connection with QMetry application are checked at a defined interval. If QMetry Agent is not communicating with QMetry application for more than the defined time and it stops requesting for schedule, then the QMetry Agent status is updated as ‘Inactive’.

  • Schedules: The column shows the number of pending schedules and in-progress schedules. For example,

...

  • 4 Scheduled / 2 In-progress.

  • In Progress: This column shows when a scheduled run is currently in execution.

  • Updated At: This is the system date and time when the Agent is added to QMetry.

The Actions column includes the Schedule, History, Manage Schedule and Delete buttons.

  • Schedule Agent: Click on the Schedule button to schedule QMetry Agent run.

Automation Testing

Users can run

...

Automation Testing

Users can run the schedule on the spot or at a specific scheduled date and time.

Note: QMetry Agents can be scheduled irrespective of the Approval workflow if the e-Signature feature is enabled.

Execution Command

Users can run Custom Command regardless of Test Framework or Build Framework. This is a command line input, which you provide on the command line interface. 

Users can trigger and execute more than 255 characters (upto 5000) command through the Automation Agent.

For example,

The following command includes the Project path on your local drive and the test command to trigger the execution in accordance with the language and Framework you use. The result file will be generated in the Project directory accordingly.

  • cd D:\QMetry\cucumber-maven-example-master && D: && mvn test

Schedule Automation Agent Run

You can schedule QMetry Agent to run at your preference.

(A) Run Now

(B) Run Later

  • One Time

  • Recurring

...

the schedule on the spot or at a specific scheduled date and time.

QMetry Agents can be scheduled irrespective of the Approval workflow if the e-Signature feature is enabled.

Execution Command

Users can run Custom Command regardless of Test Framework or Build Framework. This is a command line input, which you provide on the command line interface.  Users can trigger and execute more than 255 characters (up to 5000) command through the Automation Agent.

For example,

The following command includes the Project path on your local drive and the test command to trigger the execution in accordance with the language and Framework you use. The result file will be generated in the Project directory accordingly.

Code Block
cd D:\QMetry\cucumber-maven-example-master && D: && mvn test

Schedule Automation Agent Run

You can schedule QMetry Agent to run at your preference.

(A) Run Now

(B) Run Later

  • One Time

  • Recurring

The agent list screen now displays the total count of tasks 'Scheduled' and 'In Progress' for each agent.

image-20241026-095557.pngImage Added

Scheduling Recurring Test Execution Commands for Multiple Test Suites

You can schedule automation tasks (execution commands) for multiple test suites to recur, run immediately, or execute as a one-time run, all through a single QMetry Automation Agent.

Expand
title(A) Run Now

If you want to execute the Agent job immediately, then select the Run Now option and click Submit.

...

image-20241026-095801.pngImage Added

Expand
title(B) Run Later

You can schedule the agent to run on a future date and time. Scheduling executions helps testers set execution schedules to be run one after the other.

a. One Time Occurrence

To schedule the run only once on particular day and time, select the Run Later option for Schedule and One Time option for Occurrences.

  • Schedule: Run Later

  • Occurrences: One Time

  • Schedule date and time: Open the calendar and select date and time to initiate the Agent job

...

  • and click Submit.

image-20240903-111816.pngImage Added

  • Schedule Date: This is scheduled date to execute the command. By default, the field shows current system date in MM-DD-YYYY format. User can modify the date as per requirement. To pick date from calendar, click the calendar icon adjacent to the field.

  • Schedule Time: This is scheduled

...

  • time to execute the command. Three separate number fields are provided for Hours, Minutes and Seconds. By default, the

...

  • drop-down list shows current system

...

  • time in

...

  • HH: MM: SS format. User can modify the

...

  • time as per requirement

...

Schedule Time: This is scheduled time to execute the command. Three separate number fields are provided for Hours, Minutes and Seconds. By default, the drop down list shows current system time in HH:MM:SS format. User can modify the time as per requirement by selecting the suitable time to execute the command. Schedules will be sent to the agent at the defined time.

b. Recurring Occurrence

...

  • by selecting the suitable time to execute the command. Schedules will be sent to the agent at the defined time.

b. Recurring Occurrence

The Automation Agent supports setting up recurring schedules for multiple test suite executions on the same agent, whether for the same test suite or different. When scheduling an execution command for an agent, all upcoming schedules for the agent are displayed, making it easier for testers to identify overlapping tasks. For multiple execution schedules set for the same time on the same agent, the agent will execute them sequentially on a first-come, first-served basis.

  • Schedule: Run Later

  • Occurrences: Recurring

  • Starting On and Ending On: Select dates using calendar

  • Schedule time: Enter time in HH: MM

...

  • format

  • Recur: Select one frequency from the following and its corresponding option to schedule the QMetry Agent run recurrently.

    • Daily

    • Weekly

    • Monthly

Then click Submit.

...

image-20240903-112003.pngImage Added

Once the Agent is scheduled, the Total Schedules count increases on the Schedule screen.
The task that is immediate on the schedule gets executed. Other scheduled tasks get executed in sequence in accordance with their scheduled date and time.

Manage Schedule

The Manage Schedule option for the agent allows users to alter the scheduled time and execution commands for the run later or recurring triggers.

Steps

1. Go to Integration > Automation Agent.
2. On the Registered Agents section, click on the Manage Schedule button to manage the schedule details of that particular Agent.

...

image-20241026-095920.pngImage Added

On the Manage Schedule Screen, you can Edit or Delete an existing Schedule.

  • Edit Schedule: Click on the Edit Schedule button to Edit the schedule.

  • Delete Schedule: Click on the Delete Schedule button to Delete the schedule.

...

image-20241025-054002.pngImage Added

Edit Schedule

...

1. Click on the Edit icon for the scheduled agent that you want to update.

...

Image Added

The Edit Schedule Agent screen opens.

2. Make required changes in the schedule of the agent.

3. Click Update.

...

image-20241026-100154.pngImage Added

Delete Schedule:

image-20241026-100421.pngImage Added
  1. Go to Integration > Automation Agent.

  2. On the Registered Agents section, click on the Manage Schedule icon.

  3. Click on the Delete icon to delete the schedule.

View QMetry Automation Agent History

  1. Go to Integration > Automation Agent.

  2. On the Registered Agents section, click on the History button to view the schedule details of that particular Agent. A pop-up screen opens that displays the schedule details of the Agent.

...

image-20241026-102038.pngImage Added

On the Automation History page, you can perform the following actions -

  • Refresh the page by clicking on the Refresh icon, at the top right corner, to view the latest execution status of the job.

...

  • You can download logs by clicking on the Download icon under the Action column.

The count of pages is displayed at the bottom of the screen. Navigation buttons are provided to let users navigate through the pages

...

.

...

Delete Agent

  1. Go to Integration > Automation Agent.

  2. On the Registered Agents section, click on the Delete button for the Agent you want to delete.

...

image-20241026-102719.pngImage Added

Import Automation Test Result File

The Agent job is triggered to execute the command as per the set Schedule. The result file is generated in accordance with the command. Use this file to update the test assets and execution status in QMetry.

...

Make sure you upload the result file in QMetry using Postman to update the test execution results in QMetry.

To know more about importing automation test results into QMetry, refer to Import Automation Results through REST API.

Other ways to push automation results into QMetry:

View Test Assets and Test Results in added/updated in QMetry

On successful completion of automation testing, test assets are added/updated to Test Cases and Test Suites modules. 

The test run results are uploaded on the Test Execution screen.

Test Cases

Open the Test Cases module. The test cases imported through automation testing are displayed with the "Automated" Testing Type.

...

image-20241026-103125.pngImage Added

Test Suite

Go to the Test Suites module. You can see the Auto-Generated test suite added in QMetry as a result of automation testing.

...

Image Added

Test Execution Screen

Test execution status of test cases and steps are updated on the Test Execution Screen.

  1. Go to the Test Suites module.  

  2. Open the test suite imported in QMetry as a result of automation testing.

  3. On the Test Execution tab, click on the execution icon.

It opens the Test Execution Screen displaying test execution status of test cases with their test steps.

...

Image Added