1. Home
  2. OpKey Help
  3. 16. External Tool Integration with OpKey Accelerator
  4. 16.2 Using ALM specific OpKey Keywords

16.2 Using ALM specific OpKey Keywords

Overview:

There are few new keywords added in OpKey which helps user to perform particular task. By using these keywords, you can log defect in ALM, create ALM Test Run, create ALM Test Run Step, upload attachment and update ALM Test Run.

These keywords are described as follows:

  1. CreateALMTestRun: Used to create a Test Run
  2. CreateALMTestRunStep: Used to create a Test Run Step
  3. UploadALMAttachment: Used to upload the execution attachment file
  4. UpdateALMTestRun: Used to update the ALM Test Run

Before using these keywords in a Test Case, you must ensure that ALM is configured successfully and your Test Case is mapped with the ALM Test Plan and Requirement, as required.

For detailed information about ALM, you can refer: Working with ALM

Let us first create a Test Plan in the ALM.

Select Test Plan under Testing tab and create a new Test Plan, as shown below.

Now, we need to create a Test Set ID in the Test Lab under Test Lab.

Select Test Lab and create a new Test Set, as shown below.

ALM Server allows you to execute your Test Plan by adding them to Test Sets under Test Labs. Let us see how to add Test Plan(s) to the Test Sets and execute them.

Select the Test Set, click Execution Grid tab and select the desired Test Plan to map within the Test Set, as shown below.

Further you can execute your Test Set by using ALM specific keywords integrated to OpKey Accelerator.

Let us create a Test Case by adding these keywords.

1. CreateALMTestRun:

This keyword is used to create a Test Run in ALM. It takes two mandatory Data Input Arguments (TestSetId and TestPlanId).

Go to the Test Lab section in ALM and look for the Test Set ID. Navigate to the Test Plan in ALM and look for the Test Plan ID. Enter both IDs as data input arguments as shown below.

Save Output of this Test Step which can be further used. (Here, Run ID)

Adding a Function Library: 

Let us add a Function Library which would get Fail and it results logging a new defect in ALM. Here, you can view that the mandatory data input arguments are not provided so that it get failed.

2. CreateALMTestRunStep:

This OpKey keyword is used to create a Test Run Step in ALM. It takes two mandatory Data Input Arguments (TestRunId and TestStepName).

Go to the Data Input Argument tab, choose Step Output and map Step Output of first step (as Run ID) here as TestRunId. Enter Step 1 as TestStepName as data input argument.

3. UploadALMAttachment:

This OpKey keywords helps you to upload attachment in ALM. It takes three Data Input Arguments (TestRunID, TestStepName and ExternalFilePath).

Go to the Data Input Argument tab, choose Step Output and map step out put of your first test step (as Run ID).

Enter Step 1 as TestStepName and provide file path to be uploaded on ALM/

4. UpdateALMTestRun:

This OpKey keyword is used update the ALM Test Run. It takes only one Data Input Argument (TestRunId).

Go to the Data Input Argument tab, choose Step Output and map step out put of your first test step (as Run ID).

Save your Test case and execute it.

Once execution process has completed, you can view that there is a new Test Run created.

Open the Test Run to view detailed information. Here, you can view Status, Test Set Name, Test Instance, Configuration ID etc.

You can open the Reports as failed.

You can select the Steps link to view the Step.

You can click on the attachment link and open the attachments.

You can have a look at the attachment report, as shown below.

Was this article helpful to you? Yes No