PFLB logo
Introducing Our Cutting-Edge Load Testing Platform
Be the First to Join Our Exclusive Beta Testing and Unlock a 1-Month Free Subscription to the PFLB Standard Plan!

API Micro Focus ALM and Performance Center: Basics for Performance Testing Engineers

In this post, we are sharing our experience of using API Micro Focus ALM in the hope that load testing engineers who use LoadRunner or Performance Center will find it interesting. Working with API is useful for test automation, and/or to prepare for test launch with Jenkins or similar tools. We collected this list of examples and useful functions based on our experience, but you might also find good tips on Micro Focus’s own webpage.

Reading further, you will find a description of the main actions needed when creating an automation tool using the API service Application Lifecycle Management (ALM), which is used primarily to manage LoadRunner projects. The version we used when writing this post was ALM 12.60.

Table of Contents

Looking for performance and load testing provider?

Drop us a line. Most likely, we have already dealt with problems like yours in the previous 300 projects.

Test automation

What is test automation?

Automated testing is a method in software testing that leverages automation tools to control the execution of tests instead of a human tester. It then compares actual test results with predicted or expected results. Automated testing offers greater efficiency and faster time-to-market for your projects. In PFLB, we often automate tests using HP ALM or Performance Center to save our clients’ time and money.

Where to use automated tests?

Automated tests are widely used in regression testing, during development, in DevOps, and even in production environments. With mobile test automation, you can quickly scale your tests and boost coverage to accelerate delivery. Of course, no software can operate without an experienced testing engineer, otherwise we wouldn’t have 400+ of them on staff, but automated tests save time of these highly valuable specialists, letting them focus on challenging tasks instead of manually running the tests.

What is HP ALM?

HP ALM (Application lifecycle management) is a web-based tool that helps organizations to manage the application lifecycle right from project planning, requirements gathering, until testing and deployment, which otherwise is a time-consuming task. It enables all the stakeholders, namely, project managers, developers, testers, product owners, and business analysts, to interact and coordinate to achieve the project goals.

You will find some basics of how to use the API service Application Lifecycle Management (ALM) in the next part of the article. We do hope it will help you automate testing for your project.

API Micro Focus ALM and Performance Center 1



The full address is formed according to the following formula:

Url + /API_TYPE/rest/domains/ + Domain + /projects/ + Project + …

An example:


Most of the pages can be viewed in both API ALM and API Performance Center (hence, both are mentioned above as API_TYPE).

/qcbin/ – API ALM

Main pages:

  • runs
  • tests
  • test-instances
  • test-folders
  • defects

/LoadTest/ – API Performance Center

Main pages:

  • runs
  • tests
  • testInstances

Except for the syntax in the names of the pages, most of the actions in these two APIs are the same.

Main Pages


Contains data on test runs.



You can request data about a specific test run:

…/runs?query={…} – filtering by query

…/runs/11111 – data on the test run with ID 11111

Actions with a specific running test:

…/runs/11111/Extended – extended data on the run

…/runs/11111/stopNow – stop the running test

If /runs/ contains many tests, a request without a date may return only a partial list.


Contains scripts for the Project.



An example of a request:

…/tests/11111 – data for a script with ID 11111


Contains test instances needed for launch.



An example of a request:

…/test-instances/11111 – data for an instance with ID 11111

Read further to find out how to authorize, which parameters to use, and what operations to apply in ALM.

Authorization in ALM

Sends a GET-request to an address:


With headers:

  • Content-Type: application/json
  • Authorization: Basic [authorization code]

An example of setting headers in Java:

HttpHeaders httpHeaders = new HttpHeaders();

httpHeaders.setAccept(Arrays.asList(new MediaType[]{MediaType.APPLICATION_JSON}));



httpHeaders.set(“Authorization”,”Basic [authorization code]“);

Cookies are selected from the response:

  • LWSSO_COOKIE_KEY – for authorization
  • QCSession – to keep the session alive
  • XSRF_TOKEN – to keep the session alive

Those cookies are attached to further requests to ALM in the Cookie header.

An example of an attached Cookie in Java:

httpHeaders.set(“Cookie”, almdto.getLWSSO_COOKIE_KEY());







API Micro Focus ALM and Performance Center 2

Want to avoid performance testing mistakes?

Just hand it over to us. Drop us a line to find out what our team can do for you.




  • GET
  • HEAD

It includes the response format. Such a request is equal to using the header Accept.






  • GET for lists.

It brings back particular fields of elements from the list instead of all the fields. You can’t use it for singular elements.

Fields are divided with a comma. Fullstop shows which element of the page is the field related to.


…/tests?fields=id – ID field for all the scripts

…/tests?fields=id,name – ID and name fields for all the scripts

…/tests?fields=id, – ID and fields for all the scripts

…/tests?fields=id,, – ID, and fields for all the scripts



  • GET
  • POST

Sorts results by a determined parameter. Fields and ascending/descending sorting can be included in the parameter.

Fields are put in squiggle brackets and divided by semicolon. Type of sorting is put in square brackets after the field name. Default sorting type is ascending.

  • [ASC] – ascending
  • [DESC] – descending




…/tests?order-by={id[ASC]} – sort by ID, ascending.

…/tests?order-by={status[DESC];name[ASC]} – sort by status, descending, and name, ascending.

…/tests?order-by={status;name[ASC]} – sort by status, ascending, and by name, ascending.

Used with fields:


If order-by parameter is not used, default sorting is by ID of the element.



  • GET
  • POST

Used to limit the size of the response or the number of elements used.

Possible values:

  • number of elements on the page
  • max – maximum size possible (2,000 elements by default)


…/tests?page-size=10 – retrieves the first 10 scripts

…/tests?page-size=max – retrieves 2,000 elements max.



  • GET
  • POST

After a question mark, you can use parameter query={…}. Put the field names in squiggle brackets to mention the fields that will be used for filtration.

Formatting for page fields:


Comparison operators: >, <, >=, <=, =, <>

Logical operators: and, or, not

Semicolon is used for separation, equal to logical operator AND. Other logical operators between the fields are not supported.




Absence of a special sign means an equal mark:


Several parameters in one request are separated by a semicolon:




Example of a query request in Java:

String parametr = “{test-id[\”” + testId + “\”]}”;

ResponseEntity<String> response = + “/testInstances?query=




String.class, parametr);

Read further to find out what operations can be used in ALM.
API Micro Focus ALM and Performance Center 3

Not experienced in load testing?

Leave it to us. We will set it all up once and for all.
Drop us a line to find out what our team can do for you.

Operations with elements



  • POST
  • GET

To view a full list of elements, send POST or GET request with an empty body to the page address.


To view data on a particular element from the list, add the element ID after the page name.


For more particular requests, go back to section Parameters above.

Create an element


  • POST

Content (a script, a defect, etc.) in ALM can be created by using POST method to send the code of the element to an xml or json page.



Request body:

<Entity Type=”defect”>


<Field Name=”detected-by”>



<Field Name=”creation-time”>



<Field Name=”severity”>



<Field Name=”name”>

<Value>Some Description</Value>




You can create several elements at a time this way. It is necessary to include one of the headers to do so:

  • content-type=”application/xml;type=collection”
  • content-type=”application/json;type=collection”




To delete an element, send a request using DELETE method to the element’s address. The adress will be the same as for viewing, but for the method change.




– delete the script with ID 11111

Parameter used: ids-to-delete

This parameter allows to delete several elements at a time. To do so, use DELETE method to address the whole list, and then mention IDs of elements you want to delete, separated by a comma.


domains/LT_EFS/projects/GOS_LT_EFS/tests?ids-to-delete=11111,22222,33333 – delete scripts with IDs 11111, 22222 and 33333.

Parameter used: force-delete-children

This parameter is used to delete child directories when deleting a directory from test-folders.

Possible values:

  • y – yes
  • n – no

If the parameter force-delete-children is not used, child directories are not deleted by default.


…/test-folders/11111?force-delete-children=y – to delete child directories, where 11111 is an ID of a directory.



  • PUT

You can change an element by using method PUT to send new values for the fields changed in xml or json.


Request body:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>

<Entity Type=”defect”>


<Field Name=”description”>

<Value>This is new description</Value>




You can use the same way to change several elements at a time. To do so, put the element ID in the xml instead of the address. Include one of the headers, too:

  • content-type=”application/xml;type=collection”
  • content-type=”application/json;type=collection”
API Micro Focus ALM and Performance Center 4

Have a Project in Mind?

We have been working on performance testing projects since 2008.

Drop us a line to find out what our team can do for you.

vertical divider
Clutch badge orig
European Testing awards 2019 badge
Techreviewer 2022 badge orig
CTA performance testing


Automating performance testing saves either the time of your staff members, or of the contractor who is running the tests. Thus, in both cases, it saves customer’s money. Although there are many tools for test automation, performance testing does not yield effective results without the eye of an experienced engineer. Make sure you have one on your team, or let us know if we can help! Our expertise with 300+ projects and 400+ staff engineers lets us share our knowledge to make your application the best version of itself.