CI/CD Rules

QTM4J provides the ability to trigger automation jobs for CI/CD tools from QTM4J application to trigger automated testing pipelines with a single click. Testers can save remote CI/CD pipeline jobs and launch the jobs directly from QTM4J. Testers can select and map a configured rule to a test cycle, then trigger the pipeline job and automate the uploading of the results after the successful execution of the job. This feature enables all testers to participate in test automation and also reduces the overhead of navigating between multiple tools by automating the testing process and reporting results.

In QTM4J, users can create and trigger the Automation Rules from Automation module and Test Cycle module. Rules added in a project are accessible by all the users of that project.

  • Creating CI/CD Rule in QTM4J for Jenkins

    • Configuring CI/CD Rule to Pass Dynamic Parameters to Test Cycles

  • Triggering CI/CD Rule from Automation module

  • Triggering CI/CD Rule from Test Cycle module

    • Linking CI/CD Rule with Test Cycle

    • Triggering CI/CD Rule from Test Cycle

    • Triggering CI/CD Rule from Test Cycle List View

    • Editing CI/CD Rule from Test Cycle

    • Unlinking CI/CD Rule from Test Cycle

    • Viewing Audit Logs in Test Cycle

  • Viewing Details and History

  • Disabling a CI/CD Rule

  • Deleting a CI/CD Rule

Creating CI/CD Rule in QTM4J for Jenkins

You can configure CI/CD Rules in the Automation module and Test Cycle module of QTM4J. This section describes how to configure the CI/CD Rule from the Automation module. For details about configuring CI/CD Rules from the Test Cycle module, refer to Create CI/CD Rules from Test Cycle module.

Required Permission: You must have the CI/CD View and CI/CD Add/Edit permissions to create the rule.

Note: QTM4J just facilitates the triggering of builds to the CI/CD tools. The resultant action or outcome of triggering the build, including the import of test results back to QTM4J, is not part of the feature. Though you can import the results back to QTM4J using multiple methods when configured as part of the Job. Multiple methods are Jenkins Plugin, Maven Plugin, etc.

Perform the following steps to configure the CI/CD Rule:

1. In QTM4J, go to the Automation module.

2. Open the CI/CD Rules section.

3. Click the Create New Rule button on the screen.

{ "projectId": 16400, "summary": "test case from cycle : $testcycle.key (desc - all parameters)", "description": "KEY = $testcycle.key \n ID = $testcycle.id \n PROJKEY = $testcycle.projectkey \n LABEL = $testcycle.label \n COMPONENT = $testcycle.component \n FIXVERSION = $testcycle.fixversion \n SPRINT = $testcycle.sprint \n STARTDATE = $testcycle.plannedstartdate \n ENDDATE = $testcycle.plannedenddate \n PRIORITY = $testcycle.priority \n STATUS = $testcycle.status", "folderId": 3171 }

Triggering CI/CD Rule from Automation module

You can see the configured CI/CD rules in the CI/CD Rules section of the Automation module.

Required Permission: You must have the CI/CD View and CI/CD Trigger permissions to create the rule.

If you are triggering the CI/CD rule with test cycle parameters from the Automation module, the rule does not dynamically pass the test cycle parameters; instead, it passes a blank value.

Click on the Trigger icon for the rule using which you want to trigger a job in Jenkins.

Required Permission: You must have the CI/CD View and CI/CD Trigger permissions to create the rule.

You can configure CI/CD rules to dynamically include test cycle parameters. Triggering a CI/CD rule from a test cycle automatically populates the appropriate test cycle attributes. Refer to Dynamic Parameter Passing to Test Cycles for more information.

Perform the following steps to trigger the CI/CD Rule from the Test Cycle module:

1. Go to the Test Cycle module.

2. Open the test cycle detail page.

3. Click on the Trigger CI/CD Rule button at the top of the screen.

Required Permission: You must have the CI/CD View and Test Cycle Edit and Archive permissions to link or unlink the CI/CD Rules with test cycles.

Follow the steps mentioned below to link the CI/CD Rule with a test cycle.

1. Go to the Test Cycle module.

2. Open the test cycle details page.

3. Click on the Trigger CI/CD Rule button at the top of the screen.

The Select CI/CD Rule panel opens with a list of rules.

4. Select the CI/CD Rule that you want to link with the current test cycle.

Required Permission: You must have the CI/CD View and CI/CD Add/Edit permissions to create the rule.

Required Permission: You must have the CI/CD View and CI/CD Add/Edit permissions to disable the rule.

Perform the following steps to disable a CI/CD Rule:

1. Go to the Automation module.

2. Open the CI/CD Rules section.

3. Turn the Status inactive for the rule that you want to disable.

Required Permission: You must have the CI/CD View and CI/CD Delete permission to create the rule.

Steps:

1. Go to the Automation module.

2. Open the CI/CD Rules section.

3. Click on the Delete icon for the rule that you want to delete.

Publication date: